Skip to content
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

static IP configured via NM keyfile is not respected on first boot #358

Closed
miabbott opened this issue Jan 29, 2020 · 7 comments
Closed

static IP configured via NM keyfile is not respected on first boot #358

miabbott opened this issue Jan 29, 2020 · 7 comments

Comments

@miabbott
Copy link
Member

miabbott commented Jan 29, 2020

I was testing the NM keyfile in the docs PR (coreos/fedora-coreos-docs#30) and found that the static IP was not respected on first boot.

The keyfile was correctly landed via Igntion as such:

$ sudo cat /etc/NetworkManager/system-connections/eth0.nmconnection 
[connection]
type=ethernet
interface-name=eth0

[ethernet]
mac-address=52:54:00:0d:5c:06

[ipv4]
method=manual
addresses=192.168.124.120/24
gateway=192.168.124.1
dns=192.168.124.1;1.1.1.1;8.8.8.8
dns-search=redhat.com

But the eth0 interface did not come up with the static IP, rather it came up with a DHCP assigned address.

I was able to force it to use the static IP after using nmcli connection down eth0

Additionally, on subsequent boots, the static IP does come up correctly.

This feels like another case where bringing down the networking in the initrd would solve the issue (re: #356 (comment))

@ServerNinja
Copy link

I'm experiencing the same issue. I'm inserting an ignition file via pxe to configure an install. Ignition successfully installs fedora core but it grabs an IP from DHCP on first boot. When I do a sudo reboot, it comes back up with the correct static IP I defined in the ignition file during the install.

@cgwalters
Copy link
Member

This feels like another case where bringing down the networking in the initrd would solve the issue

Yes. Or NM in the initrd.

@kai-uwe-rommel
Copy link

Is this going to be fixed?
It's a serious issue ...
I'm going to write scripts to create a whole bunch of VMs with static IPs ...

@jlebon
Copy link
Member

jlebon commented Mar 20, 2020

We're working on this in coreos/ignition-dracut#159.

@dustymabe
Copy link
Member

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.

@LorbusChris
Copy link
Contributor

@miabbott @dustymabe did the fix for this land in 4.4 boot images?

@cgwalters
Copy link
Member

@miabbott @dustymabe did the fix for this land in 4.4 boot images?

No, RHCOS 4.4 only special cases ifcfg files right now, see coreos/ignition-dracut#89
Hopefully 4.6 will backport this stuff.

dustymabe added a commit to dustymabe/fedora-coreos-docs that referenced this issue Jul 26, 2020
coreos/fedora-coreos-tracker#358 is fixed now
so we shouldn't need a whole section devoted to troubleshooting the
issue.
dustymabe added a commit to dustymabe/fedora-coreos-docs that referenced this issue Jul 26, 2020
coreos/fedora-coreos-tracker#358 is fixed now
so we shouldn't need a whole section devoted to troubleshooting the
issue.
lucab pushed a commit to coreos/fedora-coreos-docs that referenced this issue Jul 27, 2020
…on (#111)

* pages/static-ip-config: move around useful information

Move the persistent NIC naming and the link to NetworkManager
documentation to more appropriate places higher up in the text.

* pages/static-ip-config: remove reference to bug 358

coreos/fedora-coreos-tracker#358 is fixed now
so we shouldn't need a whole section devoted to troubleshooting the
issue.

* pages/static-ip-config: Remove note about initramfs network bringup

We no longer bring up the network in the initramfs if it's not needed.
See coreos/fedora-coreos-tracker#443.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants