Bug 2279998 - Command for retrieving VIPs hosted on pacemaker nodes is broken
Summary: Command for retrieving VIPs hosted on pacemaker nodes is broken
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 17.1 (Wallaby)
Hardware: x86_64
OS: Linux
high
high
Target Milestone: z4
: 17.1
Assignee: dabarzil
QA Contact: Joe H. Rahme
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-05-10 12:52 UTC by Mikolaj Ciecierski
Modified: 2024-11-21 09:30 UTC (History)
6 users (show)

Fixed In Version: openstack-tripleo-heat-templates-14.3.1-17.1.20240528170747.e7c7ce3.el9ost
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-11-21 09:30:22 UTC
Target Upstream Version:
Embargoed:
dabarzil: needinfo+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker OSP-32094 0 None None None 2024-05-10 12:58:51 UTC
Red Hat Product Errata RHSA-2024:9978 0 None None None 2024-11-21 09:30:23 UTC

Description Mikolaj Ciecierski 2024-05-10 12:52:46 UTC
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:

Comment 15 dabarzil 2024-10-08 12:36:08 UTC
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

Comment 21 errata-xmlrpc 2024-11-21 09:30:22 UTC
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


Note You need to log in before you can comment on or make changes to this bug.