summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Baker <sbaker@redhat.com>2016-02-12 14:07:25 +1300
committerSteve Baker <sbaker@redhat.com>2016-02-12 14:07:25 +1300
commit04cc409c01270fde4703a921a429113e86353864 (patch)
tree9b794b86c2c049c7dd3e849acd94edd1a0bf9601
parent20fc1118fda24946ada541ebc435896253c2a911 (diff)
Enable heat-manage purge_deleted cron job
Without this the heat database tables will grow without limit. Change-Id: I687e733db1a73ebc2047609a03be768093010dd4 DependsOn: Ia2b80e5003450cd794ebb0c9ca72200ec8616e81
-rw-r--r--puppet/controller.yaml7
-rw-r--r--puppet/hieradata/controller.yaml4
-rw-r--r--puppet/manifests/overcloud_controller.pp4
-rw-r--r--puppet/manifests/overcloud_controller_pacemaker.pp4
4 files changed, 19 insertions, 0 deletions
diff --git a/puppet/controller.yaml b/puppet/controller.yaml
index 8fdddff9..1f27928b 100644
--- a/puppet/controller.yaml
+++ b/puppet/controller.yaml
@@ -245,6 +245,11 @@ parameters:
default: 0
description: Number of workers for Heat service.
type: number
+ HeatEnableDBPurge:
+ type: boolean
+ default: true
+ description: |
+ Whether to create cron job for purging soft deleted rows in the Heat database.
HorizonSecret:
description: Secret key for Django
type: string
@@ -892,6 +897,7 @@ resources:
- {get_param: HeatApiVirtualIP}
- ':8000/v1/waitcondition'
heat_auth_encryption_key: {get_param: HeatAuthEncryptionKey}
+ heat_enable_db_purge: {get_param: HeatEnableDBPurge}
horizon_allowed_hosts: {get_param: HorizonAllowedHosts}
horizon_secret: {get_param: HorizonSecret}
admin_email: {get_param: AdminEmail}
@@ -1325,6 +1331,7 @@ resources:
heat::database_connection: {get_input: heat_dsn}
heat::debug: {get_input: debug}
heat::db::mysql::password: {get_input: heat_password}
+ heat_enable_db_purge: {get_input: heat_enable_db_purge}
# Keystone
keystone::admin_token: {get_input: admin_token}
diff --git a/puppet/hieradata/controller.yaml b/puppet/hieradata/controller.yaml
index 13f4eec7..d0216b50 100644
--- a/puppet/hieradata/controller.yaml
+++ b/puppet/hieradata/controller.yaml
@@ -105,6 +105,10 @@ cinder::config::cinder_config:
heat::engine::configure_delegated_roles: false
heat::engine::trusts_delegated_roles: []
heat::instance_user: ''
+heat::cron::purge_deleted::age: 30
+heat::cron::purge_deleted::age_type: 'days'
+heat::cron::purge_deleted::maxdelay: 3600
+heat::cron::purge_deleted::destination: '/dev/null'
# pacemaker
pacemaker::corosync::cluster_name: 'tripleo_cluster'
diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp
index ae272335..13fc8186 100644
--- a/puppet/manifests/overcloud_controller.pp
+++ b/puppet/manifests/overcloud_controller.pp
@@ -599,6 +599,7 @@ if hiera('step') >= 4 {
$keystone_enable_db_purge = hiera('keystone_enable_db_purge', true)
$nova_enable_db_purge = hiera('nova_enable_db_purge', true)
$cinder_enable_db_purge = hiera('cinder_enable_db_purge', true)
+ $heat_enable_db_purge = hiera('heat_enable_db_purge', true)
if $keystone_enable_db_purge {
include ::keystone::cron::token_flush
@@ -609,6 +610,9 @@ if hiera('step') >= 4 {
if $cinder_enable_db_purge {
include ::cinder::cron::db_purge
}
+ if $heat_enable_db_purge {
+ include ::heat::cron::purge_deleted
+ }
} #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 a34d0709..95bf2f65 100644
--- a/puppet/manifests/overcloud_controller_pacemaker.pp
+++ b/puppet/manifests/overcloud_controller_pacemaker.pp
@@ -1028,6 +1028,7 @@ if hiera('step') >= 4 {
$keystone_enable_db_purge = hiera('keystone_enable_db_purge', true)
$nova_enable_db_purge = hiera('nova_enable_db_purge', true)
$cinder_enable_db_purge = hiera('cinder_enable_db_purge', true)
+ $heat_enable_db_purge = hiera('heat_enable_db_purge', true)
if $keystone_enable_db_purge {
include ::keystone::cron::token_flush
@@ -1038,6 +1039,9 @@ if hiera('step') >= 4 {
if $cinder_enable_db_purge {
include ::cinder::cron::db_purge
}
+ if $heat_enable_db_purge {
+ include ::heat::cron::purge_deleted
+ }
if $pacemaker_master {