From 470c3e45fa92c18ddd25e435fa50227ab76fdfff Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Fri, 2 May 2014 12:28:19 -0700 Subject: [PATCH] Fix gerrit database backups The gerrit database is now remote, or at least we have a hostname for it, so we should use the backup_remote class. Also, we don't make the dbbackups files anymore, so stop trying to compress them. Change-Id: Iddbaaef9b9fd089f074abeeb988f7cd052c80d25 --- modules/gerrit/manifests/cron.pp | 5 +---- modules/openstack_project/manifests/gerrit.pp | 7 +++++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/gerrit/manifests/cron.pp b/modules/gerrit/manifests/cron.pp index d659110cfe..07c6103541 100644 --- a/modules/gerrit/manifests/cron.pp +++ b/modules/gerrit/manifests/cron.pp @@ -23,10 +23,7 @@ class gerrit::cron( } cron { 'removedbdumps': + ensure => 'absent', user => 'gerrit2', - hour => '5', - minute => '1', - command => 'find /home/gerrit2/dbupdates/ -name "*.sql.gz" -mtime +30 -exec rm -f {} \;', - environment => 'PATH=/usr/bin:/bin:/usr/sbin:/sbin', } } diff --git a/modules/openstack_project/manifests/gerrit.pp b/modules/openstack_project/manifests/gerrit.pp index 2e8d5a8695..48848abd94 100644 --- a/modules/openstack_project/manifests/gerrit.pp +++ b/modules/openstack_project/manifests/gerrit.pp @@ -191,8 +191,11 @@ class openstack_project::gerrit ( require => Class[openstack_project::server], } - mysql_backup::backup { 'gerrit': - require => Class['::gerrit'], + mysql_backup::backup_remote { 'gerrit': + database_host => $mysql_host, + database_user => 'gerrit2', + database_password => $mysql_password, + require => Class['::gerrit'], } if ($testmode == false) {