Skip to content
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

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

jlebon
Copy link
Member

@jlebon jlebon commented Apr 26, 2024

An issue as old as timeFedora 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.

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`.
@dustymabe
Copy link
Member

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.

Copy link
Member

@dustymabe dustymabe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dustymabe
Copy link
Member

I think this touches on a paper cut I thought would be handled by #498 when we finally implemented that.

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";
Copy link
Member

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.

Copy link
Member Author

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.

@jlebon
Copy link
Member Author

jlebon commented Apr 26, 2024

I think this touches on a paper cut I thought would be handled by #498 when we finally implemented that.

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.

@jlebon jlebon merged commit fe2db96 into coreos:main Apr 26, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants