class documentation

class Burner(JobHandler):

View In Hierarchy

Burner class.

Static Method RenameInstanceOp Rename instance.
Static Method StartInstanceOp Start given instance.
Static Method StopInstanceOp Stop given instance.
Method __init__ Constructor.
Method BurnActivateDisks Activate and deactivate disks of the instances.
Method BurnAddDisks Add an extra disk to every instance and then detach it.
Method BurnAddRemoveNICs Add, change and remove an extra NIC for the instances.
Method BurnConfd Run confd queries for our instances.
Method BurnCreateInstances Create the given instances.
Method BurnFailover Failover the instances.
Method BurnGrowDisks Grow both the os and the swap disks by the requested amount, if any.
Method BurnImportExport Export the instance, delete it, and import it back.
Method BurninCluster Test a cluster intensively.
Method BurnMigrate Migrate the instances.
Method BurnModifyRuntimeMemory Alter the runtime memory.
Method BurnMove Move the instances.
Method BurnReboot Reboot the instances.
Method BurnReinstall Reinstall the instances.
Method BurnRemove Remove the instances.
Method BurnRemoveDisks Attach a previously detached disk to an instance and then remove it.
Method BurnRename Rename the instances.
Method BurnRenameSame Rename the instances to their own name.
Method BurnReplaceDisks1D8 Replace disks on primary and secondary for drbd8.
Method BurnReplaceDisks2 Replace secondary node.
Method BurnStopStart Stop/start the instances.
Method ConfdCallback Callback for confd queries
Method DoConfdRequestReply Undocumented
Method FindMatchingDisk Find a disk whose nodes match the instance's disk nodes.
Method GetState Read the cluster state from the master daemon.
Method ParseOptions Parses the command line options.
Instance Variable bep Undocumented
Instance Variable cluster_default_nicparams Undocumented
Instance Variable cluster_info Undocumented
Instance Variable confd_client Undocumented
Instance Variable confd_counting_callback Undocumented
Instance Variable confd_reply Undocumented
Instance Variable disk_count Undocumented
Instance Variable disk_growth Undocumented
Instance Variable disk_nodes Undocumented
Instance Variable disk_size Undocumented
Instance Variable hv_can_migrate Undocumented
Instance Variable hvp Undocumented
Instance Variable hypervisor Undocumented
Instance Variable instance_nodes Undocumented
Instance Variable instances Undocumented
Instance Variable nodes Undocumented
Instance Variable opts Undocumented
Instance Variable to_rem Undocumented
Instance Variable url_opener Undocumented
Method _CheckInstanceAlive Check if an instance is alive by doing http checks.

Inherited from JobHandler:

Method CommitQueue Execute all submitted opcodes in case of parallel burnin
Method ExecJobSet Execute a set of jobs and return once all are done.
Method ExecOp Execute one or more opcodes and manage the exec buffer.
Method ExecOrQueue Execute an opcode and manage the exec buffer.
Method MaybeRetry Possibly retry a given function execution.
Method StartBatch Start a new batch of jobs.
Instance Variable cl Undocumented
Instance Variable queue_retry Undocumented
Instance Variable queued_ops Undocumented
Method _ExecOp Execute one or more opcodes and manage the exec buffer.

Inherited from FeedbackAccumulator (via JobHandler):

Method ClearFeedbackBuf Clear the feedback buffer.
Method Feedback Acumulate feedback in our buffer.
Method GetFeedbackBuf Return the contents of the buffer.
Class Variable _feed_buf Undocumented
@staticmethod
def RenameInstanceOp(instance, instance_new, name_check, ip_check):

Rename instance.

@staticmethod
def StartInstanceOp(instance):

Start given instance.

@staticmethod
def StopInstanceOp(instance):

Stop given instance.

def __init__(self):
@_DoCheckInstances
@_DoBatch(True)
def BurnActivateDisks(self):

Activate and deactivate disks of the instances.

@_DoCheckInstances
@_DoBatch(False)
def BurnAddDisks(self):

Add an extra disk to every instance and then detach it.

@_DoBatch(False)
def BurnAddRemoveNICs(self):

Add, change and remove an extra NIC for the instances.

def BurnConfd(self):

Run confd queries for our instances.

The following confd queries are tested:

  • CONFD_REQ_PING: simple ping
  • CONFD_REQ_CLUSTER_MASTER: cluster master
  • CONFD_REQ_NODE_ROLE_BYNAME: node role, for the master
@_DoCheckInstances
@_DoBatch(False)
def BurnCreateInstances(self):

Create the given instances.

@_DoCheckInstances
@_DoBatch(False)
def BurnFailover(self):

Failover the instances.

@_DoBatch(False)
def BurnGrowDisks(self):

Grow both the os and the swap disks by the requested amount, if any.

@_DoCheckInstances
@_DoBatch(False)
def BurnImportExport(self):

Export the instance, delete it, and import it back.

def BurninCluster(self):

Test a cluster intensively.

This will create instances and then start/stop/failover them. It is safe for existing instances but could impact performance.

@_DoBatch(False)
def BurnMigrate(self):

Migrate the instances.

@_DoBatch(False)
def BurnModifyRuntimeMemory(self):

Alter the runtime memory.

@_DoCheckInstances
@_DoBatch(False)
def BurnMove(self):

Move the instances.

@_DoCheckInstances
@_DoBatch(True)
def BurnReboot(self):

Reboot the instances.

@_DoCheckInstances
@_DoBatch(True)
def BurnReinstall(self):

Reinstall the instances.

@_DoBatch(False)
def BurnRemove(self):

Remove the instances.

@_DoCheckInstances
@_DoBatch(False)
def BurnRemoveDisks(self):

Attach a previously detached disk to an instance and then remove it.

def BurnRename(self, name_check, ip_check):

Rename the instances.

Note that this function will not execute in parallel, since we only have one target for rename.

@_DoCheckInstances
@_DoBatch(True)
def BurnRenameSame(self, name_check, ip_check):

Rename the instances to their own name.

@_DoBatch(True)
def BurnReplaceDisks1D8(self):

Replace disks on primary and secondary for drbd8.

@_DoBatch(True)
def BurnReplaceDisks2(self):

Replace secondary node.

@_DoCheckInstances
@_DoBatch(True)
def BurnStopStart(self):

Stop/start the instances.

def ConfdCallback(self, reply):

Callback for confd queries

def DoConfdRequestReply(self, req):

Undocumented

def FindMatchingDisk(self, instance):

Find a disk whose nodes match the instance's disk nodes.

def GetState(self):

Read the cluster state from the master daemon.

def ParseOptions(self):

Parses the command line options.

In case of command line errors, it will show the usage and exit the program.

bep =

Undocumented

cluster_default_nicparams =

Undocumented

cluster_info =

Undocumented

confd_client =

Undocumented

confd_counting_callback =

Undocumented

confd_reply =

Undocumented

disk_count =

Undocumented

disk_growth =

Undocumented

disk_nodes: dict =

Undocumented

disk_size =

Undocumented

hv_can_migrate =

Undocumented

hvp =

Undocumented

hypervisor =

Undocumented

instance_nodes: dict =

Undocumented

instances =

Undocumented

nodes =

Undocumented

to_rem: list =

Undocumented

url_opener =

Undocumented

def _CheckInstanceAlive(self, instance):

Check if an instance is alive by doing http checks.

This will try to retrieve the url on the instance /hostname.txt and check that it contains the hostname of the instance. In case we get ECONNREFUSED, we retry up to the net timeout seconds, for any other error we abort.