Commit bd631b02 authored by Iustin Pop's avatar Iustin Pop
Browse files

Show instance state in instance console failures



The current message is not entirely clear, as it doesn't show the reason
why the instance is not running.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 614244bd
......@@ -7523,7 +7523,12 @@ class LUConnectConsole(NoHooksLU):
node_insts.Raise("Can't get node information from %s" % node)
if instance.name not in node_insts.payload:
raise errors.OpExecError("Instance %s is not running." % instance.name)
if instance.admin_up:
state = "ERROR_down"
else:
state = "ADMIN_down"
raise errors.OpExecError("Instance %s is not running (state %s)" %
(instance.name, state))
logging.debug("Connecting to console of %s on %s", instance.name, 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