On 11/24/2015 07:51 PM, Hrvoje Ribicic wrote:
diff --git a/lib/cmdlib/common.py b/lib/cmdlib/common.py
index 696a331..04ba7a3 100644
--- a/lib/cmdlib/common.py
+++ b/lib/cmdlib/common.py
@@ -185,7 +185,10 @@ def RunPostHook(lu, node_name):
"""
hm = lu.proc.BuildHooksManager(lu)
try:
+ # Execute usual post hooks, then global post hooks.
hm.RunPhase(constants.HOOKS_PHASE_POST, node_names=[node_name])
+ hm.RunPhase(constants.HOOKS_PHASE_POST, [node_name],
is_global=True,
+ post_status=constants.POST_HOOKS_STATUS_SUCCESS)
Nice improvement, but isn't node_names (node_uuids) an optional
parameter as well?
If nothing else, we should change it for consistency with the
statement above :)
Yes, it's an optional parameter, but we have to pass the exact value
here because
BuildHooksNodes provides other node lists which are used to execute
hooks in the usual place.