-
Story
-
Resolution: Done-Errata
-
Major
-
rhel-9.0.0
-
pacemaker-2.1.7-1.el9
-
rhel-sst-high-availability
-
ssg_filesystems_storage_and_HA
-
13
-
19
-
3
-
QE ack, Dev ack
-
False
-
-
No
-
None
-
Pass
-
None
-
-
All
-
All
-
2.1.7
-
None
Description of problem:
XML output of crm_verify doesn't contain error messages, they only go to stderr as a plaintext. This makes the XML output pretty much useless.
Version-Release number of selected component (if applicable):
pacemaker-2.1.4-5.el9
How reproducible:
always, easily
Steps to Reproduce:
1. create an invalid configuration, e.g. pcs resource create test1 systemd:chronyd promotable
2. run crm_verify output-as=xml
Actual results:
- crm_verify --live-check --output-as=xml -VV
(native_unpack) error: Resource test1:0 is of type systemd and therefore cannot be used as a promotable clone resource
(pe__create_clone_child) error: Failed unpacking resource test1
(unpack_resources) error: Ignoring <clone> resource 'test1-clone' because configuration is invalid
crm_verify: Errors found during check: config not valid
<pacemaker-result api-version="2.22" request="crm_verify --live-check --output-as=xml -VV">
<status code="78" message="Invalid configuration"/>
</pacemaker-result>
Expected results:
- crm_verify --live-check --output-as=xml
<pacemaker-result api-version="2.22" request="crm_verify --live-check --output-as=xml">
<status code="78" message="Invalid configuration"/>
<messages>
<message severity="error" code="native_unpack">
Resource test1:0 is of type systemd and therefore cannot be used as a promotable clone resource
</message>
<message severity="error" code="pe__create_clone_child">
Failed unpacking resource test1
</message>
<message severity="error" code="unpack_resources">
Ignoring <clone> resource 'test1-clone' because configuration is invalid
</message>
</messages>
</pacemaker-result>
Names of the tags and attributes are not as important as the structure: separate code, severity and message text.
Also, since XML is easy to parse and filter, consider including errors and warnings by default. For plaintext output, crm_verify requires -V to be specified to print them.
Please, avoid splitting one item over several lines / messages like in the following example:
- crm_verify --live-check --output-as=xml -VV
(unpack_resources) error: Resource start-up disabled since no STONITH resources have been defined
(unpack_resources) error: Either configure some or disable STONITH with the stonith-enabled option
(unpack_resources) error: NOTE: Clusters with shared data need STONITH to ensure data integrity
crm_verify: Errors found during check: config not valid
Additional info:
We are planning to run crm_verify from 'pcs status' command and include errors and warnings in the output. This will allow us to provide more error messages which will be more accurate than what pcs provides now with its clunky checks. We are also considering running crm_verify whenever a user makes any changes to CIB. Let us know if these are bad ideas. We'd also appreciate info about corner-cases we may hit, if you know any. Thanks!
- blocks
-
RHEL-7681 [RFE] Put 'crm_verify' messages in 'pcs status' output, run 'crm_verify' when editing CIB
- Planning
- is blocked by
-
RHEL-17225 Rebase pacemaker on upstream 2.1.7 release
- Closed
- external trackers
- links to
-
RHBA-2023:125612 pacemaker update