Package ganeti :: Module errors
[hide private]
[frames] | no frames]

Module errors

source code

Ganeti exception handling.

Classes [hide private]
  GenericError
Base exception for Ganeti.
  LockError
Lock error exception.
  PidFileLockError
PID file is already locked by another process.
  HypervisorError
Hypervisor-related exception.
  HotplugError
Hotplug-related exception.
  ProgrammerError
Programming-related error.
  BlockDeviceError
Block-device related exception.
  ConfigurationError
Configuration related exception.
  ConfigVersionMismatch
Version mismatch in the configuration file.
  ConfigVerifyError
Error reported by configuration verification
  AddressPoolError
Errors related to IP address pools.
  ReservationError
Errors reserving a resource.
  RemoteError
Programming-related error on remote call.
  SignatureError
Error authenticating a remote message.
  ParameterError
A passed parameter to a command is invalid.
  ResultValidationError
The iallocation results fails validation.
  OpPrereqError
Prerequisites for the OpCode are not fulfilled.
  OpExecError
Error during OpCode execution.
  OpResultError
Issue with OpCode result.
  OpRetryNotSupportedError
This opcode does not support retries
  DeviceCreationError
Error during the creation of a device.
  OpCodeUnknown
Unknown opcode submitted.
  JobLost
Submitted job lost.
  JobCanceled
Submitted job was canceled.
  JobFileCorrupted
Job file could not be properly decoded/restored.
  ResolverError
Host name cannot be resolved.
  HooksFailure
A generic hook failure.
  HooksAbort
A required hook has failed.
  UnitParseError
Unable to parse size unit.
  ParseError
Generic parse error.
  TypeEnforcementError
Unable to enforce data type.
  X509CertError
Invalid X509 certificate.
  TagError
Generic tag error.
  CommandError
External command error.
  StorageError
Storage-related exception.
  InotifyError
Error raised when there is a failure setting up an inotify watcher.
  QuitGanetiException
Signal Ganeti that it must quit.
  JobQueueError
Job queue error.
  JobQueueDrainError
Job queue is marked for drain error.
  JobQueueFull
Job queue full error.
  ConfdMagicError
A magic fourcc error in Ganeti confd.
  ConfdClientError
A magic fourcc error in Ganeti confd.
  UdpDataSizeError
UDP payload too big.
  NoCtypesError
python ctypes module is not found in the system.
  IPAddressError
Generic IP address error.
  LuxiError
LUXI error.
  QueryFilterParseError
Error while parsing query filter.
  RapiTestResult
Exception containing results from RAPI test utilities.
  FileStoragePathError
Error from file storage path validation.
  SshUpdateError
Error from updating the SSH setup.
Functions [hide private]
class
GetErrorClass(name)
Return the class of an exception.
source code
tuple
EncodeException(err)
Encodes an exception into a format that MaybeRaise will recognise.
source code
 
GetEncodedError(result)
If this looks like an encoded Ganeti exception, return it.
source code
 
MaybeRaise(result)
If this looks like an encoded Ganeti exception, raise it.
source code
Variables [hide private]
  ECODE_RESOLVER = constants.ERRORS_ECODE_RESOLVER
  ECODE_NORES = constants.ERRORS_ECODE_NORES
  ECODE_TEMP_NORES = constants.ERRORS_ECODE_TEMP_NORES
  ECODE_INVAL = constants.ERRORS_ECODE_INVAL
  ECODE_STATE = constants.ERRORS_ECODE_STATE
  ECODE_NOENT = constants.ERRORS_ECODE_NOENT
  ECODE_EXISTS = constants.ERRORS_ECODE_EXISTS
  ECODE_NOTUNIQUE = constants.ERRORS_ECODE_NOTUNIQUE
  ECODE_FAULT = constants.ERRORS_ECODE_FAULT
  ECODE_ENVIRON = constants.ERRORS_ECODE_ENVIRON
  ECODE_ALL = constants.ERRORS_ECODE_ALL

Imports: constants


Function Details [hide private]

GetErrorClass(name)

source code 

Return the class of an exception.

Given the class name, return the class itself.

Parameters:
  • name (str) - the exception name
Returns: class
the actual class, or None if not found

EncodeException(err)

source code 

Encodes an exception into a format that MaybeRaise will recognise.

The passed err argument will be formatted as a tuple (exception name, arguments) that the MaybeRaise function will recognise.

Parameters:
  • err (GenericError child) - usually a child of GenericError (but any exception will be accepted)
Returns: tuple
tuple of (exception name, exception arguments)

GetEncodedError(result)

source code 

If this looks like an encoded Ganeti exception, return it.

This function tries to parse the passed argument and if it looks like an encoding done by EncodeException, it will return the class object and arguments.

MaybeRaise(result)

source code 

If this looks like an encoded Ganeti exception, raise it.

This function tries to parse the passed argument and if it looks like an encoding done by EncodeException, it will re-raise it.