-
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.
state: add safe refcounts for charm storage
This branch adds refcounts for charm storage: when a storage instance is added, a refcount is incremented for (owner, storage-name); and decremented when the storage instance is removed. We also check that no units are added to or removed from an application while its charm is being upgraded. This enables us to safely drop charm storage if it is unreferenced. These changes pave the way for upgrading charms with storage, and make validation of charm-storage min/max count constraints simpler. Previously we were relying on there being a one-to-one mapping between storage instances and attachments, which leaves shared storage out in the cold; this new approach caters for both.
- Loading branch information
Showing
6 changed files
with
276 additions
and
194 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.