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

Since runit update, previous power down commands reboot the system now #24207

Closed
D-Nice opened this issue Aug 10, 2020 · 8 comments
Closed

Since runit update, previous power down commands reboot the system now #24207

D-Nice opened this issue Aug 10, 2020 · 8 comments
Labels
bug Something isn't working

Comments

@D-Nice
Copy link
Contributor

D-Nice commented Aug 10, 2020

System

  • xuname:
    Void 5.7.14_1 x86_64 GenuineIntel notuptodate hold rrDDDDFFFF with old runit
    Void 5.7.14_1 x86_64 GenuineIntel uptodate hold rrDDDFFFF with latest runit

  • package:
    runit-void-20200720_1.x86_64

Expected behavior

poweroff, shutdown, halt, with the appropriate flags to lead to a power down, or in the case of touching the power button, as previously, to lead to a power down.

Actual behavior

All those commands and actions lead to a reboot, and the final init message indicates a reboot was requested.

Steps to reproduce the behavior

sudo poweroff with aforementioned pkg, at least on my system.

Reverting to runit-void-20190906_3.x86_64 stops this from happening, and there were apparent changes done to how runit handles reboots, but turning everything into a reboot for me does not seem like a desired effect.

Revelant PR: #23668

Additional info:

runit-void-20190906_3.x86_64 - ls -l /run/runit/{reboot,stopit} output:

ls: cannot access '/run/runit/reboot': No such file or directory
---x------ 1 root root 0 Aug 10 16:22 /run/runit/stopit

runit-void-20200720_1.x86_64 - ls -l /run/runit/{reboot,stopit} output:

---------- 1 root root 0 Aug 10 16:39 /run/runit/reboot
---------- 1 root root 0 Aug 10 16:39 /run/runit/stopit
@abenson abenson added the bug Something isn't working label Aug 10, 2020
@ericonr
Copy link
Member

ericonr commented Aug 10, 2020

By chance, are you holding / no extracting any of the files in the runit-void package? Check /etc/xbps.d. If for some reason you're using /etc/runit/3 from the old the package, the system will indeed reboot by default.

@D-Nice
Copy link
Contributor Author

D-Nice commented Aug 10, 2020

good point, I indeed am, I'll have a look about merging the two for my system.

@ahesford
Copy link
Member

Please try a stock /etc/runit/3 and confirm that everything works before attempting to merge your changes.

@D-Nice
Copy link
Contributor Author

D-Nice commented Aug 10, 2020

confirmed it works after merging (didn't need to try stock, and my runit/3 doesn't change anything, just had various additions)! Thanks for the help and quick note regarding the issue on my system.

As I have run into this previously, forgetting the various changes I've done (which is my fault), a nice-to-have would be to get a warning in case of hold conflicts, I may be more likely to look into them and resolve them myself, as may be the case with others, unless something like this already happens, in which case knowing it would be useful for future updates.

Anyways, closing this issue, as it was system specific to me and changes I had done.

@D-Nice D-Nice closed this as completed Aug 10, 2020
@ericonr
Copy link
Member

ericonr commented Aug 10, 2020

Any reason you can't use /etc/rc.shutdown for these actions instead of a custom /etc/runit/3?

@D-Nice
Copy link
Contributor Author

D-Nice commented Aug 10, 2020

yes, because I need some of these run before services are stopped, among other actions. In fact, one of these is a "rc.pre-shutdown" hook, exactly for that case. Technically, if this was in by default, as some requested, I wouldn't have to use runit/3 and could put most things there.

@ericonr
Copy link
Member

ericonr commented Aug 10, 2020

I don't see any comments in void-linux/void-runit#23 besides some contributors. Do you have ideas for the design, explanations for your use case? Void contributors have limited time and some solutions are hard to come by, help is definitely appreciated. If you have your own version of runit files, an easier way of avoiding issues is by having a custom package that pulls from your repository, that way you can easily check changes made to the void-runit repository and not be caught by surprise.

@D-Nice
Copy link
Contributor Author

D-Nice commented Aug 10, 2020

I've made comments regarding my specific issue, and one of the reasons why I had to edit runit/3 here.

void-linux/void-runit#16

Please don't read negatively into my comments, in case you may be, I'm highly appreciative of the work and effort, and if anything am sorry I took time from you guys with this issue, as it is my fault for changing configurations users are warned against touching.

Still, a conflict notification would again be a nice to have for me, and maybe others who may put preserve/holds on files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants