-
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
Use nixops implementation of key services #119
Conversation
Hey @zhaofengli ! Any objection to merging this? I'd love to move back to the main fork! |
Hi, I'll take a look at this today. The original NixOps approach doesn't seem to interact well with Edit: More delays 😢 I'll get to it this week. |
@zhaofengli thanks a bunch! I actually think this is a good sign though; if the units for post-activation keys were activating even though the keys hadn't been uploaded, doesn't that illustrate exactly the problem I'm trying to fix (namely, that the unit files wouldn't reliably indicate that the keys had uploaded)? So now we just need a way to configure the unit as non-blocking for activation. I don't think anything in my change actually configures any dependencies; perhaps there's something in the test case you're running that's blocking activation that has a |
The test cases are here, which you can run with |
@zhaofengli I fixed the failing test in commit 33bca1c, but that test was not related to the post-activation keys so am I misunderstanding something? (to be clear in the new implementation the service isn't supposed to go inactive; it's "activating" while awaiting the key, and "active" when the key lands) |
I was playing with the idea separately (pushed here) so to avoid looking/copying the LGPL code from NixOps directly, even though the amount of code is minimal. With that applied the |
Hey @zhaofengli , anything I can do to help get this merged in? I can fix the conflicts but I'm not sure what you had in mind with your other branch.... |
hey @zhaofengli just a friendly nudge on this -- I'd still love to land this contribution if you'd be interested! I've been using my own fork of colmena for ages due to this issue, would love to upstream the fix, just let me know how you'd like me to change this PR to make it acceptable! |
Co-authored-by: Zhaofeng Li <[email protected]>
Let's get this merged. I added a test for post-activation keys and everything seems to work. Thank you for the contribution and so sorry for the delays ❤️ |
Ah thanks so much for this! Really appreciate you wrapping this out for me :) |
Resurrecting #116. It looks, from testing, the systemd path units aren't actually reliable for triggering when files are created. So they'll work fine if you use them on keys that are configured to a
destDir
such that the keys exist on boot, but they won't work consistently if you boot and then usecolmena upload-keys
.This PR replaces the systemd path based implementation with the proven-reliable implementation from nixops. I literally copy-pasted the unit configuration over from here.
I've confirmed on my own configs that this fixes all the problems I was having with the reliability of the key services. However, I haven't yet put together a minimal repro. I could work on doing that if you felt it was necessary @zhaofengli , but it will kind of be a pain and I am super confident in this change now so I'd prefer not to :).