From 317f62a3bc72db94635bf95fb2ed2e1491d0c179 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Tue, 5 Mar 2024 12:24:34 +0900 Subject: [PATCH] Stop hard-coding config file for db sync The magnum-db-manage command by default loads /etc/magnum/magnum.conf. Removing the override allows us to use additional paths such as magnum.conf.d in the future. Change-Id: I3efd9b50aace6661409d6dc726b94ec65a6f1410 --- manifests/db/sync.pp | 4 ++-- spec/classes/magnum_db_sync_spec.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/manifests/db/sync.pp b/manifests/db/sync.pp index 600e02b..a998cd7 100644 --- a/manifests/db/sync.pp +++ b/manifests/db/sync.pp @@ -10,7 +10,7 @@ # [*extra_params*] # (Optional) String of extra command line parameters to append # to the magnum-dbsync command. -# Defaults to undef +# Defaults to '' # # [*exec_path*] # (Optional) The path to use for finding the magnum-db-manage binary. @@ -22,7 +22,7 @@ # class magnum::db::sync( $user = 'magnum', - $extra_params = '--config-file /etc/magnum/magnum.conf', + $extra_params = '', $exec_path = '/usr/bin', $db_sync_timeout = 300, ) { diff --git a/spec/classes/magnum_db_sync_spec.rb b/spec/classes/magnum_db_sync_spec.rb index 17c038f..938156b 100644 --- a/spec/classes/magnum_db_sync_spec.rb +++ b/spec/classes/magnum_db_sync_spec.rb @@ -8,7 +8,7 @@ describe 'magnum::db::sync' do it 'runs magnum-db-sync' do is_expected.to contain_exec('magnum-db-sync').with( - :command => 'magnum-db-manage --config-file /etc/magnum/magnum.conf upgrade head', + :command => 'magnum-db-manage upgrade head', :path => '/usr/bin', :user => 'magnum', :refreshonly => 'true', @@ -60,7 +60,7 @@ describe 'magnum::db::sync' do it { is_expected.to contain_exec('magnum-db-sync').with( - :command => 'magnum-db-manage --config-file /etc/magnum/magnum.conf upgrade head', + :command => 'magnum-db-manage upgrade head', :path => '/opt/venvs/magnum/bin', :user => 'magnum', :refreshonly => 'true',