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.
cmd/snap: inhibit snap run during snap removal (canonical#14126)
* cmd/snaplock/runinhibit: add remove inhibition hint type Signed-off-by: Zeyad Gouda <[email protected]> * cmd/snap: inhibit snap run during snap removal For context, This is needed in preparation for the new "snap remove" --terminate flag. New snap app runs must be inhibited before we start killing the running apps to avoid having new runs in the window between killing currently running and unlinking the snap binaries. Signed-off-by: Zeyad Gouda <[email protected]> * cmd/snap: refactor error handling (thanks @bboozzoo) Signed-off-by: Zeyad Gouda <[email protected]> * cmd/snap: move RAA check inside waitWhileInhibited Signed-off-by: Zeyad Gouda <[email protected]> * cmd/snap: move remove inhibition check inside waitWhileInhibited Signed-off-by: Zeyad Gouda <[email protected]> * cmd/snap: extend inhibition race condition to check remove hint Signed-off-by: Zeyad Gouda <[email protected]> * cmd/snap: refactor and improve error handling (thanks @olivercalder) Signed-off-by: Zeyad Gouda <[email protected]> * cmd/snap: add clarification comment (thanks @pedronis) Signed-off-by: Zeyad Gouda <[email protected]> --------- Signed-off-by: Zeyad Gouda <[email protected]>
- Loading branch information
1 parent
e05d878
commit 3a71035
Showing
5 changed files
with
234 additions
and
43 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
Oops, something went wrong.