networking-sfc: Run db-manage command by the service user

... instead of root, because the command doesn't require root. This
follows what was already implemented in the base db-manage command[1].

[1] da49c1914fb2b6db0bbbd7244430dfab6bc18fb0

Change-Id: Ibedde3aee5ce80c2a970c35395063633f1465b71
This commit is contained in:
Takashi Kajinami 2022-04-11 17:30:36 +09:00
parent 38f1a2e250
commit fabd30c62e
2 changed files with 2 additions and 0 deletions

View File

@ -73,6 +73,7 @@ class neutron::services::sfc (
exec { 'sfc-db-sync':
command => 'neutron-db-manage --config-file /etc/neutron/neutron.conf --subproject networking-sfc upgrade head',
path => '/usr/bin',
user => $::neutron::params::user,
subscribe => [
Anchor['neutron::install::end'],
Anchor['neutron::config::end'],

View File

@ -43,6 +43,7 @@ describe 'neutron::services::sfc' do
should contain_exec('sfc-db-sync').with(
:command => 'neutron-db-manage --config-file /etc/neutron/neutron.conf --subproject networking-sfc upgrade head',
:path => '/usr/bin',
:user => 'neutron',
:subscribe => ['Anchor[neutron::install::end]',
'Anchor[neutron::config::end]',
'Anchor[neutron::dbsync::begin]'