salt: minion_id generation doesn't match the newhostname.

Tested on opensuse_leap42.1.

how to reproduce:

In a new installed machine, with new salt-Minion, before setup the minion itself (so minion-salt-service isn’t started)

  • change the hostname via hostname “NEWHOST”
  • change the file etc/hostname = “NEWHOST”.
  • don’t change the file /etc/hosts
cat /etc/hosts
...
127.0.0.2 OLDHOSTNAM
python -c \'import socket;print  socket.getfqdn()\ '
"NEWHOST"

start the salt-minion-service.

minion_id = OLD

If i modify the /etc/hosts, with the “NEWHOST”, then ; minion_id= “NEWHOST”

I don’t know if is an issue on the documentation or the network.py file, because according the official one documentation , minion_id is setting: 1)The Python function socket.getfqdn() is run 2)/etc/hostname is checked (non-Windows only) 3)/etc/hosts

  • i was thinking that for minion_id was : 1 OR 2 OR 3 and not 1 & 2 & 3
  • issue similar : #25719

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 28 (27 by maintainers)

Most upvoted comments

@MalloZup : In a new installed machine, with new salt-Minion, before setup the minion itself (so minion-salt-service isn’t started)