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

Class LUNodeRemove

source code


Logical unit for removing a node.

Instance Methods [hide private]
 
BuildHooksEnv(self)
Build hooks env.
source code
 
CheckPrereq(self)
Check prerequisites.
source code
 
Exec(self, feedback_fn)
Removes the node from the cluster.
source code

Inherited from LogicalUnit: CheckArguments, DeclareLocks, ExpandNames, HooksCallBack, __init__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  HPATH = "node-remove"
  HTYPE = "NODE"

Inherited from LogicalUnit: REQ_BGL, ssh

Instance Variables [hide private]

Inherited from LogicalUnit: dry_run_result

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

BuildHooksEnv(self)

source code 

Build hooks env.

This doesn't run on the target node in the pre phase as a failed node would then be impossible to remove.

Overrides: LogicalUnit.BuildHooksEnv

CheckPrereq(self)

source code 

Check prerequisites.

This checks:

  • the node exists in the configuration
  • it does not have primary or secondary instances
  • it's not the master

Any errors are signaled by raising errors.OpPrereqError.

Overrides: LogicalUnit.CheckPrereq

Exec(self, feedback_fn)

source code 

Removes the node from the cluster.

Overrides: LogicalUnit.Exec