Merge "Change check on host_evacuation"
This commit is contained in:
commit
610b2479c3
|
@ -11,14 +11,12 @@ fi
|
|||
|
||||
nova service-list --host $1
|
||||
|
||||
nova service-list | grep -q 'nova-compute.*enabled' && {
|
||||
nova service-disable $1 nova-compute
|
||||
}
|
||||
|
||||
nova service-list | grep -q 'nova-compute.*enabled' || {
|
||||
echo "All nova-compute are disabled"
|
||||
exit 3
|
||||
}
|
||||
if [ $(nova service-list | grep -c 'nova-compute.*enabled') -gt 1 ]; then
|
||||
nova service-disable $1 nova-compute
|
||||
else
|
||||
echo "You can't disable last compute node"
|
||||
exit 3
|
||||
fi
|
||||
|
||||
while :; do
|
||||
VMS=$(nova list --host $1 | grep -i ' active ' | wc -l)
|
||||
|
|
Loading…
Reference in New Issue