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

Module errors

source code

Ganeti exception handling

Classes [hide private]
  GenericError
Base exception for Ganeti.
  LVMError
LVM-related exception.
  LockError
Lock error exception.
  HypervisorError
Hypervisor-related exception.
  ProgrammerError
Programming-related error.
  BlockDeviceError
Block-device related exception.
  ConfigurationError
Configuration related exception.
  ConfigVersionMismatch
Version mismatch in the configuration file.
  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.
  OpPrereqError
Prerequisites for the OpCode are not fulfilled.
  OpExecError
Error during OpCode execution.
  OpResultError
Issue with OpCode result.
  OpCodeUnknown
Unknown opcode submitted.
  JobLost
Submitted job lost.
  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.
  SshKeyError
Invalid SSH key.
  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.
  ConfdRequestError
A request error in Ganeti confd.
  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.
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 = "resolver_error"
  ECODE_NORES = "insufficient_resources"
  ECODE_INVAL = "wrong_input"
  ECODE_STATE = "wrong_state"
  ECODE_NOENT = "unknown_entity"
  ECODE_EXISTS = "already_exists"
  ECODE_NOTUNIQUE = "resource_not_unique"
  ECODE_FAULT = "internal_error"
  ECODE_ENVIRON = "environment_error"
  ECODE_ALL = frozenset([ECODE_RESOLVER, ECODE_NORES, ECODE_INVA...
List of all failure types
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.


Variables Details [hide private]

ECODE_ALL

List of all failure types

Value:
frozenset([ECODE_RESOLVER, ECODE_NORES, ECODE_INVAL, ECODE_STATE, ECOD\
E_NOENT, ECODE_EXISTS, ECODE_NOTUNIQUE, ECODE_FAULT, ECODE_ENVIRON,])