Bug 1346014
| Summary: | debug-* actions don't work with all resource classes | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Ken Gaillot <kgaillot> |
| Component: | pacemaker | Assignee: | Ken Gaillot <kgaillot> |
| Status: | CLOSED ERRATA | QA Contact: | cluster-qe <cluster-qe> |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 8.0 | CC: | cfeist, cluster-maint, idevat, msmazova, omular, tojeline |
| Target Milestone: | pre-dev-freeze | Keywords: | Reopened, Triaged |
| Target Release: | 8.6 | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | pacemaker-2.1.2-1.el8 | Doc Type: | No Doc Update |
| Doc Text: |
This is a self-explanatory change that will not affect most users
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-05-10 14:09:46 UTC | Type: | Enhancement |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | 2.1.2 |
| Embargoed: | |||
|
Description
Ken Gaillot
2016-06-13 16:30:14 UTC
Pcs basically just calls "crm_resource -r <resource> --force-<action>" and displays its output. See https://github.com/ClusterLabs/pcs/blob/359e8f5c71fd6d3e3563df63efa15cfe211119da/pcs/resource.py#L2226 for details. So I am not sure what can be done in pcs to fix this. Certainly we can check for the resource's class and say systemd resources are not supported. On the other hand the message about unsupported stonith resources comes from crm_resource and pcs just catches it. It might be better to stick to this approach. It looks like start and stop work just fine for systemd, monitor is broken: [root@rh72-node1:~/devel/pcs/pcs]# crm_resource -r postfix --force-check -V Error performing operation: Argument list too long [root@rh72-node1:~/devel/pcs/pcs]# crm_resource -r postfix --force-start -V Operation start for postfix (systemd::postfix) returned 0 [root@rh72-node1:~/devel/pcs/pcs]# crm_resource -r postfix --force-stop -V Operation stop for postfix (systemd::postfix) returned 0 [root@rh72-node1:~/devel/pcs/pcs]# pcs resource show postfix Resource: postfix (class=systemd type=postfix) Meta Attrs: target-role=Stopped Operations: monitor interval=60s (postfix-monitor-interval-60s) The "Error performing operation: No such process" messages comes from crm_resource's stderr. The thing is pcs mixes stdout and stderr together. So this could be fixed in pcs, but we need to figure out when stderr is not relevant. We probably cannot tell by crm_resource's exit code: [root@rh68-node1:~]# crm_resource -r postfix --force-check -V Operation monitor for postfix (lsb::postfix) returned 3 > stdout: master is stopped Error performing operation: No such process [root@rh68-node1:~]# echo $? 3 Can you describe your idea how would you like this to be fixed in more detail? I feel silly now :) Of course this should be against pacemaker. Agree. It would be nice to support all the other non-fencing classes This will not be addressed in the 7.4 timeframe Due to short 7.5 cycle and limited resources, bumping this to 7.6 Due to developer time constraints, this issue has been opened as an upstream bug report, and this report will be closed. If developer time becomes available, this report will be reopened. Fixed upstream as of commit b4e426a0 The crm_resource --force-* options support OCF and LSB resources (including LSB resources configured as the "service" class). All other resource classes (such as systemd) will now give an error message about being unsupported. LSB monitor results will be reported as OCF results (in particular, an LSB exit status of 3 for --force-check will be mapped to "not running", which is OCF exit status 7). Trying to use one of the options with a bundle will also give an error message. > [root@virt-524 ~]# rpm -q pacemaker > pacemaker-2.1.2-2.el8.x86_64 > [root@virt-524 ~]# rpm -q pacemaker-cts > pacemaker-cts-2.1.2-2.el8.noarch Configure a cluster wih LSB, OCF, systemd and service class resources. Resource LSBDummy is included in pacemaker-cts package and is used in this bugzilla for testing the LSB class. > [root@virt-524 ~]# pcs resource create lsb1 lsb:LSBDummy op monitor interval=10 > [root@virt-524 ~]# pcs resource create lsb2 service:LSBDummy op monitor interval=10 > [root@virt-524 ~]# pcs resource create dummy ocf:pacemaker:Dummy > [root@virt-524 ~]# pcs resource create postfix systemd:postfix op monitor interval=60s > [root@virt-524 ~]# pcs resource create postfix2 service:postfix op monitor interval=60s > [root@virt-524 ~]# pcs status > Cluster name: STSRHTS9364 > Cluster Summary: > * Stack: corosync > * Current DC: virt-525 (version 2.1.2-2.el8-ada5c3b36e2) - partition with quorum > * Last updated: Fri Jan 21 16:37:20 2022 > * Last change: Fri Jan 21 16:37:12 2022 by hacluster via crmd on virt-524 > * 2 nodes configured > * 7 resource instances configured > Node List: > * Online: [ virt-524 virt-525 ] > Full List of Resources: > * fence-virt-524 (stonith:fence_xvm): Started virt-524 > * fence-virt-525 (stonith:fence_xvm): Started virt-525 > * lsb1 (lsb:LSBDummy): Started virt-525 > * lsb2 (service:LSBDummy): Started virt-524 > * postfix (systemd:postfix): Started virt-524 > * postfix2 (service:postfix): Started virt-525 > * dummy (ocf::pacemaker:Dummy): Started virt-524 > Daemon Status: > corosync: active/enabled > pacemaker: active/enabled > pcsd: active/enabled Run `pcs resource debug-monitor` (or `crm_resource --force-*`) with the resources and check the output: > [root@virt-524 ~]# crm_resource -r lsb1 --force-check > Operation force-check for lsb1 (lsb:LSBDummy) returned 0 (ok) > Running OK > LSBDummy status : 0 > [root@virt-524 ~]# crm_resource -r lsb1 --force-stop > Operation force-stop for lsb1 (lsb:LSBDummy) returned 0 (ok) > LSBDummy stop : 0B service: [ OK ] > [root@virt-524 ~]# pcs resource debug-monitor lsb2 > Operation force-check for lsb2 (service:LSBDummy) returned 0 (ok) > Running OK > LSBDummy status : 0 > [root@virt-524 ~]# crm_resource -r lsb2 --force-start > Operation force-start for lsb2 (service:LSBDummy) returned 0 (ok) > LSBDummy start : 0 service: [ OK ] > [root@virt-524 ~]# pcs resource debug-monitor dummy > Operation force-check for dummy (ocf:pacemaker:Dummy) returned 0 (ok) > [root@virt-524 ~]# crm_resource -r postfix --force-stop > Operation force-stop for postfix (systemd:postfix) could not be executed (Error: Manual execution of this standard is unsupported) > crm_resource: Error performing operation: Unimplemented > [root@virt-524 ~]# crm_resource -r postfix2 --force-check > Operation force-check for postfix2 (service:postfix) could not be executed (Error: Manual execution of this standard is unsupported) > crm_resource: Error performing operation: Unimplemented Disable the resources: > [root@virt-524 ~]# pcs resource disable lsb1 > [root@virt-524 ~]# pcs resource disable lsb2 > [root@virt-524 ~]# pcs resource disable postfix > [root@virt-524 ~]# pcs resource disable postfix2 > [root@virt-524 ~]# pcs resource disable dummy > [root@virt-524 ~]# pcs status > Cluster name: STSRHTS9364 > Cluster Summary: > * Stack: corosync > * Current DC: virt-525 (version 2.1.2-2.el8-ada5c3b36e2) - partition with quorum > * Last updated: Fri Jan 21 17:38:56 2022 > * Last change: Fri Jan 21 17:38:49 2022 by hacluster via crmd on virt-524 > * 2 nodes configured > * 7 resource instances configured (5 DISABLED) > Node List: > * Online: [ virt-524 virt-525 ] > Full List of Resources: > * fence-virt-524 (stonith:fence_xvm): Started virt-524 > * fence-virt-525 (stonith:fence_xvm): Started virt-525 > * lsb1 (lsb:LSBDummy): Stopped (disabled) > * lsb2 (service:LSBDummy): Stopped (disabled) > * postfix (systemd:postfix): Stopped (disabled) > * postfix2 (service:postfix): Stopped (disabled) > * dummy (ocf::pacemaker:Dummy): Stopped (disabled) > Daemon Status: > corosync: active/enabled > pacemaker: active/enabled > pcsd: active/enabled Run `pcs resource debug-monitor` (or `crm_resource --force-check`) on the resources and check the output: > [root@virt-524 ~]# pcs resource debug-monitor lsb1 > crm_resource: Error performing operation: Not running > Operation force-check for lsb1 (lsb:LSBDummy) returned 7 (not running) > Dummy LSB service is stopped > LSBDummy status : 3 > [root@virt-524 ~]# crm_resource -r lsb2 --force-check > Operation force-check for lsb2 (service:LSBDummy) returned 7 (not running) > Dummy LSB service is stopped > LSBDummy status : 3 > crm_resource: Error performing operation: Not running > [root@virt-524 ~]# pcs resource debug-monitor dummy > crm_resource: Error performing operation: Not running > Operation force-check for dummy (ocf:pacemaker:Dummy) returned 7 (not running) > [root@virt-524 ~]# crm_resource -r postfix --force-check > Operation force-check for postfix (systemd:postfix) could not be executed (Error: Manual execution of this standard is unsupported) > crm_resource: Error performing operation: Unimplemented > [root@virt-524 ~]# pcs resource debug-monitor postfix2 > Operation force-check for postfix2 (service:postfix) could not be executed (Error: Manual execution of this standard is unsupported) > crm_resource: Error performing operation: Unimplemented The `pcs resource debug-*` (`crm_resource --force-*`) command is supported on OCF and LSB resources including LSB resources configured as the "service" class (resources lsb1, lsb2, dummy). Other systemd and service class resources (postfix and postfix2) are showing error, that they are unsupported. verified in pacemaker-2.1.2-2.el8 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 (pacemaker bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:1885 |