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 1909901 - [RFE] Add --quiet flag to pcs resource disable --safe to only show error messages instead of full output
Summary: [RFE] Add --quiet flag to pcs resource disable --safe to only show error mess...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: pcs
Version: ---
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.5
Assignee: Michal Pospisil
QA Contact: cluster-qe@redhat.com
Steven J. Levine
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-22 00:53 UTC by Chris Feist
Modified: 2021-11-09 19:13 UTC (History)
10 users (show)

Fixed In Version: pcs-0.10.8-3.el8
Doc Type: Enhancement
Doc Text:
.New reduced output display option for `pcs resource safe-disable` command The `pcs resource safe-disable` and `pcs resource disable --safe` commands print a lengthy simulation result after an error report. You can now specify the `--brief` option for those commands to print errors only. The error report now always contains resource IDs of affected resources.
Clone Of:
Environment:
Last Closed: 2021-11-09 17:33:51 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 6169632 0 None None None 2021-07-06 14:54:35 UTC
Red Hat Product Errata RHSA-2021:4142 0 None None None 2021-11-09 17:34:43 UTC

Description Chris Feist 2020-12-22 00:53:30 UTC
Add --quiet flag to pcs resource disable --safe to only show error messages instead of full output

Comment 1 Tomas Jelinek 2021-01-04 16:06:05 UTC
The full output can be seen in bz1631519

In bz1833114 a new flag, --brief, has been introduced to 'pcs resource disable --simulate' and 'pcs resource safe-disable --simulate' commands. The purpose of the flag is to print a short and simple info instead a full output from crm_simulate. It would make sense to use the same flag here.

What is the expected error message? Will this do:
Error: Disabling specified resources would have an effect on other resources: 'resource_a', 'resource_b', 'resource_c'

Comment 5 Michal Pospisil 2021-07-07 12:04:31 UTC
Feature merged into upstream master: https://github.com/ClusterLabs/pcs/commit/b9922dffaafd0745ce57428963b9f6f5f5091a14

Instead of the proposed '--quiet' option, this was implemented as a '--brief' option that is already supported by other pcs commands.
 
The 'pcs resource safe-disable' and 'pcs resource disable --safe' have a revised error format that always specifies resources affected by the disable operation. The new '--brief' option disables printing of crm_simulate output that follows this error.

ENVIRONMENT PREPARATION:
- any cluster
- at least 3 dummy resources
  pcs resource create dummy1 ocf:pacemaker:Dummy
  pcs resource create dummy2 ocf:pacemaker:Dummy
  pcs resource create dummy3 ocf:pacemaker:Dummy

To test this fix, run commands:
# pcs constraint colocation add dummy1 with dummy2
# pcs constraint colocation add dummy2 with dummy3
# pcs resource safe-disable --brief dummy3
Error: Disabling specified resource would have an effect on these resources: 'dummy1', 'dummy2'
Error: Errors have occurred, therefore pcs is unable to continue
# pcs resource disable --safe --brief dummy3 dummy1
Error: Disabling specified resources would have an effect on this resource: 'dummy2'
Error: Errors have occurred, therefore pcs is unable to continue

Comment 6 Miroslav Lisik 2021-07-09 07:22:43 UTC
Test:

[root@r8-node-01 ~]# rpm -q pcs
pcs-0.10.8-3.el8.x86_64

[root@r8-node-01 ~]# for i in $(seq -w 01 03); do pcs resource create d-$i ocf:pacemaker:Dummy; done
[root@r8-node-01 ~]# pcs constraint colocation add d-01 with d-02
[root@r8-node-01 ~]# pcs constraint colocation add d-02 with d-03

[root@r8-node-01 ~]# pcs resource safe-disable --brief d-03
Error: Disabling specified resource would have an effect on these resources: 'd-01', 'd-02'
Error: Errors have occurred, therefore pcs is unable to continue
[root@r8-node-01 ~]# pcs resource disable --safe --brief d-03 d-01
Error: Disabling specified resources would have an effect on this resource: 'd-02'
Error: Errors have occurred, therefore pcs is unable to continue

Comment 15 errata-xmlrpc 2021-11-09 17:33:51 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 (Low: pcs security, 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/RHSA-2021:4142


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