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.
  ProgrammerError
Programming-related error.
  BlockDeviceError
Block-device related exception.
  ConfigurationError
Configuration related exception.
  ConfigVersionMismatch
Version mismatch in the configuration file.
  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.
  DeviceCreationError
Error during the creation of a device.
  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.
  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.
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"
Resolver errors
  ECODE_NORES = "insufficient_resources"
Not enough resources (iallocator failure, disk space, memory, etc.)
  ECODE_TEMP_NORES = "temp_insufficient_resources"
Temporarily out of resources; operation can be tried again
  ECODE_INVAL = "wrong_input"
Wrong arguments (at syntax level)
  ECODE_STATE = "wrong_state"
Wrong entity state
  ECODE_NOENT = "unknown_entity"
Entity not found
  ECODE_EXISTS = "already_exists"
Entity already exists
  ECODE_NOTUNIQUE = "resource_not_unique"
Resource not unique (e.g.
  ECODE_FAULT = "internal_error"
Internal cluster error
  ECODE_ENVIRON = "environment_error"
Environment error (e.g.
  ECODE_ALL = compat.UniqueFrozenset([ECODE_RESOLVER, ECODE_NORE...
List of all failure types

Imports: compat


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_NOTUNIQUE

Resource not unique (e.g. MAC or IP duplication)

Value:
"resource_not_unique"

ECODE_ENVIRON

Environment error (e.g. node disk error)

Value:
"environment_error"

ECODE_ALL

List of all failure types

Value:
compat.UniqueFrozenset([ECODE_RESOLVER, ECODE_NORES, ECODE_TEMP_NORES,\
 ECODE_INVAL, ECODE_STATE, ECODE_NOENT, ECODE_EXISTS, ECODE_NOTUNIQUE,\
 ECODE_FAULT, ECODE_ENVIRON,])