Bug 1447918

Summary: --force-start, --force-stop, --force-monitor etc. with bundles
Product: Red Hat Enterprise Linux 8 Reporter: Tomas Jelinek <tojeline>
Component: pacemakerAssignee: Ken Gaillot <kgaillot>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: low Docs Contact:
Priority: low    
Version: 8.0CC: cluster-maint, jmarcian, msmazova
Target Milestone: pre-dev-freezeKeywords: Reopened, Triaged
Target Release: 8.5   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pacemaker-2.1.0-7.el8 Doc Type: No Doc Update
Doc Text:
This change is self-explanatory and doesn't need to be called out
Story Points: ---
Clone Of:
: 1983196 (view as bug list) Environment:
Last Closed: 2021-11-09 18:44:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version: 2.1.1
Embargoed:
Bug Depends On:    
Bug Blocks: 1983196    

Description Tomas Jelinek 2017-05-04 08:50:45 UTC
crm_resource --resource <bundle resource> --force-start|--force-stop|... doesn't work with bundle resources. This is expected as it doesn't work with clones, masters and groups either. For these commands to work the user must specify id of one of inner resources which pacemaker creates behind the scene. How is the user suppose to know those ids? Sure, the ids can be seen in crm_mon --xml once the bundle is started. But what about before that?


Ken:
It sounds like a bad idea to force actions on individual components of a bundle. The intent of the bundle is that they are tightly coupled. Not sure what the best approach is here. Maybe open a bz for discussion.

Comment 2 Ken Gaillot 2017-05-04 14:41:36 UTC
This will be discussed in the 7.5 timeframe.

Comment 3 Andrew Beekhof 2017-07-18 23:54:03 UTC
At best, we could consider the --force-{action} applying to the container.
However that wont bring up anything that was supposed to start inside it, or any IP that was supposed to be collocated for access.

I would be inclined to keep the existing behaviour and "just" improve the error message.

Comment 4 Andrew Beekhof 2017-08-04 01:26:13 UTC
Bumping, not a super high priority yet

Comment 5 Ken Gaillot 2017-11-01 22:39:52 UTC
This will not be addressed in the 7.5 timeframe

Comment 8 RHEL Program Management 2020-12-01 07:28:41 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.

Comment 9 Ken Gaillot 2021-07-16 19:17:43 UTC
crm-resource --force-* outputs an error message for bundles as of upstream master branch commit 5bcab230

Comment 11 Ken Gaillot 2021-07-20 18:55:01 UTC
This can be verified either by using crm_resource with the --force-start, --force-stop, --force-demote, --force-promote, and --force-check options, or equivalently using pcs with the pcs resource debug-start, debug-stop, debug-demote, debug-promote, and debug-monitor commands.

We only need to verify that a clearer error message is given.

Comment 16 Ken Gaillot 2021-09-10 20:06:21 UTC
Since this is too low impact to merit an 8.4 z-stream, this is no longer RHOSP-related

Comment 17 Markéta Smazová 2021-09-15 15:43:36 UTC
before fix
-----------

    [root@virt-535 ~]# rpm -q pacemaker
    pacemaker-2.0.5-9.el8.x86_64

    [root@virt-535 ~]# pcs status
    Cluster name: STSRHTS12348
    Cluster Summary:
      * Stack: corosync
      * Current DC: virt-535 (version 2.0.5-9.el8-ba59be7122) - partition with quorum
      * Last updated: Wed Sep 15 15:39:16 2021
      * Last change:  Wed Sep 15 15:39:12 2021 by root via cibadmin on virt-535
      * 2 nodes configured
      * 6 resource instances configured

    Node List:
      * Online: [ virt-535 virt-536 ]

    Full List of Resources:
      * fence-virt-535	(stonith:fence_xvm):	 Started virt-535
      * fence-virt-536	(stonith:fence_xvm):	 Started virt-536
      * Container bundle set: test-bundle [redis:test]:
        * test-bundle-podman-0 (127.0.0.2)	(ocf::heartbeat:podman):	 Started virt-535
        * test-bundle-podman-1 (127.0.0.3)	(ocf::heartbeat:podman):	 Started virt-536

    Daemon Status:
      corosync: active/disabled
      pacemaker: active/disabled
      pcsd: active/enabled

    [root@virt-535 ~]# crm_resource --force-start --resource test-bundle
    (resources_action_create) 	error: Cannot create operation for test-bundle without resource class

    [root@virt-535 ~]# crm_resource --force-stop --resource test-bundle
    (resources_action_create) 	error: Cannot create operation for test-bundle without resource class

    [root@virt-535 ~]# crm_resource --force-promote --resource test-bundle
    (resources_action_create) 	error: Cannot create operation for test-bundle without resource class

    [root@virt-535 ~]# crm_resource --force-demote --resource test-bundle
    (resources_action_create) 	error: Cannot create operation for test-bundle without resource class

    [root@virt-535 ~]# crm_resource --force-check --resource test-bundle
    (resources_action_create) 	error: Cannot create operation for test-bundle without resource class

    [root@virt-535 ~]# pcs resource debug-start test-bundle
    Error: unable to debug-start a bundle

    [root@virt-535 ~]# pcs resource debug-stop test-bundle
    Error: unable to debug-stop a bundle

    [root@virt-535 ~]# pcs resource debug-promote test-bundle
    Error: unable to debug-promote a bundle

    [root@virt-535 ~]# pcs resource debug-demote test-bundle
    Error: unable to debug-demote a bundle

    [root@virt-535 ~]# pcs resource debug-monitor test-bundle
    Error: unable to debug-monitor a bundle

When using crm_resource --force-start ...etc. command on bundles, an error message does not mention that bundled resources are not supported.

after fix
----------

    [root@virt-530 ~]# rpm -q pacemaker
    pacemaker-2.1.0-8.el8.x86_64

    [root@virt-530 ~]# pcs status
    Cluster name: STSRHTS14732
    Cluster Summary:
      * Stack: corosync
      * Current DC: virt-530 (version 2.1.0-8.el8-7c3f660707) - partition with quorum
      * Last updated: Wed Sep 15 15:13:55 2021
      * Last change:  Wed Sep 15 15:12:07 2021 by root via cibadmin on virt-530
      * 2 nodes configured
      * 6 resource instances configured

    Node List:
      * Online: [ virt-529 virt-530 ]

    Full List of Resources:
      * fence-virt-529	(stonith:fence_xvm):	 Started virt-529
      * fence-virt-530	(stonith:fence_xvm):	 Started virt-530
      * Container bundle set: test-bundle [redis:test]:
        * test-bundle-podman-0 (127.0.0.2)	(ocf::heartbeat:podman):	 Started virt-529
        * test-bundle-podman-1 (127.0.0.3)	(ocf::heartbeat:podman):	 Started virt-530

    Daemon Status:
      corosync: active/disabled
      pacemaker: active/disabled
      pcsd: active/enabled


    [root@virt-530 ~]# crm_resource --force-start --resource test-bundle
    Sorry, the force-start option doesn't support bundled resources
    crm_resource: Error performing operation: Unimplemented

    [root@virt-530 ~]# crm_resource --force-stop --resource test-bundle
    Sorry, the force-stop option doesn't support bundled resources
    crm_resource: Error performing operation: Unimplemented

    [root@virt-530 ~]# crm_resource --force-promote --resource test-bundle
    Sorry, the force-promote option doesn't support bundled resources
    crm_resource: Error performing operation: Unimplemented

    [root@virt-530 ~]# crm_resource --force-demote --resource test-bundle
    Sorry, the force-demote option doesn't support bundled resources
    crm_resource: Error performing operation: Unimplemented

    [root@virt-530 ~]# crm_resource --force-check --resource test-bundle
    Sorry, the force-check option doesn't support bundled resources
    crm_resource: Error performing operation: Unimplemented

 
    [root@virt-530 ~]# pcs resource debug-start test-bundle
    Error: unable to debug-start a bundle

    [root@virt-530 ~]# pcs resource debug-stop test-bundle
    Error: unable to debug-stop a bundle

    [root@virt-530 ~]# pcs resource debug-promote test-bundle
    Error: unable to debug-promote a bundle
    
    [root@virt-530 ~]# pcs resource debug-demote test-bundle
    Error: unable to debug-demote a bundle

    [root@virt-530 ~]# pcs resource debug-monitor test-bundle
    Error: unable to debug-monitor a bundle

After fix an error message is displayed that bundled resources are not supported.

Marking verified in pacemaker-2.1.0-8.el8

Comment 19 errata-xmlrpc 2021-11-09 18:44:49 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 (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/RHEA-2021:4267