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 1712347 - pcs cluster verify suggests -V which is not working
Summary: pcs cluster verify suggests -V which is not working
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: pcs
Version: 8.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: rc
: 8.0
Assignee: Miroslav Lisik
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-21 11:32 UTC by Michele Baldessari
Modified: 2020-05-15 09:22 UTC (History)
7 users (show)

Fixed In Version: pcs-0.10.3-1.el8
Doc Type: Bug Fix
Doc Text:
Cause: Command 'pcs cluster verify' suggest -V option for more details in case when cib is not valid. Consequence: The user is confused because -V option is not recognized by pcs. Fix: Suggest --full option instead of -V option in case of invalid cib file for more details. Result: Option --full provides more details about invalid cib file.
Clone Of:
Environment:
Last Closed: 2020-05-15 09:22:49 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)
proposed fix (19.02 KB, patch)
2019-10-16 10:57 UTC, Miroslav Lisik
no flags Details | Diff

Description Michele Baldessari 2019-05-21 11:32:39 UTC
Description of problem:
On an invalid CIB we get this:

[root@controller-0 ~]# pcs cluster verify  -f cib.xml    
Error: invalid cib:                                      
Warnings found during check: config may not be valid     
  Use -V -V for more details                             

But then adding '-V' anywhere on the command line does not work.

Maybe we should mask the output of '/usr/sbin/crm_verify --xml-file /tmp/foo' which is what is producing -V -V?

Version-Release number of selected component (if applicable):
pcs-0.10.1-4.el8.x86_64

Comment 1 Tomas Jelinek 2019-05-24 14:24:09 UTC
The "-V" option of the "pcs cluster verify" has been replaced with the "--full" option in pcs in RHEL 8.0. Pcs should replace "-V" in crm_verify output with "--full".

Also, check how many "-V" should be provided to crm_verify as it seems from the message that the more "-V"s the more details are provided. Replace "-V"s in the message with one "--full" and make sure enough "-V"s are specified when pcs runs crm_verify.

Comment 7 Miroslav Lisik 2019-10-16 10:57:55 UTC
Created attachment 1626427 [details]
proposed fix

Test:
1. Get valid cib xml file.
2. Do some modifications which made cib file invalid.
3. Run `pcs cluster verify -f <your_cib_file>`.
4. pcs should suggest --full option instead of -V option.

Comment 8 Miroslav Lisik 2019-10-29 13:43:37 UTC
After fix:

[root@r81-node-01 ~]# rpm -q pcs
pcs-0.10.3-1.el8.x86_64

Configuration: A running cluster with fencing (fence_xvm).

> 1) Warning

[root@r81-node-01 ~]# rc=0
[root@r81-node-01 ~]# while [ $rc = 0 ]; do pcs cluster verify; rc=$?; pcs cluster cib > cib.xml; sleep 1; done

> On the other node do:

[root@r81-node-02 ~]# reboot -f
Rebooting.

> Results from r81-node-01:

[root@r81-node-01 ~]# while [ $rc = 0 ]; do pcs cluster verify; rc=$?; pcs cluster cib > cib.xml; sleep 1; done
Error: invalid cib:
Warnings found during check: config may not be valid


Use --full for more details.

> With --full option:

[root@r81-node-01 ~]# while [ $rc = 0 ]; do pcs cluster verify --full; rc=$?; pcs cluster cib > cib.xml; sleep 1; done
Error: invalid cib:
(pe_fence_node)         warning: Cluster node r81-node-02 will be fenced: peer is no longer part of the cluster
(determine_online_status)       warning: Node r81-node-02 is unclean
(custom_action)         warning: Action fence-r81-node-02_stop_0 on r81-node-02 is unrunnable (offline)
(custom_action)         warning: Action d-02_stop_0 on r81-node-02 is unrunnable (offline)
(stage6)        warning: Scheduling Node r81-node-02 for STONITH
Warnings found during check: config may not be valid


> 2) Error

> Configure a resource:

[root@r81-node-01 ~]# pcs resource
 d-01   (ocf::pacemaker:Dummy): Started r81-node-01

> Save a cib

[root@r81-node-01 ~]# pcs cluster cib > cib.xml

> Duplicate <privmitive> element in cib

[root@r81-node-01 ~]# vim cib.xml 

> Run "cluster verify" commands:

[root@r81-node-01 ~]# pcs cluster verify -f cib.xml 
Error: invalid cib:
/tmp/tmp0656hwj7.pcs:52: element primitive: Relax-NG validity error : ID d-01 redefined
/tmp/tmp0656hwj7.pcs:52: element primitive: Relax-NG validity error : Invalid sequence in interleave
/tmp/tmp0656hwj7.pcs:52: element primitive: Relax-NG validity error : Element primitive failed to validate content
/tmp/tmp0656hwj7.pcs:22: element primitive: Relax-NG validity error : Element resources has extra content: primitive
Errors found during check: config not valid


Use --full for more details.
[root@r81-node-01 ~]# echo $?
1

[root@r81-node-01 ~]# pcs cluster verify -f cib.xml --full
Error: invalid cib:
/tmp/tmpqtuqkrnw.pcs:52: element primitive: Relax-NG validity error : ID d-01 redefined
/tmp/tmpqtuqkrnw.pcs:52: element primitive: Relax-NG validity error : Invalid sequence in interleave
/tmp/tmpqtuqkrnw.pcs:52: element primitive: Relax-NG validity error : Element primitive failed to validate content
/tmp/tmpqtuqkrnw.pcs:22: element primitive: Relax-NG validity error : Element resources has extra content: primitive
(main)  error: CIB did not pass schema validation
Errors found during check: config not valid

[root@r81-node-01 ~]# echo $?
1


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