Package ganeti :: Package jqueue :: Class _OpExecCallbacks
[hide private]
[frames] | no frames]

Class _OpExecCallbacks

source code


Instance Methods [hide private]
 
__init__(self, queue, job, op)
Initializes this class.
source code
 
_CheckCancel(self)
Raises an exception to cancel the job if asked to.
source code
 
NotifyStart(self)
Mark the opcode as running, not lock-waiting.
source code
 
NotifyRetry(self)
Mark opcode again as lock-waiting.
source code
 
_AppendFeedback(self, timestamp, log_type, log_msgs)
Internal feedback append function, with locks
source code
 
Feedback(self, *args)
Append a log entry.
source code
 
CurrentPriority(self)
Returns current priority for opcode.
source code
 
SubmitManyJobs(self, jobs)
Submits jobs for processing.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, queue, job, op)
(Constructor)

source code 

Initializes this class.

Parameters:
Overrides: object.__init__

NotifyStart(self)

source code 

Mark the opcode as running, not lock-waiting.

This is called from the mcpu code as a notifier function, when the LU is finally about to start the Exec() method. Of course, to have end-user visible results, the opcode must be initially (before calling into Processor.ExecOpCode) set to OP_STATUS_WAITING.

Decorators:
  • @locking.ssynchronized(_QUEUE, shared= 1)
Overrides: mcpu.OpExecCbBase.NotifyStart

NotifyRetry(self)

source code 

Mark opcode again as lock-waiting.

This is called from the mcpu code just after calling PrepareRetry. The opcode will now again acquire locks (more, hopefully).

Decorators:
  • @locking.ssynchronized(_QUEUE, shared= 1)
Overrides: mcpu.OpExecCbBase.NotifyRetry

_AppendFeedback(self, timestamp, log_type, log_msgs)

source code 

Internal feedback append function, with locks

Parameters:
  • timestamp (tuple (int, int)) - timestamp of the log message
  • log_type (string) - log type (one of Types.ELogType)
  • log_msgs (any) - log data to append
Decorators:
  • @locking.ssynchronized(_QUEUE, shared= 1)

Feedback(self, *args)

source code 

Append a log entry.

Calling conventions: arg[0]: (optional) string, message type (Types.ELogType) arg[1]: data to be interpreted as a message

Overrides: mcpu.OpExecCbBase.Feedback

CurrentPriority(self)

source code 

Returns current priority for opcode.

Overrides: mcpu.OpExecCbBase.CurrentPriority

SubmitManyJobs(self, jobs)

source code 

Submits jobs for processing.

See JobQueue.SubmitManyJobs.

Overrides: mcpu.OpExecCbBase.SubmitManyJobs