Package ganeti :: Package watcher :: Module state
[hide private]
[frames] | no frames]

Module state

source code

Module keeping state for Ganeti watcher.

Classes [hide private]
  WatcherState
Interface to a state file recording restart attempts.
Functions [hide private]
 
OpenStateFile(path)
Opens the state file and acquires a lock on it.
source code
Variables [hide private]
  RETRY_EXPIRATION = 8* 3600
  KEY_CLEANUP_COUNT = "cleanup_count"
  KEY_CLEANUP_WHEN = "cleanup_when"
  KEY_RESTART_COUNT = "restart_count"
  KEY_RESTART_WHEN = "restart_when"
  KEY_BOOT_ID = "bootid"

Imports: os, time, logging, utils, serializer, errors


Function Details [hide private]

OpenStateFile(path)

source code 

Opens the state file and acquires a lock on it.

Parameters:
  • path (string) - Path to state file