Runtime manager plugin¶
- Runtime manager or runtime data storage stores intermediate states of VmShepherd cycles that need to be shared across multiple instances of application like:
- healthchecks status,
- try counts
- time and dates of last manage
and locking mechanism.
The locking mechanism guarantees a preset is managed by one instance at a time.
Initialization - consider following config:
runtime:
driver: SomeHC
param1: AAAA
param2: BBBB
some_x: CCC
All params will be passed as config dict to the driver init:
-
class
vmshepherd.runtime.abstract.
AbstractRuntimeData
(instance_id, config=None)[source]¶ Bases:
object
-
_acquire_lock
(name: str) → bool[source]¶ Locks preset during manage process, any other VMgr instance won’t disrubt it.
Parameters: name (string) – Lock name in particular preset name. If lock was acquired it should return True, otherwise False.
-
_get_preset_data
(preset_name: str) → dict[source]¶ Gets preset’s runtime data eg. fail counters, times
Parameters: preset_name (string) – Preset name
-