diff --git a/manifests/db/sync.pp b/manifests/db/sync.pp index f0c0bc3c..9e4e36a2 100644 --- a/manifests/db/sync.pp +++ b/manifests/db/sync.pp @@ -18,12 +18,7 @@ class ironic::db::sync( exec { 'ironic-dbsync': command => "${::ironic::params::dbsync_command} ${extra_params}", path => '/usr/bin', - # Ubuntu packaging is running dbsync command as root during ironic-common - # postinstall script so when Puppet tries to run dbsync again, it fails - # because it is run with ironic user. - # This is a temporary patch until it's changed in Packaging - # https://bugs.launchpad.net/cloud-archive/+bug/1450942 - user => 'root', + user => 'ironic', refreshonly => true, try_sleep => 5, tries => 10, diff --git a/spec/classes/ironic_db_sync_spec.rb b/spec/classes/ironic_db_sync_spec.rb index 575bb227..d62eecaa 100644 --- a/spec/classes/ironic_db_sync_spec.rb +++ b/spec/classes/ironic_db_sync_spec.rb @@ -8,7 +8,7 @@ describe 'ironic::db::sync' do is_expected.to contain_exec('ironic-dbsync').with( :command => 'ironic-dbsync --config-file /etc/ironic/ironic.conf ', :path => '/usr/bin', - :user => 'root', + :user => 'ironic', :refreshonly => 'true', :try_sleep => 5, :tries => 10, @@ -29,7 +29,7 @@ describe 'ironic::db::sync' do it { is_expected.to contain_exec('ironic-dbsync').with( :command => 'ironic-dbsync --config-file /etc/ironic/ironic.conf --config-file /etc/ironic/ironic_01.conf', :path => '/usr/bin', - :user => 'root', + :user => 'ironic', :refreshonly => true, :try_sleep => 5, :tries => 10,