From 166af71b1f21b186fe7bc90f186ea24c3e7d1507 Mon Sep 17 00:00:00 2001 From: Nate Potter Date: Thu, 19 Nov 2015 16:31:13 +0000 Subject: [PATCH] Correct db sync for backwards compatibility In the previous patch https://review.openstack.org/#/c/241003/4 the default value for the config file when running glance-manage db sync was changed. This patch restores the old default value for backwards compatibility. Change-Id: I1c17461bf7f4922ece41673f3f726ec00b0cd4c7 --- manifests/db/sync.pp | 4 ++-- manifests/params.pp | 2 -- spec/classes/glance_db_sync_spec.rb | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/manifests/db/sync.pp b/manifests/db/sync.pp index 09986c0c..6137e32b 100644 --- a/manifests/db/sync.pp +++ b/manifests/db/sync.pp @@ -7,10 +7,10 @@ # (optional) String of extra command line parameters to append # to the glance-manage db sync command. These will be inserted # in the command line between 'glance-manage' and 'db sync'. -# Defaults to undef +# Defaults to '--config-file /etc/glance/glance-registry.conf' # class glance::db::sync( - $extra_params = undef, + $extra_params = '--config-file /etc/glance/glance-registry.conf', ) { include ::glance::params diff --git a/manifests/params.pp b/manifests/params.pp index 6fbed16a..d8c18dc9 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -13,7 +13,6 @@ class glance::params { $registry_package_name = 'openstack-glance' $api_service_name = 'openstack-glance-api' $registry_service_name = 'openstack-glance-registry' - $db_sync_command = 'glance-manage --config-file=/etc/glance/glance-registry.conf db_sync' if ($::operatingsystem != 'fedora' and versioncmp($::operatingsystemrelease, '7') < 0) { $pyceph_package_name = 'python-ceph' } else { @@ -25,7 +24,6 @@ class glance::params { $registry_package_name = 'glance-registry' $api_service_name = 'glance-api' $registry_service_name = 'glance-registry' - $db_sync_command = 'glance-manage --config-file=/etc/glance/glance-registry.conf db_sync' $pyceph_package_name = 'python-ceph' } default: { diff --git a/spec/classes/glance_db_sync_spec.rb b/spec/classes/glance_db_sync_spec.rb index 4edf7ec4..1ba51bbb 100644 --- a/spec/classes/glance_db_sync_spec.rb +++ b/spec/classes/glance_db_sync_spec.rb @@ -6,7 +6,7 @@ describe 'glance::db::sync' do it 'runs glance-manage db_sync' do is_expected.to contain_exec('glance-manage db_sync').with( - :command => 'glance-manage db_sync', + :command => 'glance-manage --config-file /etc/glance/glance-registry.conf db_sync', :path => '/usr/bin', :user => 'glance', :refreshonly => 'true',