-
Notifications
You must be signed in to change notification settings - Fork 791
Avoid boot loop when there are dnf network issues #4442
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
base: master
Are you sure you want to change the base?
Conversation
jandubois
left a comment
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 don't understand which part of the PR is supposed to stop the reboot loop in case there is a network problem.
5133ee7 to
eb9c142
Compare
This comment was marked as resolved.
This comment was marked as resolved.
Only try to reboot when upgradePackages is true, and check the network connectivity before checking if a restart is needed. Also don't hide the stderr output, in case of any errors, and also show the list of packages that are requiring the reboot. Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
eb9c142 to
ad8e9c2
Compare
| dnf check-update >/dev/null | ||
| if [ "$?" != "1" ]; then | ||
| # needs-restarting returns "false" if needed (!) | ||
| if ! dnf needs-restarting -r; then |
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.
If the command fails due to other reasons, this results in reboot loop too?
Should this match the stdout/stderr to avoid that?
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.
The exit codes are hopelessly confused, scraping the plugin output could make it worse
But I think it is possible, as long as you select the C locale (the messages are translated)
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.
When the output is unclear it should default to avoid the potential reboot loop
The Also it now checks if the If the feature is not activated (the default), the script exits. |
Only try to reboot when upgradePackages is true, and check the network connectivity before checking if a restart is needed.
Also don't hide the stderr output, in case of any errors, and also show the list of packages that are requiring the reboot.
Closes #4440
first boot:
second boot: