Minion ID Configuration / Discovery

I'm really wondering when does the minion icon load?

http://docs.saltstack.com/en/latest/ref/configuration/minion.html#std:conf_minion-id

It says the minion id is the default hostname.

When is this value loaded? Every time it starts or every time a system name change is detected?

What happens if someone comes in and changes the hostname manually without informing other people who have access to this minion? Does it reboot automatically or what?

+3


source to share


2 answers


Here's what documentation has to say about generating minion id.

I've tried this myself. I was using ubuntu ec2 instance.



  • When the minion first starts, it uses FQDN

    to set the instance id, so whatever result hostname --fqdn

    was there when the minion first started, which becomes the id.
  • A subsequent restart does not change the identifier, even if you change the hostname.
  • If you want to change the id, you need to manually change it in the minion config

file.

+3


source


You can change the current minion id in /etc/salt/minion_id

.



When I use a Docker container, I usually add hostname > /etc/salt/minion_id

to docker-entrypoint.sh

or to a Dockerfile. If you do, remember to start the salt minion after changing the minion_id (not before).

+1


source







All Articles