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
o/snapstate: extend support for holding refreshes #12035
o/snapstate: extend support for holding refreshes #12035
Conversation
Extends the 'refresh.hold' "all-snaps" hold mechanism to allow indefinite holds. Signed-off-by: Miguel Pires <miguel.pires@canonical.com>
Adds support for the system administrator to hold the refresh of a set of snaps for any amount of time. Signed-off-by: Miguel Pires <miguel.pires@canonical.com>
General refreshes will respect specific holds, in order to be more consistent with auto-refreshes. This doesn't apply to specific refreshes (snap refresh foo bar) or to "all-snaps" holds (snap refresh --hold). Allow users to hold specific snaps but still do system refreshes. Signed-off-by: Miguel Pires <miguel.pires@canonical.com>
Tests relying on auto-refreshing triggered them by setting the 'last-refresh' to distant time which would then exceed the maximum postponement limit and trigger an auto-refresh despite any holds. Since refresh can now be held indefinitely and the system starts up with a 2h hold, we need to remove this hold in order for the auto-refresh to trigger. Signed-off-by: Miguel Pires <miguel.pires@canonical.com>
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.
Thanks, looks good, but I wonder if it could be made even easier to read for those who are not deep into the code. :-)
Signed-off-by: Miguel Pires <miguel.pires@canonical.com>
@mardy thanks for the feedback. I tried to answer your points, let me know if there's something expand on. I also experimented with writing an "implementation notes" document for this, which I can share if you want. It's short and tries not to overlap with the specification, but it's meant to document implementation decisions and roadblocks that might be relevant for someone trying to come up to speed on it |
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, thanks!
Fix merge conflict in overlord/snapstate/autorefresh.go
Signed-off-by: Miguel Pires <miguel.pires@canonical.com>
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.
thank you, did a pass, some comments
Signed-off-by: Miguel Pires <miguel.pires@canonical.com>
Signed-off-by: Miguel Pires <miguel.pires@canonical.com>
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.
thank you, small remark. I will +1 this on Monday after I have done a clarification pass on the spec
Signed-off-by: Miguel Pires <miguel.pires@canonical.com>
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.
thank you
Adds or extends refresh holding support for all-snaps and specific snaps in
snapstate
: