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 1298581 - Need a way to provide a reason for why a resource won't start (or was stopped)
Summary: Need a way to provide a reason for why a resource won't start (or was stopped)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pacemaker
Version: 7.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 7.5
Assignee: Ken Gaillot
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-14 13:31 UTC by Chris Feist
Modified: 2018-04-10 15:29 UTC (History)
4 users (show)

Fixed In Version: pacemaker-1.1.18-1.el7
Doc Type: No Doc Update
Doc Text:
Low-level tools do not need documentation. The corresponding pcs functionality will be documented as part of that separate bz.
Clone Of:
Environment:
Last Closed: 2018-04-10 15:28:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1470791 1 medium CLOSED [RFE] support crm_mon option to hide stopped banned resources 2023-09-22 18:19:39 UTC
Red Hat Product Errata RHEA-2018:0860 0 None None None 2018-04-10 15:29:53 UTC

Internal Links: 1470791

Description Chris Feist 2016-01-14 13:31:27 UTC
Description of problem:
People are running 'pcs resource enable' and the resource doesn't start because of constraints, but they don't know which constraints are preventing it from starting (or if constraints are the reason it isn't starting).

We'd like a command we can run that specifies a resource and then tells us it is either running, or gives us a reason why it isn't running.  pcs can then use that output and pass it back to the user.

Version-Release number of selected component (if applicable):
all

How reproducible:
always

Comment 2 Ken Gaillot 2016-01-18 22:56:10 UTC
Upstream commit https://github.com/ClusterLabs/pacemaker/commit/11ac60a modified "crm_resource --cleanup" to print reasons why the resource would stay stopped. For example:

* The configuration specifies that 'myrsc' should remain stopped

and/or

* Resource myrsc is configured to not be managed by the cluster

I'm thinking we can add a new option that would do just the check and print. The current implementation does not know what particular constraints or other configuration prevent startup, but it's a good starting point.

Comment 4 Ken Gaillot 2016-05-16 16:27:18 UTC
This will not be ready in the 7.3 timeframe.

Comment 5 Ken Gaillot 2017-03-06 23:24:32 UTC
This will not be ready in the 7.4 tiemframe.

Comment 6 Ken Gaillot 2017-05-31 17:35:40 UTC
Upstream pacemaker now supports a "crm_resource --why" command as of commit 6f0a149c, thanks to a submission by contributor Aravind Kumar.

The descriptions that --cleanup and --why give are currently limited to a few conditions, but this provides a basis for future enhancements.

Comment 7 Ken Gaillot 2017-10-10 16:56:55 UTC
QA: Test procedure:

1. Configure a pacemaker cluster with various resources.

2. Cause some of the resources to be stopped by various means (pcs resource disable, -INFINITY constraints on all nodes, colocation or ordering constraint with another resource stopped by one of those means, etc.).

3. Run crm_resource with the new --why option. Before the fix, the option doesn't exist; after the fix, it shows why each resource is stopped. Usage:

crm_resource --why
-> shows status of all resources (running or not running, and why)

crm_resource --why -r <resource-id>
-> shows status of particular resource

crm_resource --why -r <resource-id> -N <node-name>
-> shows status of particular resource on particular node

Comment 10 Patrik Hagara 2018-02-28 17:41:03 UTC
Before the fix (1.1.16-12.el7-94ff4df), the "--why" option does not exist:
> [root@virt-131 ~]# crm_resource --why
> crm_resource: unrecognized option '--why'

After the fix (1.1.18-11.el7-2b07d5c5a9), creating a bunch of dummy resources and (mis)configuring them to not be able to start using the following methods:
  * disabling the resource, which resulted in the following being printed by "crm_resource --why":
    > The configuration specifies that '<resource>' should remain stopped
  * banning the resource on all nodes (ie. creating -INFINITY location constraints); "crm_resource --why" DOES NOT show any extra info apart from "is not running"
  * constraining a resource to be colocated with a disabled resource; "crm_resource --why" DOES NOT show any extra info apart from "is not running"
  * constraining a resource to be started after a disabled resource; "crm_resource --why" DOES NOT show any extra info apart from "is not running"

While the number of particular reasons why resources are not starting is currently *very* limited (see link at the end of this comment), it seems highly unlikely to break anything and can be enhanced to cover more situations in the future (to actually become useful in practice). Marking VERIFIED.


https://github.com/ClusterLabs/pacemaker/blob/edd67444e967a0c58a96aab1748b378eec3b40f9/tools/crm_resource_runtime.c#L829

Comment 12 errata-xmlrpc 2018-04-10 15:28:37 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, 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-2018:0860


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