class LUNodeAdd(LogicalUnit):
Logical unit for adding node to the cluster.
Method |
|
Build hooks env. |
Method |
|
Build hooks nodes. |
Method |
|
Check syntactic validity for the opcode arguments. |
Method |
|
Check prerequisites. |
Method |
|
Adds the new node to the cluster. |
Method |
|
Extend list of nodes to run the post LU hook. |
Constant | HPATH |
Undocumented |
Instance Variable | changed |
Undocumented |
Instance Variable | hostname |
Undocumented |
Instance Variable | master |
Undocumented |
Instance Variable | new |
Undocumented |
Instance Variable | new |
Undocumented |
Instance Variable | new |
Undocumented |
Instance Variable | node |
Undocumented |
Instance Variable | primary |
Undocumented |
Method | _ |
Undocumented |
Method | _ |
Update the SSH setup of all nodes after adding a new node. |
Constant | _NFLAGS |
Undocumented |
Inherited from LogicalUnit
:
Method | __init__ |
Constructor for LogicalUnit. |
Method |
|
Raise AssertionError if the LU holds some locks of the given level. |
Method |
|
Declare LU locking needs for a level |
Method |
|
Expand names for this LU. |
Method |
|
Notify the LU about the results of its hooks. |
Method | owned |
Return the list of locks owned by the LU at a given level. |
Method |
|
Prepare the LU to run again. |
Method | release |
Return a request to release the specified locks of the given level. |
Method |
|
Undocumented |
Constant | HTYPE |
Undocumented |
Constant | REQ |
Undocumented |
Instance Variable | add |
Undocumented |
Instance Variable | cfg |
Undocumented |
Instance Variable | dont |
Undocumented |
Instance Variable | dry |
the value (if any) that will be returned to the caller in dry-run mode (signalled by opcode dry_run parameter) |
Instance Variable |
|
Undocumented |
Instance Variable |
|
Undocumented |
Instance Variable |
|
Undocumented |
Instance Variable |
|
Undocumented |
Instance Variable | needed |
Undocumented |
Instance Variable | op |
Undocumented |
Instance Variable | opportunistic |
Undocumented |
Instance Variable | opportunistic |
Undocumented |
Instance Variable | proc |
Undocumented |
Instance Variable | recalculate |
Undocumented |
Instance Variable | rpc |
Undocumented |
Instance Variable | share |
Undocumented |
Instance Variable | tasklets |
Undocumented |
Instance Variable | wconfd |
Undocumented |
Instance Variable | wconfdcontext |
Undocumented |
Instance Variable | wconfdlocks |
Undocumented |
Method | _ |
Helper function to expand and lock an instance. |
Method | _ |
Helper function to declare instances' nodes for locking. |
Check syntactic validity for the opcode arguments.
This method is for doing a simple syntactic check and ensure validity of opcode parameters, without any cluster-related checks. While the same can be accomplished in ExpandNames and/or CheckPrereq, doing these separate is better because:
- ExpandNames is left as as purely a lock-related function
- CheckPrereq is run after we have acquired locks (and possible waited for them)
The function is allowed to change the self.op attribute so that later methods can no longer worry about missing parameters.
Check prerequisites.
This checks:
- the new node is not already in the config
- it is resolvable
- its parameters (single/dual homed) matches the cluster
Any errors are signaled by raising errors.OpPrereqError.
Extend list of nodes to run the post LU hook.
This method allows LUs to change the list of node UUIDs on which the post hook should run after the LU has been executed but before the post hook is run.
Parameters | |
post | The initial list of node UUIDs to run the post hook on, as returned by BuildHooksNodes . |
Returns | |
list | list of node UUIDs on which the post hook should run. The default implementation returns the passed in post_hook_node_uuids, but custom implementations can choose to alter the list. |
Update the SSH setup of all nodes after adding a new node.
Parameters | |
new | Undocumented |
new | Undocumented |
is | Undocumented |
is | Undocumented |
rpcrunner | Undocumented |
readd:boolean | whether or not this node is readded |
feedback | Undocumented |