Improve the final message of build_chroot
Give more precise instructions on the next steps to actually run thechroot.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Make build_chroot self-contained
The configuration file are included in build_chroot, and areautomatically created by the script if it is not able to find themalready in the directory pointed by $DATA_DIR.
Note that the configuration file directory is cleaned if it's temporary,...
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...
In tiered allocation, cut non-promising shrinking tries
The heuristics for tiered allocation has been improved in that itchooses to shrink such a resource next where by shrinking only thisresource a valid allocation can be made, if such a resource exists....
Merge branch 'stable-2.7' into stable-2.8
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
More agressively line break man pages
Newer versions of pandoc (as, e.g., shipped with Ubuntu 13.04)more agressively quote, in particular minus signs. That sometimesleads to unintended line breaks, which are a problem, if the newline starts with a dot....
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>
Add test for shrink heuristics over different resources
In this example, memory prevents adding more than one instance onthe first node. Yet, on the other nodes, 2 instances can be placedeach, if disks are shrunk appropriately. This, however, requiresto courageous decision to shrink disks next, even though more nodes...
Improve hspace shrinking strategy
In tired allocation, hspace shrinks that resource of the instancenext, that causes failure on most nodes. While, this is not a badstrategy in general, it can lead hspace into a dead end if for a largenumber of nodes a particular resource blocks any further allocation of...
Convenience function for iterating while the result is Ok
For a function f :: a -> GenericResult a, iterate it (in the sense of themonad), until the result is Bad; return the list of values occurred.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
Provide witness for the sum-type structure of GenericResult
GenericResult, while rightfully a type of its own, is isomorphicto Either. So, also provide the case analysis function (i.e., theuniversal arrow out of the sum).
Signed-off-by: Klaus Aehlig <aehlig@google.com>...
Disable more version checks for alpha versions
Alpha versions should not check for version numbers in READMEsand documentation.
Allow alpha versions not to have an entry in the NEWS file
Alpha versions are still under heavy development, and can therefore not have anentry in the NEWS file yet. The entry will have to be added before switching tothe first beta version.
Partially fixes Issue 448...
Add tests for check-news
Unit tests verifying the behaviour of the check-news script are added.
This required adding a new make target, "autotools-check" directly called from"commit-check", because the usual tests are executed in the build directory,whereas these, being relative to the autotools, cannot be executed there because...
Introduce support for alpha versions
An alpha version can be used to name a release while a previous one is stillbeing developed.
E.g. 2.9.0~alpha1 can be out while 2.8.0~rc1 is being worked on.
When a version is marked as alpha, it is allowed to have unreleased versions...
Improve docstring
Fix bug in Makefile.am
There was a typo in the name of the script for launching offline tests.
Conflicts: (trival, take union of added files/tests) Makefile.am test/hs/shelltests/htools-hspace.test...
Add a test for hspace to respect instance policy
In this example, the instance policy for disks prevents allocationof more than one instance per node. The test verifies that tieredallocation still respects this and doesn't attempt to place policyviolating instances on the cluster....
Make shrinkByType aware of individual disks
When shrinking an instances, you can't just get smaller disk footprintwhile leaving the individual disks as they are. Make the shrinkheuristic aware of that fact, and decrease all individual disks aswell. Fixes issue 484....
Restructure documentation index page
The index page of the documentation used to be just a list of links.Now it is a proper introduction to all the other pages.
Fixes Issue 424.
Add missing parenthesis to description of --machine-readable
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Update NEWS file for 2.8
Add to the NEWS file the list of modifications performed during the 2.8development cycle.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
Add --force option to gnt-cluster modify
Make the force option of the ClusterSetParams Opcode availableon the command line.
Add a force option to the ClusterSetParams Opcode
If set, the op code will, in particular, try to set the master IPon the new netdev, even if shutting down the master IP on the oldnetdev failed.
Document the monitoring daemon in the admin guide
The administrator's guide must include a section describing the monitoringdaemon and its API, in order for the users to be able to use it.
Factor out the API of the monitoring daemon
It will be included by both the design document and the user documentation.
Add monitoring agent info to the security document
Add information regarding the monitoring agent and its security tothe security document.
Export device UUIDs to hooks and OS scripts
Export UUIDs and names of instance NICs and disks to the environmentof OS scripts and instance related hooks.
Signed-off-by: Christos Stavrakakis <cstavr@grnet.gr>Signed-off-by: Klaus Aehlig <aehlig@google.com>...
gnt-cluster info: only parameters for enabled hypervisors
In the output of gnt-cluster info, restrict the hypervisor parametersto those hypervisors that are enabled. This fixes issue 443.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
Support RAPI QA on an already existing cluster
We support running most of the QA tests on an existing cluster. One bigexception was RAPI, as the credentials for the QA RAPI user were created atcluster setup. This patch allows to recover the password for the QA user...
Conflicts: doc/iallocator.rst...
Document users-setup tool
The users-setup tool was added but had no documentation up to now. This commitfixes this issue.
Adjusting permissions after confd start
This is a workaround for issue 477. Confd resets thepermissions of the query socket in a wrong way. Thispatch fixes them after the start of confd.
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
Ensure the queue socket has the right permissions
RAPI needs to be able to perform queries as well.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Update IAllocator interface documentation
Update the missing documentation for the tags fields of node groups.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>(partially cherry picked from commit 2daca99b5be21ea4667637721ee2c65a14444520)...
Add NEWS entry for hail honoring networks
The entry also mentions the required change in the IAllocator protocol.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Add tests for network-aware allocation
hail-alloc-invalid-network defines a cluster with two nodegroups and anallocation request which does not fit on any of the groups. Group 1 hasinvalid disk-templates while Group 2 is not connected to the rightnetworks....
Honor network connections in hail
Before trying to allocate nodes in node groups, node groups are nowfiltered based on the networks they are connected to an the networkswhich are required by the new instance.
Signed-off-by: Thomas Thrainer <thomasth@google.com>...
Parse NIC data from allocation request in hail
Add a NIC type and extend the Instance type by a list of NIC's. Parsethe NIC's in allocation requests and store them for now. Later patcheswill make use of this field in order to ensure that the requestedinstance is only placed in node groups wich are connected to those...
Support group networks in Text backend
The Text backend now parses network UUID (comma separated) andserializes them in the same form.The test data is adapted to the new format.
Parse node group networks
Extend the Group by the network ids it is connected to. Adaptthe IAlloc backend such that the networks are parsed correctly.This also required the adaption of test data.
Document the newly added network field of node groups, and also updatethe missing documentation for the other fields of node groups.
Export connected networks to IAllocator
IAllocators should not put instances on nodes in nodegroups which arenot connected to the network the instance should be connected to.Therefore, export the networks a node group is connected to to theIAllocator, so it can account for this restriction....
Re-activate previously active disks in watcher
The watcher process previously (incorrectly) examined the admin_statefield to figure out if the disks of an instance should be activatedafter a node reboot. This is changed to use the disks_active field of...
Make the disks_active flag queryable
gnt-instance list now also supports the disks_active field.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Helga Velroyen <helgav@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.
Add disks_active to configuration
This flag tracks if the disks of an instace are supposed to be active.That's the case when an instance is running or when its disks gotactivated explicitly (and in a couple of other cases).It will be used by watcher to re-activate disks after a node reboot....
Fix release of instances in QA
Also, fix some uses of keyword arguments for arguments with a defaultvalue, as required by the style guide, and a typo.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Bump up version for 2.7.0~rc2 release
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Create overall design document for 2.8
Also, cleanup the list of draft designs.
Add NEWS entry for SO_PEERCRED fix
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
Workaround missing SO_PEERCRED
This bug happens in a few new distributions, so we workaround it bydefining the constant ourselves, if it's missing.
Add debugging clause to _ExpandCheckDisks error
This has been reported by users, so we should have the extra debuggingavailable.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
Reduce pylint maximum file length to 4500
The longest Python files we still have are around 4200 lines long. Inorder to prevent future growth, limit the maximum file length (checkedby pylint) to 4500 lines.
Mention hail network incompatibility in manpages
We can't fix this in the 2.7 version, so it should be documented.
Remove obsolete Debian-related documentation
This part of the documentation refers to Grub instead of Grub2, butGrub2 has been the standard boot loader since Squeeze. As this part only(wrongly) repeats the preceeding documentation, it's removed completely....
Update NEWS for 2.7.0 rc2
Move "local" entries at the bottom, and leave global 2.7 entries at thetop, as for the other releases.
Improve installation documentation
Based on user feedback the installation documentation is clarified andextended.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>(cherry picked from commit 3913eaa72b8a48706ca4caa59dd022fa1a05805a)...
Add Harep man page
Add the man page for the Ganeti auto-repair tool.
Stash Xen config file after a failed startup
This is a fix for a minor bug.Currently, a failed Xen VM start results in a stale config file leftbehind on the filesystem.This change introduces a new log directory, where the Xen VM configfile is moved after a failed startup....
Fix owner of the OS log dir
The OS log dir is used by noded, not masterd.
Signed-off-by: Balazs Lecz <leczb@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Update NEWS with disk creation fixes
Also document a couple more fixes.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
Sort cmdlib-related entries in Makefile.am
Files in the cmdlib directory are sorted alphabetically inMakefile.am.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
cmdlib: Cleanup public/private functions
All functions/classes which are used outside of their defining module(with tests as an exception) no longer have a leading underscore.
cmdlib: Extract instance query related functionality
Split instance.py further by extracting instance querying relatedlogical units and functions to instance_query.py.
cmdlib: Extract instance operation functionality
Split instance.py further by extracting instance operations(start/stop/reboot/etc.) related logical units and functions toinstance_operation.py.
The extracted operations have in common that they affect the operating...
cmdlib: Extract migration related functionality
Split instance.py further by extracting migration related logical unitsand functions to instance_migration.py.
cmdlib: Extract storage related functionality
Split instance.py further by extracting storage related logical unitsand functions to instance_storage.py.
Reformat and define exports in cmdlib/__init__.py
cmdlib/__init__.py now simply defines the interface of the cmdlib moduleby importing all classes which should be visible to clients.
Also don't ignore C0302 (Too many lines in module) any more.
Extract miscellaneous logical units from cmdlib
All remaining classes in init.py are extracted to misc.py.
Extract os related logical units from cmdlib
All LUOs* classes are extracted to operating_system.py.
Extract query related logical units from cmdlib
All LUQuery* classes are extracted to query.py.
Extract backup related logical units from cmdlib
All LUBackup* classes are extracted to backup.py.
Extract instance related logical units from cmdlib
All LUInstance* classes are extracted to instance.py. Common functionsare moved to common.py if used by non-instance logical units as well.Additionally, helper functions which are only used by LUBackup* and...
Extract node related logical units from cmdlib
All LUNode* classes are extracted to node.py. Common functions are movedto common.py if used by non-node logical units as well.
Extract group related logial units from cmdlib
All LUGroup* classes are moved to group.py. Common functions areextracted to common.py.
Extract cluster related logical units from cmdlib
All LUCluster* classes are extracted to cluster.py. Shared functions areextracted to common.py, helper functions only used by LUCluster* areextracted to cluster.py.
Extract test logical units from cmdlib
LUTest* are moved to test.py.
Extract network related logical units from cmdlib
LUNetwork* and associated helper functions are extracted to network.py.
Extract tags related logical units from cmdlib
LUTags* and their base class, TagsLU, are extracted to tags.py. Anadditional shared function, _ShareAll, is extracted to common.py forshared usage.
Extract base classes from cmdlib
Base classes holding common functionality is extracted into base.py.Utility functions used by both base classes and subclasses is moved tocommon.py.
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.
Compatibility test for instances
This patch introduces a test to check the compatibilityof the Haskell and the Python representation of instances.
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Instance generators
This patch introduces and enhances generators forinstances:- 'genInstWithNets' is split into the generation of an arbitrary instance and enhancing an instance with nets- 'genInst' calls 'genInstWithNets' with an empty set of initial networks to provide a reasonable default...
Annotate every arbitrary instance field
The Arbitrary instance of the 'Instance' object is writtenusing the <*> syntax. Since it often uses the 'arbitrary'generator for the instance's fields it is hard to figureout which 'arbitrary' fills which instance field. This...
Generators for disks
This patch adds generators for Disk instances to the Haskelltest code. It uses somewhat more reasonable generators tofill the fields instead of just arbitrary values.'genDiskWithChildren' is a generator that generates a diskwith a specified number of disk children. To avoid shooting...
Remove extra newline
Also, properly set the date of the last modification.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Add MonD to the watcher
The monitoring daemon should always be alive, therefore it's added to thewatcher.
Start the monitoring and node daemons together
Add the monitoring daemon to the command starting the node daemon, given thatthey both have to be started on all nodes.
Note that daemon-util only supports starting one daemon at the time, so theactual command has to be composed as a sequence of two different daemon-util...
Add a constant stating whether monitoring is enabled
Add QA for recreating single instance disks
So far QA only recreated the whole set of disks at once.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Add QA for gnt-instance modify --disk
Just a very basic test that adds and then removes a disk.
Clean up when "gnt-instance modify" fails to create a disk
cmdlib.LUInstanceSetParams now uses helper functions to create and wipedisks, so that when the creation of a disk fails, any leftover device iscleaned up. As a bonus, exceptions raised by _CreateBlockDev() are caught...
recreate-disks honors the prealloc_wipe_disks flag
Now even recreate-disks wipes the newly-created disks, if the flag is set.
Introduce wrapper for cmdlib._WipeDisks()
The wrapper handles errors by logging them and cleaning up freshly-createddisks.
Also, the correct disk is used in the error message when an error happensin cmdlib._CreateDisks() and the resulting disk clean-up fails....