During a minor update of a HA controller node, an initial step
consists in moving away any virtual IP hosted on the node to be
updated. But when the HA control plane only has 1-node, this step logs
an error, because there is no other available node to move the virtual
IP to:
* 2020-08-05 11:06:29 | <192.168.24.3> (0, b'\n{"cmd": "CLUSTER_NODE=$(crm_node -n)\\necho \\"Retrieving all the VIPs which are hosted on this node\\"\\nVIPS_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\')\\nfor v in ${VIPS_TO_MOVE}; do\\n echo \\"Moving VIP $v on another node\\"\\n pcs resource move $v --wait=300\\ndone\\necho \\"Removing the location constraints that were created to move the VIPs\\"\\nfor v in ${VIPS_TO_MOVE}; do\\n echo \\"Removing location ban for VIP $v\\"\\n ban_id=$(cibadmin --query | xmllint --xpath \'string(//rsc_location[@rsc=\\"\'${v}\'\\" and @node=\\"\'${CLUSTER_NODE}\'\\" and @score=\\"-INFINITY\\"]/@id)\' -)\\n if [ -n \\"$ban_id\\" ]; then\\n pcs constraint remove ${ban_id}\\n else\\n echo \\"Could not retrieve and clear location constraint for VIP $v\\" 2>&1\\n fi\\ndone\\n", "stdout": "Retrieving all the VIPs which are hosted on this node\\nMoving VIP ip-192.168.24.16 on another node\\nWarning: Creating location constraint \'cli-ban-ip-192.168.24.16-on-node-0000333831\' with a score of -INFINITY for resource ip-192.168.24.16 on node-0000333831.\\n\\tThis will prevent ip-192.168.24.16 from running on node-0000333831 until the constraint is removed\\n\\tThis will be the case even if node-0000333831 is the last node in the cluster\\nRemoving the location constraints that were created to move the VIPs\\nRemoving location ban for VIP ip-192.168.24.16", "stderr": "Error: resource \'ip-192.168.24.16\' is not running on any node", "rc": 0, "start": "2020-08-05 11:06:25.880027", "end": "2020-08-05 11:06:29.046251", "delta": "0:00:03.166224", "changed": true, "invocation": {"module_args": {"_raw_params": "CLUSTER_NODE=$(crm_node -n)\\necho \\"Retrieving all the VIPs which are hosted on this node\\"\\nVIPS_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\')\\nfor v in ${VIPS_TO_MOVE}; do\\n echo \\"Moving VIP $v on another node\\"\\n pcs resource move $v --wait=300\\ndone\\necho \\"Removing the location constraints that were created to move the VIPs\\"\\nfor v in ${VIPS_TO_MOVE}; do\\n echo \\"Removing location ban for VIP $v\\"\\n ban_id=$(cibadmin --query | xmllint --xpath \'string(//rsc_location[@rsc=\\"\'${v}\'\\" and @node=\\"\'${CLUSTER_NODE}\'\\" and @score=\\"-INFINITY\\"]/@id)\' -)\\n if [ -n \\"$ban_id\\" ]; then\\n pcs constraint remove ${ban_id}\\n else\\n echo \\"Could not retrieve and clear location constraint for VIP $v\\" 2>&1\\n fi\\ndone\\n", "_uses_shell": true, "warn": true, "stdin_add_newline": true, "strip_empty_ends": true, "argv": null, "chdir": null, "executable": null, "creates": null, "removes": null, "stdin": null}}}\n', b'')
* 2020-08-05 11:06:29 | "stderr": "Error: resource 'ip-192.168.24.16' is not running on any node"
Change abandoned by Emilien Macchi (<email address hidden>) on branch: master /review. opendev. org/746927
Review: https:/
Reason: The gate is currently hitting the "docker api 429" issue, see #tripleo channel for more details. I'll abandon that patch so it's cleared from the gate. Please do not restore it as I'll take care of it when the gate is stable again. Thanks for your understanding and patience!