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 3353 #3453

Merged
merged 3 commits into from
Jun 12, 2016
Merged

Fix 3353 #3453

merged 3 commits into from
Jun 12, 2016

Conversation

poettering
Copy link
Member

No description provided.

@martinpitt martinpitt added the ci-fails/needs-rework 🔥 Please rework this, the CI noticed an issue with the PR label Jun 7, 2016
For legacy commands such as /sbin/halt or /sbin/poweroff we support legacy
fallbacks that talk via traditional SysV way with PID 1 to issue the desired
operation. We do this on any kind of error if the primary method of operation
fails. When this is the case we suppress any error message that is normally
generated, in order to not confuse the user. When suppressing this log message,
don't suppress the original error code, because there's really no reason to.
Reloading or reexecuting PID 1 means the unit generators are rerun, which are
timed out at 90s. Make sure the method call asking for the reload is timed out
at twice that, so that the generators have 90s and the reload operation has 90s
too.

This reworks the daemon_reload() call in systemctl, and makes it exclusively
about reloading/reexecing. Previously it was used for other trivial method
calls too, which didn't really help readability. As the code paths are now
sufficiently different, split out the old code into a new function
trivial_method().

This call also does a similar change as
c8ad4ef but for the reload/reexec operation.

Fixes: systemd#3353
@poettering
Copy link
Member Author

OK, force pushed a new version that fixes the bug that cause the CI to fail.

(Most likely the CI is going to fail again though, as I rebased and #3499 isn't merged yet and breaks all CI)

@poettering poettering removed the ci-fails/needs-rework 🔥 Please rework this, the CI noticed an issue with the PR label Jun 10, 2016
@keszybz
Copy link
Member

keszybz commented Jun 12, 2016

While testing this I noticed that 'systemctl --user reboot' tries to set the wall message and fails because user 'reboot.target' is not found. Subject for another bugfix...

@keszybz keszybz merged commit 7f40134 into systemd:master Jun 12, 2016
keszybz added a commit to keszybz/systemd that referenced this pull request Jun 13, 2016
... as well as halt/poweroff/kexec/suspend/hibernate/hybrid-sleep.
Running those commands will fail in user mode, but we try to set the wall
message first, which might even succeed for privileged users. Best to nip
the whole sequence in the bud.

systemd#3453 (comment)
martinpitt pushed a commit that referenced this pull request Jun 13, 2016
... as well as halt/poweroff/kexec/suspend/hibernate/hybrid-sleep.
Running those commands will fail in user mode, but we try to set the wall
message first, which might even succeed for privileged users. Best to nip
the whole sequence in the bud.

#3453 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants