Trees | Indices | Help |
|
---|
|
Tool to restart erroneously downed virtual machines.
This program and set of classes implement a watchdog to restart virtual machines in a Ganeti cluster that have crashed or been killed by a node reboot. Run from cron or similar.
|
|||
|
|
|||
NotMasterError Exception raised when this host is not the master. |
|||
Instance Abstraction for a Virtual Machine instance. |
|||
Node Data container representing cluster node. |
|||
_StatCb Helper to store file handle's fstat .
|
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
bool |
|
||
|
|||
|
|||
|
|||
tuple; (None or number, list of lists containing instance name and status) |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
MAXTRIES = 5
|
|||
BAD_STATES = frozenset([constants.INSTST_ERRORDOWN,])
|
|||
HELPLESS_STATES = frozenset([constants.INSTST_NODEDOWN, consta
|
|||
NOTICE = "NOTICE"
|
|||
ERROR = "ERROR"
|
|||
CHILD_PROCESS_DELAY = 1.0 Number of seconds to wait between starting child processes for node groups |
|||
INSTANCE_STATUS_LOCK_TIMEOUT = 10.0 How many seconds to wait for instance status file lock |
Imports: os, sys, time, logging, operator, errno, OptionParser, utils, constants, compat, errors, opcodes, cli, luxi, rapi, netutils, qlang, objects, ssconf, ht, ganeti, nodemaint, state
|
Checks if given instances has any secondary in offline status.
|
Connects to RAPI port and does a simple test. Connects to RAPI port of hostname and does a simple test. At this time, the test is GetVersion.
|
Parse the command line options.
|
Writes the per-group instance status file. The entries are sorted.
|
Writes an instance status file from Instance objects.
|
Reads an instance status file.
|
Merges all per-group instance status files into a global one.
|
Tries to connect to the master daemon.
|
Main function for global watcher. At the end child processes are spawned for every node group.
|
|
HELPLESS_STATES
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Jul 24 16:51:20 2012 | http://epydoc.sourceforge.net |