- Nov 02, 2009
-
-
Iustin Pop authored
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 <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Oct 30, 2009
-
-
Michael Hanselmann authored
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 <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Oct 27, 2009
-
-
Michael Hanselmann authored
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 executing backend function: [Errno 1] Operation not permitted … Error while uploading ssconf files to node …: Error while executing backend function: [Errno 1] Operation not permitted $ gnt-node modify --offline no --force node3.example.com … - WARNING: Not enough master candidates (desired 10, new value will be 4) … Copy of file /var/lib/ganeti/config.data to node node8.example.com failed: Error while executing backend function: [Errno 1] Operation not permitted Modified node node3.example.com - offline -> True - master_candidate -> auto-demotion due to offline Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Oct 22, 2009
-
-
Ken Wehr authored
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 <ksw@google.com> Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Oct 16, 2009
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Sep 25, 2009
-
-
Iustin Pop authored
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 explicitely do this instead of relying on the automated upgrade. Additionally this patch adds ctime/mtime population at cluster init time. mtime is not necessarily needed (master will update it automatically, but we're doing it anyway for consistency). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Sep 24, 2009
-
-
Guido Trotter authored
Without this confd will not start when a node is added to the cluster. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Sep 17, 2009
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Sep 16, 2009
-
-
Luca Bigliardi authored
Copy pub_key in authorized_keys. Signed-off-by:
Luca Bigliardi <shammash@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Sep 03, 2009
-
-
Michael Hanselmann authored
This survived QA, burnin and unittests. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Luca Bigliardi <shammash@google.com>
-
- Aug 17, 2009
-
-
Iustin Pop authored
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 makes sense when 2.0 is upgraded to 2.1. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Aug 13, 2009
-
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com> (cherry picked from commit 022c3a0b)
-
- Aug 10, 2009
-
-
Guido Trotter authored
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. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com> (cherry picked from commit b86a6bcd)
-
- Jul 29, 2009
-
-
Guido Trotter authored
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 used. This changed the behavior from 2.0, where we didn't start the master daemon at all, when this option was used. The manpage is also updated to remove the 2.0 only change. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jul 20, 2009
-
-
Guido Trotter authored
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 <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jul 16, 2009
-
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
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 if we pass in a list of enabled hypervisors which doesn't include the "default" xen-pvm one, we're also forced to pass a default hypervisor, or an error will be reported. It is also currently possible to disable the default hypervisor in cluster-modify (with unknown results). In order to avoid this we get rid of this field altogether, and define the "first" enabled hypervisor as the default one. This allows ease of changing which one is the default, and at the same time maintains coherency. At configuration upgrade we make sure that the old default is first in the list, so that 2.0 cluster defaults are preserved. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
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 then returned, but ignored. With this patch we just write out the config_data at InitConfig time, and thus can remove SimpleConfigWriter altogether. The now unused SimpleConfigReader.FromDict is also gone. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
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 ssh.WriteKnownHostsFile, and thus we don't need to care anymore for the InitConfig returned SimpleConfigWriter Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jul 08, 2009
-
-
Guido Trotter authored
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 used. This changed the behavior from 2.0, where we didn't start the master daemon at all, when this option was used. The manpage is also updated to remove the 2.0 only change. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
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 <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jul 07, 2009
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jun 15, 2009
-
-
Iustin Pop authored
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 <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
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, and the inner used to catch all exception (including this one), so in the logs we always had an exception logged, instead of the normal 'leaving cluster message'. The patch also adds logging of the exception's arguments, so that we have a trail in the logs about the shutdown mode. The exception's arguments were reversed from the normal RPC results style. While it makes somewhat more sense for this exception, we change them such that they match the rpc result format. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This is used in multiple places outside cmdlib.py, so it's a more interesting patch. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Guido Trotter authored
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. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jun 08, 2009
-
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
This way the same constant can represent the default profile also for nic, disk and OS parameters. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- May 28, 2009
-
-
Guido Trotter authored
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. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- May 07, 2009
-
-
Carlos Valiente authored
This is for Python 2.6 compatibility. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- May 04, 2009
-
-
Iustin Pop authored
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 <iustin@google.com> Reviewed-by:
Alexander Schreiber <als@google.com>
-
- Feb 27, 2009
-
-
Guido Trotter authored
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 an utils.EnsureDirs function and we call that one from ganti-noded, ganeti-masterd and bootstrap. Reviewed-by: iustinp
-
Iustin Pop authored
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
-
- Feb 10, 2009
-
-
Guido Trotter authored
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 - Add new constants dicts HVS_PARAMETER_TYPES and BES_PARAMETER_TYPES holding not only the valid parameters but also their types - Drop the old HVS_PARAMETERS and BES_PARAMETERS constants and calculate the values from the type dict - Convert all the default parameters to a valid type value - Create a new ForceDictType utils function, to check/enforce a dict's element value types, with relevant unit tests - Drop a few custom functions to check/convert the BE param types in utils and cli, in favor of ForceDictType - Double-check the parameter types using ForceDictType in both scripts and LogicalUnits, when possible. As a bonus: - Remove some old commented-out code in gnt-instance - Remove some already fixed FIXME - Fix a bug which prevented VALUE_DEFAULT to be applied to BE parameters in SetInstanceParams because the value was checked for validity before that transformation was made - Fix a bug which prevented initing a cluster and passing hvparams to work at all - ForceDictType allows an allowed_values for exceptions, which makes us able to do the checking even when some values must not be converted/typechecked (for example the 'default' string in SetInstanceParameters) Reviewed-by: iustinp
-
Iustin Pop authored
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 init and for new nodes. Reviewed-by: imsnah
-
- Dec 19, 2008
-
-
Michael Hanselmann authored
Reviewed-by: amishchenko
-