Hide Forgot
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 cli-standby-group01 I think we could make this more user-friendly and intuitive. Version-Release number of selected component (if applicable): pcs-0.9.26-9.el6.noarch How reproducible: always Steps to Reproduce: 1. see description 2. 3. 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:
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
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)
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/RHBA-2013-1633.html