Merge "HA: fix race when moving VIP during minor update" into stable/ussuri

This commit is contained in:
Zuul 2021-04-29 23:00:53 +00:00 committed by Gerrit Code Review
commit e3cb9db4b4
1 changed files with 1 additions and 1 deletions

View File

@ -345,7 +345,7 @@ outputs:
VIPS_TO_MOVE=$(crm_mon --as-xml | xmllint --xpath '//resource[@resource_agent = "ocf::heartbeat:IPaddr2" and @role = "Started" and @managed = "true" and ./node[@name = "'${CLUSTER_NODE}'"]]/@id' - | sed -e 's/id=//g' -e 's/"//g') VIPS_TO_MOVE=$(crm_mon --as-xml | xmllint --xpath '//resource[@resource_agent = "ocf::heartbeat:IPaddr2" and @role = "Started" and @managed = "true" and ./node[@name = "'${CLUSTER_NODE}'"]]/@id' - | sed -e 's/id=//g' -e 's/"//g')
for v in ${VIPS_TO_MOVE}; do for v in ${VIPS_TO_MOVE}; do
echo "Moving VIP $v on another node" echo "Moving VIP $v on another node"
pcs resource move $v --wait=300 pcs resource ban $v ${CLUSTER_NODE} --wait=300
done done
echo "Removing the location constraints that were created to move the VIPs" echo "Removing the location constraints that were created to move the VIPs"
for v in ${VIPS_TO_MOVE}; do for v in ${VIPS_TO_MOVE}; do