Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 894174

Summary: unable to build constraints between group/clone/multistate resources
Product: Red Hat Enterprise Linux 6 Reporter: David Vossel <dvossel>
Component: pcsAssignee: Chris Feist <cfeist>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.4CC: cluster-maint, fdanapfe, fdinitto, jkortus, rsteiger, tlavigne
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pcs-0.9.26-9.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 09:49:58 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: 768522, 902691    
Attachments:
Description Flags
example cib none

Description David Vossel 2013-01-10 22:06:49 UTC
Description of problem:

pcs only allows constraints (order/colocation) to exist between primitive types.  We need to be able to build these sorts of constraints between groups, multistate, and clone resources as well.


Steps to Reproduce:

1. make 2 groups.

pcs resource create Q ocf:pacemaker:Dummy op monitor interval=10s
pcs resource create R ocf:pacemaker:Dummy op monitor interval=10s
pcs resource create S ocf:pacemaker:Dummy op monitor interval=10s pcs resource group add GROUP1 Q R S
pcs resource create T ocf:pacemaker:Dummy op monitor interval=10s
pcs resource create U ocf:pacemaker:Dummy op monitor interval=10s
pcs resource create V ocf:pacemaker:Dummy op monitor interval=10s
pcs resource group add GROUP2 T U V

2. building constraints between them does not work
pcs order add GROUP1 GROUP2 Error: Resource 'GROUP1' does not exist

Additional info:

Looking at pcs/utils.py we are only looking for primitives in "does_resource_exist()" function, which is what the constraint functions check to verify the resource input arguments are valid.

Comment 2 David Vossel 2013-01-10 22:59:33 UTC
The formatting of the steps to reproduce this looked messed up in the description so I fixed it below.

1. make 2 groups.

# pcs resource create Q ocf:pacemaker:Dummy op monitor interval=10s
# pcs resource create R ocf:pacemaker:Dummy op monitor interval=10s
# pcs resource create S ocf:pacemaker:Dummy op monitor interval=10s
# pcs resource group add GROUP1 Q R S
# pcs resource create T ocf:pacemaker:Dummy op monitor interval=10s
# pcs resource create U ocf:pacemaker:Dummy op monitor interval=10s
# pcs resource create V ocf:pacemaker:Dummy op monitor interval=10s
# pcs resource group add GROUP2 T U V
 
2. building constraints between them does not work
# pcs constraint order add GROUP1 GROUP2

Error: Resource 'GROUP1' does not exist

Comment 3 David Vossel 2013-01-10 23:11:44 UTC
Created attachment 676576 [details]
example cib

I've attached a sample cib file to reproduce this so you don't need the cluster stack running.

Try this.

# pcs -f cib_pcs_constraints.xml constraint order add GROUP1 GROUP2
Error: Resource 'GROUP1' does not exist

I can confirm this issue exists in the latest 6.4 pcs.  It appears to have been introduced recently. Looking at the source, I believe this started at v0.9.26-3 which got built 2012-10-31.

Comment 4 Chris Feist 2013-01-10 23:43:46 UTC
Fix for this bz is here - https://github.com/feist/pcs/commit/eca923a06ab8d2283c815fe7117761328ab7fc17

Before the fix:
[root@ask-03 pcs]# pcs -f ~/cib_pcs_constraints.xml constraint order add GROUP1 GROUP2
Error: Resource 'GROUP1' does not exist

Using upstream fix:
[root@ask-03 pcs]# ./pcs -f ~/cib_pcs_constraints.xml constraint order add GROUP1 GROUP2
Adding GROUP1 GROUP2 (kind: Mandatory)
[root@ask-03 pcs]# 
[root@ask-03 pcs]# ./pcs -f ~/cib_pcs_constraints.xml constraint order
Ordering Constraints:
  GROUP1 then GROUP2

Comment 5 David Vossel 2013-01-11 20:17:50 UTC
Frank Danapfel has confirmed that this does affect sap deployments.  His initial test setup did not use the affected pcs version which is why he did not run into this earlier.

-- Vossel

Comment 7 Chris Feist 2013-01-15 21:55:06 UTC
Before fix:

[root@ask-03 ~]# pcs resource create Q ocf:pacemaker:Dummy op monitor interval=10s
[root@ask-03 ~]# pcs resource create R ocf:pacemaker:Dummy op monitor interval=10s
[root@ask-03 ~]# pcs resource create S ocf:pacemaker:Dummy op monitor interval=10s
[root@ask-03 ~]# pcs resource group add GROUP1 Q R S
[root@ask-03 ~]# pcs resource create T ocf:pacemaker:Dummy op monitor interval=10s
[root@ask-03 ~]# pcs resource create U ocf:pacemaker:Dummy op monitor interval=10s
[root@ask-03 ~]# pcs resource create V ocf:pacemaker:Dummy op monitor interval=10s
[root@ask-03 ~]# pcs resource group add GROUP2 T U V
[root@ask-03 ~]# pcs constraint order add GROUP1 GROUP2
Error: Resource 'GROUP1' does not exist

After fix:
(Clear out all of the old entries with 'pcs resource delete')
[root@ask-03 ~]# pcs resource create Q ocf:pacemaker:Dummy op monitor interval=10s
[root@ask-03 ~]# pcs resource create R ocf:pacemaker:Dummy op monitor interval=10s
[root@ask-03 ~]# pcs resource create S ocf:pacemaker:Dummy op monitor interval=10s
[root@ask-03 ~]# pcs resource group add GROUP1 Q R S
[root@ask-03 ~]# pcs resource create T ocf:pacemaker:Dummy op monitor interval=10s
[root@ask-03 ~]# pcs resource create U ocf:pacemaker:Dummy op monitor interval=10s
[root@ask-03 ~]# pcs resource create V ocf:pacemaker:Dummy op monitor interval=10s
[root@ask-03 ~]# pcs resource group add GROUP2 T U V
[root@ask-03 ~]# pcs constraint order add GROUP1 GROUP2
Adding GROUP1 GROUP2 (kind: Mandatory)
[root@ask-03 ~]# pcs constraint
Location Constraints:
Ordering Constraints:
  GROUP1 then GROUP2
Colocation Constraints:
[root@ask-03 ~]# rpm -q pcs
pcs-0.9.26-9.el6.noarch
[root@ask-03 ~]#

Comment 11 errata-xmlrpc 2013-02-21 09:49:58 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, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2013-0369.html