Trees | Indices | Help |
|
---|
|
Functions to bootstrap a new cluster.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
list |
|
|
|||
_INITCONF_ECID = "initconfig-ecid"
|
Imports: os, re, logging, time, rpc, ssh, utils, errors, config, constants, objects, ssconf, serializer, hypervisor, bdev, netutils, backend
|
Setup the SSH configuration for the cluster. This generates a dsa keypair for root, adds the pub key to the permitted hosts and adds the hostkey to its own known hosts. |
Writes a new HMAC key.
|
Updates the cluster certificates, keys and secrets.
|
Setup the necessary configuration for the initial node daemon. This creates the nodepass file containing the shared password for the cluster, generates the SSL certificate and starts the node daemon.
|
Initialize if needed the file storage.
|
Initialise the cluster.
|
Create the initial cluster configuration. It will contain the current node, which will also be the master node, and no instances.
|
Execute the last steps of cluster destroy This function shuts down all the daemons, completing the destroy begun in cmdlib.LUDestroyOpcode. |
Add a node to the cluster. This function must be called before the actual opcode, and will ssh to the remote node, copy the needed files, and start ganeti-noded, allowing the master to do the rest via normal rpc calls.
|
Failover the master node. This checks that we are not already the master, and will cause the current master to cease being master, and the non-master to become new master.
|
Returns the current master node. This is a separate function in bootstrap since it's needed by gnt-cluster, and instead of importing directly ssconf, it's better to abstract it in bootstrap, where we do use ssconf in other functions too. |
Check the agreement on who is the master. This function will return a list of (node, number of votes), ordered by the number of votes. Errors will be denoted by the key 'None'. Note that the sum of votes is the number of nodes this machine knows, whereas the number of entries in the list could be different (if some nodes vote for another master). We remove ourselves from the list since we know that (bugs aside) since we use the same source for configuration information for both backend and boostrap, we'll always vote for ourselves.
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Dec 20 13:26:35 2010 | http://epydoc.sourceforge.net |