Worker and storage nodes currently support pxeboot-N hostname
nslookup resolution because they dhcp for their pxeboot network
lease address provided by dnsmasq persists.
However, this is not true for the controllers. Although they may
initially dhcp for a pxeboot address, that address is overridden
by their statically assigned pxeboot network address(es).
Adding the controller pxeboot network hostnames and addresses to
the dnsmasq.addn_hosts file yields proper pxeboot hostname resolution
for controllers.
From Controllers:
[sysadmin@controller-0 ~$ nslookup pxeboot-2
Server: fdff:10:80:27::2
Address: fdff:10:80:27::2#53
Name: pxeboot-2
Address: 192.168.202.3
[sysadmin@controller-0 ~$ nslookup pxeboot-1
Server: fdff:10:80:27::2
Address: fdff:10:80:27::2#53
Name: pxeboot-1
Address: 192.168.202.2
sysadmin@controller-1:~$ nslookup pxeboot-1
Server: fdff:10:80:27::2
Address: fdff:10:80:27::2#53
Name: pxeboot-1
Address: 192.168.202.2
sysadmin@controller-1:~$ nslookup pxeboot-2
Server: fdff:10:80:27::2
Address: fdff:10:80:27::2#53
Name: pxeboot-2
Address: 192.168.202.3
From Worker:
sysadmin@worker-0:~$ nslookup pxeboot-1
Server: 192.168.204.1
Address: 192.168.204.1#53
Name: pxeboot-1
Address: 169.254.202.2
Now all hosts in the system support pxeboot hostname nslookup
Also, this update adds an explicit call to _generate_dnsmasq_hosts_file
to the conductor process restart. This handles the case where dnsmasq
publishes a new lease to handle while the sysinv conductor is not
running or being restarted.
Test Plan:
PASS: Verify build and install AIO DX Plus system.
PASS: Verify format of new additions to dhsmasq.addn_hosts file.
PASS: Verify nslookup using controller pxeboot hostnames from either
controller or even a worker node.
PASS: Verify no new pep8 warnings or errors are added to the conductor
manager.py.
Story: 2010940
Task: 49829
Change-Id: Ibacdaadd24cf8c73fec98167d4a79fece341b1e6
Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>