Note
This feature is available starting from the MCP 2019.2.12 maintenance update. Before using the feature, follow the steps described in Apply maintenance updates.
Using the Deploy - Openstack Database Cleanup Jenkins pipeline job,
you can automatically clean up stale records from the Nova, Cinder, Heat, or
Glance database to make it smaller. This is helpful before any update or
upgrade activity. You can execute the
Deploy - Openstack Database Cleanup Jenkins pipeline job without a
maintenance window, just as for an online dbsync
.
To clean up an OpenStack database:
Open your Git project repository with the Reclass model on the cluster level.
In <cluster_name>/openstack/control.yml
, specify the pillars below with
the following parameters:
db_purge
to True
.days
as required. If you skip setting the days
parameter:max_rows
to limit the rows for deletion. It is safe to
specify 500-1000 rows. Unlimited cleanup may cause the database being
inaccessible and, as a result, OpenStack being inoperable.For example:
For Nova:
nova:
controller:
db_purge:
enabled: True
max_rows: 1000
days: 45
For Cinder:
cinder:
controller:
db_purge:
enabled: True
days: 45
For Heat:
heat:
server:
db_purge:
enabled: True
days: 45
For Glance Available since 2019.2.17 maintenance update:
glance:
server:
db_purge:
enabled: True
days: 45
Log in to the Jenkins web UI.
Open the Deploy - Openstack Database Cleanup Jenkins pipeline job.
Specify the following parameters:
Parameter | Description and values |
---|---|
SALT_MASTER_CREDENTIALS | The Salt Master credentials to use for connection, defaults to
salt . |
SALT_MASTER_URL | The Salt Master node host URL with the salt-api port,
defaults to the jenkins_salt_api_url parameter.
For example, http://172.18.170.27:6969 . |
Click Deploy.
The Jenkins pipeline job workflow: