Bug 901588 - pcs constraint handling could be more user-friendly (and machine parsable)
Summary: pcs constraint handling could be more user-friendly (and machine parsable)
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: pcs
Version: 6.4
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Chris Feist
QA Contact: Cluster QE
Depends On:
TreeView+ depends on / blocked
Reported: 2013-01-18 15:15 UTC by Jaroslav Kortus
Modified: 2013-11-21 11:50 UTC (History)
4 users (show)

Fixed In Version: pcs-0.9.64-1.el6
Doc Type: Bug Fix
Doc Text:
Cause: constraint rules ids and resource operation ids are not displayed in pcs. Consequence: Users will have difficulty remove the rules with pcs and must resort to using other tools or editing the cib directly Fix: Using the --full option pcs will properly display the ids for resource operations and constraint rules Result: Users can find the id of the resource operation or constraint rule that was missing
Clone Of:
Last Closed: 2013-11-21 11:50:31 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1633 0 normal SHIPPED_LIVE pcs bug fix and enhancement update 2013-11-20 21:53:48 UTC

Description Jaroslav Kortus 2013-01-18 15:15:54 UTC
Description of problem:
pcs constraint handling could be more user-friendly (and machine parsable).
Example of the output (with one constraint present):

$ pcs constraint
Location Constraints:
  Resource: group01
    Rule: #uname eq marathon-03c2-node02 (score:-INFINITY) 
Ordering Constraints:
Colocation Constraints:

In this output there is no identifier of the constraint for further operations.
So one has to do this to actually get it:
$ pcs constraint ref group01
Resource: group01

I think we could make this more user-friendly and intuitive.

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

How reproducible:

Steps to Reproduce:
1. see description
Actual results:
* pcs constraint does not print any re-usable ID of listed constraints
* the output is tricky for automated parsing

Expected results:
* pcs constraint should print ID of each listed constraint
* output should be more parsing-friendly (if not xml :))

Additional info:

Comment 2 Jaroslav Kortus 2013-01-21 16:57:14 UTC
The same situation applies also to operations on resources. I haven't found any pcs option to show me the exact operation ids.

(10:50:26) [root@marathon-03c2-node01:~]$ pcs resource add_operation dummystateful monitor interval="20" role="Slave" timeout="20"

(10:51:11) [root@marathon-03c2-node01:~]$ pcs resource add_operation dummystateful monitor interval="10" role="Master" timeout="20"

(10:51:39) [root@marathon-03c2-node01:~]$ pcs resource
 dummystateful	(ocf::pacemaker:Stateful):	Started 

(10:51:50) [root@marathon-03c2-node01:~]$ pcs resource show dummystateful
Resource: dummystateful
  op monitor interval=30s
  op monitor interval=20 role=Slave timeout=20
  op monitor interval=10 role=Master timeout=20

(10:51:55) [root@marathon-03c2-node01:~]$ pcs resource remove_operation dummystateful monitor
Unable to find operation matching: monitor

Comment 9 Chris Feist 2013-08-13 21:34:09 UTC
Constraint and operation id's are now shown with --full

[root@ask-02 ~]# pcs -f test.xml resource create Test Dummy
[root@ask-02 ~]# pcs -f test.xml constraint location Test prefers rh7-1
[root@ask-02 ~]# pcs -f test.xml constraint
Location Constraints:
  Resource: Test
    Enabled on: rh7-1
Ordering Constraints:
Colocation Constraints:
[root@ask-02 ~]# pcs -f test.xml constraint --full
Location Constraints:
  Resource: Test
    Enabled on: rh7-1 (score:INFINITY) (id:location-Test-rh7-1-INFINITY)
Ordering Constraints:
Colocation Constraints:
[root@ask-02 ~]# pcs -f test.xml resource op add Test monitor interval=31s
[root@ask-02 ~]# pcs -f test.xml resource --full
 Resource: Test (class=ocf provider=heartbeat type=Dummy)
  Operations: monitor interval=60s (Test-monitor-interval-60s)
              monitor interval=31s (Test-name-monitor-interval-31s)

Comment 12 errata-xmlrpc 2013-11-21 11:50:31 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.


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