Package ganeti :: Package cmdlib :: Module node
[hide private]
[frames] | no frames]

Module node

source code

Logical units dealing with nodes.

Classes [hide private]
  LUNodeAdd
Logical unit for adding node to the cluster.
  LUNodeSetParams
Modifies the parameters of a node.
  LUNodePowercycle
Powercycles a node.
  LUNodeEvacuate
Evacuates instances off a list of nodes.
  LUNodeMigrate
Migrate all instances from a node.
  LUNodeModifyStorage
Logical unit for modifying a storage volume on a node.
  LUNodeQueryvols
Logical unit for getting volumes on node(s).
  LUNodeQueryStorage
Logical unit for getting information on storage units on node(s).
  LUNodeRemove
Logical unit for removing a node.
  LURepairNodeStorage
Repairs the volume group on a node.
Functions [hide private]
 
_DecideSelfPromotion(lu, exceptions=None)
Decide whether I should promote myself as a master candidate.
source code
 
_CheckNodeHasSecondaryIP(lu, node, secondary_ip, prereq)
Ensure that a node has the given secondary ip.
source code
 
_GetNodeInstancesInner(cfg, fn) source code
 
_GetNodePrimaryInstances(cfg, node_uuid)
Returns primary instances on a node.
source code
 
_GetNodeSecondaryInstances(cfg, node_uuid)
Returns secondary instances on a node.
source code
 
_GetNodeInstances(cfg, node_uuid)
Returns a list of all primary and secondary instances on a node.
source code
 
_GetStorageTypeArgs(cfg, storage_type)
Returns the arguments for a storage type.
source code
 
_CheckOutputFields(fields, selected)
Checks whether all selected fields are valid according to fields.
source code

Imports: logging, operator, constants, errors, locking, netutils, objects, opcodes, rpc, utils, iallocator, LogicalUnit, NoHooksLU, ResultWithJobs, CheckParamsNotGlobal, MergeAndVerifyHvState, MergeAndVerifyDiskState, IsExclusiveStorageEnabledNode, CheckNodePVs, RedistributeAncillaryFiles, ExpandNodeUuidAndName, ShareAll, SupportsOob, CheckInstanceState, INSTANCE_DOWN, GetUpdatedParams, AdjustCandidatePool, CheckIAllocatorOrNode, LoadNodeEvacResult, GetWantedNodes, MapInstanceLvsToNodes, RunPostHook, FindFaultyInstanceDisks, CheckStorageTypeEnabled, GetClientCertDigest, AddNodeCertToCandidateCerts, RemoveNodeCertFromCandidateCerts, EnsureKvmdOnNodes


Function Details [hide private]

_CheckNodeHasSecondaryIP(lu, node, secondary_ip, prereq)

source code 

Ensure that a node has the given secondary ip.

Parameters:
  • lu (LogicalUnit) - the LU on behalf of which we make the check
  • node (objects.Node) - the node to check
  • secondary_ip (string) - the ip to check
  • prereq (boolean) - whether to throw a prerequisite or an execute error
Raises:

_CheckOutputFields(fields, selected)

source code 

Checks whether all selected fields are valid according to fields.

Parameters: