-
Notifications
You must be signed in to change notification settings - Fork 282
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
base: master
Are you sure you want to change the base?
Conversation
tests/microos/networkmanager.pm
Outdated
@@ -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; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -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); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
Restore the original system config and restart NetworkManager-wait-online.service