From ce6682d5a96487150a961784ac159de717dd2889 Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Mon, 18 Mar 2019 07:28:45 -0600 Subject: [PATCH] Fix path for cinder-manage When we run the db sync, grep is called in the process however it is not found in the path as we are only setting /usr/bin Change-Id: I9905e02958f715be1cfebaf73e0e93b65b267ef9 --- manifests/db/sync.pp | 2 +- spec/classes/cinder_db_sync_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/manifests/db/sync.pp b/manifests/db/sync.pp index 95f4195c..ec5d783b 100644 --- a/manifests/db/sync.pp +++ b/manifests/db/sync.pp @@ -17,7 +17,7 @@ class cinder::db::sync( exec { 'cinder-manage db_sync': command => "cinder-manage ${extra_params} db sync", - path => '/usr/bin', + path => ['/bin', '/usr/bin'], user => 'cinder', refreshonly => true, try_sleep => 5, diff --git a/spec/classes/cinder_db_sync_spec.rb b/spec/classes/cinder_db_sync_spec.rb index e6c7f147..0bdcf044 100644 --- a/spec/classes/cinder_db_sync_spec.rb +++ b/spec/classes/cinder_db_sync_spec.rb @@ -6,7 +6,7 @@ describe 'cinder::db::sync' do is_expected.to contain_exec('cinder-manage db_sync').with( :command => 'cinder-manage db sync', :user => 'cinder', - :path => '/usr/bin', + :path => ['/bin', '/usr/bin'], :refreshonly => 'true', :try_sleep => 5, :tries => 10, @@ -30,7 +30,7 @@ describe 'cinder::db::sync' do is_expected.to contain_exec('cinder-manage db_sync').with( :command => 'cinder-manage --config-file /etc/cinder/cinder.conf db sync', :user => 'cinder', - :path => '/usr/bin', + :path => ['/bin', '/usr/bin'], :refreshonly => 'true', :try_sleep => 5, :tries => 10,