Description of problem: Command from step: "Move virtual IPs to another node before stopping pacemaker" for retrieving VIPs hosted on pacemaker node is broken. Broken command from tht code: [root@controller-0 tripleo-admin]# 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') Returned value: XPath set is empty Working command: [root@controller-0 tripleo-admin]# 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') [root@controller-0 tripleo-admin]# echo $VIPS_TO_MOVE ip-192.168.24.8 ip-172.17.4.96 There is extra ":" in broken command before heartbeat:IPaddr2 Version-Release number of selected component (if applicable): z1,z2 How reproducible: Steps to Reproduce: 1. Login to controller 2. Run CLUSTER_NODE=$(crm_node -n) 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') 3. check value of $VIPS_TO_MOVE Actual results: Returned value: XPath set is empty Expected results: VIPS_TO_MOVE contains VIP addresses Additional info:
Verified on RHOS-17.1-RHEL-9-20240909.n.1: [stack@undercloud-0 ~]$ rpm -qa |grep heat-templates openstack-tripleo-heat-templates-14.3.1-17.1.20240528170747.e7c7ce3.el9ost.noarch [root@controller-0 ~]# CLUSTER_NODE=$(crm_node -n) [root@controller-0 ~]# 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') [root@controller-0 ~]# echo $VIPS_TO_MOVE ip-192.168.24.46 ip-172.17.1.109 ip-172.17.4.123
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: RHOSP 17.1.4 (openstack-tripleo-heat-templates) security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2024:9978