fix: preserve /var/lib/NetworkManager from initramfs [DNM]#1166
Draft
tserong wants to merge 1 commit intoharvester:masterfrom
Draft
fix: preserve /var/lib/NetworkManager from initramfs [DNM]#1166tserong wants to merge 1 commit intoharvester:masterfrom
tserong wants to merge 1 commit intoharvester:masterfrom
Conversation
This is an experiment only. It's slighly problematic in that because it's done so early, the /var/lib/NetworkManager files copied from the initramfs actually end up in the installed system's root filesystem where strictly we really only want this in the installation environment. But, it's good enough for a test. What I observed when doing this, while looking at the DHCP _server_ logs, is that without this change, I see: In initramfs: Oct 16 04:54:14 pxe-server dhcpd[4809]: DHCPDISCOVER from 02:00:00:0d:62:e2 via eth1 Oct 16 04:54:14 pxe-server dhcpd[4809]: DHCPOFFER on 192.168.0.30 to 02:00:00:0d:62:e2 via eth1 Oct 16 04:54:16 pxe-server dhcpd[4809]: DHCPREQUEST for 192.168.0.30 (192.168.0.254) from 02:00:00:0d:62:e2 via eth1 Oct 16 04:54:16 pxe-server dhcpd[4809]: DHCPACK on 192.168.0.30 to 02:00:00:0d:62:e2 via eth1 After switch root: Oct 16 04:54:23 pxe-server dhcpd[4809]: DHCPDISCOVER from 02:00:00:0d:62:e2 via eth1 Oct 16 04:54:23 pxe-server dhcpd[4809]: DHCPOFFER on 192.168.0.30 to 02:00:00:0d:62:e2 via eth1 Oct 16 04:54:24 pxe-server dhcpd[4809]: DHCPREQUEST for 192.168.0.30 (192.168.0.254) from 02:00:00:0d:62:e2 via eth1 Oct 16 04:54:24 pxe-server dhcpd[4809]: DHCPACK on 192.168.0.30 to 02:00:00:0d:62:e2 via eth1 So there's a full DHCP discovery that happens again after the interface is restarted. With this change applied, I see the initial discovery in the initramfs: Oct 16 07:50:20 pxe-server dhcpd[4837]: DHCPDISCOVER from 02:00:00:0d:62:e2 via eth1 Oct 16 07:50:20 pxe-server dhcpd[4837]: DHCPOFFER on 192.168.0.30 to 02:00:00:0d:62:e2 via eth1 Oct 16 07:50:21 pxe-server dhcpd[4837]: DHCPREQUEST for 192.168.0.30 (192.168.0.254) from 02:00:00:0d:62:e2 via eth1 Oct 16 07:50:21 pxe-server dhcpd[4837]: DHCPACK on 192.168.0.30 to 02:00:00:0d:62:e2 via eth1 ...but then after switch root, even though the interface is still restarted, I only get this: Oct 16 07:50:29 pxe-server dhcpd[4837]: DHCPREQUEST for 192.168.0.30 from 02:00:00:0d:62:e2 via eth1 Oct 16 07:50:29 pxe-server dhcpd[4837]: DHCPACK on 192.168.0.30 to 02:00:00:0d:62:e2 via eth1 ...so it's not doing the full discovery. I wonder if this will be enough to fix the problem? Signed-off-by: Tim Serong <tserong@suse.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an experiment only. It's slighly problematic in that because it's done so early, the /var/lib/NetworkManager files copied from the initramfs actually end up in the installed system's root filesystem where strictly we really only want this in the installation environment. But, it's good enough for a test. What I observed when doing this, while looking at the DHCP server logs, is that without this change, I see:
In initramfs:
Oct 16 04:54:14 pxe-server dhcpd[4809]: DHCPDISCOVER from 02:00:00:0d:62:e2 via eth1
Oct 16 04:54:14 pxe-server dhcpd[4809]: DHCPOFFER on 192.168.0.30 to 02:00:00:0d:62:e2 via eth1
Oct 16 04:54:16 pxe-server dhcpd[4809]: DHCPREQUEST for 192.168.0.30 (192.168.0.254) from 02:00:00:0d:62:e2 via eth1
Oct 16 04:54:16 pxe-server dhcpd[4809]: DHCPACK on 192.168.0.30 to 02:00:00:0d:62:e2 via eth1
After switch root:
Oct 16 04:54:23 pxe-server dhcpd[4809]: DHCPDISCOVER from 02:00:00:0d:62:e2 via eth1
Oct 16 04:54:23 pxe-server dhcpd[4809]: DHCPOFFER on 192.168.0.30 to 02:00:00:0d:62:e2 via eth1
Oct 16 04:54:24 pxe-server dhcpd[4809]: DHCPREQUEST for 192.168.0.30 (192.168.0.254) from 02:00:00:0d:62:e2 via eth1
Oct 16 04:54:24 pxe-server dhcpd[4809]: DHCPACK on 192.168.0.30 to 02:00:00:0d:62:e2 via eth1
So there's a full DHCP discovery that happens again after the interface is restarted.
With this change applied, I see the initial discovery in the initramfs:
Oct 16 07:50:20 pxe-server dhcpd[4837]: DHCPDISCOVER from 02:00:00:0d:62:e2 via eth1
Oct 16 07:50:20 pxe-server dhcpd[4837]: DHCPOFFER on 192.168.0.30 to 02:00:00:0d:62:e2 via eth1
Oct 16 07:50:21 pxe-server dhcpd[4837]: DHCPREQUEST for 192.168.0.30 (192.168.0.254) from 02:00:00:0d:62:e2 via eth1
Oct 16 07:50:21 pxe-server dhcpd[4837]: DHCPACK on 192.168.0.30 to 02:00:00:0d:62:e2 via eth1
...but then after switch root, even though the interface is still restarted, I only get this:
Oct 16 07:50:29 pxe-server dhcpd[4837]: DHCPREQUEST for 192.168.0.30 from 02:00:00:0d:62:e2 via eth1
Oct 16 07:50:29 pxe-server dhcpd[4837]: DHCPACK on 192.168.0.30 to 02:00:00:0d:62:e2 via eth1
...so it's not doing the full discovery. I wonder if this will be enough to fix the problem?