Bug 1245721
| Summary: | Add option to put node into maintenance mode | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Frank Danapfel <fdanapfe> | ||||
| Component: | pcs | Assignee: | Ondrej Mular <omular> | ||||
| Status: | CLOSED ERRATA | QA Contact: | cluster-qe <cluster-qe> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 6.6 | CC: | cfeist, cluster-maint, fdinitto, jpokorny, mlisik, omular, rsteiger, tojeline | ||||
| Target Milestone: | rc | ||||||
| Target Release: | 6.8 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | pcs-0.9.145-1.el6 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | |||||||
| : | 1247088 1315366 (view as bug list) | Environment: | |||||
| Last Closed: | 2016-05-10 19:27: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: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 1315366 | ||||||
| Attachments: |
|
||||||
|
Description
Frank Danapfel
2015-07-22 15:13:14 UTC
This can be enabled/disabled with the following crm_attribute commands: crm_attribute -t nodes -N <nodename> -n maintenance -v on crm_attribute -t nodes -N <nodename> -n maintenance -v off We will add a pcs command to simplify that creation. I don't think there is an "ask interactively" precedence in pcs (putting auth aside), but in case of any resource running (or just defined ... or just always) it would be good to ask the user if she indeed wants "pcs cluster standby --all" or rather enable the maintenance mode. Or just apply this logic without asking as this should definitely be more sane thing to do. In case you don't like "standby --all" -> maintenance mode trigger proposal, you may, at least, consider translating that command into "pcs property set stop_all_resources=true" that would likely avoid inevitable issue with iterated switch toggling -- evacuation of the resources to the rest of living nodes (until they are standby'd as well) connected with unnecessary and unhelpful utilization peaks there (there are some risks implied). Jan, I didn't suggest that there should be a dialog or something asking the if somebody wants to put a node in standby mode or maintenance mode. All I'm asking for is to be able to enable/disable maintenance mode via pcs, without having to fall back to using "crm_attribute". Frank, I was talking about possibly bad behavior of "pcs cluster standby --all" which could not be translated into enabling maintenance mode as pcs hasn't be able to do that yet. With this bug resolved it will be, hence proposing translating that command to maintenance mode enablement (implicitly or explicitly). Is it more clear now? Created attachment 1085139 [details]
proposed fix
Before Fix: [root@rh67-node1 ~]# rpm -q pcs pcs-0.9.139-9.el6_7.1.x86_64 Pcs does not have ability to put a node to maintenance mode. After Fix: [root@rh67-node1:~]# rpm -q pcs pcs-0.9.145-1.el6.x86_64 [root@rh67-node1:~]# pcs status nodes Pacemaker Nodes: Online: rh67-node1 rh67-node2 Standby: Maintenance: Offline: Pacemaker Remote Nodes: Online: Standby: Maintenance: Offline: [root@rh67-node1:~]# pcs node maintenance [root@rh67-node1:~]# pcs status nodes Pacemaker Nodes: Online: rh67-node2 Standby: Maintenance: rh67-node1 Offline: Pacemaker Remote Nodes: Online: Standby: Maintenance: Offline: [root@rh67-node1:~]# pcs node unmaintenance [root@rh67-node1:~]# pcs status nodes Pacemaker Nodes: Online: rh67-node1 rh67-node2 Standby: Maintenance: Offline: Pacemaker Remote Nodes: Online: Standby: Maintenance: Offline: [root@rh67-node1:~]# pcs node maintenance rh67-node2 [root@rh67-node1:~]# pcs status nodes Pacemaker Nodes: Online: rh67-node1 Standby: Maintenance: rh67-node2 Offline: Pacemaker Remote Nodes: Online: Standby: Maintenance: Offline: [root@rh67-node1:~]# pcs node unmaintenance rh67-node2 [root@rh67-node1:~]# pcs status nodes Pacemaker Nodes: Online: rh67-node1 rh67-node2 Standby: Maintenance: Offline: Pacemaker Remote Nodes: Online: Standby: Maintenance: Offline: [root@rh67-node1:~]# pcs node maintenance --all [root@rh67-node1:~]# pcs status nodes Pacemaker Nodes: Online: Standby: Maintenance: rh67-node1 rh67-node2 Offline: Pacemaker Remote Nodes: Online: Standby: Maintenance: Offline: [root@rh67-node1:~]# pcs node unmaintenance --all [root@rh67-node1:~]# pcs status nodes Pacemaker Nodes: Online: rh67-node1 rh67-node2 Standby: Maintenance: Offline: Pacemaker Remote Nodes: Online: Standby: Maintenance: Offline: 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/RHBA-2016-0739.html |