Commit 082c5adb authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Fix error message when masterd is not listening

Reported by Iustin.

Reviewed-by: iustinp
parent 6683bba2
......@@ -539,7 +539,7 @@ def FormatError(err):
obuf.write("Unhandled Ganeti error: %s" % msg)
elif isinstance(err, luxi.NoMasterError):
obuf.write("Cannot communicate with the master daemon.\nIs it running"
" and listening on '%s'?" % err.args[0])
" and listening for connections?")
elif isinstance(err, luxi.TimeoutError):
obuf.write("Timeout while talking to the master daemon. Error:\n"
"%s" % msg)
......@@ -154,7 +154,7 @@ class Transport:
except socket.timeout, err:
raise TimeoutError("Connect timed out: %s" % str(err))
except socket.error, err:
if err.args[0] == errno.ENOENT:
if err.args[0] in (errno.ENOENT, errno.ECONNREFUSED):
raise NoMasterError((address,))
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