Package ganeti :: Package tools :: Module burnin
[hide private]
[frames] | no frames]

Module burnin

source code

Burnin program

Classes [hide private]
  InstanceDown
The checked instance was not up
  BurninFailure
Failure detected during burning
  SimpleOpener
A simple url opener
  FeedbackAccumulator
Feedback accumulator class.
  JobHandler
Class for handling Ganeti jobs.
  Burner
Burner class.
Functions [hide private]
 
Usage()
Shows program usage information and exits the program.
source code
 
Log(msg, *args, **kwargs)
Simple function that prints out its argument.
source code
 
Err(msg, exit_code=1)
Simple error logging that prints to stderr.
source code
 
RandomString(size=8, chars=string.ascii_uppercase+string.digits) source code
 
_DoCheckInstances(fn)
Decorator for checking instances.
source code
 
_DoBatch(retry)
Decorator for possible batch operations.
source code
 
Main()
Main function.
source code
Variables [hide private]
  USAGE = "\tburnin -o OS_NAME [options...] instance_name ..."
  MAX_RETRIES = 3
  LOG_HEADERS = {0: "- ", 1: "* ", 2: "",}
  _SINGLE_NODE_DISK_TEMPLATES = compat.UniqueFrozenset([constant...
Disk templates supporting a single node
  _SUPPORTED_DISK_TEMPLATES = compat.UniqueFrozenset([constants....
  _IMPEXP_DISK_TEMPLATES = _SUPPORTED_DISK_TEMPLATES-frozenset([...
Disk templates for which import/export is tested
  OPTIONS = [cli.cli_option("-o", "--os", dest= "os", default= N...
  ARGUMENTS = [cli.ArgInstance(min= 1)]

Imports: sys, optparse, time, socket, urllib, random, string, izip, islice, cycle, StringIO, or_, opcodes, constants, cli, errors, utils, hypervisor, compat, pathutils, confd_client, GetClient


Function Details [hide private]

_DoBatch(retry)

source code 

Decorator for possible batch operations.

Must come after the _DoCheckInstances decorator (if any).

Parameters:
  • retry - whether this is a retryable batch, will be passed to StartBatch

Variables Details [hide private]

_SINGLE_NODE_DISK_TEMPLATES

Disk templates supporting a single node

Value:
compat.UniqueFrozenset([constants.DT_DISKLESS, constants.DT_PLAIN, con\
stants.DT_FILE, constants.DT_SHARED_FILE, constants.DT_EXT, constants.\
DT_RBD, constants.DT_GLUSTER])

_SUPPORTED_DISK_TEMPLATES

Value:
compat.UniqueFrozenset([constants.DT_DISKLESS, constants.DT_DRBD8, con\
stants.DT_EXT, constants.DT_FILE, constants.DT_PLAIN, constants.DT_RBD\
, constants.DT_SHARED_FILE, constants.DT_GLUSTER])

_IMPEXP_DISK_TEMPLATES

Disk templates for which import/export is tested

Value:
_SUPPORTED_DISK_TEMPLATES-frozenset([constants.DT_DISKLESS, constants.\
DT_FILE, constants.DT_SHARED_FILE, constants.DT_GLUSTER])

OPTIONS

Value:
[cli.cli_option("-o", "--os", dest= "os", default= None, help= "OS to \
use during burnin", metavar= "<OS>", completion_suggest= cli.OPT_COMPL\
_ONE_OS), cli.HYPERVISOR_OPT, cli.OSPARAMS_OPT, cli.cli_option("--disk\
-size", dest= "disk_size", help= "Disk size (determines disk count)", \
default= "1G", type= "string", metavar= "<size,size,...>", completion_\
suggest= ("512M 1G 4G 1G,256M" " 4G,1G,1G 10G").split()), cli.cli_opti\
on("--disk-growth", dest= "disk_growth", help= "Disk growth", default=\
 "128m", type= "string", metavar= "<size,size,...>"), cli.cli_option("\
...