[UNTESTED] immediately abort chef-client if maintenance mode is set#13
[UNTESTED] immediately abort chef-client if maintenance mode is set#13aspiers wants to merge 3 commits intocrowbar:masterfrom
Conversation
There was a problem hiding this comment.
Style/MultilineOperationIndentation: Use 2 (not 0) spaces for indenting an expression spanning multiple lines.
2cc0c35 to
4352717
Compare
There was a problem hiding this comment.
Not sure I would raise something here; if the admin did put the node in maintenance while chef-client was running, then, well, that's the way it is and why should chef fail because of that?
There was a problem hiding this comment.
Yeah OK, I guess a Chef::Log.warn is more appropriate here.
4352717 to
d4eb66f
Compare
|
+1 |
The reasoning is explained in the comments. I'm not sure why I ever thought it was a good idea to allow a chef-client run to proceed if maintenance mode is set. It's not even as if that approach could ever restore an ill node to full health, because we were deliberately checking whether the maintenance mode was set prior to the chef-client run, and if so, leaving it set. This way, if a node is left in maintenance mode, it will be discovered sooner, resulting in the cloud operator being alerted to a degraded cluster sooner.
d4eb66f to
8661acd
Compare
There was a problem hiding this comment.
Style/RedundantReturn: Redundant return detected.
|
Crap, raising an exception in the start handler doesn't abort the run :-( Need to find a way to do this. |
Make #maintenance_mode? return a sensible value even when Pacemaker is down or uninstalled. This is especially helpful when it is invoked by Chef's start_handler. Cherry-picked from crowbar/barclamp-pacemaker@7dff6c1.
8661acd to
43590c4
Compare
|
@aspiers still relevant? if so, can you rebase? |
|
Changes Unknown when pulling 43590c4 on aspiers:abort-on-maintenance-mode into ** on crowbar:master**. |
|
@aspiers is this still alive or should we close it? |
The reasoning is explained in the comments. I'm not sure why I ever thought it was a good idea to allow a chef-client run to proceed if maintenance mode is set. It's not even as if that approach could ever restore an ill node to full health, because we were deliberately checking whether the maintenance mode was set prior to the chef-client run, and if so, leaving it set. This way, if a node is left in maintenance mode, it will be discovered sooner, resulting in the cloud operator being alerted to a degraded cluster sooner.
Also ported crowbar/barclamp-pacemaker#149 on top of this.