From bf00e679016b60b421a9af353dd09dcaef514926 Mon Sep 17 00:00:00 2001 From: ZhongShengping Date: Tue, 18 Apr 2017 15:05:34 +0800 Subject: [PATCH] Fix user in sync.pp The bug[0] is fixed, so we can fix the user. [0] https://bugs.launchpad.net/cloud-archive/+bug/1450942 Change-Id: I89bdeec3f9723605acad29b90328ad0479b15ffc --- manifests/db/sync.pp | 7 +------ spec/classes/ironic_db_sync_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 8 deletions(-) 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,