-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
Reload TALs on SIGHUP #241
Conversation
This seems to break the Windows build, somewhat unsurprisingly (I didn’t know Windows was supported TBH). Will take a look! |
Okay, this seems to have fixed it! |
Ah, right. That was the reason I created |
For now I stubbed it out on Windows and it “works”, but I can try and figure out how to make it work across all platforms (but likely not anytime soone)! |
Leaving Windows for later is completely fine. I don’t think there’s too many people using Routinator as a Windows service, anyway. However, how do you feel about wrapping the functionality into |
we could do that, however then I’d maybe move to name it |
Isn’t the main validation thread still sitting there idle waiting for something arrive in the channel or timing out? If so, the name is still fine. I think I mostly just stuck |
@partim I forgot to notify you again but I moved the logic to |
Ah, sorry, now I messed it up … I think I would prefer if It also should be possible to have |
That sounds sensible. About |
Ah, good point. That was about full reload including the config and everything. Maybe that should happen on SIGHUP? (That would also include shutting down the RTR and HTTP listeners so needs to be a bit further out.) Reloading TALs is slightly less intrusive – it is basically an attended re-validation that therefore is okay to fail (that was the reason for not reloading TALs on every validation run). Maybe that should actually be wired to SIGUSR1? |
I shuffled the logic around a little bit; was that what you were thinking? If so, I‘ll change the signal type. |
Jupp, that’s exactly it. |
Alright, I just rebased and changed the signal. What do you think? |
Looks good. I’d like to see the CI actions run on your last commit but somehow it doesn’t seem to want to run them anymore. |
Yeah, I saw. I’d be happy if it did that, too, because I didn’t test the latest changes for Windows at all. |
Hm, maybe try adding a trivial commit now after the force-push? |
Seems like we’re good now! |
Awesome! Thank you for the effort and sorry for being picky. |
No problem, I’m happy it turned out to your liking! |
This PR is a first attempt at handling SIGHUP (referencing #200) using crossbeam channels and
signal-hook
, which seems to be the current best practice. It allows us to get rid ofIdleWait
, which is nice. I’m not sure whether the threading model was what you were thinking of, which is why I only added the SIGHUP handler for now (though extending it should be fairly simple now!).Let me know whether this is going in the right direction!
Cheers