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

Restore the original system config and restart NetworkManager-wait-online.service #21298

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tinawang123
Copy link
Contributor

@tinawang123 tinawang123 commented Feb 27, 2025

Restore the original system config and restart NetworkManager-wait-online.service

@@ -40,6 +40,8 @@ sub restore_config {
script_run('rm -f /etc/NetworkManager/conf.d/00-use-dnsmasq.conf');
script_run('unlink /etc/resolv.conf');
systemctl('restart NetworkManager');
sleep 30;
Copy link
Contributor

@rfan1 rfan1 Feb 27, 2025

Choose a reason for hiding this comment

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

I suggest using script_retry here

Copy link
Contributor

@Amrysliu Amrysliu left a comment

Choose a reason for hiding this comment

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

LGTM

@tinawang123 tinawang123 added qe-core Tag used to filter PR's created by QE-Core's members or are assigned to them WIP Work in progress labels Feb 28, 2025
@@ -40,6 +40,7 @@ sub restore_config {
script_run('rm -f /etc/NetworkManager/conf.d/00-use-dnsmasq.conf');
script_run('unlink /etc/resolv.conf');
systemctl('restart NetworkManager');
script_retry('systemctl restart NetworkManager-wait-online.service', retry => 3, delay => 20);
Copy link
Contributor

Choose a reason for hiding this comment

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

Just out of curiosity, have you checked nm-online? You can set timeout over there and most likely you might receive some useful output in case of failure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I checked nm-online, it failed to start after NM started.
I have discussed with developer, and opened one bug: https://bugzilla.suse.com/show_bug.cgi?id=1238218

Copy link
Contributor

Choose a reason for hiding this comment

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

In this case, I believe that relying on NetworkManager-wait-online.service as it executes nm-online is not the right check to make sure that NM has started

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qe-core Tag used to filter PR's created by QE-Core's members or are assigned to them WIP Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants