| Summary: | fix parsing of 'constraint colocation add' parameters | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Ivan Devat <idevat> |
| Component: | pcs | Assignee: | Tomas Jelinek <tojeline> |
| Status: | CLOSED WONTFIX | QA Contact: | cluster-qe <cluster-qe> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.2 | CC: | cfeist, cluster-maint, idevat, omular, tojeline |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-09-16 14:29:29 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: | |
|
Description
Ivan Devat
2016-04-08 08:24:50 UTC
There are more problems in this command: Steps to Reproduce: 1. Create resources with ids "r1", "r2" and "master" [vm-rhel72-1 /] $ pcs resource create r1 ocf:pacemaker:Dummy [vm-rhel72-1 /] $ pcs resource create r2 ocf:pacemaker:Dummy [vm-rhel72-1 /] $ pcs resource create master ocf:pacemaker:Dummy 2. Try create colocation for resources r1 and r2 with role specification, but forget keyword "with" [vm-rhel72-1 /] $ pcs constraint colocation add master r1 slave r2 Actual results: Colocation for resources master and r2 created. Expected results: No colocation created and usage for constraint colocation add listed. Steps to Reproduce:
1. Create resources with ids "r1" and "r2"
[vm-rhel72-1 /] $ pcs resource create r1 ocf:pacemaker:Dummy
[vm-rhel72-1 /] $ pcs resource create r2 ocf:pacemaker:Dummy
2. Try create colocation for resources r1 and r2 but forget keyword r2
[vm-rhel72-1 /] $ pcs add master r1 with
Actual results:
Traceback (most recent call last):
File "/usr/sbin/pcs", line 219, in <module>
main(sys.argv[1:])
File "/usr/sbin/pcs", line 159, in main
cmd_map[command](argv)
File "/usr/lib/python2.7/site-packages/pcs/constraint.py", line 67, in constraint_cmd
colocation_add(argv)
File "/usr/lib/python2.7/site-packages/pcs/constraint.py", line 194, in colocation_add
if utils.is_score_or_opt(argv[1]):
IndexError: list index out of range
Expected results:
Usage for constraint colocation add listed.
Steps to Reproduce: 1. Create resources with ids "r1" and "r2" [vm-rhel72-1 /] $ pcs resource create r1 ocf:pacemaker:Dummy [vm-rhel72-1 /] $ pcs resource create r2 ocf:pacemaker:Dummy 2. Try create colocation for resources r1 and r2 but forget keyword r2 [vm-rhel72-1 /] $ pcs add r1 with Actual results: Error: Resource 'with' does not exist Expected results: Usage for constraint colocation add listed. Steps to Reproduce: 1. Create resources with ids "r1", "r2" and "with" [vm-rhel72-1 /] $ pcs resource create r1 ocf:pacemaker:Dummy [vm-rhel72-1 /] $ pcs resource create r2 ocf:pacemaker:Dummy [vm-rhel72-1 /] $ pcs resource create with ocf:pacemaker:Dummy 2. Try create colocation for resources r1 and r2 but forget keyword r2 [vm-rhel72-1 /] $ pcs add r1 with Actual results: Colocation for resources r1 and with created. Expected results: Usage for constraint colocation add listed. This has been partially fixed in pcs-0.10 branch by removing support for deprecated syntax in https://github.com/ClusterLabs/pcs/commit/dcab313b1ed8948642a3efcd29c1bb0c33745a88 The issues described in comment 0 and comment 2 have been fixed in: https://github.com/ClusterLabs/pcs/commit/2c259f6604cbcef07bab4e76d4ff0f2a345c5c8a for pcs-0.9 branch https://github.com/ClusterLabs/pcs/commit/4afc322c39ccb0953de35951913721edddd44cfc for pcs-0.10 branch Comment 3 issue has not been fixed yet in pcs-0.9 branch. It has been already fixed in pcs-0.10 branch. Comment 4 and comment 5 cannot be really fixed due to the command supporting two syntaxes in pcs-0.9 branch. They have been fixed in pcs-0.10 branch. |