Bug 1175400
Summary: | pcs resource op add creates duplicate op entires | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Frank Danapfel <fdanapfe> | ||||
Component: | pcs | Assignee: | Tomas Jelinek <tojeline> | ||||
Status: | CLOSED ERRATA | QA Contact: | cluster-qe <cluster-qe> | ||||
Severity: | low | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 7.1 | CC: | cluster-maint, rbinkhor, rsteiger, tojeline | ||||
Target Milestone: | pre-dev-freeze | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | pcs-0.9.141-1.el7 | Doc Type: | Bug Fix | ||||
Doc Text: |
Cause:
User adds a duplicate resource operation.
Consequence:
Duplicate operations specified for a resource.
Fix:
Added check for duplicate operations.
Result:
User is informed that a duplicate operation already exists, new duplicate operation is not created unless --force flag is used.
|
Story Points: | --- | ||||
Clone Of: | Environment: | ||||||
Last Closed: | 2015-11-19 09:33:56 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: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Frank Danapfel
2014-12-17 16:15:51 UTC
There are some cases when we want to allow multiple operations, but most of the time that isn't what a user wants. I think we just need to add a warning if a operation already exists with that name, and specifically an error if we attempt to add a monitor operation with the same interval (since pacemaker does not support that). There are patches in upstream for reporting an error when user attempts to add an operation with the same name and interval: https://github.com/feist/pcs/commit/c97e96ab6361f15773bbd426babe7af192257999 https://github.com/feist/pcs/commit/40c0a774a453730c92600f4ece7c310e2d7dd2e7 https://github.com/feist/pcs/commit/abd1ecd1d1b24156a419257517c17a11a36152e5 They do not cover the case when user attempts to create more operations with the same name but different intervals. We can add a check for that and print a warning. It should be possible to create several monitor operations with different roles (or OCF_CHECK_LEVEL values) and different intervals though. Created attachment 1040492 [details]
proposed fix
See also: bz1031141 comment 7 Before Fix: [root@rh71-node1 ~]# rpm -q pcs pcs-0.9.140-1.el7.x86_64 [root@rh71-node1:~]# pcs resource create dummy dummy [root@rh71-node1:~]# pcs resource show dummy Resource: dummy (class=ocf provider=heartbeat type=Dummy) Operations: start interval=0s timeout=20 (dummy-start-interval-0s) stop interval=0s timeout=20 (dummy-stop-interval-0s) monitor interval=10 timeout=20 (dummy-monitor-interval-10) [root@rh71-node1:~]# pcs resource op add dummy monitor interval=20 timeout=20 [root@rh71-node1:~]# echo $? 0 [root@rh71-node1:~]# pcs resource show dummy Resource: dummy (class=ocf provider=heartbeat type=Dummy) Operations: start interval=0s timeout=20 (dummy-start-interval-0s) stop interval=0s timeout=20 (dummy-stop-interval-0s) monitor interval=10 timeout=20 (dummy-monitor-interval-10) monitor interval=20 timeout=20 (dummy-monitor-interval-20) After Fix: [root@rh71-node1:~]# rpm -q pcs pcs-0.9.141-1.el7.x86_64 [root@rh71-node1:~]# pcs resource create dummy dummy [root@rh71-node1:~]# pcs resource show dummy Resource: dummy (class=ocf provider=heartbeat type=Dummy) Operations: start interval=0s timeout=20 (dummy-start-interval-0s) stop interval=0s timeout=20 (dummy-stop-interval-0s) monitor interval=10 timeout=20 (dummy-monitor-interval-10) [root@rh71-node1:~]# pcs resource op add dummy monitor interval=20 timeout=20 Error: operation monitor already specified for dummy, use --force to override: monitor interval=10 timeout=20 (dummy-monitor-interval-10) [root@rh71-node1:~]# echo $? 1 [root@rh71-node1:~]# pcs resource show dummy Resource: dummy (class=ocf provider=heartbeat type=Dummy) Operations: start interval=0s timeout=20 (dummy-start-interval-0s) stop interval=0s timeout=20 (dummy-stop-interval-0s) monitor interval=10 timeout=20 (dummy-monitor-interval-10) [root@rh71-node1:~]# pcs resource op add dummy monitor interval=20 timeout=20 --force [root@rh71-node1:~]# echo $? 0 [root@rh71-node1:~]# pcs resource show dummy Resource: dummy (class=ocf provider=heartbeat type=Dummy) Operations: start interval=0s timeout=20 (dummy-start-interval-0s) stop interval=0s timeout=20 (dummy-stop-interval-0s) monitor interval=10 timeout=20 (dummy-monitor-interval-10) monitor interval=20 timeout=20 (dummy-monitor-interval-20) 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://rhn.redhat.com/errata/RHSA-2015-2290.html |