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

🐛 Improve network stage #1062

Merged
merged 2 commits into from
Mar 8, 2023
Merged

🐛 Improve network stage #1062

merged 2 commits into from
Mar 8, 2023

Conversation

Itxaka
Copy link
Member

@Itxaka Itxaka commented Mar 8, 2023

What this PR does / why we need it:

  • First disable NetworkManager and wicked
  • Then enable systemd services for network and resolv
  • Then remove and link /etc/resolv.conf

This fixes a case in which systemd-networkd could be enabled before wicked is disabled and because network is linked to wicked it would fail to enable systemd-networkd properly during initramfs.

Also adds a check before removing the resolv.conf, to skip it if it doesnt exist.

Found by immucore running the initramfs as it spits out the errors into the log and we can see them more easily

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

 - First disable NetworkManager and wicked
 - Then enable systemd services for network and resolv
 - Then remove and link /etc/resolv.conf

This fixes a case in which systemd-networkd could be enabled before
wicked is disabled and because network is linked to wicked it would fail
to enable systemd-networkd properly during initramfs.

Also adds a check before removing the resolv.conf, to skip it if it
doesnt exist.

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
@Itxaka Itxaka requested a review from a team March 8, 2023 10:24
@netlify
Copy link

netlify bot commented Mar 8, 2023

Deploy Preview for kairos-io canceled.

Name Link
🔨 Latest commit d2e0cb8
🔍 Latest deploy log https://app.netlify.com/sites/kairos-io/deploys/64088e28e30c6f000989173d

Copy link
Member

@mudler mudler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good here, nice cleanup!

@mudler mudler enabled auto-merge (squash) March 8, 2023 13:31
@codecov-commenter
Copy link

Codecov Report

Merging #1062 (d2e0cb8) into master (7bb9af9) will not change coverage.
The diff coverage is n/a.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@           Coverage Diff           @@
##           master    #1062   +/-   ##
=======================================
  Coverage   22.79%   22.79%           
=======================================
  Files          22       22           
  Lines        1610     1610           
=======================================
  Hits          367      367           
  Misses       1179     1179           
  Partials       64       64           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@mudler mudler merged commit 0184437 into kairos-io:master Mar 8, 2023
Itxaka added a commit to Itxaka/kairos that referenced this pull request Mar 9, 2023
- First disable NetworkManager and wicked
 - Then enable systemd services for network and resolv
 - Then remove and link /etc/resolv.conf

This fixes a case in which systemd-networkd could be enabled before
wicked is disabled and because network is linked to wicked it would fail
to enable systemd-networkd properly during initramfs.

Also adds a check before removing the resolv.conf, to skip it if it
doesnt exist.

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
Co-authored-by: Ettore Di Giacinto <mudler@users.noreply.github.com>
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.

3 participants