Michele Tartara [Fri, 26 Apr 2013 06:50:07 +0000 (06:50 +0000)]
Export Instance Status collector information
Name, version, format version, category and kind of the Instance Status data
collector are now exported.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Thu, 25 Apr 2013 13:54:59 +0000 (13:54 +0000)]
Include the reason trail in the instance collector output
Fetch the reason trail from file, failing gracefully if it is not found, and
include it in the output of the instance status data collector.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Thu, 25 Apr 2013 13:03:43 +0000 (13:03 +0000)]
Determine status of one instance
Added function for determining whether the status of an instance is ok, and to
represent this information in the corresponding field in the report.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Thu, 25 Apr 2013 14:36:10 +0000 (14:36 +0000)]
Export the actual instance state
Compute the actual state of the instance and export it.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Thu, 25 Apr 2013 14:28:58 +0000 (14:28 +0000)]
Add the core of the instance status collector
Add the Xen instance status data collector with only its core features.
The next commits will add more reporting functionalities.
The access to the collector is made possible through the mon-collector
tool.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Thu, 25 Apr 2013 14:20:05 +0000 (14:20 +0000)]
Add module containing function for getting info from Xen
The Xen instance status data collector will require to get some information
from the hypervisor. This commit introduces a module providing such functions.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Michele Tartara [Thu, 25 Apr 2013 08:27:48 +0000 (08:27 +0000)]
Add HS functions for getting the instance reason path
The getInstReasonFilename is built to resemble the python corresponding
function.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Wed, 24 Apr 2013 14:55:01 +0000 (14:55 +0000)]
Add dependency on the process library
The tests are already using this library, so it's not really a new build
dependency, but it was not specified esplicitly.
Furthermore, it's going to be used by the instance status collector, so it's
added to the requirements for the monitoring subsystem.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Klaus Aehlig [Fri, 10 May 2013 13:52:39 +0000 (15:52 +0200)]
Add example for online rolling reboots using tags
While this use case was described in the design document, and
mentioned several times as motivation for changes in commit messages,
it has never been added to a user-facing documentation. This commit
adds at least an example to the man page.
Signed-off-by: Klaus Aehlig <aehlig@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>
Klaus Aehlig [Fri, 10 May 2013 11:26:27 +0000 (13:26 +0200)]
Extend hroller test to also verify tag-based node selection
While the multiple-tags test was added to verify that coloring is done
only after node selection (otherwise it wouldn't be possible to get in
both cases a single reboot group), it can easily be extended to also
verify that the correct nodes are selected by --node-tags.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Klaus Aehlig [Wed, 8 May 2013 16:21:59 +0000 (18:21 +0200)]
Add a test for online rolling reboot scheduling
In the example configuration, the graph constructed by just connecting
primary and secondary instances is two-colorable. However, when taking
conflicting locations of secondary nodes into account, three reboot
groups are needed. Moreover, these reboot groups are not subordinated
to any two-coloring of the first-mentioned graph.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Klaus Aehlig [Tue, 7 May 2013 13:21:19 +0000 (15:21 +0200)]
Support online-maintenance in hroller
Make hroller take into account the nodes (redundant) instances
will be migrated to. This be behavior can be overridden by the
--offline-maintenance option which will make hroller plan under
the assumption that all instances will be shutdown before starting
with the rolling reboots.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Klaus Aehlig [Tue, 7 May 2013 12:51:48 +0000 (14:51 +0200)]
Support construction of the graph of all reboot constraints
For online rolling reboots, there are two kind of restrictions. First,
we cannot reboot the primary and secondary nodes of an instance
together. Secondly, two nodes cannot be rebooted simultaneously, if
they are the primary nodes of two instances with the same secondary
node. The second condition requires knowledge of all nodes, not only
those the graph is to be constructed on.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Klaus Aehlig [Mon, 6 May 2013 13:51:20 +0000 (15:51 +0200)]
Add option --one-step-only to hroller
Add a new option to hroller to only output information about the first
reboot group. Together with the option --node-tags this allows for the
following work flow. First tag all nodes; then repeatedly compute the
first node group, handle these nodes and remove the tags. In between
these steps, other operations can be carried out on the cluster.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Klaus Aehlig [Wed, 8 May 2013 11:46:40 +0000 (13:46 +0200)]
Sort reboot groups by size
Make hroller output the node groups not containing the master node
sorted by size, largest group first. The master node still remains
the last node of the last reboot group. In this way, most progress
is made when switching back to normal cluster operations after the
first reboot group.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Klaus Aehlig [Wed, 8 May 2013 18:20:34 +0000 (20:20 +0200)]
Fix expectation in hroller test
Regular expressions are not shell globs. So "any symbol" is expressed
by a dot, not a question mark. In this case, the confusion lead to a
too liberal expectation, hence the test passed. Fix it nevertheless.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Bernardo Dal Seno [Tue, 7 May 2013 13:01:50 +0000 (15:01 +0200)]
Refactor check for exclusive_storage in LUInstanceCreate
The order of evaluation of the conditions is changed, so it's easier to add
more (foreseen) checks for exclusive_storage.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Bernardo Dal Seno [Tue, 7 May 2013 14:43:18 +0000 (16:43 +0200)]
Refactor disk checks in LUInstanceSetParams
Prereq checks relative disks are grouped together and moved in a separate
method. This reduces the clutter in CheckPrereq().
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Klaus Aehlig <aehlig@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>
Klaus Aehlig [Tue, 7 May 2013 16:28:21 +0000 (18:28 +0200)]
Fix lint errors (redundant bracket)
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Klaus Aehlig [Fri, 3 May 2013 09:12:58 +0000 (11:12 +0200)]
Add a test demonstrating the --node-tags option of hroller
The example is a cluster of 6 nodes, paired into 3 group by three
instances. So the whole cluster would need two reboot groups. The two
tags select, in two different ways, one node of each group. So, when
restricting to one tag, a single reboot group suffices, but no
coloring of the whole cluster would achieve this.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Klaus Aehlig [Thu, 2 May 2013 13:12:00 +0000 (15:12 +0200)]
Add option to hroller to select nodes based on tags
Add option --node-tags to tell hroller to consider only nodes
with these tags. A use case would be a tag tracking on which
nodes the maintenance has not yet been carried out, e.g., if
rolling reboots are interleaved with other cluster operations.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Klaus Aehlig [Thu, 2 May 2013 12:31:04 +0000 (14:31 +0200)]
Make Rapi backed set node tags correctly
Since the htools representation of a node now allows adding
the node tags, populate this field correctly in the Rapi
backend.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Klaus Aehlig [Thu, 2 May 2013 11:41:53 +0000 (13:41 +0200)]
Make LUXI backed set node tags correctly
Since the htools representation of a node now allows adding
the node tags, populate this field correctly in the LUXI
backend.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Klaus Aehlig [Thu, 2 May 2013 11:10:42 +0000 (13:10 +0200)]
Extend the text format to contain node tags
In order to allow htools to make use of node tags, add them to the
text format. This is done by adding a new column at the end of the
node lines. If this column is missing, the default value (which
is the empty list) is left unchanged, thus yielding the current
behavior.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Klaus Aehlig [Thu, 2 May 2013 10:36:29 +0000 (12:36 +0200)]
Extend the Node in the htools to allow adding node tags
Since hroller (and probably other tools in the future) will support
node selection based on node tags, extend the node data structure to
allow adding this information.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Klaus Aehlig [Thu, 2 May 2013 14:40:51 +0000 (16:40 +0200)]
Make hroller filter the nodes before coloring the graph
Hroller used to first compute a coloring of the node graph and then
filter out the nodes that it had to work on. While the only filtering
was according to node groups this did not make a difference, as there
shouldn't be any instance with primary and secondary node on different
node groups. With more elaborate filtering, however, reducing the graph
first can lead to better reboot groups.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Klaus Aehlig [Thu, 2 May 2013 16:22:39 +0000 (18:22 +0200)]
Make mkNodeGraph ignore edges to non-present nodes
Change the behavior of mkNodeGraph to tacitly ignore all instances
where one of the nodes is not in the list of nodes. In this way, we
can construct sub-graphs by filtering the nodes and ignoring any
possibly added isolated nodes for the missing indexes.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Klaus Aehlig [Thu, 2 May 2013 15:18:35 +0000 (17:18 +0200)]
Add tests for the -O option of hroller
In hroller, the option -O can be used to mark certain nodes as offline.
These nodes should then not be part of any reboot group. Add tests
to verify this behavior.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Klaus Aehlig [Fri, 3 May 2013 08:13:14 +0000 (10:13 +0200)]
Update hroller man page
In commit
7dbe4c725 the new option --force was introduced to
hroller. Change the man page to reflect this change.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Thomas Thrainer [Tue, 7 May 2013 13:46:11 +0000 (15:46 +0200)]
Mention DRBD 8.4 support in NEWS
Mention the main features of DRBD 8.4 support in the NEWS file.
Signed-off-by: Thomas Thrainer <thomasth@google.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 15:03:56 +0000 (17:03 +0200)]
Fix `drbdsetup show` parsing for DRBD 8.4
In DRBD 8.4, Ganeti does no longer use indexed external meta data but
flexible external metadata. Therefore, there is no longer a meta data
index in the output of `drbdsetup show`.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Helga Velroyen [Tue, 9 Apr 2013 21:36:47 +0000 (23:36 +0200)]
Correction of design doc regarding RPC extension
This corrects the storage types design doc regarding the specification
of the RPC call.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Bernardo dal Seno <bdalseno@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>
Klaus Aehlig [Mon, 6 May 2013 13:22:54 +0000 (15:22 +0200)]
Change design of algorithm for computing rolling reboots
Instead of computing a coloring for one condition first and then refining
it for the other condition, we can construct a graph with edges for all
conditions that prevent simultaneous reboots. This will not only result
in simpler code, but might also lead to better colorings.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Guido Trotter <ultrotter@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).
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Thomas Thrainer [Thu, 25 Apr 2013 09:32:20 +0000 (11:32 +0200)]
Check for uniform DRBD version in node group
This check is performed during gnt-cluster verify and outputs warnings
if at least two different DRBD versions are found within a node group.
In such a case, all nodes with their installed DRBD version are
displayed.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Thomas Thrainer [Thu, 25 Apr 2013 07:21:52 +0000 (09:21 +0200)]
Split DRBD8Dev into DRBD8 and DRBD8Dev
All functionality specific to a single DRBD8 devide is now in DRBD8Dev,
whereas functionality which is valid for the whole DRBD "installation"
on a device is collected in DRBD8.
This makes it possible to remove a couple of FIXME's and clarifies the
code in some areas.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Thomas Thrainer [Thu, 25 Apr 2013 06:47:57 +0000 (08:47 +0200)]
Rename DRBD8 to DRBD8Dev
Right now the DRBD8 class has multiple responsibilities: a) it
reprensents a device which can be set up, grown, etc. and b) it
represents the whole DRBD system on a node which has a usermode helper,
which knows how to shut down _all_ devices, etc. Therefore, the DRBD8Dev
class will only be responsible for a device, whereas the soon to be
extraced DRBD8 class is responsible for the DRBD system.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Thomas Thrainer [Thu, 25 Apr 2013 06:39:44 +0000 (08:39 +0200)]
Make DRBD version queryable from noded
gnt-cluster verify should issue a warning if there are multiple DRBD
versions present in a node group. In order to do so, the DRBD version
has to be queryable from noded.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@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>
Michele Tartara [Fri, 3 May 2013 13:23:22 +0000 (13:23 +0000)]
Merge remote-tracking branch 'origin/stable-2.8'
Conflicts:
lib/bdev.py
lib/cmdlib.py
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@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>
Bernardo Dal Seno [Thu, 2 May 2013 20:38:15 +0000 (22:38 +0200)]
Reuse current spindles in design for partitioned
Renaming the current parameters dealing with spindles is nice, as their
meaning would be clearer, but that would mean changing a lot of code,
change external interfaces, and renaming internal variables for little
benefit. Also, instance policies would end up containing two related
parameters, one used when exclusive_storage is enabled, and the other when
disabled. Reusing the existing parameters by changing slightly their
semantics makes more sense.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Bernardo Dal Seno [Thu, 2 May 2013 21:37:39 +0000 (23:37 +0200)]
Fix white spaces in partitioned design doc
Bullet lists start after a blank line.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Guido Trotter <ultrotter@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>
Thomas Thrainer [Thu, 2 May 2013 15:10:32 +0000 (17:10 +0200)]
Support DRBD 8.4.3 command syntax
DRBD 8.4.3 does not support specifying volume ids directly while
creating the meta device. It requires a slightly different syntax (using
flex-external as volume id) which is fortunately also supported by (at
least) DRBD 8.4.2.
Signed-off-by: Thomas Thrainer <thomasth@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 [Mon, 29 Apr 2013 16:48:52 +0000 (18:48 +0200)]
Merge branch 'stable-2.8' into master
* stable-2.8: (42 commits)
Add shelltests for hspace allocation
hspace: Handle multiple ipolicy specs
QA: Test multiple instance specs
QA: Handle multiple instance specs
Unit test for cli.FormatPolicyInfo()
Add command-line support for multiple specs in ipolicy
Add multiple min/max specs in instance policy
Separate checks for std spec compliance
QA: Transpose instance specs
Improve check for "unreleased" versions in NEWS
Update documentation for text format
Add missing fields in htools text-backend documentation
cfgupgrade: Remove enabled_disk_templates on downgrade
Reason trail implementation for "start"
Reason trail implementation for "shutdown"
QA: More tests for instance policies in groups
QA: Split function to set and parse instance policies
QA: Update tests for new ipolicy specs command-line options
Add unit tests for cfgupgrade with a real configuration
Split functions in cfupgrade unit tests
...
Conflicts:
lib/backend.py
lib/bdev.py
man/gnt-cluster.rst
lib/bdev.py was renamed to lib/block/bdev.py in master, so I've manually
applied the
bc3427b7 commit to the new file. The other two are
straightforward conflicts.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Thomas Thrainer [Mon, 29 Apr 2013 11:51:29 +0000 (13:51 +0200)]
Cleanup DRBD 8.4 devices properly during QA
QA cleans up DRBD 8.4 devices via drbdsetup, which currently only worked
for DRBD 8.3. This (rather ugly) command makes sure that DRBD 8.4
devices are cleaned up as well.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Mon, 29 Apr 2013 11:51:28 +0000 (13:51 +0200)]
Add command generator for DRBD 8.4
The DRBD84CmdGenerator class, which generates commands suited for DRBD
8.4, is added. A common baseclass for DRBD83CmdGenerator and
DRBD84CmdGenerator is introduced as well.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Mon, 29 Apr 2013 12:02:39 +0000 (14:02 +0200)]
Add test for version dispatching code
Based on the version of DRBD (as reported through /proc/drbd), the DRBD8
class chooses helper objects which adapt for the differences between
DRBD <= 8.3 and DRBD 8.4. This new test verifies that the proper objects
are created.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Mon, 29 Apr 2013 11:51:27 +0000 (13:51 +0200)]
Add dependency on python-mock
Python Mock (http://www.voidspace.org.uk/python/mock/) is a mocking
library for Python. It is included in the standard Python distribution
as of Python 3.3, but has been around for quite a while. Debian unstable
contains a version we require.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Mon, 29 Apr 2013 11:51:26 +0000 (13:51 +0200)]
Extract DRBD related tests
As the DRBD code was extracted from bdev.py, the corresponding tests
should as well be extracted into their own file. That's what this patch
performs.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Mon, 29 Apr 2013 11:51:25 +0000 (13:51 +0200)]
Extract command generation logic from DRBD8
In order to easily support the DRBD 8.4 command syntax, this patch
extracts all command generation logic (i.e. where calls to `drbdsetup`
are assembled) into a new class DRBD83CmdGenerator.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Mon, 29 Apr 2013 11:51:24 +0000 (13:51 +0200)]
Use DRBD84ShowInfo based on DRBD version
Now the DRBD8 class actually checks which version of DRBD is running on
the system and chooses the right class to parse the `drbdsetup show`
output.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Mon, 29 Apr 2013 11:51:24 +0000 (13:51 +0200)]
Add `drbdsetup show` parser for DRBD 8.4
Common functionality between the DRBD 8.3 and DRBD 8.4 parser has been
extracted into BaseShowInfo. A test which verifies the behaviour is
included, but the DRBD84ShowInfo class is not yet used within the DRBD8
class.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Mon, 29 Apr 2013 11:51:23 +0000 (13:51 +0200)]
Extract DRBD info parsing into drbd_info.py
Parsing the status (/proc/drbd) and `drbdsetup show` output takes quite
a bit of code, which has to be augmented by even more with the DRBD 8.4
support. So extract all the related classes into their own file.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Mon, 29 Apr 2013 11:51:22 +0000 (13:51 +0200)]
Extract DRBD8ShowInfo class
This class parses the `drbdsetup show` output and represents it in an
easily accessible format. It got extracted so that 1) the DRBD8 class
can focus more on DRBD logic rather than parsing and 2) it's easier to
adapt the parser to new formats.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Mon, 29 Apr 2013 11:51:21 +0000 (13:51 +0200)]
Add test for DRBD 8.4 /proc/drbd parsing
The current parser already supports the output of DRBD 8.4 /proc/drbd,
so add tests which actually verify this behaviour.
Note that the empty lines in proc_drbd84.txt are actually present in the
output of DRBD 8.4, they always appear when minors are not contiguous.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Mon, 29 Apr 2013 11:51:21 +0000 (13:51 +0200)]
Add test for empty version in /proc/drbd
The previous patch removed a (rather implicit) test for /proc/drbd not
containing a version line. This adds an explicit test for this case.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Mon, 29 Apr 2013 11:51:20 +0000 (13:51 +0200)]
Rename _JoinProcDataPerMinor to _JoinLinesPerMinor
In the new context of the DRBD8Info class, the name
_JoinProcDataPerMinor doesn't fit any more. _JoinLinesPerMinor reflects
more precisely what's done, and doesn't imply that the data comes from
/proc/drbd.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Mon, 29 Apr 2013 11:51:19 +0000 (13:51 +0200)]
Extract /proc/drbd parsing code into DRBD8Info
As the DRBD8 class got bigger due to the previous merge of BaseDRBD, now
parts of it are ripped out into DRBD8Info. This new class parses
/proc/drbd and exposes the information in an easily accessible way. This
allowed to simplify some methods in DRBD8 and do make the tests more
concise.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Wed, 24 Apr 2013 14:59:11 +0000 (16:59 +0200)]
Remove BaseDRBD
BaseDRBD was probably useful when DRBD 0.7 and DRBD 8 were supported.
However, there is only one subclass of BaseDRBD remaining (DRBD8), and
the separation of responsibilities between those two classes was rather
randomly chosen.
The unification into one class also eases the introduction of
DRBD 8.4 support, as the responsibilities of the class(es) will be
distributed anew.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Wed, 24 Apr 2013 14:59:04 +0000 (16:59 +0200)]
Rename _MassageProcData to _JoinProcDataPerMinor
That's what the method actually does, so there is no reason why we
should use a funny but unreadable name.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@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>