class documentation
class WatcherState(object):
Interface to a state file recording restart attempts.
Method | __init__ |
Open, lock, read and parse the file. |
Method |
|
Unlock configuration file and close it. |
Method |
|
Returns the last boot ID of a node or None. |
Method |
|
Perform maintenance on the recorded instances. |
Method |
|
Returns number of previous cleanup attempts. |
Method |
|
Returns number of previous restart attempts. |
Method |
|
Record a cleanup attempt. |
Method |
|
Record a restart attempt. |
Method |
|
Update state to reflect that a machine is running. |
Method |
|
Save state to file. |
Method |
|
Sets the boot ID of a node. |
Instance Variable | statefile |
Undocumented |
Static Method | _ |
Record an event. |
Instance Variable | _data |
Undocumented |
Instance Variable | _orig |
Undocumented |
Perform maintenance on the recorded instances.
Parameters | |
instances:list of string | the list of currently existing instances |
Returns number of previous cleanup attempts.
Parameters | |
instance | the name of the instance to look up |
Returns number of previous restart attempts.
Parameters | |
instance | the name of the instance to look up |
Update state to reflect that a machine is running.
This method removes the record for a named instance (as we only track down instances).
Parameters | |
instance | the name of the instance to remove from books |