Revision c979d253
b/daemons/ganeti-masterd | ||
---|---|---|
443 | 443 |
dirs = [(constants.RUN_GANETI_DIR, constants.RUN_DIRS_MODE), |
444 | 444 |
(constants.SOCKET_DIR, constants.SOCKET_DIR_MODE), |
445 | 445 |
] |
446 |
for dir, mode in dirs: |
|
446 |
for dir_name, mode in dirs:
|
|
447 | 447 |
try: |
448 |
os.mkdir(dir, mode) |
|
448 |
os.mkdir(dir_name, mode)
|
|
449 | 449 |
except EnvironmentError, err: |
450 | 450 |
if err.errno != errno.EEXIST: |
451 | 451 |
raise errors.GenericError("Cannot create needed directory" |
452 | 452 |
" '%s': %s" % (constants.SOCKET_DIR, err)) |
453 |
if not os.path.isdir(dir): |
|
454 |
raise errors.GenericError("%s is not a directory" % dir) |
|
453 |
if not os.path.isdir(dir_name):
|
|
454 |
raise errors.GenericError("%s is not a directory" % dir_name)
|
|
455 | 455 |
|
456 | 456 |
# This is safe to do as the pid file guarantees against |
457 | 457 |
# concurrent execution. |
b/lib/backend.py | ||
---|---|---|
435 | 435 |
if constants.NV_DRBDLIST in what: |
436 | 436 |
try: |
437 | 437 |
used_minors = bdev.DRBD8.GetUsedDevs().keys() |
438 |
except errors.BlockDeviceErrors:
|
|
438 |
except errors.BlockDeviceError: |
|
439 | 439 |
logging.warning("Can't get used minors list", exc_info=True) |
440 | 440 |
used_minors = [] |
441 | 441 |
result[constants.NV_DRBDLIST] = used_minors |
b/lib/hypervisor/hv_xen.py | ||
---|---|---|
293 | 293 |
# remove old xen file after migration succeeded |
294 | 294 |
try: |
295 | 295 |
self._RemoveConfigFile(instance) |
296 |
except EnvironmentError, err: |
|
297 |
logger.Error("Failure while removing instance config file: %s" % |
|
298 |
str(err)) |
|
296 |
except EnvironmentError: |
|
297 |
logging.exception("Failure while removing instance config file") |
|
299 | 298 |
|
300 | 299 |
|
301 | 300 |
class XenPvmHypervisor(XenHypervisor): |
Also available in: Unified diff