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

fix: prevent first boot name resolution failures #52

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

nis65
Copy link
Contributor

@nis65 nis65 commented Jan 7, 2024

Description

Without masking systemd-networkd before first boot, there were often (the slower the hardware, the more likely) failures in name resolution during first boot. Everything went well until at some point in time the dns resolution stopped working and the install of each single apt package took 3 minutes. Although the installation finishes more or less successfully and the missing packages are installed by the first ansible pull after 2nd boot, it can prolong first boot time by 60 minutes or more.

There might be more elegant solutions, but it looks so wrong to have both the (ubuntu server) systemd-networkd and (ubuntu client) NetworkManager network managements active at the same time.

Without masking systemd-networkd before first boot, there were often
(the slower the hardware, the more likely) failures in name resolution
during first boot. Everything went well until at some point in time
the dns resolution stopped working and the install of each single apt
package took 3 minutes. Although the installation finishes more or less
successfully and the missing packages are installed by the first ansible pull
after 2nd boot, it can prolong first boot time by 60 minutes or more.

There might be more elegant solutions, but it looks so wrong to have both
the  (ubuntu server) systemd-networkd and (ubuntu client) NetworkManager
network managements active at the same time.
@nis65
Copy link
Contributor Author

nis65 commented Jan 7, 2024

@fadnincx During more experiments (especially trying to install mlc on a 10y old device), I finally nailed down my installation issues: I had to manually restart systemd-resolved to get working name resolution again after about 50% of the first boot. This MR solves the "install fail" issue as described in the commit message.

The other MR #51 actually solves a different problem (as I found out during my tests): The entry in the network-online.target.wants directory comes from the original ubuntu server iso and, if not explicitly removed, there will be a 2 minute timeout during each boot...

Follow up tests showed that I don't need to remove the cloud-init package at all. I once removed cloud-init via autoinstall-user-data, but this was a bad idea: The admin user was not created any more at the beginning of first boot but my setup relies on keeping this user to get admin access.... 😱

@fadnincx fadnincx added this pull request to the merge queue Jan 8, 2024
Merged via the queue into projectpotos:main with commit 19cbed0 Jan 8, 2024
3 checks passed
@nis65 nis65 deleted the masknetworkd branch February 1, 2024 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants