Remove physical_id field from disks during upgrade
The physical_id field is no longer supported in disk objects, so removeit during upgrades.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Jose A. Lopes <jabolopes@google.com>
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...
Merge branch 'stable-2.9' into master
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>...
Merge branch 'stable-2.8' into stable-2.9
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.
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
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.
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
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.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
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.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
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.
Trivial merge: no conflicts...
cfgupgrade: Fix error messages
Messages were inconsistent. You could get both an error and a messagesaying that everything was fine.
vcluster-setup: Create $vnode/etc/ganeti directory
This directory is required by “cfgupgrade” and some other tools.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
Add cfgupgrade for changing nic.network to uuid
This gets all network info from config_data and parsesall instances and their NICs and makes the substitution.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>Reviewed-by: Helga Velroyen <helgav@google.com>
Version bump for 2.7.0~beta1
Also update the documentation target versions and the cfgupgrade tool torecognize 2.6 and upgrade to 2.7
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Move burnin to ganeti.tools.burnin
Similar to other scripts, “tools/burnin” just becomes a wrapper script.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
burnin: Enable DT_EXT/DT_RBD for single node clusters
As reported by Constantinos Venetsanopoulos, DT_RBD and DT_EXT work onsingle node clusters.
burnin: Disk template option cleanup
Burnin doesn't support all disk templates (specifically it doesn'tsupport “blockdev”). The code, however, used manually composed lists insome places, constants.DISK_TEMPLATES in others, and an internal list ofsupported templates in some....
burnin: Factorize disk template lists
Keep the lists at the top instead of having them embedded in the code.Use frozenset, too.
Implement the External Storage Interface
With this commit we introduce the External Storage Interfaceto Ganeti, abbreviated: ExtStorage Interface.
The ExtStorage Interface provides Ganeti with the ability to interactwith externally connected shared storage pools, visible by all...
Replace frozenset with compat.UniqueFrozenset
This is not a trivial s/frozenset/compat.UniqueFrozenset/, but ratheronly replaces “frozenset” where appropriate. Most of the places are“static” information that doesn't change after the module has beenloaded....
burnin: rename instances to same name
this (a) allows us to test renaming in burnin even if we don't have anextra instance name and (b) is a valid operation, as it allows to "fix" an instance who went name-astray
Signed-off-by: Guido Trotter <ultrotter@google.com>...
Very very very basic openvswitch support
This is a "better than nothing" support, just for kvm and just joiningthe machine to the opevswitch bridge with the right command.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Iustin Pop <iustin@google.com>...
Factorize logging setup in tools
Most tools had their own “SetupLogging” function, but they were allessentially the same. This patch adds a generic version to “utils.log”and provides unit tests.
Fix tools/move-instance after networks addition
Commits d4117a72 (“Modify LUInstanceCreate to support networks”) and09a3d21f (“Pass detailed network info in hooks“) expanded the nicinformation as computed by _NICToTuple, which means that the format ofthe result value from LUInstanceQueryData has changed, and...
Fixes to pass pep8 (make lint)
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>Reviewed-by: Iustin Pop <iustin@google.com>
Fixes to pass unittests (make check)
cfgupgrade for networks
Add networks slot in config data.Add networks slot in nodegroups.
Merge branch 'devel-2.6' into submit
Conflicts: Makefile.am (reordering, fixed) htools/Ganeti/Confd/Server.hs (hlint fixes on master) htools/Ganeti/Daemon.hs (hlint)...
Fix gnt-instance console with xl
- Rename xm-console-wrapper to xen-console-wrapper- Pass the xen command to use as a parameter
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
cfgupgrade: Write file for file storage paths
When file storage is used this file is now mandatory.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Make Paramiko an optional dependency for listrunner
With the move away from “setup-ssh”, Paramiko is no longer necessary toconfigure SSH on nodes.
Remove setup-ssh
It has been superseeded by “prepare-node-join”.
gnt-node add: Use prepare-node-join
This patch changes “gnt-node add” to use the newly added“prepare-node-join” tool. Hereby Paramiko is no longer a hard dependencyfor setting up SSH on nodes.
In “gnt_cluster.py”, a positional parameter is no longer passed as a...
Force tap's MAC prefix to "fe"
Setting a high prefix discourages the bridge from adopting the tap'sMAC. Xen is not affected by this since the MAC is forced to"fe:ff:ff:ff:ff:ff".
This addresses issue #217.
Signed-off-by: Iustin Pop <iustin@google.com>...
vcluster-setup: Stop hardcoding /etc/hosts
… use a constant instead.
vcluster-setup: Watcher, init script
- Generate a wrapper script for ganeti-watcher- Provide command line option to specify init script
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
vcluster-setup: Add more parameters to "gnt-cluster init"
This patch also adds two new parameters to the vcluster-setup script tonot configure /etc/hosts and networking. Build-time variables are nowused for paths.
Signed-off-by: Michael Hanselmann <hansmi@google.com>...
Stop hardcoding root user
Some parts of the code still use a hardcoded user name: root. This patchreplaces all with a constant specified at build time. The end goal is tomake it possible to run a Ganeti cluster without any special privileges(of course this will prevent some functionality from working)....
Cleanup of build-time shell variable replacements
Instead of having a different set in (almost) every shell script, thisinserts the most commonly used variables at build time. This way thecode for injecting a root directory for virtual clusters also is just...
Add vcluster-setup utility
This utility can be used to configure an environment for a virtualcluster. It sets up entries in /etc/hosts, creates the necessarydirectory structure, and generates helper scripts.
Documentation for virtual clusters will come in a later patch....
cfgshell: Remove pylint disable line
Commit 326830963 removed the use of a private member function. Alsoreplace '' with "" in one place.
Migrate tools/* from constants to pathutils
File system paths moved from constants to pathutils.
Make the slots functionality more modular
As we will introduce another set of containers using the slots trickwe abstract away as much as possible to separate bases classes. Thechild classes then adapt them for their needs. This leads to less code...
Merge branch 'devel-2.6'
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
Fix decorator uses which crash newer pylint
Pylint version:
pylint 0.25.1, astng 0.23.1, common 0.58.0
crashes when passing the fully-qualified decorator name with:
File "/usr/lib/pymodules/python2.7/pylint/checkers/base.py", line 161, in visit_function...
Bump pep8 version to 1.2
Debian Wheezy will ship with this version, and it has many improved checks compared to 0.6, so let's:
- bump version in the docs- silence some new checks that are wrong due to our indent=2 instead of 4- fix lots of errors in the code where the indentation was wrong by 1...
Re-indent kvm-ifup.in
By a strange accident, this file seems to be tabified, instead of ourown 2-space rule. Re-indent it and also break one long line.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
Extend burnin to do NIC changes
This would have caught our previous issue, since QA otherwise doesn'tdo add, remove or changes of NICs.
Signed-off-by: Iustin Pop <iustin@google.com>Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Upgrade wrong iv_names at cfgupgrade time
Since Ganeti 2.6 does warn about disks with wrong iv_names, it wouldbe better to fix them when upgrading to 2.6.
Not sure if this is too brittle and whether we want to add moresafeguards on the contents of the config/instance/disks before...