/etc/resolv.conf contents reversed after rebuilding nfsroot

CSCI Technician tech at csci.viu.ca
Wed Oct 9 21:14:20 CEST 2019


Hi,

I have been chasing down a problem on and off since I lasted asked about 
rebuilding nfsroot.  I have narrowed it down to a DNS issue and the fact 
that the entries in resolv.conf are in the reverse order of what they 
were previously.

What I am seeing:
The FAI server has been upgraded from 5.3.6 to 5.8.4~bpo9+2
No config files have been changed post upgrade
1. Working nfsroot
- Created with FAI version 5.3.6 prior to the upgrade
- PXE booted client has correct resolv.conf and no dns errors FAI logs. 
Resolv.conf:
   - search csci.viu.ca
   - nameserver [csci server ip]
   - nameserver [viu server 1 ip]
   - nameserver [viu server 2 ip]
2. Working nfsroot (upgraded version of above using -kvP flags)
- Same results as above with no issues
3. Non-working nfsroot
- Created post server upgrade using -fvP flags
- PXE booted client has reversed resolv.conf
- DNS errors are in remote client fai.log
- Logging into the client before rebooting
   - DNS lookups fail due to [viu server 2] and [viu server 1] being 
first in list
   - Commenting out the 2 viu servers causes DNS lookups to work. This 
is expected as the viu servers cannot be reached at this point, hence 
the importance of the order of the resolv.conf entries.

The nfsroot:/etc/resolv.conf in all three issues has these two entries:
- search csci.viu.ca
- nameserver [csci server ip]

Basically on PXE booting the client with the newly built nfsroot results 
in a resolv.conf file with all the entries exactly reversed from the 
original or updated nfsroot.  What process on the client would be 
rebuilding the file and in reverse?

A second oddity that I am seeing in the fai.log and boot.log involves 
the SERVER variable.
1. In the version 5.3.6 version of nfsroot
- boot.log shows 1 "SERVER" variable entry and it is set to the IP 
address of the FAI server
2. In the version 5.8.4~bpo9+2 version of nfsroot
- boot.log shows 2 "SERVER" variable entries
   - 1 with the value set to the IP address of the server
   - 1 with no value set
- fai.log shows the following line that is not present in the 5.3.6 version
Setting SERVER=[FAI FQDN]. Value extracted from FAI_CONFIG_SRC.

The above happens in the task_confdir() subroutine.
The boot.log file containing a second SERVER variable and the following 
additional lines as printed out in setnet()
IPADDR=192.168.18.120
SERVER=
NETMASK=255.255.255.0
GATEWAYS=192.168.18.254
BROADCAST=192.168.18.255
CIDR=192.168.18.120/24
NIC1=eth0

I don't know if the reversed resolv.conf file and the SERVER variable 
being set to the FQDN instead of the IP addr are related but it seems to 
be the first issue that is the source of my images clients not working. 
Any insight would be appreciated.

Cheers,
Merlin

-- 

Merlin Hansen
Department of Computing Science
Vancouver Island University
900 Fifth Street
Nanaimo BC  V9R 5S5
250-753-3245 x 2321
tech at csci.viu.ca



More information about the linux-fai mailing list