-
Notifications
You must be signed in to change notification settings - Fork 564
Support releasing storage (model/apiserver changes) #7648
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
Conversation
| result[i].Error = common.ServerError(err) | ||
| continue | ||
| } | ||
| destroy := a.storage.DestroyStorageInstance |
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.
The docstring for the containing Destroy method needs updating
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.
Done. Also, I'll be renaming the method to Remove in the next PR, after discussion with Christian.
ec54d73 to
49081db
Compare
Add a new method, State.ReleaseStorageInstance, which atomically marks a storage instance Dying and sets it to "releasing". A storage instance that is being released is one that will be removed from the model without destorying the cloud storage resources.
49081db to
8fd5f42
Compare
|
|
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
|
Build failed: Tests failed |
Update the Storage API facade to handle the new ReleaseStorage field in the DestroyStorage method's parameters. This is to support a client requesting that storage be non-destructively removed from the model. Update the StorageProvisioner API with new methods for obtaining parameters to destroy volumes and filesystems (distinct from parameters for creating), which include a new field indicating whether or not the storage should be released rather than destroyed.
8fd5f42 to
c770def
Compare
|
|
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
Release storage client worker provider ## Description of change Add api, cmd, worker/storageprovisioner, and storage provider changes required to support non-destructively removing storage from a model. The `juju remove-storage` command grows a `--no-destroy` flag, which instructs Juju to remove the storage without destroying the associated cloud storage resources. This can be used to release the storage from Juju's control. Once the storage is removed from the model, destroying the model or controller will not destroy the storage. The VolumeSource and FilesystemSource interfaces grow methods for releasing storage, rather than destroying it. The storageprovisioner worker uses these methods for storage that is marked for releasing. Requires #7648 ## QA steps 1. juju bootstrap localhost 2. juju deploy postgresql --storage pgdata=lxd 3. juju remove-storage --force --no-destroy pgdata/0 4. juju destroy-controller localhost 5. lxc storage volume show juju juju-<model-uuid-suffix>-filesystem-0 # use "list" to get the name (volume should remain, but should show no juju-controller-uuid or juju-model-uuid tags) As above, but with EBS. In the portal, you should see the juju-controller-uuid/juju-model-uuid tags are empty after the storage is released/removed. ## Documentation changes Yes, we'll need to document `juju remove-storage --no-destroy`. ## Bug reference None.
Description of change
Add state/apiserver support for non-destructively removing storage from a model. This PR is just about modifying the model entities, and updating the storage provisioner API with methods for reporting the new information to a storage provisioner worker.
There will be a followup PR that adds the API client, CLI, worker, and storage provider changes.
QA steps
Smoke test, ensure "remove-storage" works as before.
Documentation changes
None (yet).
Bug reference
None.