salt minion names keep changing - weired

258 views
Skip to first unread message

Sagar Srivastava

unread,
Sep 27, 2013, 7:54:46 PM9/27/13
to salt-...@googlegroups.com

I love this wonderful salt, it has spiced my work life!

My problem is my salt minions keep changing their name ( on reboots,  patching etc ). since names are case sensitive, I have to keep changing top.sls and Node group definition to continue to keep things working.

what is the solution?

Thanks.


Corey Quinn

unread,
Sep 27, 2013, 8:25:36 PM9/27/13
to salt-...@googlegroups.com, salt-...@googlegroups.com
...what are you doing that causes the minion names to reset? Are you not setting the host name persistently or some such?
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Sagar Srivastava

unread,
Sep 27, 2013, 8:38:31 PM9/27/13
to salt-...@googlegroups.com
I have static hostnames, hardcoded in the server using standard redhat kickstart. DNS setup ( by pushing /etc/resolv.conf using salt state.) all works fine.

names keep changing randomly. but it does not happen for all my minions- only some of them. I have not found any pattern yet.
Thanks

Pedro Algarvio

unread,
Sep 28, 2013, 3:17:01 PM9/28/13
to salt-...@googlegroups.com
The simplest solution is to actually name your minions on their configuration files.

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

Best Regards,
--
Pedro Algarvio Pedro Algarvio
Email me @algarvio.me // Find me on LinkedIn // Find me on Twitter // Find me on GitHub // Find me on BitBucket // Find me on Ohloh // Like my work? Tip me on GitTip

Ben Hosmer

unread,
Sep 29, 2013, 9:54:26 AM9/29/13
to salt-...@googlegroups.com
I also name mine directly in their minion configurations.

I set the hostname on my CentOS EC2 machines in /etc/sysconfig/network otherwise they seem to always change on reboot.

Jacob Albretsen

unread,
Jan 16, 2014, 9:49:55 PM1/16/14
to salt-...@googlegroups.com
On Friday, September 27, 2013 04:54:46 PM Sagar Srivastava wrote:
> I love this wonderful salt, it has spiced my work life!
>
> My problem is my salt minions keep changing their name ( on reboots,
> patching etc ). since names are case sensitive, I have to keep changing
> top.sls and Node group definition to continue to keep things working.

I am way late to the party on this, but for archive / posterity purposes....

I'd like to point out a possible cause for this that I encountered for
understanding.

The name of your minion is based on the DNS lookup if something else is not
defined (like id in the minion.conf file). If your DNS has more than one name
for the server, it will grab one of them randomly. Hence, you'll approve the
key under one name, then try to run something, it might fail when it finds the
other name.

The solution like others have said is to assign an id in the minion.conf file.
Or clean out your DNS server of unneeded names. Or in my case it was a little
of each since I had to keep some of the multiple DNS names.
Reply all
Reply to author
Forward
0 new messages