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. |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
bool |
|
||
|
|||
|
|||
|
|||
|
|||
tuple; (None or number, list of lists containing instance name and status) |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
MAXTRIES = 5
|
|||
BAD_STATES = compat.UniqueFrozenset([constants.INSTST_ERRORDOW
|
|||
HELPLESS_STATES = compat.UniqueFrozenset([constants.INSTST_NOD
|
|||
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, wconfd, constants, compat, errors, opcodes, cli, rpcerr, rapi, netutils, qlang, ssconf, ht, pathutils, ganeti, UsesRapiClient, 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. If RAPI responds with error code "401 Unauthorized", the test is successful, because the aim of this function is to assess whether RAPI is responding, not if it is accessible.
|
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 luxi daemon.
|
Main function for global watcher. At the end child processes are spawned for every node group.
|
|
BAD_STATES
|
HELPLESS_STATES
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Apr 4 13:43:46 2016 | http://epydoc.sourceforge.net |