[CentOS] initramfs annoyances (I think)

Mon Jul 29 20:49:38 UTC 2019
mark <m.roth at 5-cent.us>

Leon Fauster via CentOS wrote:
>
>> Am 29.07.2019 um 22:37 schrieb J Martin Rushton via CentOS
>> <centos at centos.org>:
>> On 29/07/2019 20:58, mark wrote:
>>
>>> Moved a server from the datacenter to our secure room. I've changed
>>> the DNS, and our dhcpd... and yet, every time it boots, it comes up
>>> with the IP it had in the datacenter.
>>>
>>> Any idea where it could be caching the IP - maybe in the initramfs?
>>> C 7, updated.
>>>
>> Don't shoot the messenger, but have you checked
>> /etc/sysconfig/network-scripts/ifcfg-* ?  For that matter, have you
>> checked /var/lib/dhcpd/dhcpd.leases?
>
> or fixed IP from DHCP server?
>
Yep. ifcfg-em1 is set to dhcp.

A bit more info: we're encrypted, and when it reboots, it can't find the
tang server (using clevis/tang), so it hangs, and if I let it drop me to
the emergency shell, I see the old IP address.

I've been looking at this, and what's gotten really weird is that if I do
a host tang on the server, it gives *two* different IPs... one of which
has not been a dhcpd or tang server since last year. And tang<fqdn> is not
in the organization DNS. So I'm sitting here, trying to figure out where
it's getting both IPs from.  Our dhcpd server knows the correct tang
server.

And the /etc/hosts on the server consists of
127.0.0.1   localhost localhost.localdomain localhost4
localhost4.localdomain4
::1         localhost localhost.localdomain localhost6
localhost6.localdomain6

so it's not the hosts file.

     mark
 As I said, used the organizational lookup, and it doesn't find tang.