-
Notifications
You must be signed in to change notification settings - Fork 34
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
update_agent: add hidden knob to override interactive session check #1178
Conversation
An issue as old as ~time~Fedora CoreOS is that when you're testing something related to updates, you want Zincati to reboot but because `cosa run` gives you an interactive session and you can't *not* have a session without losing the VM, you're stuck waiting for the 10 minutes grace period to expire. Just add a hidden knob for this to make that scenario less painful. The API is pretty much: when you're ready to have Zincati reboot, just `touch /run/zincati/override-interactive-check`.
I think this touches on a paper cut I thought would be handled by #498 when we finally implemented that. As is it improves the state, but I think users should have a documented way to do this too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
for example, #498 could handle the "I'm in an interactive session, an update is available, and I want to ignore update strategy (i.e. if your node isn't configured to update until the weekend)" case. |
@@ -37,6 +38,10 @@ const DEFAULT_POSTPONEMENT_TIME_SECS: u64 = 60; // 1 minute. | |||
/// before abandoning a target update. | |||
const MAX_DEPLOY_ATTEMPTS: u8 = 12; | |||
|
|||
/// This is undocumented; it's for testing Zincati in e.g. cosa where you have | |||
/// an interactive session but you don't want to wait for the full timeout. | |||
const INTERACTIVE_SESSION_OVERRIDE: &str = "/run/zincati/override-interactive-check"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems OK as is, but I personally would have probably leaned towards making this an environment variable and told people to systemctl edit --runtime zincati
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I debated on this a bit. It's just... so much easier to touch a file than to type out a dropin. Though we could also have added a cosa run --add-ignition zincati-override-interactive-check
to help.
Yeah, thanks for calling out #498. I agree it'd mostly solve that case, though OTOH it's also a lot more work. I found this useful for debugging coreos/fedora-coreos-tracker#1691 and it took a few minutes to type it out. We can nuke it when #498 happens. |
An issue as old as
timeFedora CoreOS is that when you're testing something related to updates, you want Zincati to reboot but becausecosa run
gives you an interactive session and you can't not have a session without losing the VM, you're stuck waiting for the 10 minutes grace period to expire.Just add a hidden knob for this to make that scenario less painful.
The API is pretty much: when you're ready to have Zincati reboot, just
touch /run/zincati/override-interactive-check
.