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:
parent
77c3177911
commit
837fbb1b54
@ -2,5 +2,5 @@
|
|||||||
set -eux
|
set -eux
|
||||||
|
|
||||||
if os-is-bootstrap-host ; then
|
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
|
fi
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
set -eux
|
set -eux
|
||||||
|
|
||||||
if os-is-bootstrap-host ; then
|
if os-is-bootstrap-host ; then
|
||||||
cinder-manage db sync
|
sudo -u cinder -- cinder-manage db sync
|
||||||
fi
|
fi
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
set -eux
|
set -eux
|
||||||
|
|
||||||
if os-is-bootstrap-host ; then
|
if os-is-bootstrap-host ; then
|
||||||
glance-manage db sync
|
sudo -u glance -- glance-manage db sync
|
||||||
fi
|
fi
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
set -eux
|
set -eux
|
||||||
|
|
||||||
if os-is-bootstrap-host ; then
|
if os-is-bootstrap-host ; then
|
||||||
heat-manage db_sync
|
sudo -u heat -- heat-manage db_sync
|
||||||
fi
|
fi
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
set -eux
|
set -eux
|
||||||
|
|
||||||
if os-is-bootstrap-host ; then
|
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
|
fi
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
set -eux
|
set -eux
|
||||||
|
|
||||||
if os-is-bootstrap-host ; then
|
if os-is-bootstrap-host ; then
|
||||||
keystone-manage db_sync
|
sudo -u keystone -- keystone-manage db_sync
|
||||||
fi
|
fi
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
set -eux
|
set -eux
|
||||||
|
|
||||||
if os-is-bootstrap-host ; then
|
if os-is-bootstrap-host ; then
|
||||||
nova-manage db sync
|
sudo -u nova -- nova-manage db sync
|
||||||
fi
|
fi
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
set -eux
|
set -eux
|
||||||
|
|
||||||
if os-is-bootstrap-host ; then
|
if os-is-bootstrap-host ; then
|
||||||
nova-baremetal-manage db sync
|
sudo -u nova -- nova-baremetal-manage db sync
|
||||||
fi
|
fi
|
||||||
|
@ -4,7 +4,7 @@ set -eux
|
|||||||
mkdir -p /mnt/state/var/log/trove
|
mkdir -p /mnt/state/var/log/trove
|
||||||
chown -R trove:trove /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
|
os-svc-enable -n trove-api
|
||||||
|
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
set -eux
|
set -eux
|
||||||
|
|
||||||
if os-is-bootstrap-host ; then
|
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
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user