Skip to content

Commit 1df0789

Browse files
Use sudo+virsh to clean instances frm previous run
* fixes bug 955782 Change-Id: I8868132d5e18908d309da025760582a778ab4e72
1 parent 440be4b commit 1df0789

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

stack.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -990,10 +990,10 @@ if is_service_enabled n-cpu; then
990990
clean_iptables
991991

992992
# Destroy old instances
993-
instances=`virsh list --all | grep $INSTANCE_NAME_PREFIX | sed "s/.*\($INSTANCE_NAME_PREFIX[0-9a-fA-F]*\).*/\1/g"`
993+
instances=`sudo virsh list --all | grep $INSTANCE_NAME_PREFIX | sed "s/.*\($INSTANCE_NAME_PREFIX[0-9a-fA-F]*\).*/\1/g"`
994994
if [ ! "$instances" = "" ]; then
995-
echo $instances | xargs -n1 virsh destroy || true
996-
echo $instances | xargs -n1 virsh undefine || true
995+
echo $instances | xargs -n1 sudo virsh destroy || true
996+
echo $instances | xargs -n1 sudo virsh undefine || true
997997
fi
998998

999999
# Logout and delete iscsi sessions

0 commit comments

Comments
 (0)