Thomas Thrainer [Tue, 14 May 2013 08:17:04 +0000 (10:17 +0200)]
Extract os related logical units from cmdlib
All LUOs* classes are extracted to operating_system.py.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
Thomas Thrainer [Tue, 14 May 2013 08:07:29 +0000 (10:07 +0200)]
Extract query related logical units from cmdlib
All LUQuery* classes are extracted to query.py.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
Thomas Thrainer [Tue, 14 May 2013 07:55:31 +0000 (09:55 +0200)]
Extract backup related logical units from cmdlib
All LUBackup* classes are extracted to backup.py.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
Thomas Thrainer [Tue, 14 May 2013 07:19:16 +0000 (09:19 +0200)]
Extract instance related logical units from cmdlib
All LUInstance* classes are extracted to instance.py. Common functions
are moved to common.py if used by non-instance logical units as well.
Additionally, helper functions which are only used by LUBackup* and
LUInstance* are moved to instance_utils.py.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
Thomas Thrainer [Mon, 13 May 2013 13:16:27 +0000 (15:16 +0200)]
Extract node related logical units from cmdlib
All LUNode* classes are extracted to node.py. Common functions are moved
to common.py if used by non-node logical units as well.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
Thomas Thrainer [Mon, 13 May 2013 12:54:49 +0000 (14:54 +0200)]
Extract group related logial units from cmdlib
All LUGroup* classes are moved to group.py. Common functions are
extracted to common.py.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
Thomas Thrainer [Mon, 13 May 2013 11:49:33 +0000 (13:49 +0200)]
Extract cluster related logical units from cmdlib
All LUCluster* classes are extracted to cluster.py. Shared functions are
extracted to common.py, helper functions only used by LUCluster* are
extracted to cluster.py.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
Thomas Thrainer [Mon, 13 May 2013 10:17:01 +0000 (12:17 +0200)]
Extract test logical units from cmdlib
LUTest* are moved to test.py.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
Thomas Thrainer [Mon, 13 May 2013 09:38:08 +0000 (11:38 +0200)]
Extract network related logical units from cmdlib
LUNetwork* and associated helper functions are extracted to network.py.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
Thomas Thrainer [Mon, 13 May 2013 09:16:43 +0000 (11:16 +0200)]
Extract tags related logical units from cmdlib
LUTags* and their base class, TagsLU, are extracted to tags.py. An
additional shared function, _ShareAll, is extracted to common.py for
shared usage.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
Thomas Thrainer [Mon, 13 May 2013 08:48:48 +0000 (10:48 +0200)]
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 to
common.py.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
Thomas Thrainer [Tue, 14 May 2013 14:21:25 +0000 (16:21 +0200)]
Don't fail to deactivate master IP if already down
The master IP setup script now checks if the master IP is actually
configured 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>
Helga Velroyen [Wed, 15 May 2013 10:46:24 +0000 (12:46 +0200)]
Compatibility test for instances
This patch introduces a test to check the compatibility
of the Haskell and the Python representation of instances.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Wed, 15 May 2013 11:46:46 +0000 (13:46 +0200)]
Instance generators
This patch introduces and enhances generators for
instances:
- '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
- the Arbitrary instance of 'Instance' uses now 'genDisks'
to create instances with a reasonable set of disks
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Wed, 15 May 2013 13:01:28 +0000 (15:01 +0200)]
Annotate every arbitrary instance field
The Arbitrary instance of the 'Instance' object is written
using the <*> syntax. Since it often uses the 'arbitrary'
generator for the instance's fields it is hard to figure
out which 'arbitrary' fills which instance field. This
patch annotates all fields with their name to make
maintenance of this code easier.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Wed, 15 May 2013 12:52:47 +0000 (14:52 +0200)]
Generators for disks
This patch adds generators for Disk instances to the Haskell
test code. It uses somewhat more reasonable generators to
fill the fields instead of just arbitrary values.
'genDiskWithChildren' is a generator that generates a disk
with a specified number of disk children. To avoid shooting
ourselves in the foot we do not generate further (grand)
child disks for the child disks. 'genDisk' calls
'genDiskWithChildren' by requesting three children as a
resonable default.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Tue, 14 May 2013 17:26:07 +0000 (18:26 +0100)]
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>
Michele Tartara [Mon, 13 May 2013 14:05:08 +0000 (14:05 +0000)]
Add MonD to the watcher
The monitoring daemon should always be alive, therefore it's added to the
watcher.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michele Tartara [Mon, 13 May 2013 14:00:17 +0000 (14:00 +0000)]
Start the monitoring and node daemons together
Add the monitoring daemon to the command starting the node daemon, given that
they both have to be started on all nodes.
Note that daemon-util only supports starting one daemon at the time, so the
actual command has to be composed as a sequence of two different daemon-util
invocations.
Also, the monitoring daemon invocation is conditional, depending on whether it
was enabled at configure time.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michele Tartara [Mon, 13 May 2013 13:57:46 +0000 (13:57 +0000)]
Add a constant stating whether monitoring is enabled
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Bernardo Dal Seno [Fri, 10 May 2013 23:37:45 +0000 (01:37 +0200)]
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>
Bernardo Dal Seno [Fri, 10 May 2013 23:23:08 +0000 (01:23 +0200)]
Add QA for gnt-instance modify --disk
Just a very basic test that adds and then removes a disk.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Bernardo Dal Seno [Fri, 10 May 2013 14:27:20 +0000 (16:27 +0200)]
Clean up when "gnt-instance modify" fails to create a disk
cmdlib.LUInstanceSetParams now uses helper functions to create and wipe
disks, so that when the creation of a disk fails, any leftover device is
cleaned up. As a bonus, exceptions raised by _CreateBlockDev() are caught
correctly.
Now cmdlib._CreateDisks() is used every time there are disks to create.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Bernardo Dal Seno [Fri, 10 May 2013 13:05:56 +0000 (15:05 +0200)]
recreate-disks honors the prealloc_wipe_disks flag
Now even recreate-disks wipes the newly-created disks, if the flag is set.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Bernardo Dal Seno [Fri, 10 May 2013 13:44:01 +0000 (15:44 +0200)]
Introduce wrapper for cmdlib._WipeDisks()
The wrapper handles errors by logging them and cleaning up freshly-created
disks.
Also, the correct disk is used in the error message when an error happens
in cmdlib._CreateDisks() and the resulting disk clean-up fails.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Bernardo Dal Seno [Thu, 9 May 2013 17:07:34 +0000 (19:07 +0200)]
Don't catch an exception that cannot be raised
Since
9b221ea4, _CreateBlockDev() doesn't raise OpExecError any more. Yet
some code was left in place to catch it. By removing that code we have two
advantages:
1. Dead code is removed.
2. If for whatever reason _CreateBlockDev() raises OpExecError, the
exception is not silently dropped and we notice (so we can fix it).
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michael Hanselmann [Mon, 25 Feb 2013 15:27:27 +0000 (16:27 +0100)]
Wipe disks added through "gnt-instance modify"
In issue 353 Sascha Lucas reported that disks are not wiped when added
through “gnt-instance modify”. This patch adds this functionality and
updates the docstring for “_WipeDisks”.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
(cherry picked from commit
965e0e6a88e09f96d4c9b6030ab8753366c84a78)
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Guido Trotter [Fri, 10 May 2013 16:12:55 +0000 (18:12 +0200)]
Move cmdlib.py to cmdlib/__init__.py
cmdlib.py has grown *really* too much. Move it into its own package to
allow 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>
Michele Tartara [Fri, 10 May 2013 13:46:51 +0000 (15:46 +0200)]
Allow build_chroot to work from any directory
build_chroot used to work only if launched from ./devel/, whereas now
it can be launched from anywhere, and it will store the resulting files
in the current directory.
Fixes Issue 459.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michele Tartara [Fri, 10 May 2013 13:45:14 +0000 (15:45 +0200)]
build_chroot: check whether the data dir exists
If the data directory is not in the expected place, the script complains
with an error message and stops, instead of giving obscure messages.
Partially fixes Issue 459.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Weiwei Jia [Wed, 8 May 2013 12:46:22 +0000 (20:46 +0800)]
Fix a misspelled word in design-storagetypes
Signed-off-by: Weiwei Jia <harryxiyou@gmail.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michele Tartara [Tue, 7 May 2013 13:15:48 +0000 (13:15 +0000)]
Add version numbers to chroot build script
Update the script adding explicit version numbers for increased repeatability
of the build environment construction process. Version numbers are aligned
with those used by the external buildbot slack role.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Thomas Thrainer [Mon, 6 May 2013 13:10:00 +0000 (15:10 +0200)]
Support /var/run being a symlink in upload
Starting from Debian Wheezy, /var/run is a symlink to /run. If rsync
does not treat receiving symlinks to directories as directories, it
would remove the original symlink and create a new, empty directory
where only the files to sync are put in. In the case of /var/run, this
behavior severly impacts the running system (as, for example, several
PID can't be found anymore).
This is a cherry-pick of commit 412e738.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Bernardo Dal Seno [Fri, 3 May 2013 18:23:54 +0000 (20:23 +0200)]
QA checks suitability for exclusive_storage tests
When instance tests with exclusive_storage are enabled, the number of PVs
on 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>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Guido Trotter [Fri, 3 May 2013 09:09:34 +0000 (11:09 +0200)]
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>
Bernardo Dal Seno [Fri, 3 May 2013 10:31:44 +0000 (12:31 +0200)]
Disk templates are "allowed" and not "enabled" in ipolicies
The way disk templates were displayed in instance policies became confusing
since the introduction of the enabled_disk_templates cluster parameter.
Fix issue 440.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Bernardo Dal Seno [Fri, 3 May 2013 09:51:06 +0000 (11:51 +0200)]
Unit test for FillIPolicy keeping unknown keys
This makes sure that issue 401 doesn't come back.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Helga Velroyen [Fri, 3 May 2013 08:28:35 +0000 (10:28 +0200)]
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 makes
gnt-job list display unicode characters properly.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michele Tartara [Fri, 3 May 2013 08:10:43 +0000 (10:10 +0200)]
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>
Michele Tartara [Fri, 3 May 2013 07:07:06 +0000 (09:07 +0200)]
Cleanup of the INSTALL file
Curl is not optional anymore. Remove reference to it in the optional libraries
section.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Helga Velroyen [Thu, 2 May 2013 13:21:27 +0000 (15:21 +0200)]
gnt-cluster modify: check vg name only on vm-capable nodes
This fixes issue 432: when setting the volume group name, the presence
of the volume group was checked on all nodes. This patch now restricts
the check only to the vm-capable ones.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Helga Velroyen [Thu, 2 May 2013 12:35:39 +0000 (14:35 +0200)]
Disable inter-cluster instance move for file instances
Inter-cluster instance moves depends on exporting an instance. For file-based
instance, exporting is not supported. Therefore, this patch disables
inter-cluster instance moves for file-based instances and informs the user
with an expressive error message.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Helga Velroyen [Thu, 2 May 2013 09:04:50 +0000 (11:04 +0200)]
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 hint
on what to do as a possible fix.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Guido Trotter [Thu, 2 May 2013 10:20:09 +0000 (12:20 +0200)]
Update NEWS for 2.7.0 rc1
Move the "main" 2.7 section up to rc1, and just leave the delta in
beta3. Then add a new beta3 to rc1 delta.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Guido Trotter [Thu, 2 May 2013 09:10:32 +0000 (11:10 +0200)]
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
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Guido Trotter [Thu, 2 May 2013 09:01:52 +0000 (11:01 +0200)]
Mention file-storage-paths in UPGRADE
It was in NEWS, but not mentioned at all in the upgrade notes.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Guido Trotter [Wed, 1 May 2013 10:03:54 +0000 (12:03 +0200)]
kvm: use -machine type,accel= for newer qemu
-enable-kvm and -disable-kvm are deprecated in favor of accel=kvm passed
as a machine specification. This fixes compatibility with newer qemu
versions.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Guido Trotter [Wed, 1 May 2013 09:56:12 +0000 (11:56 +0200)]
kvm: Move parameter validation before use
We had parameter validation when the runtime is generated, but in the
middle of the function. Move up, before any parameter is accessed.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Guido Trotter [Wed, 1 May 2013 09:37:54 +0000 (11:37 +0200)]
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.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Guido Trotter [Tue, 30 Apr 2013 13:53:11 +0000 (15:53 +0200)]
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
This also fixes Issue 372.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Tue, 30 Apr 2013 14:15:44 +0000 (14:15 +0000)]
Disable compiling mon-collector if monitoring is disabled
Mon-collector kept being compiled even if monitoring was disabled during
configure.
Fixes Issue 441.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michele Tartara [Tue, 30 Apr 2013 14:01:42 +0000 (14:01 +0000)]
Add confd as a dependency of monitoring
Some data collectors require confd data information. Therefore, monitoring is
dependent on confd, but this was not checked.
This commit introduces such a check and partially fixes Issue 441.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Thu, 25 Apr 2013 07:19:49 +0000 (07:19 +0000)]
Add reason trail to haskell opcode format
The haskell type definition of opcodes should remain aligned with the python
one.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Thu, 25 Apr 2013 07:16:03 +0000 (07:16 +0000)]
Add the reason trail type definition in Haskell
It will be added to the haskell definition of opcodes, to keep it aligned to
the python one, and it will be used for fetching the reason trail by the
instance status data collector.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Wed, 24 Apr 2013 15:19:52 +0000 (15:19 +0000)]
Update "reason" field in instance status design
Now the reason field is implemented according to the reason trail design
document.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Wed, 24 Apr 2013 10:59:54 +0000 (10:59 +0000)]
Remove outdated TODO comment
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Wed, 24 Apr 2013 10:20:29 +0000 (10:20 +0000)]
Add proper error management to monitoring daemon
Produce a personalized 404 error when the requested resource is not available.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Wed, 24 Apr 2013 09:24:16 +0000 (09:24 +0000)]
Produce a report for all the data collectors
Implement the API function of the monitoring daemon that provides the report
of all the data collectors.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Mon, 29 Apr 2013 14:49:51 +0000 (14:49 +0000)]
Generate report for a single collector
Allow to ask the monitoring daemon for the report of one specific data
collector.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Wed, 24 Apr 2013 09:41:45 +0000 (09:41 +0000)]
Export the full report from DRBD data collector
Export the full report instead of just the data from the DRBD data collector.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Wed, 24 Apr 2013 08:44:52 +0000 (08:44 +0000)]
Add monitoring daemon to the masterd group
The hmac.key file is owned by group masterd and is required to communicate with
the confd.
The monitoring daemon need to communicate with the confd so it has to be part of
the masterd group.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Thu, 28 Mar 2013 09:14:46 +0000 (09:14 +0000)]
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.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Thu, 28 Mar 2013 09:13:08 +0000 (09:13 +0000)]
Improve monitoring agent design document
Specify more precisely the format of the category names.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Fri, 15 Mar 2013 17:40:12 +0000 (17:40 +0000)]
Implement the "list collectors" API in monitoring
Implement the handler for outputting the list of collectors
(name, category, kind) in JSON format.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Iustin Pop [Mon, 25 Feb 2013 16:18:36 +0000 (17:18 +0100)]
Fix bug in group queries related to node/instance fields
Since we use the primitive string type for group UUIDs, the group
fields have a bug where we pass the group name as filter for node
tests, whereas the nodes themselves use the group UUID. This results
in zero node count, empty node list, and no instances being reported
as assigned to groups.
The patch fixes this and adds a test for the node count. It does some
test generation improvement, and also cleans up whitespace issues in
Test/G/Q/Query.hs (the functions case_queryNode_allfields,
prop_queryGroup_noUnknown and case_queryGroup_allfields are unchanged
but simply have indentation fixed).
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Cherry-pick of
e7124835, fixes issue 436
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Conflicts:
test/hs/Test/Ganeti/Objects.hs
test/hs/Test/Ganeti/Query/Query.hs
Helga Velroyen [Mon, 29 Apr 2013 16:43:39 +0000 (18:43 +0200)]
man gnt-instance: new hypervisor parameter 'vif_type'
This patch extends the man page of the 'gnt-instance' command
by describing the newly implemented hypervisor parameter
'vif_type'.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Helga Velroyen [Mon, 29 Apr 2013 15:04:29 +0000 (17:04 +0200)]
gnt-instance: new hypervisor parameter 'vif_type'
This patch fixes issue 247. It empowers the user to specify
explicitly the vif type of a nic configuration of a Xen HVM
instance. This includes the option of setting it to '' on the
commandline, causing Ganeti to leave out the 'type' parameter
in the vif configuration completely.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Bernardo Dal Seno [Wed, 24 Apr 2013 01:15:14 +0000 (03:15 +0200)]
Add shelltests for hspace allocation
Both tiered and standard allocations are tested, with a single and a double
min/max instance specification.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Bernardo Dal Seno [Tue, 23 Apr 2013 21:11:01 +0000 (23:11 +0200)]
hspace: Handle multiple ipolicy specs
With tiered allocation, hspace uses all the max specs in turn as the
initial instance spec.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Bernardo Dal Seno [Tue, 23 Apr 2013 14:37:41 +0000 (16:37 +0200)]
QA: Test multiple instance specs
The test of the interaction between policy and instances is extended.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Bernardo Dal Seno [Mon, 22 Apr 2013 23:24:25 +0000 (01:24 +0200)]
QA: Handle multiple instance specs
Existing tests are updated to cope with the new instance specs format.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Bernardo Dal Seno [Mon, 22 Apr 2013 14:59:58 +0000 (16:59 +0200)]
Unit test for cli.FormatPolicyInfo()
We try to parse the string obtained by formatting a policy, and see if we
get the same policy.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Bernardo Dal Seno [Mon, 15 Apr 2013 23:24:22 +0000 (01:24 +0200)]
Add command-line support for multiple specs in ipolicy
Command line options accept multiple min/max specifications in instance
policies. The output of show-ispecs-cmd is updated accordingly.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Bernardo Dal Seno [Mon, 15 Apr 2013 09:03:38 +0000 (11:03 +0200)]
Add multiple min/max specs in instance policy
Now instance policies can contain more than one min/max specs. This is the
main 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
to change all the code that handles it.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Bernardo Dal Seno [Tue, 16 Apr 2013 11:49:48 +0000 (13:49 +0200)]
Separate checks for std spec compliance
This is needed to be able to validate the std spec against multiple min/max
spec pairs (appearing in next patches).
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Bernardo Dal Seno [Mon, 22 Apr 2013 23:21:01 +0000 (01:21 +0200)]
QA: Transpose instance specs
The format used to store instance specs in QA is changed to better handle
multiple instance specs, a feature contained in the following patches.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Klaus Aehlig [Mon, 29 Apr 2013 12:08:17 +0000 (14:08 +0200)]
Log at info level the success of a luxi query
So far, any successful query was only logged at debug level, thus leaving
no traces in the logs, unless debugging was enabled. Therefore, we add
a notes about successful completion at info level. Also, repeat a failed
request at WARN level, so that, even if debugging disabled, the request
is available together with the error message in the logs.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Klaus Aehlig [Mon, 29 Apr 2013 12:17:07 +0000 (14:17 +0200)]
Fix typo in documentation string
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Thomas Thrainer [Mon, 29 Apr 2013 07:03:08 +0000 (09:03 +0200)]
Improve gnt-instance documentation
Explain the relationship of the ip and network parameter in
`gnt-instance add --net` better.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Guido Trotter [Fri, 26 Apr 2013 12:37:19 +0000 (14:37 +0200)]
Fix unclear error when replacing a nic's ip
The current error message ends up saying something like
'192.168.5.5' != 'network1', which is sort of non-intuitive (yes, of
course they are different). Fix this by explaining better what the
erroneous condition actually is.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Klaus Aehlig [Tue, 23 Apr 2013 09:35:18 +0000 (11:35 +0200)]
In plain to drbd conversion, rename LVs back on failure
Currently, if converting an instance from plain to drbd fails after
renaming the original LVs, the instance is left in an inconsistent
state. This commit tries to undo the renaming if a failure occurs
on assembling a DRBD device, e.g., when device minor numbers are
exhausted. (Issue 229)
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Guido Trotter [Thu, 25 Apr 2013 10:25:50 +0000 (12:25 +0200)]
Merge branch 'stable-2.7' into stable-2.8
This fixes the problem with the distcheck-release target failing needlessly.
* stable-2.7:
Improve check for "unreleased" versions in NEWS
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Guido Trotter [Thu, 25 Apr 2013 08:37:29 +0000 (10:37 +0200)]
Improve check for "unreleased" versions in NEWS
Currently this is checked only when distcheck-release is called.
Check it in check-news instead, for all versions before the "current"
one (as defined by configure.ac)
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Klaus Aehlig [Thu, 25 Apr 2013 08:31:48 +0000 (10:31 +0200)]
Update documentation for text format
In commit
000ca91a the text format was extended to also include
information about the master node. This commit updates the
htools man page to reflect this change.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Klaus Aehlig [Wed, 24 Apr 2013 16:30:26 +0000 (18:30 +0200)]
Merge branch 'stable-2.7' into stable-2.8
Conflicts:
NEWS
doc/rapi.rst
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Bernardo Dal Seno [Wed, 24 Apr 2013 12:40:35 +0000 (14:40 +0200)]
Add missing fields in htools text-backend documentation
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Bernardo Dal Seno [Wed, 24 Apr 2013 14:08:10 +0000 (16:08 +0200)]
cfgupgrade: Remove enabled_disk_templates on downgrade
Remove enabled_disk_templates instead of the deprecated
enabled_storage_types.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michele Tartara [Tue, 23 Apr 2013 11:38:44 +0000 (13:38 +0200)]
Reason trail implementation for "start"
Opcode-specific implementation of the reason trail for the instance
startup operation.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michele Tartara [Mon, 22 Apr 2013 15:26:29 +0000 (15:26 +0000)]
Reason trail implementation for "shutdown"
Opcode-specific implementation of the reason trail for the instance shutdown
operation.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Bernardo Dal Seno [Fri, 12 Apr 2013 13:53:24 +0000 (15:53 +0200)]
QA: More tests for instance policies in groups
Instance policies are changed and checked for changes.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Bernardo Dal Seno [Fri, 12 Apr 2013 08:22:35 +0000 (10:22 +0200)]
QA: Split function to set and parse instance policies
The main parts, moved to qa_util, will be used for node groups too.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Bernardo Dal Seno [Mon, 4 Mar 2013 23:30:33 +0000 (00:30 +0100)]
QA: Update tests for new ipolicy specs command-line options
The old command-line options weren't working any more. Utility functions
are updated, and broken tests are removed (new tests are coming in the
following patches).
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Bernardo Dal Seno [Mon, 15 Apr 2013 09:52:04 +0000 (11:52 +0200)]
Add unit tests for cfgupgrade with a real configuration
Test upgrade and downgrade from a realistic 2.7 configuration.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Bernardo Dal Seno [Wed, 10 Apr 2013 23:06:24 +0000 (01:06 +0200)]
Split functions in cfupgrade unit tests
This makes easier to test real configurations.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Bernardo Dal Seno [Mon, 8 Apr 2013 18:42:59 +0000 (20:42 +0200)]
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>
Bernardo Dal Seno [Mon, 8 Apr 2013 18:40:40 +0000 (20:40 +0200)]
Limit specs in ipolicy command lines are always complete
Command line options are brought in line with the specs change of previous
patch. Old options are still allowed in gnt-cluster init, where the
semantic will remain non-ambiguous even after introducing multiple specs.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Bernardo Dal Seno [Mon, 8 Apr 2013 18:36:34 +0000 (20:36 +0200)]
Limit specs in instance policies are always complete
Specs used to specify limits in instance policies are always complete, even
at group level (only the whole limit set can be overridden). This is in
preparation for introducing multiple limits.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Bernardo Dal Seno [Tue, 9 Apr 2013 15:37:00 +0000 (17:37 +0200)]
Refactor tests in ipolicy validation
This makes the code more modular, in preparation for the following patches.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Bernardo Dal Seno [Fri, 5 Apr 2013 15:56:41 +0000 (17:56 +0200)]
QA for --ipolicy-xxx-specs and show-ispecs-cmd
The tests check the interactions between the two commands.
Also refactored group QA code to separate tests about ipolicy, as those
tests are going to grow in complexity.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Bernardo Dal Seno [Thu, 4 Apr 2013 20:30:59 +0000 (22:30 +0200)]
Add command to print ipolicy options
The output of this command can be used to create an exact copy of the
current instance policy specs. The command could be expanded to print all
the options used to create a group or the cluster.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>