Revision f362096f
b/daemons/ganeti-noded | ||
---|---|---|
519 | 519 |
|
520 | 520 |
""" |
521 | 521 |
options, args = ParseOptions() |
522 |
utils.debug = options.debug |
|
522 | 523 |
for fname in (constants.SSL_CERT_FILE,): |
523 | 524 |
if not os.path.isfile(fname): |
524 | 525 |
print "config %s not there, will not run." % fname |
b/lib/cli.py | ||
---|---|---|
453 | 453 |
|
454 | 454 |
logger.SetupLogging(debug=options.debug, program=binary) |
455 | 455 |
|
456 |
utils.debug = options.debug |
|
456 | 457 |
try: |
457 | 458 |
utils.Lock('cmd', max_retries=options.lock_retries, debug=options.debug) |
458 | 459 |
except errors.LockError, err: |
b/lib/utils.py | ||
---|---|---|
44 | 44 |
_locksheld = [] |
45 | 45 |
_re_shell_unquoted = re.compile('^[-.,=:/_+@A-Za-z0-9]+$') |
46 | 46 |
|
47 |
debug = False |
|
48 |
|
|
47 | 49 |
class RunResult(object): |
48 | 50 |
"""Simple class for holding the result of running external programs. |
49 | 51 |
|
... | ... | |
78 | 80 |
else: |
79 | 81 |
self.fail_reason = "unable to determine termination reason" |
80 | 82 |
|
83 |
if debug and self.failed: |
|
84 |
logger.Debug("Command '%s' failed (%s); output: %s" % |
|
85 |
(self.cmd, self.fail_reason, self.output)) |
|
86 |
|
|
81 | 87 |
def _GetOutput(self): |
82 | 88 |
"""Returns the combined stdout and stderr for easier usage. |
83 | 89 |
|
Also available in: Unified diff