Commit b4874c9e authored by Guido Trotter's avatar Guido Trotter
Browse files

Instance reinstall: don't mix up errors



If the remote info rpc call fails we can't assume that the instance is
up.
Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
parent f1926756
......@@ -2971,7 +2971,8 @@ class LUReinstallInstance(LogicalUnit):
remote_info = self.rpc.call_instance_info(instance.primary_node,
instance.name,
instance.hypervisor)
if remote_info.failed or remote_info.data:
remote_info.Raise()
if remote_info.data:
raise errors.OpPrereqError("Instance '%s' is running on the node %s" %
(self.op.instance_name,
instance.primary_node))
......
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