aboutsummaryrefslogtreecommitdiffstats
path: root/puppet
diff options
context:
space:
mode:
authorMartin Mágr <mmagr@redhat.com>2015-07-31 16:01:56 +0200
committerMartin Mágr <mmagr@redhat.com>2016-01-04 13:27:55 +0100
commit8a4f47ca93bf7e8f1cd130084c4047c29b7e575c (patch)
tree770521ac761facaa6f46d0ec08ad9e1773881dfc /puppet
parentd85635ba68e201c3ec5e42b4828e2f4291b8f080 (diff)
Remove deleted Nova rows
Creates cron job running every twelve hours for "nova-manage db archive_deleted_rows" Partial-bug: rhbz#1249106 Depends-On: Ic674f4d39bc88f89abfeb0ce99a571c2534e57e4 Change-Id: I4740cc02aa9714f48798521fe9918ac3487db031
Diffstat (limited to 'puppet')
-rw-r--r--puppet/controller.yaml7
-rw-r--r--puppet/hieradata/controller.yaml2
-rw-r--r--puppet/manifests/overcloud_controller.pp5
-rw-r--r--puppet/manifests/overcloud_controller_pacemaker.pp7
4 files changed, 20 insertions, 1 deletions
diff --git a/puppet/controller.yaml b/puppet/controller.yaml
index 4ec62762..8e013400 100644
--- a/puppet/controller.yaml
+++ b/puppet/controller.yaml
@@ -502,6 +502,11 @@ parameters:
default: 0
description: Number of workers for Neutron service.
type: number
+ NovaEnableDBPurge:
+ default: true
+ description: |
+ Whether to create cron job for purging soft deleted rows in Nova database.
+ type: boolean
NovaPassword:
description: The password for the nova service and db account, used by nova-api.
type: string
@@ -1046,6 +1051,7 @@ resources:
- '/ceilometer'
snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
+ nova_enable_db_purge: {get_param: NovaEnableDBPurge}
nova_password: {get_param: NovaPassword}
nova_dsn:
list_join:
@@ -1407,6 +1413,7 @@ resources:
nova::network::neutron::neutron_admin_auth_url: {get_input: neutron_admin_auth_url}
nova::vncproxy::host: {get_input: nova_api_network}
nova::db::mysql::password: {get_input: nova_password}
+ nova_enable_db_purge: {get_input: nova_enable_db_purge}
# Horizon
apache::ip: {get_input: horizon_network}
diff --git a/puppet/hieradata/controller.yaml b/puppet/hieradata/controller.yaml
index b0e6ae96..c9f3a417 100644
--- a/puppet/hieradata/controller.yaml
+++ b/puppet/hieradata/controller.yaml
@@ -77,6 +77,8 @@ nova::notify_on_state_change: 'vm_and_task_state'
nova::api::default_floating_pool: 'public'
nova::api::osapi_v3: true
nova::scheduler::filter::ram_allocation_ratio: '1.0'
+nova::cron::archive_deleted_rows::hour: '*/12'
+nova::cron::archive_deleted_rows::destination: '/dev/null'
# ceilometer
ceilometer::agent::auth::auth_endpoint_type: 'internalURL'
diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp
index a84a534b..508025cf 100644
--- a/puppet/manifests/overcloud_controller.pp
+++ b/puppet/manifests/overcloud_controller.pp
@@ -548,7 +548,12 @@ if hiera('step') >= 3 {
} #END STEP 3
if hiera('step') >= 4 {
+ $nova_enable_db_purge = hiera('nova_enable_db_purge', true)
+
include ::keystone::cron::token_flush
+ if $nova_enable_db_purge {
+ include ::nova::cron::archive_deleted_rows
+ }
} #END STEP 4
$package_manifest_name = join(['/var/lib/tripleo/installed-packages/overcloud_controller', hiera('step')])
diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp
index d0d46e2d..de6c1b5a 100644
--- a/puppet/manifests/overcloud_controller_pacemaker.pp
+++ b/puppet/manifests/overcloud_controller_pacemaker.pp
@@ -968,7 +968,12 @@ if hiera('step') >= 3 {
} #END STEP 3
if hiera('step') >= 4 {
- include ::keystone::cron::token_flush
+ $nova_enable_db_purge = hiera('nova_enable_db_purge', true)
+
+ include ::keystone::cron::token_flush
+ if $nova_enable_db_purge {
+ include ::nova::cron::archive_deleted_rows
+ }
if $pacemaker_master {