Statistics
| Branch: | Tag: | Revision:

root / lib / bootstrap.py @ 463f75a5

History | View | Annotate | Download (27.9 kB)

# Date Author Comment
0376655e 06/23/2011 04:53 pm Guido Trotter

remove bootstrap._InitSharedFileStorage

This function is a copy of bootstrap._InitFileStorage with the following
differences:
- check constants.ENABLE_SHARED_FILE_STORAGE and not
constants.ENABLE_FILE_STORAGE
- use different local variable names
- one different error string...

d1e9c98d 03/31/2011 04:53 pm Iustin Pop

Automatically enable hail if enabled and found

Signed-off-by: Iustin Pop <>
Reviewed-by: Michael Hanselmann <>

7925d409 03/01/2011 07:18 pm Apollon Oikonomopoulos

Shared file storage initialization code

Add shared file storage handling during cluster initialization.

Signed-off-by: Apollon Oikonomopoulos <>
Signed-off-by: Iustin Pop <>
Reviewed-by: Iustin Pop <>

4b97f902 03/01/2011 07:11 pm Apollon Oikonomopoulos

Core shared file storage support

This patch introduces core file storage support, consisting of the following:

A configure-time switch for enabling/disabling shared file storage
support and controlling the shared file storage location:
--with-shared-file-storage-dir=. Shared file storage configuration is then...

ff699aa9 02/28/2011 05:26 pm Michael Hanselmann

gnt-cluster master-failover: Undrain queue

- Move functions for drain status (tracked via file) from jqueue to jstore
- Undrain queue on master failover if necessary
- Add QA test

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

fb87cbeb 01/27/2011 07:07 pm Michael Hanselmann

Merge branch 'devel-2.3' into devel-2.4

  • devel-2.3:
    Wait for master to become available on initialization
    Start all daemons on cluster initialization
    Clarify job processing order in admin guide
    Improve option descriptions
    Remove two unused variables...
3b6b6129 01/26/2011 06:26 pm Michael Hanselmann

Wait for master to become available on initialization

This is analogue to the existing check for a responsive node daemon.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

952d7515 01/26/2011 06:25 pm Michael Hanselmann

Start all daemons on cluster initialization

At least ganeti-confd was not started. It got started a few minutes
later by ganeti-watcher. Also move one pylint disable to the effective
line.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

72729d6e 01/04/2011 04:42 pm Michael Hanselmann

Cleanup bootstrap.SetupNodeDaemon

- Code formatting
- Use ShellQuote for one argument
- Remove variables no longer used after commit 9294514d

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

75cf411a 12/08/2010 09:45 pm Adeodato Simo

Introduce constant for the name of the initial node group

Signed-off-by: Adeodato Simo <>
Reviewed-by: Michael Hanselmann <>

6204ee71 12/01/2010 03:36 pm René Nussbaumer

Adding ndparams to gnt-cluster init|modify and man page

This is reverting the revert and adaption to fix the issue which caused
the revert

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

435e4bd6 11/29/2010 10:00 pm Michael Hanselmann

bootstrap: Set master node's {c,m}time on cluster init

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

4f358f28 11/29/2010 07:44 pm Michael Hanselmann

Revert "InitCluster support for ndparams"

This reverts commit fd7f5b411ca61be2e4eff638773ba6c0fac7eb32.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

fd7f5b41 11/29/2010 04:01 pm René Nussbaumer

InitCluster support for ndparams

Signed-off-by: René Nussbaumer <>
Reviewed-by: Michael Hanselmann <>

eb180fe2 10/22/2010 06:23 pm Iustin Pop

ConfigWriter: prevent using a foreign config

If the configuration file doesn't denote this node as master, we prevent
startup. This would have detected our previous race condition more
easily, hence we add it as a permanent check.

Signed-off-by: Iustin Pop <>...

21004460 10/22/2010 06:23 pm Iustin Pop

Fix bootstrap.MasterFailover race with watcher

This fixes a recently diagnosed race condition between master failover
and the watcher.

Currently, the master failover first stops the master daemon, checks
that the IP is no longer reachable, and then distributes the updated...

3d914585 10/12/2010 01:57 pm René Nussbaumer

Add prealloc_wipe_disks as a cluster-wide configuration variable

This is the first step for the support of wiping block devices prior
to creation of the instance.

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

31684f84 09/15/2010 03:58 pm René Nussbaumer

Stop all daemons precautiosly before trying to start ganeti-noded again

Please note that if the pid file is broken or missing we'll not catch
the process (if any is running) and it's up to the user to fix this state

Signed-off-by: René Nussbaumer <>...

88b92fe3 09/15/2010 02:08 pm Guido Trotter

InitConfig: create nodegroups as well

This patch also ensures that the initial configuration has all the
needed UUIDs and that they are unique, by using a
TemporaryReservationManager inside InitConfit to generate them.

Signed-off-by: Guido Trotter <>...

9294514d 08/25/2010 02:07 pm René Nussbaumer

Change bootstrap.SetupDaemonNode to use scp as we can assume SSH is setup

Signed-off-by: René Nussbaumer <>
Reviewed-by: Manuel Franceschini <>
Reviewed-by: Guido Trotter <>
Reviewed-by: Iustin Pop <>

ea8ac9c9 08/23/2010 03:40 pm René Nussbaumer

Switch to the RPC call to update /etc/hosts in LUAddNode and LURemoveNode

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>
Reviewed-by: Michael Hanselmann <>

7c4c22f5 08/20/2010 04:12 pm Manuel Franceschini

gnt-node add: add error msg when using IPv6

Signed-off-by: Manuel Franceschini <>
Reviewed-by: Michael Hanselmann <>

d8e0caa6 08/20/2010 02:12 pm Manuel Franceschini

Use family in backend.StartMaster

This patches changes the StartMaster method to consult the cluster
primary ip version when deciding whether to use arping or ndisc6 after
activating the master ip.

Signed-off-by: Manuel Franceschini <>...

b43dcc5a 08/19/2010 12:44 pm Manuel Franceschini

Support IPv6 node add

Signed-off-by: Manuel Franceschini <>
Reviewed-by: Iustin Pop <>

2f20d07b 08/19/2010 12:43 pm Manuel Franceschini

Add new cluster parameter primary_ip_version

We expose the ip_version (4, 6) to the external interface and internally
we convert it to ip_family (AF_INET=2, AF_INET6=10). This makes the code
more concise as all functions deal with family rather than version....

7845b8c8 08/18/2010 04:07 pm Manuel Franceschini

Fix some small newline style issues

Signed-off-by: Manuel Franceschini <>
Reviewed-by: Iustin Pop <>

b705c7a6 08/18/2010 11:27 am Manuel Franceschini

Support for resolving hostnames to IPv6 addresses

This patch enables IPv6 name resolution by using socket.getaddrinfo
instead of socket.gethostbyname_ex.

It renames the HostInfo class to Hostname and unifies its use throughout
the code. This is achieved by using static calls where no object is...

d367b66c 08/18/2010 11:26 am Manuel Franceschini

cluster init: Write ssconf before noded starts

This change is needed as we will need to read the primary ip version
cluster parameter before we start the node daemon. The reason is that we
need to know in advance if we bind to the IPv4 or IPv6 any address....

8b312c1d 08/18/2010 11:26 am Manuel Franceschini

Introduce new IPAddress classes

This patch unifies the netutils functions dealing with IP addresses to
three classes:
- IPAddress: Common IP address functionality
- IPv4Address: IPv4 specific functionality
- IPv6address: IPv6-specific functionality

Furthermore it adds methods to check whether an address is a loopback...

600535f0 07/21/2010 12:34 pm Manuel Franceschini

Always set commonName in X509 certificates

Due to the current switch of the RPC client to PycURL, a bug with newer
versions of libcurl surfaced. When the 'Subject' or 'Issuer' of
'server.pem' were empty, SSL handshake failed.

This patch changes the certificate generation functions such that they...

a744b676 07/09/2010 04:37 pm Manuel Franceschini

Introduce lib/netutils.py

This patch moves network utility functions to a dedicated module.

Signed-off-by: Manuel Franceschini <>
Reviewed-by: Iustin Pop <>

bf4af505 07/08/2010 04:45 pm Apollon Oikonomopoulos

Add default_iallocator cluster parameter

Add a cluster parameter to hold the iallocator that will be used by default
when required and no alternative (manually-specified iallocator or
manually-specified node(s)) is given.

Signed-off-by: Apollon Oikonomopoulos <>...

425f0f54 07/06/2010 03:28 pm Iustin Pop

Add a delay in master failover

I have seen some very seldom errors where (it seems) the address is
still live for a short while after removing it from the old master, thus
the new master will fail in startup/adding its own IP address.

To prevent against this, we add a delay/retry before we proceed, if the...

a721e23a 07/06/2010 12:24 pm Luca Bigliardi

Check and set drbd helper during bootstrap

Signed-off-by: Luca Bigliardi <>
Reviewed-by: Iustin Pop <>

c0c3fa27 06/30/2010 02:32 pm Manuel Franceschini

Introduce utils.IsValidIP{4,6}()

This patch introduces functions to check for valid IPv4 and IPv6
addresses and converts IsValidIP() to return True if it is either a IPv4
or a IPv6 address.

For now we do not change the functional behavior and replace IsValidIP...

fc0726b9 06/09/2010 12:40 pm Michael Hanselmann

cfgupgrade: Local variable for cluster-domain-secret filename

This is necessary to allow cfgupgrade to work on a non-standard directory.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

f39cd91d 04/20/2010 07:26 pm Balazs Lecz

Merge branch 'devel-2.1'

Conflicts:
doc/security.rst
trivial
lib/cli.py
trivial

Signed-off-by: Balazs Lecz <>
Reviewed-by: Michael Hanselmann <>

39b0f0c2 04/16/2010 04:10 pm Balazs Lecz

Add --uid-pool option to gnt-cluster init

Signed-off-by: Balazs Lecz <>
Reviewed-by: Guido Trotter <>

af2ae1c0 04/16/2010 03:06 pm Iustin Pop

Merge branch 'devel-2.1'

  • devel-2.1:
    utils: Add class to split string stream into lines
    Fix cluster behaviour with disabled file storage
    Update docstrings in tools/ and enable epydoc
    Forward-port the ganeti 2.0 cfgupgrade
    Add a new tool: sanitize-config...
0e3baaf3 04/15/2010 05:37 pm Iustin Pop

Fix cluster behaviour with disabled file storage

There are a few issues with disabled file storage:
- cluster initialization is broken by default, as it uses the 'no'
setting which is not a valid path
- some other parts of the code require the file storage dir to be a...

aeefe835 04/15/2010 05:36 pm Iustin Pop

Fix cfgupgrade with non-default DATA_DIR

Commit 43575108 added bootstrap.GenerateclusterCrypto and commit
7506a7f1 changed cfgupgrade to use it. However, this lost the
functionality of upgrading in non-default DATA_DIR.

To fix this, we enhance bootstrap.GenerateclusterCrypto to accept custom...

e7a25b08 04/12/2010 12:36 pm Guido Trotter

Merge branch 'devel-2.1'

  • devel-2.1:
    burnin: only remove instances we actually added
    burnin.ExecOrQueue: add post-process function
    burnin.ExecOrQueue: remove variable argument list
    Fix new pylint errors
    Rename the confd_client unittest (to confd.client)...
3953242f 04/08/2010 06:50 pm Iustin Pop

Add a new cluster parameter maintain_node_health

This will be used to conditionally enable the watcher node maintenance
feature.

Signed-off-by: Iustin Pop <>
Reviewed-by: Guido Trotter <>

3db3eb2a 03/17/2010 05:18 pm Michael Hanselmann

Add cluster domain secret

Information exchanged between different clusters via untrusted
third parties (e.g. for remote instance import/export) must be
signed with a secret shared between all involved clusters to
ensure the third party doesn't modify the information....

084aba47 03/15/2010 07:00 pm Michael Hanselmann

Merge remote branch 'origin/devel-2.1'

  • origin/devel-2.1:
    Rightname confd's HMAC key
    Rename SSL_CERT_FILE to NODED_CERT_FILE
    Clarify the error message for ':' in PV names

Conflicts:
lib/bootstrap.py: Trivial
lib/constants.py: Trivial

Signed-off-by: Michael Hanselmann <>...

168c1de2 03/15/2010 06:40 pm Michael Hanselmann

Rename SSL_CERT_FILE to NODED_CERT_FILE

To be consistent with RAPI_CERT_FILE, the rather generic named
“SSL_CERT_FILE” constant is renamed to “NODED_CERT_FILE”. The actual file
name is not changed.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

6b7d5878 03/15/2010 06:40 pm Michael Hanselmann

Rightname confd's HMAC key

Currently, the ganeti-confd's HMAC key is called “cluster HMAC key” or
simply “HMAC key” everywhere. With the implementation of inter-cluster
instance moves, another HMAC key will be introduced for signing critical
data. They can not be the same, so this patch clarifies the purpose of the...

bb3776b4 03/15/2010 04:25 pm Michael Hanselmann

Merge remote branch 'origin/devel-2.1'

  • origin/devel-2.1: (116 commits)
    Implement replacing cluster certs and keys via “gnt-cluster renew-crypto”
    cli: Add helper function to stop and start whole cluster
    cfgupgrade: Use new bootstrap function for certs and keys...
43575108 03/12/2010 05:44 pm Michael Hanselmann

bootstrap: Add new function to create cluster certs and keys

The code to generate cluster certificates, keys and secrets is currently
spread over several places. It makes sense to move it to a separate
function as we want to provide the user with the ability to automatically...

44caf5a8 03/08/2010 03:53 pm Iustin Pop

Validate the hostnames at creation time

This patch adds validation of new names used, i.e. at cluster init time,
node add time, and instance creation.

For instances, especially when using «--no-name-check» (which skips DNS
checks), we should validate the give name, and also normalize it...

5627f375 02/19/2010 05:58 pm Michael Hanselmann

bootstrap: Wait for node daemon when adding new node

Until now this was only done for the master node, though
the problem originally fixed in 8f215968 also occurs for
other node daemons.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

a55474c7 02/01/2010 04:42 pm Michael Hanselmann

Move function generating SSL certs into utils

Also add unittest.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Guido Trotter <>

e2e92ea0 01/13/2010 06:45 pm Guido Trotter

Generate hmac file with a newline at the end

This makes it slightly easier to cut&paste its content.

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

f154a7a3 11/05/2009 05:36 pm Michael Hanselmann

Add new “daemon-util” script to start/stop Ganeti daemons

Until now, Ganeti started and stopped its own daemons using custom functions.
To start, the daemon was just executed and then sent the appropriate signals to
stop it again. Init scripts would have to pay attention to the PID file and...

104f4ca1 11/04/2009 01:54 pm Iustin Pop

Introduce a wrapper for hostname resolving

Currently a few of the LU's CheckPrereq use utils.HostInfo which raises
a resolver error in case of failure. This is an exception from the
standard that CheckPrereq should raise an OpPrereqError if the error is
in the 'pre' phase (so that it can be retried)....

099c52ad 11/03/2009 04:31 pm Iustin Pop

Another round of pylint-related style fixes

A newer version of pylint, more warnings…

Signed-off-by: Iustin Pop <>
Reviewed-by: Michael Hanselmann <>

d3833ebd 11/03/2009 12:51 pm Michael Hanselmann

bootstrap: Convert to utils.Retry

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

debac808 11/02/2009 04:14 pm Iustin Pop

Convert the rest of the OpPrereqError users

This finishes the conversion of OpPrereqError creation to two-argument
style. Any leftovers as one-argument are not breaking anything, just
losing information about the errors.

Signed-off-by: Iustin Pop <>...

8f215968 10/30/2009 12:46 pm Michael Hanselmann

Make cluster initialization more reliable

There was a race condition between starting the node daemon
and sending requests to write the ssconf files. With this
patch, the initialization waits up to ten seconds for the
node daemon to become responsive.

Signed-off-by: Michael Hanselmann <>...

a4eae71f 10/27/2009 03:14 pm Michael Hanselmann

Provide feedback from redistributing configuration

This is particularily useful for “gnt-cluster redist-conf”, but
also for all other cases where the configuration files are
rewritten on other nodes.

$ gnt-cluster redist-conf
… Copy of file /var/lib/ganeti/config.data to node … failed: Error while...

b989b9d9 10/22/2009 04:40 pm Ken Wehr

Adding '--no-ssh-init' option to 'gnt-cluster init'.

Allows the initialization of a cluster without the creation or distribution
of SSH key pairs. Includes changes for LeaveCluster and RPC.

Signed-off-by: Ken Wehr <>
Signed-off-by: Guido Trotter <>...

c008906b 10/16/2009 05:51 pm Michael Hanselmann

bootstrap: Factorize HMAC key generation

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

cd34faf2 10/16/2009 05:51 pm Michael Hanselmann

Make bootstrap._GenerateSelfSignedSslCert public

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

430b923c 09/25/2009 05:14 pm Iustin Pop

Add uuid on node/instance add and cluster init

This patch does a little bit of cleanup first, since we want to call
GenerateUniqueID without reacquiring the lock.

Note that we don't necessarily need to do this for the cluster, since at
first startup ConfigWriter will do it anyway. But it's better to...

77b076ca 09/24/2009 01:04 pm Guido Trotter

Node init: copy hmac key as well

Without this confd will not start when a node is added to the cluster.

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

3cebe102 09/17/2009 06:53 pm Michael Hanselmann

Remove RpcResult.RemoteFailMsg completely

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

7a0156dc 09/16/2009 03:47 pm Luca Bigliardi

Fix authorized_keys generation at cluster init

Copy pub_key in authorized_keys.

Signed-off-by: Luca Bigliardi <>
Reviewed-by: Michael Hanselmann <>

13998ef2 09/03/2009 06:43 pm Michael Hanselmann

Use ReadFile/WriteFile in more places

This survived QA, burnin and unittests.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

d693c864 08/17/2009 05:46 pm Iustin Pop

Add ctime/mtime support to the main ConfigObjects

This patch adds ctime/mtime support to the “main” config objects - the
config data itself, and the cluster/nodes/instances objects.

These are not added on auto-upgrade, but rather should be migrated if it...

4a34c5cf 07/20/2009 07:58 pm Guido Trotter

Generate a shared HMAC key at cluster init time

This key is shared on all nodes (via cmdlib._RedistributeAncillaryFiles)
and will be used for HMAC authentication of confd messages.

Signed-off-by: Guido Trotter <>
Reviewed-by: Iustin Pop <>

539210af 07/17/2009 02:41 pm Guido Trotter

Merge branch 'next' into branch-2.1

  • next:
    Fix another issue with hypervisor_name change
    Update NEWS and version for 2.0.2 release
    Improve the description of node flags in man page
    Add enabled hypervisors to TestConfigRunner
    Add a few more checks to verify config...
b119bccb 07/16/2009 04:40 pm Guido Trotter

Make sure enabled_hypervisors list is valid

Signed-off-by: Guido Trotter <>
Reviewed-by: Iustin Pop <>

066f465d 07/16/2009 04:34 pm Guido Trotter

Get rid of the default_hypervisor slot

Currently we have both a default_hypervisor and an enabled_hypervisors
list. The former is only settable at cluster init time, while the latter
can be changed with cluster modify.

This becomes cumbersome in a few ways: at cluster init time for example...

a33848a5 07/16/2009 01:57 pm Guido Trotter

Simplify InitConfig and remove SimpleConfigWriter

InitConfig currently creates the cluster config_data, then puts it into
a dict, passes it to SimpleConfigWriter to load it from a dict (which
just reuses the dict value) and then saves it. The SimpleConfigWriter is...

9e1333b9 07/16/2009 01:57 pm Guido Trotter

InitCluster, don't use SimpleConfigWriter

InitConfig returns a SimpleConfigWriter to InitCluster, which then
passes it on to ssh.WriteKnownHostsFile, which extracts a couple of
values from it. One line later the full ConfigWriter is initialized.

By initializing it one line before we can pass the full writer to...

3583908a 07/08/2009 12:49 pm Guido Trotter

Extend call_node_start_master rpc with no_voting

When the parameter is set to True and start_daemons is also True,
ganeti-masterd will be started with the new --no-voting --yes-do-it
options.

This new option is set to True only on masterfailover, when no_voting is...

2f7140ba 07/08/2009 12:28 pm Guido Trotter

Merge branch 'next' into branch-2.1

  • next:
    Create a new --no-voting option for masterfailover
    ganeti-masterd: allow non-interactive --no-voting
    Fix pylint warnings
    Add custom pylintrc
    bootstrap: Don't leak file descriptor when generating SSL certificate...
fba15943 07/08/2009 12:27 pm Guido Trotter

Merge branch 'master' into next

  • master:
    Create a new --no-voting option for masterfailover
    ganeti-masterd: allow non-interactive --no-voting
8e2524c3 07/08/2009 12:17 pm Guido Trotter

Create a new --no-voting option for masterfailover

This allows failing over in certain corner cases, such as a 2 node
cluster with one node down. The man page is also updated to document
this dangerous option and how to recover from this situation.

Signed-off-by: Guido Trotter <>...

88828491 07/07/2009 03:54 pm Michael Hanselmann

bootstrap: Don't leak file descriptor when generating SSL certificate

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

5bbd3f7f 07/07/2009 03:51 pm Michael Hanselmann

Fix some typos

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

2a52a064 06/15/2009 08:08 pm Iustin Pop

Convert master_info rpc to new style result

This was more tricky as the backend function is used by other function
in backend.py. As such, it must be handled specially - it must raise
always an exception and not simply return False, err.

Signed-off-by: Iustin Pop <>...

0623d351 06/15/2009 08:08 pm Iustin Pop

Conver node_leave_cluster rpc to new style result

This patch converts this rpc call to the new style result, and also
changes in the process the meaning of the QuitGanetiException's
arguments and the node daemon rpc call exception handler.

The problem with the exception handler is that we used a two-stage one,...

6c00d19a 06/15/2009 08:08 pm Iustin Pop

Convert node_stop_master rpc to new style result

Signed-off-by: Iustin Pop <>
Reviewed-by: Guido Trotter <>

b726aff0 06/15/2009 08:08 pm Iustin Pop

Convert node_start_master to new style result

This is used in multiple places outside cmdlib.py, so it's a more
interesting patch.

Signed-off-by: Iustin Pop <>
Reviewed-by: Guido Trotter <>

ec0652ad 06/15/2009 01:52 pm Guido Trotter

InitCluster: don't set default_bridge

And remove the -b option, as default nic parameters can be used instead.
We could support the option, but that would add more code, and since
cluster init is not a frequent operation, it's better to keep the code
clean....

b6a30b0d 06/08/2009 07:58 pm Guido Trotter

Allow setting NIC parameters at gnt-cluster init

Signed-off-by: Guido Trotter <>
Reviewed-by: Iustin Pop <>

4ef7f423 06/08/2009 07:58 pm Guido Trotter

Change BEGR_DEFAULT to PP_DEFAULT

This way the same constant can represent the default profile also for
nic, disk and OS parameters.

Signed-off-by: Guido Trotter <>
Reviewed-by: Iustin Pop <>

022c3a0b 06/08/2009 07:58 pm Guido Trotter

Fix a typo in InitCluster

Signed-off-by: Guido Trotter <>
Reviewed-by: Iustin Pop <>

b86a6bcd 05/28/2009 03:18 pm Guido Trotter

Add cluster-init --no-etc-hosts parameter

If --no-etc-hosts is passed in at cluster init time we set a new
parameter in the cluster's object to false, and avoid adding nodes to
the hosts file. The UpgradeConfig function is used to set the value to
True, when upgrading from an old configuration version....

bd45767b 05/07/2009 11:13 am Carlos Valiente

Remove some superfluous imports

This is for Python 2.6 compatibility.

Signed-off-by: Iustin Pop <>
Reviewed-by: Iustin Pop <>

8eb148ae 05/04/2009 04:09 pm Iustin Pop

Fix gnt-cluster getmaster on non-master nodes

The current implementation of “gnt-cluster getmaster” doesn't work on
non-master nodes, which is a regression from 1.2. This patch implements
it (again) via ssconf.

Signed-off-by: Iustin Pop <>...

9dae41ad 02/27/2009 07:08 pm Guido Trotter

Create runtime dir in bootstrap

Some hypervisors (KVM) need RUN_GANETI_DIR to exist even at cluster init
time. This patch creates it in InitCluster just before hv parameter
checking. Since the code to make list of directories is already repeated
twice in the code, and this would be the third time, we abstract it into...

5fcc718f 02/27/2009 03:06 pm Iustin Pop

Fix some epydoc style issues

99% of the epydoc return tags are "@return:", but each of the modified files
had one "@returns:" line. We fix this for consistency.

Reviewed-by: imsnah

a5728081 02/10/2009 05:06 pm Guido Trotter

Instance parameters: force typing

We want all the hv/be parameters to have a known type, rather than a
random mix of empty string, boolean values, and None, so we declare the
type of each variable and we enforce/convert it.

- Add some new constants for enforceable value types...

af64c0ea 02/10/2009 04:45 pm Iustin Pop

Add a ‘drained’ attribute to node objects

This attribute will be used to prevent any allocation on the node (any
of replace-disks with new secondary this node, failover to the node,
migration to the node).

The patch adds the attribute and initializes it correctly in cluster...

5b099da9 12/19/2008 09:31 pm Michael Hanselmann

ganeti.bootstrap: Set permissions on newly uploaded files

Reviewed-by: amishchenko

2438c157 12/19/2008 09:30 pm Michael Hanselmann

ganeti.bootstrap: Upload remote API certificate to new nodes

Reviewed-by: amishchenko

5557b04c 12/19/2008 09:30 pm Michael Hanselmann

ganeti.bootstrap: Prepare for remote API certificate

Reviewed-by: amishchenko

c4415fd5 12/19/2008 09:30 pm Michael Hanselmann

ganeti.bootstrap: Write SSL key to temporary file and set permissions

Previously, we set the permissions only after writing the key. This
gave other users on the system a small window during which they could
read the key.

Reviewed-by: amishchenko