Run n-cpu using LXD_GROUP when LXD virt driver

Enabling nova-lxd require to run n-cpu using lxd group

Change-Id: I0553dafcc797fcc1342501a558c7455261cf3daf
This commit is contained in:
Lubosz "diltram" Kosnik 2016-08-02 16:35:22 -05:00
parent 675e10767c
commit 0ffdfbdbd7
2 changed files with 5 additions and 0 deletions

View File

@ -825,6 +825,8 @@ function start_nova_compute {
# ``sg`` is used in run_process to execute nova-compute as a member of the # ``sg`` is used in run_process to execute nova-compute as a member of the
# **$LIBVIRT_GROUP** group. # **$LIBVIRT_GROUP** group.
run_process n-cpu "$NOVA_BIN_DIR/nova-compute --config-file $compute_cell_conf" $LIBVIRT_GROUP run_process n-cpu "$NOVA_BIN_DIR/nova-compute --config-file $compute_cell_conf" $LIBVIRT_GROUP
elif [[ "$VIRT_DRIVER" = 'lxd' ]]; then
run_process n-cpu "$NOVA_BIN_DIR/nova-compute --config-file $compute_cell_conf" $LXD_GROUP
elif [[ "$VIRT_DRIVER" = 'fake' ]]; then elif [[ "$VIRT_DRIVER" = 'fake' ]]; then
local i local i
for i in `seq 1 $NUMBER_FAKE_NOVA_COMPUTE`; do for i in `seq 1 $NUMBER_FAKE_NOVA_COMPUTE`; do

View File

@ -586,6 +586,9 @@ case "$VIRT_DRIVER" in
LIBVIRT_GROUP=libvirtd LIBVIRT_GROUP=libvirtd
fi fi
;; ;;
lxd)
LXD_GROUP=${LXD_GROUP:-"lxd"}
;;
fake) fake)
NUMBER_FAKE_NOVA_COMPUTE=${NUMBER_FAKE_NOVA_COMPUTE:-1} NUMBER_FAKE_NOVA_COMPUTE=${NUMBER_FAKE_NOVA_COMPUTE:-1}
;; ;;