<Mic92> samueldr: we have a systemd upgrade in staging for that I think
<mdlayher> so i'm using RestartKillSignal=SIGHUP and 'systemctl restart x' still appears to send a TERM
<mdlayher> i wonder if i am missing something obvious.
<mdlayher> the PR in question: https://github.com/NixOS/nixpkgs/pull/94953
<{^_^}> #94953 (by mdlayher, 1 day ago, merged): corerad: 0.2.7 -> 0.2.8
<mdlayher> the basic idea is that i'd like to differentiate service stop versus restart in my application by the signal that is sent from systemd. i had assumed this would provide TERM on stop and HUP on restart, but it seems not
<mdlayher> and i want to do that because i want to make sure all the machines on my LAN don't drop their IPv6 default route when i'm doing an immediate service restart!
<Mic92> mdlayher: in our activation script we usually stop and than start services rather than using restart.
<Mic92> You could modify the service to reload instead.
<mdlayher> yeah i was just thinking about that. i was hoping for a tidy solution leveraging systemd rather than having to propagate cancelation through my program, load a new config, validate it, deal with a possibly malformed config, etc etc etc. but perhaps i need to bite that bullet
<Mic92> mdlayher: we use reload for nginx for the same reason.
<mdlayher> i'll take a look at the module there for inspiration, thanks!
<Mic92> mdlayher: have a look enableReload option there.
<Mic92> I think in the long term we should have a pre-activation phase that does imperative configuration checkw
<Mic92> *checks
<Mic92> Not all checks can be executed in the sandbox.
<Mic92> We don't want those on systemd-bootup though because it could render the system not booting
<Mic92> *system bootup
<mdlayher> yep makes sense
<Mic92> But if one would do `switch` there could be a rollback if any of the checks fail.
<Mic92> This would make many things easier.
<Mic92> Basically in between setting up /etc and stopping the old services.
<Mic92> But with an option to ignore failed checks or the upgrade could dead-lock like I have seen many times in apt.
<mdlayher> i like this idea. is there an issue open about it that i could subscribe to? i'm happy to be a guinea pig for these sorts of changes
<Mic92> mdlayher: No. It only exists in my head. I had this idea when working on https://github.com/Mic92/sops-nix because there keys could fail to decrypt, in which case one may not want to continue to boot.
<Mic92> not boot but continue to upgrade.
<mdlayher> certainly. i like the idea.
<Mic92> mdlayher: I got it drafted here: https://github.com/NixOS/nixpkgs/issues/95090
<{^_^}> #95090 (by Mic92, 42 seconds ago, open): Configuration checks during activation phase
<mdlayher> thank you!
<samueldr> Mic92: yeah, I knew about the upgrade in staging, I was looking for the problem details to know whether what I was seeing was related or not (it was not related)
<aanderse> "Mic92" (https://matrix.to/#/@freenode_Mic92:matrix.org): have you started any conversations on this? or all just in your mind currently?
<Mic92> aanderse: the thing about configuration checks?
<Mic92> you already found it.
<aanderse> sorry i meant other than that thread :-)
<Mic92> This issue is the first one about the topic.
<aanderse> cool
<aanderse> i look forward to seeing the conversation progress
<aanderse> if there is anything more useful than "i like that too" that i can contribute please let me know
<Mic92> aanderse: once there is a design how the rollback can work, it's all about integrating nixos services to have their configuration checks there.
<aanderse> yeah
<Mic92> I don't have a time line for it, but I want to have it for sops-nix.
<Mic92> So it i will be there eventually
<aanderse> awesome to hear
{`-`} has joined #nixos-systemd
andi- has quit [Ping timeout: 260 seconds]
andi- has joined #nixos-systemd