Run dbsync commands with service user

In some cases these commands create log files, running them as the service
user prevents them being owned by root.

Change-Id: I5d5dc4b58f7fca494ac2617f15da9f90b5fa11c9
This commit is contained in:
Derek Higgins 2014-08-18 16:38:54 +01:00
parent 77c3177911
commit 837fbb1b54
10 changed files with 10 additions and 10 deletions

View File

@ -2,5 +2,5 @@
set -eux
if os-is-bootstrap-host ; then
ceilometer-dbsync --config-file /etc/ceilometer/ceilometer.conf
sudo -u ceilometer -- ceilometer-dbsync --config-file /etc/ceilometer/ceilometer.conf
fi

View File

@ -2,5 +2,5 @@
set -eux
if os-is-bootstrap-host ; then
cinder-manage db sync
sudo -u cinder -- cinder-manage db sync
fi

View File

@ -2,5 +2,5 @@
set -eux
if os-is-bootstrap-host ; then
glance-manage db sync
sudo -u glance -- glance-manage db sync
fi

View File

@ -2,5 +2,5 @@
set -eux
if os-is-bootstrap-host ; then
heat-manage db_sync
sudo -u heat -- heat-manage db_sync
fi

View File

@ -2,5 +2,5 @@
set -eux
if os-is-bootstrap-host ; then
ironic-dbsync --config-file /etc/ironic/ironic.conf
sudo -u ironic -- ironic-dbsync --config-file /etc/ironic/ironic.conf
fi

View File

@ -2,5 +2,5 @@
set -eux
if os-is-bootstrap-host ; then
keystone-manage db_sync
sudo -u keystone -- keystone-manage db_sync
fi

View File

@ -2,5 +2,5 @@
set -eux
if os-is-bootstrap-host ; then
nova-manage db sync
sudo -u nova -- nova-manage db sync
fi

View File

@ -2,5 +2,5 @@
set -eux
if os-is-bootstrap-host ; then
nova-baremetal-manage db sync
sudo -u nova -- nova-baremetal-manage db sync
fi

View File

@ -4,7 +4,7 @@ set -eux
mkdir -p /mnt/state/var/log/trove
chown -R trove:trove /mnt/state/var/log/trove
trove-manage --config-file /etc/trove/trove.conf db_sync
sudo -u trove -- trove-manage --config-file /etc/trove/trove.conf db_sync
os-svc-enable -n trove-api

View File

@ -2,5 +2,5 @@
set -eux
if os-is-bootstrap-host ; then
tuskar-dbsync --config-file /etc/tuskar/tuskar.conf
sudo -u tuskar -- tuskar-dbsync --config-file /etc/tuskar/tuskar.conf
fi