Commit 7f5edc60 authored by Iustin Pop's avatar Iustin Pop
Browse files

Show correct daemon name on Luxi connect errors

Since now confd also serves a Luxi endpoint, the current message in
cli.FormatError is misleading when actually failing to connect to
it. The patch adds a somewhat hackish way to show the right daemon
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarMichael Hanselmann <>
parent d70571bb
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Google Inc.
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Google Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -2302,8 +2302,12 @@ def FormatError(err):
elif isinstance(err, errors.ParameterError):
obuf.write("Failure: unknown/wrong parameter name '%s'" % msg)
elif isinstance(err, luxi.NoMasterError):
obuf.write("Cannot communicate with the master daemon.\nIs it running"
" and listening for connections?")
if err.args[0] == pathutils.MASTER_SOCKET:
daemon = "master"
daemon = "config"
obuf.write("Cannot communicate with the %s daemon.\nIs it running"
" and listening for connections?" % daemon)
elif isinstance(err, luxi.TimeoutError):
obuf.write("Timeout while talking to the master daemon. Jobs might have"
" been submitted and will continue to run even if the call"
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