Add purge to Nova cleanup cron.

This patch enable the option --purge
in the Cron cleaning the Nova deleted instances.

Also, enables the --all-cells option to
cause the purge to be applied against all cell
databases

Also adds new cron options to purge the shadow
tables daily with a 14 days retention period.

Depends-On: I2dcf37417c36fb8b1bde207c60d22d580005715c
Depends-On: I4ac0c9bd30463c546b141326b1293c78f845cf81
Depends-On: I9ffebfad1d31182f43ed688a7c1ff3047655cbae
Depends-On: Ia99cd83dae1ed35b4cb6f035c445617f1e40f490
Change-Id: I5033f9a4e2f540b9f0154e287560bd6cce412663
This commit is contained in:
Carlos Camacho 2018-03-12 12:09:00 +01:00
parent f2e4073265
commit fb29f77987
3 changed files with 82 additions and 0 deletions

View File

@ -55,6 +55,11 @@ parameters:
description: |
Whether to create cron job for purging soft deleted rows in Nova database.
type: boolean
NovaEnableDBArchive:
default: true
description: |
Whether to create cron job for archiving soft deleted rows in Nova database.
type: boolean
MonitoringSubscriptionNovaApi:
default: 'overcloud-nova-api'
type: string
@ -162,6 +167,7 @@ outputs:
nova::api::neutron_metadata_proxy_shared_secret: {get_param: NeutronMetadataProxySharedSecret}
nova::api::instance_name_template: {get_param: InstanceNameTemplate}
nova_enable_db_purge: {get_param: NovaEnableDBPurge}
nova_enable_db_archive: {get_param: NovaEnableDBArchive}
nova::policy::policies: {get_param: NovaApiPolicies}
-
if:

View File

@ -142,6 +142,65 @@ parameters:
type: boolean
description: >
Cron to move deleted instances to another table - Until complete
default: true
NovaCronArchiveDeleteRowsPurge:
type: boolean
description: >
Purge shadow tables immediately after scheduled archiving
default: false
NovaCronPurgeShadowTablesMinute:
type: string
description: >
Cron to purge shadow tables - Minute
default: '0'
NovaCronPurgeShadowTablesHour:
type: string
description: >
Cron to purge shadow tables - Hour
default: '5'
NovaCronPurgeShadowTablesMonthday:
type: string
description: >
Cron to purge shadow tables - Month Day
default: '*'
NovaCronPurgeShadowTablesMonth:
type: string
description: >
Cron to purge shadow tables - Month
default: '*'
NovaCronPurgeShadowTablesWeekday:
type: string
description: >
Cron to purge shadow tables - Week Day
default: '*'
NovaCronPurgeShadowTablesUser:
type: string
description: >
Cron to purge shadow tables - User
default: 'nova'
NovaCronPurgeShadowTablesDestination:
type: string
description: >
Cron to purge shadow tables - Log destination
default: '/var/log/nova/nova-rowspurge.log'
NovaCronPurgeShadowTablesAge:
type: number
description: >
Cron to purge shadow tables - Age
This will define the retention policy when
purging the shadow tables in days.
0 means, purge data older than today in
shadow tables.
default: 14
NovaCronPurgeShadowTablesVerbose:
type: boolean
description: >
Cron to purge shadow tables - Verbose
default: false
NovaCronPurgeShadowTablesAllCells:
type: boolean
description: >
Cron to purge shadow tables - All cells
default: false
NovaPlacementAPIInterface:
type: string
@ -252,6 +311,17 @@ outputs:
nova::cron::archive_deleted_rows::user: {get_param: NovaCronArchiveDeleteRowsUser}
nova::cron::archive_deleted_rows::destination: {get_param: NovaCronArchiveDeleteRowsDestination}
nova::cron::archive_deleted_rows::until_complete: {get_param: NovaCronArchiveDeleteRowsUntilComplete}
nova::cron::archive_deleted_rows::purge: {get_param: NovaCronArchiveDeleteRowsPurge}
nova::cron::purge_shadow_tables::minute: {get_param: NovaCronPurgeShadowTablesMinute}
nova::cron::purge_shadow_tables::hour: {get_param: NovaCronPurgeShadowTablesHour}
nova::cron::purge_shadow_tables::monthday: {get_param: NovaCronPurgeShadowTablesMonthday}
nova::cron::purge_shadow_tables::month: {get_param: NovaCronPurgeShadowTablesMonth}
nova::cron::purge_shadow_tables::weekday: {get_param: NovaCronPurgeShadowTablesWeekday}
nova::cron::purge_shadow_tables::user: {get_param: NovaCronPurgeShadowTablesUser}
nova::cron::purge_shadow_tables::destination: {get_param: NovaCronPurgeShadowTablesDestination}
nova::cron::purge_shadow_tables::age: {get_param: NovaCronPurgeShadowTablesAge}
nova::cron::purge_shadow_tables::verbose: {get_param: NovaCronPurgeShadowTablesVerbose}
nova::cron::purge_shadow_tables::all_cells: {get_param: NovaCronPurgeShadowTablesAllCells}
-
if:
- compute_upgrade_level_empty

View File

@ -0,0 +1,6 @@
---
features:
- |
Add the ability of fully purging the shadow
tables whether in the archive or the purge
cron.