mcvirt.node package

Submodules

mcvirt.node.drbd module

Provides interface to mange the DRBD installation.

class mcvirt.node.drbd.Drbd[source]

Bases: mcvirt.rpc.pyro_object.PyroObject

Performs configuration of DRBD on the node

CLUSTER_SIZE = 2
CONFIG_DIRECTORY = '/etc/drbd.d'
DrbdADM = '/sbin/drbdadm'
GLOBAL_CONFIG = '/etc/drbd.d/global_common.conf'
GLOBAL_CONFIG_TEMPLATE = '/usr/lib/mcvirt/templates/drbd_global.conf'
adjust_drbd_config(resource='all')[source]

Perform a Drbd adjust, which updates the Drbd running configuration

enable(*args, **kwargs)
ensure_installed()[source]

Ensure that Drbd is installed on the node

generate_config()[source]

Generate the Drbd configuration

generate_secret()[source]

Generate a random secret for Drbd

get_all_drbd_hard_drive_object(include_remote=False)[source]

Obtain all hard drive objects that are backed by DRBD

get_config()[source]

Return the global Drbd configuration

static get_default_config()[source]

Return the default configuration for DRBD

get_used_drbd_minors()[source]

Return a list of used Drbd minor IDs

get_used_drbd_ports()[source]

Return a list of used Drbd ports

is_enabled()[source]

Determine whether Drbd is enabled on the node or not

is_installed()[source]

Determine if the ‘drbdadm’ command is present to determine if the ‘drbd8-utils’ package is installed

list()[source]

List the Drbd volumes and statuses

set_secret(secret)[source]

Set the Drbd configuration in the global MCVirt config file

mcvirt.node.libvirt_config module

Provide class to configure libvirtd

class mcvirt.node.libvirt_config.LibvirtConfig[source]

Bases: mcvirt.rpc.pyro_object.PyroObject

Provides configuration for libvirtd

CONFIG_FILE = '/etc/libvirt/libvirtd.conf'
CONFIG_TEMPLATE = '/usr/lib/mcvirt/templates/libvirtd.conf'
DEFAULT_CONFIG = '\n# Defaults for libvirtd initscript (/etc/init.d/libvirtd)\n# This is a POSIX shell fragment\n\n# Start libvirtd to handle qemu/kvm:\nstart_libvirtd="yes"\n\n# options passed to libvirtd, add "-l" to listen on tcp\nlibvirtd_opts=" --listen --verbose %s"\n'
DEFAULT_FILE = '/etc/default/%s'
generate_config()[source]

Generate the libvirtd configuration

get_config()[source]

Create the configuration for libvirt

get_service_name()[source]

Locate the libvirt service

mcvirt.node.node module

Perform configurations for local node.

class mcvirt.node.node.Node[source]

Bases: mcvirt.rpc.pyro_object.PyroObject

Provides methods to configure the local node.

clear_method_lock()[source]

Force clear a method lock to escape deadlock

get_version()[source]

Returns the version of the running daemon

is_volume_group_set()[source]

Determine if the volume group has been configured on the node

set_cluster_ip_address(*args, **kwargs)
set_storage_volume_group(*args, **kwargs)

Module contents