Commit 2a6de57a authored by Andrea Spadaccini's avatar Andrea Spadaccini
Browse files

Check the results of master IP RPCs



A failed gnt-cluster (de)activate-master-ip would not produce any output
to the user. This patch adds code that checks for the results of the
RPCs and raise an exception if appropriate.
Signed-off-by: default avatarAndrea Spadaccini <spadaccio@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 3738b8d6
......@@ -3858,7 +3858,8 @@ class LUClusterActivateMasterIp(NoHooksLU):
"""
master = self.cfg.GetMasterNode()
self.rpc.call_node_activate_master_ip(master)
result = self.rpc.call_node_activate_master_ip(master)
result.Raise("Could not activate the master IP")
class LUClusterDeactivateMasterIp(NoHooksLU):
......@@ -3870,7 +3871,8 @@ class LUClusterDeactivateMasterIp(NoHooksLU):
"""
master = self.cfg.GetMasterNode()
self.rpc.call_node_deactivate_master_ip(master)
result = self.rpc.call_node_deactivate_master_ip(master)
result.Raise("Could not deactivate the master IP")
def _WaitForSync(lu, instance, disks=None, oneshot=False):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment