You should examine your hostname resolution settings - not only your DNS configuration (/etc/resolv.conf) but also '/etc/hosts' and most importantly '/etc/nsswitch.conf'. On the CN, NetworkManager will perform a reverse lookup of the host's IP address, so you just need to control the answer that it gets. I find this command particularly helpful when debugging these things: 'getent hosts <name_or_IPaddr>' This command does exactly what getHostNameByAddr() and getHostAddrByName() would do by consulting 'nsswitch.conf' and the databases that it lists for 'hosts'. Barring some organizational policy, you have full control of how the names are mapped to IP addresses, usually via the 'hosts' file, but sometimes with the DNS server running on the head node if you enable that.
In short, focus on the source of answers rather than the processes that set or change the hostname values. -Russ > On April 22, 2020 at 1:49 PM Thomas HUMMEL <thomas.hum...@pasteur.fr> wrote: > > > Hello, > > I'm successfully using xCAT 2.15.1 to provision CentOS 8.1 stateless nodes. > > For that matter my osimage has got the confignetwork -s postscript > configured. > > By default genimage does not generate a hostname-mode directive in > NetworkManager.conf(5) causing it to have its default value. > > This causes the following behavior : > > - osimage without confignetwork -s : node hostname ends up being a non > fqdn name (ex: maestro-1000) : this is good > > - osimage with confignetwork -s : node hostname ends up being the fqdn > name : (ex : maestro-1000.maestro.pasteur.fr) : this is to me not > recommended and anyway not consistent with the above case > > This is because DHCP sends the non fqdn hostname and dracut/initrd sets > the transient hostname to the fqdn hostname and, according to the > semantic of the default value of NetworkManager(5) hostname-mode, the > original hostname (i.e. initrd/dracut fqdn one in this case) is restored > once the DHCP connection is deactivated, which is the case when the > xcat- static profile is created by confignetwork -s takes over. > > This can be worked around by inserting into the image the > hostname-mode=none NetworkManager.conf(5) setting. > > However I saw in configeth script code (which is called be > confignetwork) that the transient hostname is set using the hostname(1) > command (hostname $NODE) > > I think it may be the problem as NetworkManager has no way to be aware > of it (as it uses systemd-hostnamed service as a proxy). > > Wouldn't configeth rather use dbus-send or hostnamectl(1) --transient to > achieve the same ? > > What do you think ? > > Thanks for your help > > -- > Thomas HUMMEL > > > _______________________________________________ > xCAT-user mailing list > xCAT-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/xcat-user _______________________________________________ xCAT-user mailing list xCAT-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xcat-user