Package ganeti :: Module config
[hide private]
[frames] | no frames]

Module config

source code

Configuration management for Ganeti

This module provides the interface to the Ganeti cluster configuration.

The configuration data is stored on every node but is updated on the master only. After each update, the master distributes the data to the other nodes.

Currently, the data storage format is JSON. YAML was slow and consuming too much memory.

Classes [hide private]
  TemporaryReservationManager
A temporary resource reservation manager.
  ConfigWriter
The interface to the cluster configuration.
Functions [hide private]
 
_ValidateConfig(data)
Verifies that a configuration objects looks valid.
source code
 
_MatchNameComponentIgnoreCase(short_name, names)
Wrapper around utils.text.MatchNameComponent.
source code
list of tuples; (int, string, string)
_CheckInstanceDiskIvNames(disks)
Checks if instance's disks' iv_name attributes are in order.
source code
Variables [hide private]
  _config_lock = locking.SharedLock("ConfigWriter")
  _UPGRADE_CONFIG_JID = "jid-cfg-upgrade"

Imports: copy, os, random, logging, time, itertools, errors, locking, utils, constants, rpc, objects, serializer, uidpool, netutils, runtime, pathutils, network


Function Details [hide private]

_ValidateConfig(data)

source code 

Verifies that a configuration objects looks valid.

This only verifies the version of the configuration.

Raises:

_CheckInstanceDiskIvNames(disks)

source code 

Checks if instance's disks' iv_name attributes are in order.

Parameters:
Returns: list of tuples; (int, string, string)
List of wrongly named disks, each tuple contains disk index, expected and actual name