Correct number of empty lines
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Hrvoje Ribicic <riba@google.com>
Remove osparams_private when downgrading the configuration
The instance parameter "osparams_private" was newly introducedin 2.12. So remove it when downgrading the configuration to 2.11.
Remove osparams_private_cluster on config downgrade
The new cluster parameter "osparams_private_cluster" wasnewly introduced in 2.12. So remove it when downgradingto 2.11.
Add 'kvm-ifup-os' to configure instance communication TAP
The script 'tools/kvm-ifup-os' configures TAP network interfaces forfor instances, routing, DHCP server, etc. Note that this script onlyconfigures TAP network interfaces that are used by the instance...
Merge branch 'stable-2.11' into master
Disabling client certificate usage
This patch temporarily disables the usage of the clientSSL certificates. The handling of RPC connections had aconceptional flaw, because the certificates lack a propersignature. For this, Ganeti needs to implement a CA,...
Add parameter max_running_jobs to the cluster configuration
This cluster-wide parameter will determine how many non-finalized jobs maximallyshould be in a not queued state at the same time.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Petr Pudlak <pudlak@google.com>
Prepare master as new 2.12 branch
This adapts various file to make the current masterbranch the new stable-2.12 branch.
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Add generating node certificates as post-upgrade task
While, technically, Ganeti is still working without individual nodecertificates, it is considered an error by gnt-cluster verify tonot have it done immediately after upgrading. So, to make automatic...
Merge branch 'stable-2.10' into master
Signed-off-by: Klaus Aehlig <aehlig@google.com>...
Add an empty post-upgrade hook
As 2.10 is the first version from which you can do automatic upgrades,there is nothing to do when going to any other version in the 2.10branch.
Make the move-instance tool more fault tolerant
The move-instance tool raises an exception when used with a clusterrunning an earlier version of Ganeti. As the tool is meant to performinter-cluster moves, this situation could be encountered outside the...
Also downgrade gluster parameters
Support for gluster was added only in version 2.11. So,when downgrading to the 2.10 branch, these parametersneed to be removed.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Verify incoming RPCs against candidate map
From this patch on, incoming RPC calls are checked againstthe map of valid master candidate certificates. If no mapis present, the cluster is assumed to be inbootstrap/upgrade mode and compares the incoming call...
Create client SSL certificates on cluster init
This patch makes Ganeti create a client SSL certificate forthe master node on cluster initialization. Note that some ofthe code in this patch is later moved into an LU to serverequirements for crypto renewal and updates, but for this...
Merge branch 'stable-2.9' into stable-2.10
Merge branch 'stable-2.8' into stable-2.9
master-up-setup: Ping multiple times with a shorter interval
In the case of network problems, one ping packet can possibly get lost.Sending multiple packets is safer. The interval between packets is setto 200ms so that the check finishes faster.
Signed-off-by: Petr Pudlak <pudlak@google.com>...
Add a packet number limit to "fping" in master-ip-setup
This fixes issue #630. Apparently there is a bug in fping 3.5 where itloops forever without "-c" given an unreachable host, even though"-c 1" should be the default according to the man page.
The "-c" flag works on Squeeze. Checking the man pages on the Internet,...
Add default_iallocator_params cluster parameter
Add a cluster parameter to hold the iallocator parameters usedby the default instance allocator. Implement the option tomodify config.data, query config.data and upgrade man pages,tests and cfgupgrade tool. The new default_iallocator_params is...
Fix net-common script in case of routed mode
setup_route should run in case or routed mode and notopenvswitch.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
Be paranoid about existing keys in cfgupgrade
The cfgupgrade test assumes a very minimal configuration for some of itstests. This configuration does not contain some of the fields which wereassumed to be present in cfgupgrade. This patch tests for the existence...
Downgrade from 2.10 to 2.9 correctly
Add handling for Open vSwitch related configuration parameters as wellas for the "cpuid" and "soundhw" hypervisor parameters.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Update custom SSH ports config when downgrading to 2.10
If SSH ports other than 22 are configured, abort the config downgrade,as the operation would certainly fail. Otherwise just removendparams/ssh_port from the configuration.
Pass VLAN parameter correctly in moves
Fix the assignment of a wrong value to the VLAN and name parameters ofNICs during instance moves.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Hrvoje Ribicic <riba@google.com>
Remove hardcoded references to File, SharedFile templates
DTS_FILEBASED is a constant that exists and this commit makes surethat it is used whenever sensible, rather than resorting to hardcodingthe pair of templates in very many files.
Signed-off-by: Santi Raffa <rsanti@google.com>...
Prepare constants for automatic reexport
Add --compress option to instance_move
instance_move now supports the --compress option with which it'spossible to select the compression mode to use during the instance move.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Prepare master branch for 2.11 devel cycle
Bump versions in various places to 2.11 and remove the downgrade codefrom cfgupgrade. Also adapt cfgupgrade tests.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Prepare version numbers for 2.10 release cycle
- Bump version numbers to 2.10 in various files- Move implemented designs to design-2.10
Merge branch 'stable-2.9' into master
Downgrade 'vif_script'
This patch adds removing the 'vif_script' attributefrom the cluster's config when downgrading from 2.9to 2.8. Adaption of the unit test is included.
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Downgrade 'xen_cmd'
This downgrades the cluster's hypervisor parameters for thexen hypervisors with respect to the 'xen_cmd' attribute.A unit tests is provided.
Fix lint errors
This fixes a couple of lint errors that I missed withthe patch "Fix upgrade and downgrade regardingdisk.dev_type".
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
Fix upgrade and downgrade regarding disk.dev_type
The up/downgrade procedure so far did not consider thechanges in the 'dev_type' attribute of disks. This patchadds relevant checks and updates. A related problemwas that the logical IDs of disks were adjusted depending...
Rename LDS_DRBD to DTS_DRBD
This patch renames the constant 'LDS_DRBD' to 'DTS_DRBD'to make it consistent with the renaming of LD_* constantsto DT_* constants.
Move 'BuildVersion' to 'lib/utils/version.py'
Functions 'BuildVersion' and 'SplitVersion' are no longer needed bythe constants and, given that they are not constants, they should bemoved elsewhere. Since they are only used by 'cfgupgrade' and tests,these functions are moved to 'lib/utils/version.py' and references to...
Remove physical_id field reference from tools
Remove remaining references to the physical_id field in cluster-mergeand sanitize-config.
Remove physical_id field from disks during upgrade
The physical_id field is no longer supported in disk objects, so removeit during upgrades.
Improves allocation parameters check in move-instance
If the target cluster has a default iallocator, no allocation paramsare needed. The parameter checks take this into account and do notshow errors anymore.
Signed-off-by: Hrvoje Ribicic <riba@google.com>...
Move-instance can now change the disk template while moving
By using the --dest-disk-template option, the move-instance utilitycan change the disk template of the moved instance on-the-fly.This is done by simply altering the disk template of the instance...
Fix strings invalid with newer lint versions
Generating ASCII characters via a supported but not official escape sequenceleads to a "Anomalous backslash in string" error in newer pylint versions. Thispatch fixes the issue.
Signed-off-by: Michele Tartara <mtartara@google.com>...
Generate tools/users-setup from descriptions
Now that we have a machine readable description of the usersto be added to the system, use it to generate the tools/users-setupscript, so that we again have only one authoritative source ofthe user and group requirements. This also has the advantage of...
Fix bridging in net-common
Bridging does not work correctly in net-common. The parameters passedby Ganeti are put in /var/run/ganeti/xen-hypervisor/nic/$domname/$devidand read again from there before running the setup functions accordingto the $MODE which is read from the file....
Remove dsahostkeypub during config downgrade
Remove the newly-added DSA host public key field from the configuration filewhen downgrading to 2.7, if present. Otherwise masterd will refuse to start.
Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>...
Replace LD_* constants with DT_* constants
LD_* constants are basically like DT_* constants, exceptfor that both file and shared file were mapped to file.In order to not having to maintain three slightly differentsets of disk-related constants (DT, LD and ST), we merge...
Merge branch 'stable-2.9'
Support DSA SSH keys in bootstrap
As outlined in issue 338, Ganeti failed to initialize a cluster if noRSA SSH key is present on the master node. This patch extends Ganetissupport to DSA keys, so clusters with only DSA keys are possible now.
This fixes issue 338....
QA: skip lvm-based tests if lvm disabled
QA tests should make sure not to be run if the necessaryenvironment for them is not present. This patch fixes thatfor a couple of tests that fail to check that before beingexecuted.
Signed-off-by: Helga Velroyen <helgav@google.com>...
Cluster-merge: determine shared file storage use from config
This patch makes cluster merge read the cluster'sconfiguration to find out whether or not sharedfile storage is enabled.
Fix the downgrade function of cfgupgrade
The downgrade was not correctly removing some of the UUIDs (namely, thoseof disks and NICs).
Fixes Issue 510.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Extend gnt-instance show to show vlan parameter
Extensions for "gnt-instance show" to output the vlan parameter whichwas introduced by my recent patch series.This is done by extending the nic object that is used to output theinfo. Every other occurrence of this object is adopted as well....
Adopt cfgupgrade to support vlan parameter
This patch updates cfgupgrade to support vlans.Downgrade will remove the vlan information and give a warning.
Signed-off-by: Sebastian Gebhard <sege@fs.ei.tum.de>Signed-off-by: Klaus Aehlig <aehlig@google.com>...
Rename queryd to luxid
As queryd will, in the future, handle all LUXI request, queue jobs andmost likely perform various other tasks, it is renamed to luxid already.This will safe some headache when upgrading Ganeti installations, as wedon't have to deal with a daemon rename....
Add queryd daemon (split from confd)
queryd is added as a new daemon which handles configuration queries overLUXI. This functionality was removed from confd, which now only queriesover the network.
The queryd user is added to the master group such that it can access...
Reset cfgupgrade --downgrade to be a no-op
In version 2.10 cfgupgrade --downgrade is supposed to downgradethe configuration to version 2.9 which, at the moment, is stillthe same as 2.10.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
cluster-merge: remove usage of 'ENABLE_FILE_STORAGE'
This patch adjusts the cluster-merge tool so that it doesno longer check the constant 'ENABLE_FILE_STORAGE' butthe clusters' configurations.
Refactor NIC configuration scripts
Add new script vif-ganeti that could be used instead ofdefault vif-bridge in order NIC customization can be moreflexible.
Extract common code from kvm-ifup and insert it in a newfile net-common that is being sourced by kvm-ifup and...
Add route to VCluster network in vcluster-setup
This route is required on the Fedora test machine, as otherwise fpingwould not work and hang forever.
Convert instance indices to UUIDs in configuration
cfgupgrade replaces the occurences of instance names (where they areused as index) with the instance UUID.
It also supports the inverse replacement, so downgrades aresupported too.
Signed-off-by: Thomas Thrainer <thomasth@google.com>...
Merge branch 'stable-2.8' into master
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
Adapt VCluster script to current situation
vcluster-setup is adapted to the current Ganeti command line arguments.Also, a bug for diskless instances in qa_instance is fixed.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
Add confd user to masterd group
The server.pem file is 0440 (materd_uid, masterd_gid) and cannot beaccessed by confd.
This patch contains a workaround for 2.8.0~beta1 (adding conf to themasterd group in the user setup tool, and remembering the users to...
Version bump to 2.9.0~alpha1
Bump the version number to 2.9.0~alpha1.
This also requires updating version numbers in cfgupgrade tool.
Furthermore, a data file for test representing a 2.8 configuration had theversion number set to 2.7 in order to prevent tests failing while the current...
Merge branch 'stable-2.8' into 'master'
Version bump to 2.8.0~alpha1
Now that alpha versions are supported, we can bump the version numberfor branch stable-2.8 to 2.8.
This also requires updating the cfgupgrade tool.
Thanks to the previous patches, all the other documents can be upgradedduring the alpha lifetime, before switching to beta (that will enable...
Make cfgupgrade idempotent
One of the unit tests checks whether cfgupgrade's downgrade option isidempotent. It is, but a version number check made it impossible toactually downgrade multiple times.
With this change, both the current-version version number and the...
Update config version number when downgrading
The downgrade option of the cfgupgrade tool was not changing the versionnumber in the configuration file of the cluster while performing thedowngrade.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Convert node indices to UUIDs in configuration
cfgupgrade replaces the occurences of node names (where they are used asindex) with the node UUID.It also supports the inverse replacement, so downgrades are supportedtoo.
Tests for cfgupgrade are adapted as well....
Support spindles in move-instance
The script was failing when exclusive storage was active (bug introduced in7c848a6a).
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
Consider disks_active in UpgradeConfig
The disks_active flag is updated when masterd reads the configuration.Also, cfgupgrade now removes the disks_active flag during downgrades.
Report missing spindles in the configuration
cfgupgrade and cluster-verify run a check for missing spindles in diskconfiguration when exclusive storage is enabled. The check in cfgupgrademay give false positives due to the complexity of getting the correct value...
cfgupgrade: Remove spindles on downgrade
Spindles didn't exist in 2.8 and should be removed to downgrade.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
cfgupgrade: Downgrade is a NO-OP
The configuration is still the same as in 2.8 (the reference stable versionfor this branch), so downgrade shouldn't do anything.
Unit tests are also updated, with a new 2.8 configuration file. Theconfiguration file used for the upgrade+downgrade test was tailored to the...
Merge branch 'stable-2.7' into stable-2.8
Don't fail to deactivate master IP if already down
The master IP setup script now checks if the master IP is actuallyconfigured on the machine before trying to remove the IP.
This fixes issue 460.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Merge stable-2.7 into stable-2.8
Conflicts: INSTALL NEWS configure.ac src/Ganeti/Query/Group.hs test/hs/Test/Ganeti/Objects.hs test/hs/Test/Ganeti/Query/Query.hs
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Disable inter-cluster instance move for file instances
Inter-cluster instance moves depends on exporting an instance. For file-basedinstance, exporting is not supported. Therefore, this patch disablesinter-cluster instance moves for file-based instances and informs the user...
Add monitoring daemon to the masterd group
The hmac.key file is owned by group masterd and is required to communicate withthe confd.
The monitoring daemon need to communicate with the confd so it has to be part ofthe masterd group.
Add multiple min/max specs in instance policy
Now instance policies can contain more than one min/max specs. This is themain element of the "Constrained instance sizes" section in the"Partitioned Ganeti" design doc.
This is a big patch, but changing the type of a configuration item requires...
Conflicts: NEWS doc/rapi.rst
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
cfgupgrade: Remove enabled_disk_templates on downgrade
Remove enabled_disk_templates instead of the deprecatedenabled_storage_types.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
cfgupgrade: Limit specs in ipolicy are always complete
Partial specs are filled with cluster defaults.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Add monitoring daemon user to user creation script
The script was added to Ganeti before the monitoring daemon, so itdid not include that user yet.
Preserve device names during instance move
Fix 'move-instance' tool to preserve the instance disk and NIC nameswhen moving instances from one cluster to another. Also, fix value errorsince an instance NIC is an 8-tuple, containing also name and UUID.
Signed-off-by: Christos Stavrakakis <cstavr@grnet.gr>...
users setup: add masterd to confd group
Without this masterd fails saving the config, because it can't changethe group on the file.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Merge branch 'devel-2.7'
Add tool for creating users and groups
When executed in split user mode, Ganeti requires a specific set of usersand groups to be created in the appropriate way.
This commit introduces a tool that takes care of that automatically.
cfgupgrade: Add support for newly refactored ipolicies
Instance policies in the configuration are upgraded and downgraded. Bothoperations are idempotent.
cfgupgrade: Add --downgrade option
It's now possible to go back to the previous stable version. Unit testsprovided.
This is mostly useful during development, when going from master tostable/devel.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>...
cfgupgrade: Refactor code
All the upgrading code is now in one function. No functionality has beenchanged.