Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2252464

Summary: pacemaker_resource module calls obsolete pcs command
Product: Red Hat OpenStack Reporter: Alan Bishop <abishop>
Component: ansible-pacemakerAssignee: mathieu bultel <mbultel>
Status: CLOSED ERRATA QA Contact: Arik Chernetsky <achernet>
Severity: high Docs Contact:
Priority: high    
Version: 17.1 (Wallaby)CC: amoralej, gregraka, jbadiapa, jjoyce, jmarcian, lmiccini, ltoscano, mariel, mburns
Target Milestone: z3Keywords: Triaged, ZStream
Target Release: 17.1   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ansible-pacemaker-1.0.4-17.1.20230621040436.el9ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-05-22 20:39:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2128012    

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