-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
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
A (rough but working) way to restart systemd to activate config changes. #35036
A (rough but working) way to restart systemd to activate config changes. #35036
Conversation
SystemD is not restarted and thus changed configuration is not applied upon changes to configuration like this: systemd.extraConfig = '' RuntimeWatchdogSec=60 ''; This commit implements a very simple and rough way of doing so. I'm open to improvements, like: should we pay attention to more config files like the journal? Should we refactor this in a way that predicts the reload instead of looking at the result of the activation? Unfortunately my Perl fu is very limited, so I'm open to suggestions but might not be able to implement them ...
SystemD is not restarted and thus changed configuration is not applied upon systemd.extraConfig = '' This commit implements a very simple and rough way of doing so. I'm open to Unfortunately my Perl fu is very limited, so I'm open to suggestions but might |
Thanks, @GrahamcOfBorg ... anything I can do to move this forward? |
@ctheune Do you this is ready for review and potentially inclusion? Your before-last comment makes me wonder, and I guess that's why the WIP tag has been added :) |
Well, it's been in place over here for a while. I guess I can even figure out a test (although I'm a bit short on time currently) if needed. We could monitor more files, etc. However, that change in itself seems fine so you could maybe even just merge that ... more improvements are always possible ... |
Are there any updates on this pull request, please? |
Sorry, this got lost in the flood of my open ends. I might be able to convince @dpausp to pick this up ... :) |
Thank you for your contributions.
|
I like it, it's simple and straightforward. However, as long as we don't have a CAS store, it will restart systemd even if the file contents are the same. @ctheune, does it restart a lot, and does it ever cause trouble? |
Hah, that's an old one. I just checked and we didn't use this patch in production as I wanted to get the upstream discussion done first, so I can't tell whether this causes continuous superfluous restarts. However, daemon-reexec isn't something that usually is a problem and this really only depends on how often you run activate on your system. We even usually run daemon-reexec gratuitously if systemd chokes on itself ... ;) |
Ok, in that case I'm A-OK with merging this. Could you perhaps rebase or at least resolve the conflicts? |
I can try a rebase, will take a while. Was on holiday the last weeks and just came back. |
I marked this as stale due to inactivity. → More info |
@dpausp Is this something we want to follow up on? Do we still maintian this in our overlay/fork? |
this is still a problem... |
I did an alternative implementation in #149342 |
Let's close this in favor of #149342. |
Motivation for this change
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)