Revision 055d6ac0

b/lib/cli.py
2216 2216
      connected to the query socket instead of the masterd socket
2217 2217

  
2218 2218
  """
2219
  if query and constants.ENABLE_SPLIT_QUERY:
2219
  override_socket = os.getenv(constants.LUXI_OVERRIDE, "")
2220
  if override_socket:
2221
    if override_socket == constants.LUXI_OVERRIDE_MASTER:
2222
      address = pathutils.MASTER_SOCKET
2223
    elif override_socket == constants.LUXI_OVERRIDE_QUERY:
2224
      address = pathutils.QUERY_SOCKET
2225
    else:
2226
      address = override_socket
2227
  elif query and constants.ENABLE_SPLIT_QUERY:
2220 2228
    address = pathutils.QUERY_SOCKET
2221 2229
  else:
2222 2230
    address = None
......
2303 2311
    obuf.write("Failure: unknown/wrong parameter name '%s'" % msg)
2304 2312
  elif isinstance(err, luxi.NoMasterError):
2305 2313
    if err.args[0] == pathutils.MASTER_SOCKET:
2306
      daemon = "master"
2314
      daemon = "the master daemon"
2315
    elif err.args[0] == pathutils.QUERY_SOCKET:
2316
      daemon = "the config daemon"
2307 2317
    else:
2308
      daemon = "config"
2309
    obuf.write("Cannot communicate with the %s daemon.\nIs it running"
2318
      daemon = "socket '%s'" % str(err.args[0])
2319
    obuf.write("Cannot communicate with %s.\nIs the process running"
2310 2320
               " and listening for connections?" % daemon)
2311 2321
  elif isinstance(err, luxi.TimeoutError):
2312 2322
    obuf.write("Timeout while talking to the master daemon. Jobs might have"
b/lib/constants.py
184 184
# Local UniX Interface related constants
185 185
LUXI_EOM = "\3"
186 186
LUXI_VERSION = CONFIG_VERSION
187
#: Environment variable for the luxi override socket
188
LUXI_OVERRIDE = "FORCE_LUXI_SOCKET"
189
LUXI_OVERRIDE_MASTER = "master"
190
LUXI_OVERRIDE_QUERY = "query"
187 191

  
188 192
# one of "no", "yes", "only"
189 193
SYSLOG_USAGE = _autoconf.SYSLOG_USAGE
b/man/ganeti.rst
267 267
flags by setting ``GNT_NODE_LIST``, ``GNT_GROUP_LIST`` and
268 268
``GNT_INSTANCE_LIST``.
269 269

  
270
Debug options
271
~~~~~~~~~~~~~
272

  
273
If the variable ``FORCE_LUXI_SOCKET`` is set, it will override the
274
socket used for LUXI connections by command-line tools
275
(``gnt-*``). This is useful mostly for debugging, and some operations
276
won't work at all if, for example, you point this variable to the
277
confd-supplied query socket and try to submit a job.
278

  
279
If the variable is set to the value ``master``, it will connect to the
280
correct path for the master daemon (even if, for example, split
281
queries are enabled and this is a query operation). If set to
282
``query``, it will always (try to) connect to the query socket, even
283
if split queries are disabled. Otherwise, the value is taken to
284
represent a filesystem path to the socket to use.
285

  
270 286
Field formatting
271 287
----------------
272 288

  

Also available in: Unified diff