Commit 1d1c45fc authored by QM's avatar QM Committed by vipwzw

fix function check_supervision_node_group_list

parent d1b32346
......@@ -782,15 +782,18 @@ function para_create_nodegroup() {
# $1 status, $2 hash
function check_supervision_node_group_list() {
local idcount=0
if [ "$#" -eq 3 ]; then
idcount=$3
fi
newid=$(${PARA_CLI} para supervision_node id_list -s "$1" | jq -r ".ids[$idcount].id")
if [ "$newid" != "$2" ]; then
${PARA_CLI} para supervision_node id_list -s "$1"
echo "cancel status error "
exit 1
fi
while true; do
newid=$(${PARA_CLI} para supervision_node id_list -s "$1" | jq -r ".ids[$idcount].id")
if [ "$newid" == null ]; then
${PARA_CLI} para supervision_node id_list -s "$1"
echo "cancel status error "
exit 1
fi
if [ "$newid" == "$2" ]; then
break
fi
idcount=$((idcount + 1))
done
}
# $1 status $2 addr
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment