forked from canonical/snapd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
o/snapstate: make a managed refresh schedule not require any addition…
…al checks (canonical#14107) * o/snapstate: make a managed refresh schedule not require any additional checks Drop the additional check to CanManageRefreshes() when the refresh schedule is already set to 'managed'. This was originally a way to ensure that there is at least one snap entitled to directly manage the refreshes or fall back to the default auto-refresh schedule. However, the conditions in which the fallback would be applied are incorrect and could lead to a situation when snapd would trigger an auto-refresh even while a snap which is entitled to using a managed refresh schedule is being refreshed (due to the snapd-control being temporarily disconnected). On top of this, since the device was once switched to managed, it clearly means that it was entitled to do so and it was intentional, hence we should not accidentally break the expectations. Signed-off-by: Maciej Borzecki <[email protected]> * o/devicestate: tweak comment around CanManageRefreshes() Signed-off-by: Maciej Borzecki <[email protected]> * o/configstate/configcore: tweak comments around managed refresh schedule Signed-off-by: Maciej Borzecki <[email protected]> * o/snapstate: refresh hints report managed refresh when schedule is set to managed Signed-off-by: Maciej Borzecki <[email protected]> * o/snapstate, o/devicestate: drop snapstate.CanManageRefreshes Signed-off-by: Maciej Borzecki <[email protected]> * overlord: add a durability test of connections during a refresh * overlord: improve test for both old and fixed scenarios Signed-off-by: Maciej Borzecki <[email protected]> * overlord: tweak test comments Signed-off-by: Maciej Borzecki <[email protected]> * overlord: fix data race in unit tests Signed-off-by: Maciej Borzecki <[email protected]> --------- Signed-off-by: Maciej Borzecki <[email protected]> Co-authored-by: Philip Meulengracht <[email protected]>
- Loading branch information
1 parent
7e09dd8
commit a2bc59c
Showing
9 changed files
with
322 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.