Adding new state which will be used for db cleanup.
Prod-Related: PROD-35183
Change-Id: I8ee6b33eae01cadcd7e5b72fa0051d1f4775f577
diff --git a/README.rst b/README.rst
index f51f533..8e7385e 100644
--- a/README.rst
+++ b/README.rst
@@ -1120,3 +1120,37 @@
cinder:
upgrade:
manage_service_maintenance: false
+
+
+Execute database maintenance tasks
+----------------------------------
+Cleanup stale records from cinder database to make it smaller.
+This is helpful before any upgrade activity.
+It is safe to execute it generally without maintenance window same as online db_sync.
+
+Enable this pillar:
+
+.. code-block:: yaml
+
+ cinder:
+ controller:
+ db_purge:
+ enabled: True
+
+Execute state cinder.db.db_cleanup to purge stale records:
+
+.. code-block:: bash
+
+ salt -C 'I@cinder:controller:role:primary' state.apply cinder.db.db_cleanup -l debug
+
+It is possible to pass days parameter.
+If you skip setting it, all records would be archived/purged:
+
+.. code-block:: yaml
+
+ cinder:
+ controller:
+ db_purge:
+ enabled: True
+ days: 45
+