Skip to content
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

Add documentation for delete protection for instances & volumes #433

Merged
merged 2 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions source/adminguide/storage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,46 @@ True. Instances created from this service offering will have their disks reset
upon reboot. See `“Creating a New Compute
Offering” <service_offerings.html#creating-a-new-compute-offering>`_.

Volume delete protection
~~~~~~~~~~~~~~~~~~~~~~~~

CloudStack protects volumes from accidental deletion using a delete protection
flag, which is false by default. When delete protection is enabled for a volume,
it cannot be deleted through the UI or API. It can only be deleted after
removing delete protection from the volume.

Delete protection can be enabled for a volume via updateVirtualMachine API.

.. code:: bash

cmk update volume id=<volume id> deleteprotection=true

To remove delete protection, use the following command:

.. code:: bash

cmk update volume id=<volume id> deleteprotection=false

To enable/disable delete protection for a volume using the UI, follow these steps:

#. Log in to the CloudStack UI as a User or admin.

#. In the navigation menu on the left, click Volumes under Storage.

#. Choose the volume for which you want to enable/disable delete protection.

#. Click on the Edit button |EditButton.png|

#. Toggle the Delete Protection switch to enable or disable delete protection.

#. Click Ok button to save the changes.

.. note::
The volume delete protection is only considered when the volume is being
deleted through the UI or via `deleteVolume` or `destroyVolume` API. If the
domain/project is deleted, the volumes under the domain/project will be
deleted irrespective of the delete protection status.


Volume Deletion and Garbage Collection
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -1515,6 +1555,8 @@ Deleting objects from a bucket
:alt: Object store file upload
.. |delete-button.png| image:: /_static/images/delete-button.png
:alt: Delete button
.. |EditButton.png| image:: /_static/images/edit-icon.png
:alt: button to edit the properties of a volume
.. |upload-button.png| image:: /_static/images/upload-button.png
:alt: Upload button
.. |adding-local-pool-via-ui.png| image:: /_static/images/adding-local-pool-via-ui.png
Expand Down
41 changes: 41 additions & 0 deletions source/adminguide/virtual_machines.rst
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,47 @@ The following table explains how an Instance name is displayed in different scen
<i.n> represents the value of the global configuration - instance.name


Instance delete protection
--------------------------

CloudStack protects instances from accidental deletion using a delete protection
flag, which is false by default. When delete protection is enabled for an
instance, it cannot be deleted through the UI or API. It can only be deleted
after removing delete protection from the instance.

Delete protection can be enabled for an instance via updateVirtualMachine API.

.. code:: bash

cmk update virtualmachine id=<instance id> deleteprotection=true

To remove delete protection, use the following command:

.. code:: bash

cmk update virtualmachine id=<instance id> deleteprotection=false

To enable/disable delete protection for an instance using the UI, follow these steps:

#. Log in to the CloudStack UI as a User or admin.

#. In the navigation menu on the left, click Instances under Compute.

#. Choose the Instance for which you want to enable/disable delete protection.

#. Click on the Edit button |EditButton.png|

#. Toggle the Delete Protection switch to enable or disable delete protection.

#. Click Ok button to save the changes.

.. note::
The instance delete protection is only considered when the instance is being
deleted through the UI or via `destroyVirtualMachine` or `expungeVirtualMachine`
API. If the domain/project is deleted, the instances under the domain/project
will be deleted irrespective of the delete protection status.


Changing the Service Offering for an Instance
---------------------------------------------

Expand Down
Loading