Devstack - run vbmc as sudo

On CentOS 7 following the documentatition to set up ironic
in devstack I keep getting permission error because for some
reason the $HOME is root's home.

[Errno 13] Permission denied: '/root/.vbmc'

The permission issue causes various error's when trying to
re-stack and unstack.

Also, kill all vbmc processes after cleanup-nodes.

Change-Id: I92683dc9345825671310e199d0a6e36bdc462ed0
This commit is contained in:
Harald Jensås 2019-02-18 12:28:42 +01:00 committed by Dmitry Tantsur
parent ccf2bb1ea1
commit e240dd501e
3 changed files with 5 additions and 3 deletions

View File

@ -2438,6 +2438,8 @@ function cleanup_baremetal_basic_ops {
done
done
sudo killall vbmc || true
sudo ovs-vsctl --if-exists del-br $IRONIC_VM_NETWORK_BRIDGE
sudo rm -rf /etc/xinetd.d/tftp /etc/init/tftpd-hpa.override

View File

@ -23,7 +23,7 @@ virsh list --inactive | grep -q $NAME && virsh undefine $NAME --nvram
# Delete the Virtual BMC
if [[ $(type -P vbmc) != "" ]]; then
vbmc list | grep -a $NAME && vbmc delete $NAME
sudo vbmc list | grep -a $NAME && sudo vbmc delete $NAME
fi
if virsh pool-list | grep -q $LIBVIRT_STORAGE_POOL ; then

View File

@ -131,8 +131,8 @@ if ! virsh list --all | grep -q $NAME; then
# Createa Virtual BMC for the node if IPMI is used
if [[ $(type -P vbmc) != "" ]]; then
vbmc add $NAME --port $VBMC_PORT
vbmc start $NAME
sudo vbmc add $NAME --port $VBMC_PORT
sudo vbmc start $NAME
fi
fi