gc3libs.exceptions

Exceptions specific to the gc3libs package.

In addition to the exceptions listed here, gc3libs functions try to use Python builtin exceptions with the same meaning they have in core Python, namely:

  • TypeError is raised when an argument to a function or method has an incompatible type or does not implement the required protocol (e.g., a number is given where a sequence is expected).
  • ValueError`is raised when an argument to a function or method has the correct type, but fails to satisfy other constraints in the function contract (e.g., a positive number is required, and `-1 is passed instead).
  • AssertionError is raised when some internal assumption regarding state or function/method calling contract is violated. Informally, this indicates a bug in the software.
exception gc3libs.exceptions.ApplicationDescriptionError(msg, do_log=True)

Raised when the dumped description on a given Application produces something that the LRMS backend cannot process.

exception gc3libs.exceptions.AuthError(msg, do_log=False)

Base class for Auth-related errors.

Should never be instanciated: create a specific error class describing the actual error condition.

exception gc3libs.exceptions.AuxiliaryCommandError(msg, do_log=False)

Raised when some external command that we depend upon has failed.

For instance, we might need to list processes on a remote machine but ps aux does not run because of insufficient privileges.

exception gc3libs.exceptions.ConfigurationError(msg, do_log=True)

Raised when the configuration file (or parts of it) could not be read/parsed. Also used to signal that a required parameter is missing or has an unknown/invalid value.

exception gc3libs.exceptions.ConfigurationFileError(msg, do_log=True)

Generic issue with the configuration file(s).

exception gc3libs.exceptions.CopyError(source, destination, ex)

Error copying a file from source to destination.

exception gc3libs.exceptions.DataStagingError(msg, do_log=False)

Base class for data staging and movement errors.

Should never be instanciated: create a specific error class describing the actual error condition.

exception gc3libs.exceptions.DetachedFromGridError(msg, do_log=False)

Raised when a method (other than attach()) is called on a detached Task instance.

exception gc3libs.exceptions.DuplicateEntryError(msg, do_log=False)

Raised by Application.__init__ if not all (local or remote) entries in the input or output files are distinct.

exception gc3libs.exceptions.Error(msg, do_log=False)

Base class for all error-level exceptions in GC3Pie.

Generally, this indicates a non-fatal error: depending on the nature of the task, steps could be taken to continue, but users must be aware that an error condition occurred, so the message is sent to the logs at the ERROR level.

Exceptions indicating an error condition after which the program cannot continue and should immediately stop, should use the FatalError base class.

exception gc3libs.exceptions.FatalError(msg, do_log=True)

A fatal error: execution cannot continue and program should report to user and then stop.

The message is sent to the logs at CRITICAL level when the exception is first constructed.

This is the base class for all fatal exceptions.

exception gc3libs.exceptions.InputFileError(msg, do_log=True)

Raised when an input file is specified, which does not exist or cannot be read.

exception gc3libs.exceptions.InternalError(msg, do_log=False)

Raised when some function cannot fulfill its duties, for reasons that do not depend on the library client code. For instance, when a response string gotten from an external command cannot be parsed as expected.

exception gc3libs.exceptions.InvalidArgument(msg, do_log=False)

Raised when the arguments passed to a function do not honor some required contract. For instance, either one of two optional arguments must be provided, but none of them was.

exception gc3libs.exceptions.InvalidOperation(msg, do_log=False)

Raised when an operation is attempted, that is not considered valid according to the system state. For instance, trying to retrieve the output of a job that has not yet been submitted.

exception gc3libs.exceptions.InvalidResourceName(msg, do_log=True)

Raised to signal that no computational resource with the given name is defined in the configuration file.

Raising this exception will automatically log its message at ERROR level, unless the do_log=False optional argument is explicitly passed to the constructor.

exception gc3libs.exceptions.InvalidType(msg, do_log=False)

A specialization of`InvalidArgument` for cases when the type of the passed argument does not match expectations.

exception gc3libs.exceptions.InvalidUsage(msg, do_log=True)

Raised when a command is not provided all required arguments on the command line, or the arguments do not match the expected syntax.

Since the exception message is the last thing a user will see, try to be specific about what is wrong on the command line.

exception gc3libs.exceptions.InvalidValue(msg, do_log=False)

A specialization of`InvalidArgument` for cases when the type of the passed argument does not match expectations.

exception gc3libs.exceptions.LRMSSkipSubmissionToNextIteration(msg, do_log=False)

An elastic resource has initiated adapting for a new task. Although we cannot submit the task right now, it will be accepted in the (not too distant) future.

exception gc3libs.exceptions.LoadError(msg, do_log=False)

Raised upon errors loading a job from the persistent storage.

exception gc3libs.exceptions.MaximumCapacityReached(msg, do_log=False)

Indicates that a resource is full and cannot run any more jobs.

exception gc3libs.exceptions.NoAccessibleConfigurationFile(msg, do_log=True)

Raised when the configuration file cannot be read (e.g., does not exist or has wrong permissions).

exception gc3libs.exceptions.NoConfigurationFile(msg, do_log=True)

Raised when the configuration file cannot be read (e.g., does not exist or has wrong permissions), or cannot be parsed (e.g., is malformed).

exception gc3libs.exceptions.NoResources(msg, do_log=False)

Raised to signal that no resources are defined, or that none are compatible with the request.

exception gc3libs.exceptions.NoValidConfigurationFile(msg, do_log=True)

Raised when the configuration file cannot be parsed (e.g., is malformed).

exception gc3libs.exceptions.OutputNotAvailableError(msg, do_log=False)

Raised upon attempts to retrieve the output for jobs that are still in NEW or SUBMITTED state.

exception gc3libs.exceptions.RecoverableDataStagingError(msg, do_log=False)

Raised when transient problems with copying data to or from the remote execution site occurred.

This error is considered to be transient (e.g., network connectivity interruption), so trying again at a later time could solve the problem.

exception gc3libs.exceptions.RecoverableError(msg, do_log=False)

Used to mark transient errors: retrying the same action at a later time could succeed.

This exception should never be instanciated: it is only to be used in except clauses to catch “try again” situations.

exception gc3libs.exceptions.TaskError(msg, do_log=False)

Generic error condition in a Task object.

exception gc3libs.exceptions.UnexpectedJobState(msg, do_log=False)

Raised when a job state is gotten from the execution code, that does not match what GC3Pie expects for the task.

Typically this is a synchronization issue (different parts of a system update at different times), hence this error is marked as “recoverable”.

For instance, a task might be TERMINATED according to GC3Pie but the batch system accounting commands still report it as running.

exception gc3libs.exceptions.UnexpectedStateError(msg, do_log=False)

Raised by Task.progress() when a job lands in STOPPED or TERMINATED state.

exception gc3libs.exceptions.UnknownJob(msg, do_log=False)

Raised when an operation is attempted on a task, which is unknown to the remote server or backend.

exception gc3libs.exceptions.UnknownJobState(msg, do_log=False)

Raised when a job state is gotten from the Grid middleware, that is not handled by the GC3Libs code. Might actually mean that there is a version mismatch between GC3Libs and the Grid middleware used.

exception gc3libs.exceptions.UnrecoverableDataStagingError(msg, do_log=False)

Raised when problems with copying data to or from the remote execution site occurred.

exception gc3libs.exceptions.UnrecoverableError(msg, do_log=False)

Used to mark permanent errors: there’s no point in retrying the same action at a later time, because it will yield the same error again.

This exception should never be instanciated: it is only to be used in except clauses to exclude “try again” situations.