-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No resolv.conf being created in initramfs after pxe boot #393
Comments
Afaik that dracut module ( |
@arithx I couldn't remember if it was that module or some other one. That was the only one that I could grep for that seemed to be writing to a resolv.conf file. Either way I found some notes from last year where I had debugged a similar issue and my notes said:
So The following workarounds on the kernel command line should work:
I think this should be handled appropriately when we move to networkmanager in the initrd. |
What's the reason for disabling |
Looks like the original removal was here. @cgwalters, do you remember any additional context? |
Sorry I don't 😦 - are other Fedora editions using resolved? I think Ubuntu switched and mostly worked through the bugs but I'm not sure Fedora did. I think I'm vaguely recalling bugs around NetworkManager + resolved; IIRC Ubuntu server cases went with networkd or so? |
I am running a KVM VM with only one interface, so it can't be the IPMI NIC can't apply to me. It works if I manually run: Ignition is able to resolve names to get the ignition JSON from a server, but after switching root, it's gone. Maybe NetworkManager might need to be restarted from scratch after finishing the ignition bootstrapping? Simply restarting NetworkManager from systemctl doesn't seem to be enough, though. The following are some things I did troubleshoot.
|
After a while, the machine also loses its DHCP address and consequently its connectivity too. The When we get to the final booting stage after ignition bootstrapped everything, NetworkManager is not actually running a DHCP client. I am not quite sure what NetworkManager thinks it is doing in the final environment. Basically, something like the following needs to be run in the final environment:
After that is run, then I can see What is the right way to make this sort of thing happen with Fedora CoreOS? I don't want to have to write my own systemd service that kicks NetworkManager in the pants at boot if it should be pulling itself up by its own bootstraps. :) |
@lump. You're right that this is a problem and we're working to fix it. An ugly answer for now is to reboot the node after the first boot. |
@dustymabe this is Live PXE. Rebooting won't help because it is always first-boot. |
@lump good point, sorry for the noise. |
@dustymabe, I totally appreciate that you're watching this and I graciously thank you for your help! :) |
Since Live PXE FCOS is unusable until this is fixed, here is my super hacky workaround that I am using for now that brute-forces a solution for the problem.
Edit: The unit also needs |
We are now using NetworkManager in the initramfs and also propagating network information from the initramfs (kargs) when appropriate, which we think fixes this issue. See #394 (comment) and the preceding discussion for more details. |
As far as I can tell, this has indeed been fixed by #394. |
Hi,
I've been testing out migration to FCOS from Container Linux.
Initially my machines were pxe booting with kernel command line options:
ip=dhcp rd.neednet=1 console=tty0 console=ttyS0 ignition.firstboot ignition.platform.id=metal ignition.config.url=http://pxeserver/fedora-coreos/ignition/generic-pxe.ign
But it was failing to download the ignition file due to not being able to resolve DNS.
The system had an IP address on eth0. I could see dhclient processes running for eth0, eth1 and eth2 (oddly not eth3, but whatever)
/tmp/net.eth0.resolv.conf was populated with the correct nameserver etc. that had been received via DHCP (presumably by /sbin/dhclient-script). But /etc/resolv.conf doesn't exist. I was unable to work out what (if anything) should be taking the /tmp/net.*.resolv.conf files and creating /etc/resolv.conf.
@dustymabe helped me out on IRC, pointing me at some dracut code that takes the /tmp/net.*.resolv.conf file and populates /run/initramfs/state/etc/resolv.conf from them. That file (and the /run/initramfs/state directory that it would be in) don't exist on my system.
We got no further in looking at what might turn that file into /etc/resolv.conf beacuse it was suggested that I change my kernel command line from ip=dhcp to ip=eth0:dhcp. This change allowed the system to end up with working DNS and therefore download my ignition file.
The system i'm using have 4 network cards. eth0 an eth2 are plugged into the same vlan on which there's a dhcp server running, eth1 and eth3 are plugged into the same networks (lots of vlan tagged networks), but not the same as eth0 and eth2. Our DHCP server only hands out DHCP addresses if it finds a matching MAC address in its config. The MAC of eth0 is in our DHCP config, the MAC of eth2 isn't.
I don't have rpm-ostree status output from the system when it wasn't working. If it would be useful I can reproduce and try to provide it.
The text was updated successfully, but these errors were encountered: