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>
Merge branch 'stable-2.7' into stable-2.8
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.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
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.
Signed-off-by: Thomas Thrainer <thomasth@google.com>...
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.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
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....
Don't catch an exception that cannot be raised
Since 9b221ea4, _CreateBlockDev() doesn't raise OpExecError any more. Yetsome code was left in place to catch it. By removing that code we have twoadvantages:1. Dead code is removed.2. If for whatever reason _CreateBlockDev() raises OpExecError, the...
Wipe disks added through "gnt-instance modify"
In issue 353 Sascha Lucas reported that disks are not wiped when addedthrough “gnt-instance modify”. This patch adds this functionality andupdates the docstring for “_WipeDisks”.
Signed-off-by: Michael Hanselmann <hansmi@google.com>...
Move cmdlib.py to cmdlib/__init__.py
cmdlib.py has grown really too much. Move it into its own package toallow splitting it further.
Signed-off-by: Guido Trotter <ultrotter@google.com>Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Allow build_chroot to work from any directory
build_chroot used to work only if launched from ./devel/, whereas nowit can be launched from anywhere, and it will store the resulting filesin the current directory.
Fixes Issue 459.
Signed-off-by: Michele Tartara <mtartara@google.com>...
build_chroot: check whether the data dir exists
If the data directory is not in the expected place, the script complainswith an error message and stops, instead of giving obscure messages.
Partially fixes Issue 459.
Fix a misspelled word in design-storagetypes
Signed-off-by: Weiwei Jia <harryxiyou@gmail.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Add version numbers to chroot build script
Update the script adding explicit version numbers for increased repeatabilityof the build environment construction process. Version numbers are alignedwith those used by the external buildbot slack role.
Support /var/run being a symlink in upload
Starting from Debian Wheezy, /var/run is a symlink to /run. If rsyncdoes not treat receiving symlinks to directories as directories, itwould remove the original symlink and create a new, empty directorywhere only the files to sync are put in. In the case of /var/run, this...
QA checks suitability for exclusive_storage tests
When instance tests with exclusive_storage are enabled, the number of PVson nodes are checked to see if it's suitable for those tests.
This fixes issue 437.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>...
Final NEWS and configure.ac update for 2.7.0~rc1
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Disk templates are "allowed" and not "enabled" in ipolicies
The way disk templates were displayed in instance policies became confusingsince the introduction of the enabled_disk_templates cluster parameter.
Fix issue 440.
Unit test for FillIPolicy keeping unknown keys
This makes sure that issue 401 doesn't come back.
gnt-job list: deal with non-ascii encoding in jobs
This fixes issue 432. If a job summary contained a non-ascii character,gnt-job list crashed badly so far. This patch fixes the crash and makesgnt-job list display unicode characters properly.
Signed-off-by: Helga Velroyen <helgav@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
Cleanup of the INSTALL file
Curl is not optional anymore. Remove reference to it in the optional librariessection.
gnt-cluster modify: check vg name only on vm-capable nodes
This fixes issue 432: when setting the volume group name, the presenceof the volume group was checked on all nodes. This patch now restrictsthe check only to the vm-capable ones.
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...
Improve error message for file instance creation
Currently, when creating an instance with file storage fails,the error message is rather general. This patch adds a hinton what to do as a possible fix.
Update NEWS for 2.7.0 rc1
Move the "main" 2.7 section up to rc1, and just leave the delta inbeta3. Then add a new beta3 to rc1 delta.
admin guide updates for 2.7
- Mention the file-storage-paths config file- Add information about sharedfile and ext storage types- Change one manpage reference to a proper link
Mention file-storage-paths in UPGRADE
It was in NEWS, but not mentioned at all in the upgrade notes.
kvm: use -machine type,accel= for newer qemu
-enable-kvm and -disable-kvm are deprecated in favor of accel=kvm passedas a machine specification. This fixes compatibility with newer qemuversions.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
kvm: Move parameter validation before use
We had parameter validation when the runtime is generated, but in themiddle of the function. Move up, before any parameter is accessed.
kvm: Use -display none rather than -nographic
Newer versions of kvm (from 1.4) don't support -nographic with-daemonize. When -display exists, use -display none instead.
This fixes Issue 389.
INSTALL updates for wheezy, and fixes
- Remove mention of python 2.4 specific modules, as that version is not supported anymore- Add bitarray and ipaddr- Remove a double space- Add mandatory C library packages too- Mention the option of using drbd modules directly from your kernel...
Disable compiling mon-collector if monitoring is disabled
Mon-collector kept being compiled even if monitoring was disabled duringconfigure.
Fixes Issue 441.
Add confd as a dependency of monitoring
Some data collectors require confd data information. Therefore, monitoring isdependent on confd, but this was not checked.
This commit introduces such a check and partially fixes Issue 441.
Add reason trail to haskell opcode format
The haskell type definition of opcodes should remain aligned with the pythonone.
Add the reason trail type definition in Haskell
It will be added to the haskell definition of opcodes, to keep it aligned tothe python one, and it will be used for fetching the reason trail by theinstance status data collector.
Update "reason" field in instance status design
Now the reason field is implemented according to the reason trail designdocument.
Remove outdated TODO comment
Add proper error management to monitoring daemon
Produce a personalized 404 error when the requested resource is not available.
Produce a report for all the data collectors
Implement the API function of the monitoring daemon that provides the reportof all the data collectors.
Generate report for a single collector
Allow to ask the monitoring daemon for the report of one specific datacollector.
Export the full report from DRBD data collector
Export the full report instead of just the data from the DRBD data collector.
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.
Update JSON serialization for "category"
Change the JSON serialization for the "category" field of data collectors,in accordance to the latest version of the design document.
Improve monitoring agent design document
Specify more precisely the format of the category names.
Implement the "list collectors" API in monitoring
Implement the handler for outputting the list of collectors(name, category, kind) in JSON format.
Fix bug in group queries related to node/instance fields
Since we use the primitive string type for group UUIDs, the groupfields have a bug where we pass the group name as filter for nodetests, whereas the nodes themselves use the group UUID. This results...
gnt-instance: new hypervisor parameter 'vif_type'
This patch fixes issue 247. It empowers the user to specifyexplicitly the vif type of a nic configuration of a Xen HVMinstance. This includes the option of setting it to '' on thecommandline, causing Ganeti to leave out the 'type' parameter...
man gnt-instance: new hypervisor parameter 'vif_type'
This patch extends the man page of the 'gnt-instance' commandby describing the newly implemented hypervisor parameter'vif_type'.
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Add shelltests for hspace allocation
Both tiered and standard allocations are tested, with a single and a doublemin/max instance specification.
hspace: Handle multiple ipolicy specs
With tiered allocation, hspace uses all the max specs in turn as theinitial instance spec.
QA: Test multiple instance specs
The test of the interaction between policy and instances is extended.
QA: Handle multiple instance specs
Existing tests are updated to cope with the new instance specs format.
Unit test for cli.FormatPolicyInfo()
We try to parse the string obtained by formatting a policy, and see if weget the same policy.
Add command-line support for multiple specs in ipolicy
Command line options accept multiple min/max specifications in instancepolicies. The output of show-ispecs-cmd is updated accordingly.
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...