From d620ff6b1cb82971ef40a3717b8fdc0b9fd9d425 Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 17 Jul 2014 13:26:37 -0700 Subject: [PATCH] Set dep from glance cron jobs to api package Currently there is no dependency between the glance cron jobs and the glance api package. This dependency needs to exist b/c the cron jobs cannot even be created by Puppet until the glance user exists on the system (which in the case of package installation is installed via the installation of the glance package) This patch adds the dependency. Change-Id: Ib0a42cf171d4fcabaab616c880aad2d0c4db4424 --- manifests/cache/cleaner.pp | 3 ++- manifests/cache/pruner.pp | 4 +++- spec/classes/glance_cache_cleaner_spec.rb | 3 ++- spec/classes/glance_cache_pruner_spec.rb | 3 ++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/manifests/cache/cleaner.pp b/manifests/cache/cleaner.pp index 181c627e..9ef5dbe5 100644 --- a/manifests/cache/cleaner.pp +++ b/manifests/cache/cleaner.pp @@ -37,6 +37,7 @@ class glance::cache::cleaner ( hour => $hour, monthday => $monthday, month => $month, - weekday => $weekday + weekday => $weekday, + require => Package[$::glance::params::api_package_name], } } diff --git a/manifests/cache/pruner.pp b/manifests/cache/pruner.pp index 9c3811a9..2cee4381 100644 --- a/manifests/cache/pruner.pp +++ b/manifests/cache/pruner.pp @@ -37,6 +37,8 @@ class glance::cache::pruner ( hour => $hour, monthday => $monthday, month => $month, - weekday => $weekday + weekday => $weekday, + require => Package[$::glance::params::api_package_name], + } } diff --git a/spec/classes/glance_cache_cleaner_spec.rb b/spec/classes/glance_cache_cleaner_spec.rb index 8b8bbe48..4a25cb5a 100644 --- a/spec/classes/glance_cache_cleaner_spec.rb +++ b/spec/classes/glance_cache_cleaner_spec.rb @@ -15,7 +15,8 @@ describe 'glance::cache::cleaner' do :hour => 0, :monthday => '*', :month => '*', - :weekday => '*' + :weekday => '*', + :require => 'Package[glance-api]' ) end end diff --git a/spec/classes/glance_cache_pruner_spec.rb b/spec/classes/glance_cache_pruner_spec.rb index 5bcf7cd2..25876a0f 100644 --- a/spec/classes/glance_cache_pruner_spec.rb +++ b/spec/classes/glance_cache_pruner_spec.rb @@ -15,7 +15,8 @@ describe 'glance::cache::pruner' do :hour => '*', :monthday => '*', :month => '*', - :weekday => '*' + :weekday => '*', + :require => 'Package[glance-api]' ) end end