Run db setup by the service user instead of root

... because the command doesn't require root privilege. This follows
the guidance in current installation guide[1][2].

[1] https://docs.openstack.org/designate/latest/install/install-rdo.html
[2] https://docs.openstack.org/designate/latest/install/install-ubuntu.html

Change-Id: If664267a805edb5f7262274b0dc5b152d514c629
This commit is contained in:
Takashi Kajinami 2022-02-20 19:18:12 +09:00
parent 34ff6e6f04
commit ec8079de90
2 changed files with 4 additions and 3 deletions

View File

@ -20,11 +20,12 @@ class designate::db::sync(
) {
include designate::deps
include designate::params
exec { 'designate-dbsync':
command => "designate-manage ${extra_params} database sync",
path => '/usr/bin',
user => 'root',
user => $::designate::params::user,
refreshonly => true,
try_sleep => 5,
tries => 10,

View File

@ -14,7 +14,7 @@ describe 'designate::db::sync' do
is_expected.to contain_exec('designate-dbsync').with(
:command => 'designate-manage database sync',
:path => '/usr/bin',
:user => 'root',
:user => 'designate',
:refreshonly => 'true',
:try_sleep => 5,
:tries => 10,
@ -40,7 +40,7 @@ describe 'designate::db::sync' do
is_expected.to contain_exec('designate-dbsync').with(
:command => 'designate-manage --config-file /etc/designate/designate.conf database sync',
:path => '/usr/bin',
:user => 'root',
:user => 'designate',
:refreshonly => 'true',
:try_sleep => 5,
:tries => 10,