Summary: | "resource create" accepts an unknown operation | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Ivan Devat <idevat> | ||||||
Component: | pcs | Assignee: | Ivan Devat <idevat> | ||||||
Status: | CLOSED ERRATA | QA Contact: | cluster-qe <cluster-qe> | ||||||
Severity: | unspecified | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | 7.2 | CC: | cfeist, cluster-maint, idevat, omular, rsteiger, tojeline | ||||||
Target Milestone: | rc | ||||||||
Target Release: | --- | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | pcs-0.9.156-1.el7 | Doc Type: | Bug Fix | ||||||
Doc Text: |
Cause:
The user makes a typo in an operation name when runs "pcs resource create". Pcs silently accept it.
Consequence:
Pcs puts into the cib a contents than the user intended.
Fix:
Pcs compares the entered operation name with the list of operation names which is specified in the resource agent. If the name is not found in the list the pcs ends up with an error that could be forced.
Result:
The user is informed about the potential typo and may decide to either repair or force the command.
|
Story Points: | --- | ||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2017-08-01 18:24:40 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: | |||||||
Attachments: |
|
Description
Ivan Devat
2016-11-25 09:38:12 UTC
Created attachment 1246358 [details]
proposed fix
Tests are in the patch.
Created attachment 1246359 [details]
proposed fix
Tests are in the patch.
After Fix: [vm-rhel72-1 ~] $ rpm -q pcs pcs-0.9.156-1.el7.x86_64 [vm-rhel72-1 ~] $ pcs resource create R ocf:heartbeat:Dummy op monitro interval=100 Error: 'monitro' is not a valid operation name value, use meta-data, migrate_from, migrate_to, monitor, reload, start, stop, validate-all, use --force to override [vm-rhel72-1 ~] $ pcs resource create R ocf:heartbeat:Dummy op monitro interval=100 --force Warning: 'monitro' is not a valid operation name value, use meta-data, migrate_from, migrate_to, monitor, reload, start, stop, validate-all [vm-rhel72-1 ~] $ echo $? 0 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/RHBA-2017:1958 |