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.
many: add state unlocker to runinhibit helpers (canonical#14671)
* many: add state unlocker to runinhibit.LockWithHint Signed-off-by: Zeyad Gouda <[email protected]> * many: add state unlocker to runinhibit.Unlock Signed-off-by: Zeyad Gouda <[email protected]> * many: add state unlocker to runinhibit.IsLocked Signed-off-by: Zeyad Gouda <[email protected]> * many: add state unlocker to runinhibit.RemoveLockFile Signed-off-by: Zeyad Gouda <[email protected]> * cmd/snaplock/runinhibit: update doc comment to mention unlocker Signed-off-by: Zeyad Gouda <[email protected]> * tests: add a regression spread test for lp-2084730 Signed-off-by: Zeyad Gouda <[email protected]> * o/snapstate/backend: add unit tests for forbidden nil state unlocker Signed-off-by: Zeyad Gouda <[email protected]> * tests: address review comments Signed-off-by: Zeyad Gouda <[email protected]> * tests: fix restore for tests/regression/lp-2084730 Signed-off-by: Zeyad Gouda <[email protected]> * tests: skip lsof command if not found Signed-off-by: Zeyad Gouda <[email protected]> * cmd/snaplock: add comment about potential deadlock using snap lock The snap lock is only accessible to root and is only intended to synchronize operations between snapd and snap-confine (and snap-update-ns in some cases). Any process holding the snap lock must not do any interactions with snapd to avoid deadlocks due to locked snap state. Signed-off-by: Zeyad Gouda <[email protected]> * o/hookstate: avoid unlocking/locking state twice quickly Signed-off-by: Zeyad Gouda <[email protected]> --------- Signed-off-by: Zeyad Gouda <[email protected]>
- Loading branch information
1 parent
f17d3ac
commit 2905448
Showing
23 changed files
with
412 additions
and
127 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
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.