Skip to content

Commit 8e1292e

Browse files
Add documentation for delete protection for instances & volumes (#433)
* Add documetation for delete protection for instances & volumes * Apply suggestions from code review Co-authored-by: Suresh Kumar Anaparti <[email protected]> --------- Co-authored-by: Suresh Kumar Anaparti <[email protected]>
1 parent 57565b4 commit 8e1292e

File tree

2 files changed

+83
-0
lines changed

2 files changed

+83
-0
lines changed

source/adminguide/storage.rst

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,6 +1005,46 @@ True. Instances created from this service offering will have their disks reset
10051005
upon reboot. See `“Creating a New Compute
10061006
Offering” <service_offerings.html#creating-a-new-compute-offering>`_.
10071007

1008+
Volume delete protection
1009+
~~~~~~~~~~~~~~~~~~~~~~~~
1010+
1011+
CloudStack protects volumes from accidental deletion using a delete protection
1012+
flag, which is false by default. When delete protection is enabled for a volume,
1013+
it cannot be deleted through the UI or API. It can only be deleted after
1014+
removing delete protection from the volume.
1015+
1016+
Delete protection can be enabled for a volume via updateVirtualMachine API.
1017+
1018+
.. code:: bash
1019+
1020+
cmk update volume id=<volume id> deleteprotection=true
1021+
1022+
To remove delete protection, use the following command:
1023+
1024+
.. code:: bash
1025+
1026+
cmk update volume id=<volume id> deleteprotection=false
1027+
1028+
To enable/disable delete protection for a volume using the UI, follow these steps:
1029+
1030+
#. Log in to the CloudStack UI as a User or admin.
1031+
1032+
#. In the navigation menu on the left, click Volumes under Storage.
1033+
1034+
#. Choose the volume for which you want to enable/disable delete protection.
1035+
1036+
#. Click on the Edit button |EditButton.png|
1037+
1038+
#. Toggle the Delete Protection switch to enable or disable delete protection.
1039+
1040+
#. Click Ok button to save the changes.
1041+
1042+
.. note::
1043+
The volume delete protection is only considered when the volume is being
1044+
deleted through the UI or via `deleteVolume` or `destroyVolume` API. If the
1045+
domain/project is deleted, the volumes under the domain/project will be
1046+
deleted irrespective of the delete protection status.
1047+
10081048

10091049
Volume Deletion and Garbage Collection
10101050
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1614,6 +1654,8 @@ as well if they wish. Attaching and detaching a disk is not allowed on a Shared
16141654
:alt: Object store file upload
16151655
.. |delete-button.png| image:: /_static/images/delete-button.png
16161656
:alt: Delete button
1657+
.. |EditButton.png| image:: /_static/images/edit-icon.png
1658+
:alt: button to edit the properties of a volume
16171659
.. |upload-button.png| image:: /_static/images/upload-button.png
16181660
:alt: Upload button
16191661
.. |adding-local-pool-via-ui.png| image:: /_static/images/adding-local-pool-via-ui.png

source/adminguide/virtual_machines.rst

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,47 @@ The following table explains how an Instance name is displayed in different scen
424424
<i.n> represents the value of the global configuration - instance.name
425425

426426

427+
Instance delete protection
428+
--------------------------
429+
430+
CloudStack protects instances from accidental deletion using a delete protection
431+
flag, which is false by default. When delete protection is enabled for an
432+
instance, it cannot be deleted through the UI or API. It can only be deleted
433+
after removing delete protection from the instance.
434+
435+
Delete protection can be enabled for an instance via updateVirtualMachine API.
436+
437+
.. code:: bash
438+
439+
cmk update virtualmachine id=<instance id> deleteprotection=true
440+
441+
To remove delete protection, use the following command:
442+
443+
.. code:: bash
444+
445+
cmk update virtualmachine id=<instance id> deleteprotection=false
446+
447+
To enable/disable delete protection for an instance using the UI, follow these steps:
448+
449+
#. Log in to the CloudStack UI as a User or admin.
450+
451+
#. In the navigation menu on the left, click Instances under Compute.
452+
453+
#. Choose the Instance for which you want to enable/disable delete protection.
454+
455+
#. Click on the Edit button |EditButton.png|
456+
457+
#. Toggle the Delete Protection switch to enable or disable delete protection.
458+
459+
#. Click Ok button to save the changes.
460+
461+
.. note::
462+
The instance delete protection is only considered when the instance is being
463+
deleted through the UI or via `destroyVirtualMachine` or `expungeVirtualMachine`
464+
API. If the domain/project is deleted, the instances under the domain/project
465+
will be deleted irrespective of the delete protection status.
466+
467+
427468
Changing the Service Offering for an Instance
428469
---------------------------------------------
429470

0 commit comments

Comments
 (0)