Bug 2252464 - pacemaker_resource module calls obsolete pcs command
Summary: pacemaker_resource module calls obsolete pcs command
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: ansible-pacemaker
Version: 17.1 (Wallaby)
Hardware: x86_64
OS: Linux
high
high
Target Milestone: z3
: 17.1
Assignee: mathieu bultel
QA Contact: Arik Chernetsky
URL:
Whiteboard:
Depends On:
Blocks: 2128012
TreeView+ depends on / blocked
 
Reported: 2023-12-01 20:17 UTC by Alan Bishop
Modified: 2024-05-22 20:39 UTC (History)
9 users (show)

Fixed In Version: ansible-pacemaker-1.0.4-17.1.20230621040436.el9ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-05-22 20:39:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Gerrithub.io 1173095 0 None None None 2023-12-04 11:09:51 UTC
Red Hat Issue Tracker OSP-30638 0 None None None 2023-12-01 20:18:11 UTC
Red Hat Product Errata RHBA-2024:2741 0 None None None 2024-05-22 20:39:59 UTC

Description Alan Bishop 2023-12-01 20:17:46 UTC
Description of problem:

The pacemaker_resource module runs "pcs resource status <resource>" [1] to fetch a specific resource. However, that command was deprecated [1] and removed [2] >2 years ago.

[1] https://github.com/redhat-openstack/ansible-pacemaker/blob/master/modules/pacemaker_resource.py#L87
[2] https://github.com/ClusterLabs/pcs/commit/93da15a7615e8a83cbc220c8ad03197dc702df04
[3] https://github.com/ClusterLabs/pcs/commit/240faf0c5dda0321ccae6e34d51139626f9b30a6

As a consequence, attempts to delete a resource using the pacemaker_resource module appear to succeed, but don't actually delete the resource. The module's get_resource() function returns an error, which is interpreted to mean the resource has already been deleted. However, the error is actually saying the pcs command is no longer valid. Here's what you see if you run the command by hand:

[root@controller-0 ~]# pcs resource show openstack-cinder-volume
Error: This command has been replaced with 'pcs resource config'. See 'man pcs' -> Changes in pcs-0.11.

Version-Release number of selected component (if applicable):

ansible-pacemaker-1.0.4-17.1.20230621040435.7c10fdb.el9ost.noarch

How reproducible:

Always

Steps to Reproduce:
1. Deploy the cinder-backup service in active/passive mode: include "-e <THT>/environments/cinder-backup.yaml" in the overcloud deployment command
2. Switch cinder-backup to active/active mode by changing the command to include "-e <THT>/environments/cinder-backup-active-active.yaml"

Switching from A/P to A/A triggers the THT to delete the openstack-cinder-backup pacemaker resource [4]. But if you log onto a controller, "pcs status" will show the resource has not been deleted.

[4] https://opendev.org/openstack/tripleo-heat-templates/src/branch/stable/wallaby/deployment/cinder/cinder-backup-container-puppet.yaml#L305

Actual results:


Expected results:


Additional info:

Comment 17 Julia Marciano 2024-04-25 12:06:08 UTC
Verified,

[stack@undercloud-0 ~]$ cat core_puddle_version 
RHOS-17.1-RHEL-9-20240415.n.1

[stack@undercloud-0 ~]$ rpm -qa|grep ansible|grep pacemaker
ansible-pacemaker-1.0.4-17.1.20230621040436.el9ost.noarch

[stack@undercloud-0 ~]$  grep -n config /usr/share/ansible/plugins/modules/pacemaker_resource.py -B 2 -A2
85-
86-def get_resource(module, resource):
87:    cmd = "pcs resource config %s" % resource
88-    return module.run_command(cmd)
89-

Comment 24 errata-xmlrpc 2024-05-22 20:39:54 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 (Red Hat OpenStack Platform 17.1.3 bug fix and enhancement advisory), 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/RHBA-2024:2741


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