ganeti-local
10 years agoBump versions to release 2.9~beta1 v2.9.0beta1
Klaus Aehlig [Tue, 27 Aug 2013 13:41:33 +0000 (15:41 +0200)]
Bump versions to release 2.9~beta1

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agoAdd design-2.9 to docinput
Klaus Aehlig [Tue, 27 Aug 2013 15:24:09 +0000 (17:24 +0200)]
Add design-2.9 to docinput

While design-2.9.rst was already created earlier, it
wasn't registered in the Makefile. Fix this.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agoMerge branch 'stable-2.8' into stable-2.9
Klaus Aehlig [Tue, 27 Aug 2013 11:02:07 +0000 (13:02 +0200)]
Merge branch 'stable-2.8' into stable-2.9

* stable-2.8
  Add function to unwrap Results logging failures
  Make the DRBD collector more failure-resilient
  Prepare GetLinuxNodeInfo for testing
  Add unit test for GetLinuxNodeInfo
  NEWS update and version bump for 2.8 rc2

Conflicts:
Makefile.am
NEWS
configure.ac
lib/hypervisor/hv_base.py

For hv_base.py, take the changes of stable-2.8, for
configure.ac take the version of stable-2.9, for the
rest, take both additions.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agoNEWS update and version bump for 2.8 rc2 v2.8.0rc2
Michele Tartara [Tue, 27 Aug 2013 07:59:14 +0000 (09:59 +0200)]
NEWS update and version bump for 2.8 rc2

Latest modifications and fixes added to the NEWS file.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agoLint improvements to regexps
Michele Tartara [Wed, 21 Aug 2013 12:19:19 +0000 (12:19 +0000)]
Lint improvements to regexps

Fix some regular expressions so that they pass lint checks with newer versions
of pylint.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

10 years agoAdd unit test for GetLinuxNodeInfo
Michele Tartara [Thu, 22 Aug 2013 08:53:07 +0000 (08:53 +0000)]
Add unit test for GetLinuxNodeInfo

The function was not unit tested previously.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

10 years agoPrepare GetLinuxNodeInfo for testing
Michele Tartara [Thu, 22 Aug 2013 08:31:45 +0000 (10:31 +0200)]
Prepare GetLinuxNodeInfo for testing

The names of the input files are not hardcoded anymore, but they are now default
parameters.

No changes for the callers, but it's now possible to test the function more
easily.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

10 years agoCheck right disk template in inst set params
Thomas Thrainer [Thu, 22 Aug 2013 09:11:03 +0000 (11:11 +0200)]
Check right disk template in inst set params

While checking the parameters of the opcode for LUInstanceSetParams, the
already set disk_template was checked instead of the new one in the
opcode. This patch fixes this bug.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

10 years agoMake the DRBD collector more failure-resilient
Michele Tartara [Wed, 21 Aug 2013 14:17:38 +0000 (14:17 +0000)]
Make the DRBD collector more failure-resilient

If information about instances is not available, just log the error and
continue without it.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

10 years agoAdd function to unwrap Results logging failures
Michele Tartara [Wed, 21 Aug 2013 14:15:30 +0000 (14:15 +0000)]
Add function to unwrap Results logging failures

Add logWarningIfBad, a utility function similar to exitIfBad, that logs a
warning and returns a default value instead of just crashing the program if
the unpacked value is Bad.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

10 years agoFix bug in NodeD and RapiD usage strings
Michele Tartara [Wed, 21 Aug 2013 12:26:54 +0000 (12:26 +0000)]
Fix bug in NodeD and RapiD usage strings

The strings did not comply with the style guide, and were not diplayed
correctly either.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

10 years agoMerge branch 'stable-2.8' into stable-2.9
Thomas Thrainer [Tue, 20 Aug 2013 12:20:52 +0000 (14:20 +0200)]
Merge branch 'stable-2.8' into stable-2.9

* stable-2.8
  Allow instance mods if only osparams are given
  Fix harep manpage title
  Use FQDN to check master node status

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

10 years agoAllow instance mods if only osparams are given
Thomas Thrainer [Tue, 20 Aug 2013 10:37:08 +0000 (12:37 +0200)]
Allow instance mods if only osparams are given

osparams are now recognized as changes, so changing only those without
other changes works too now.

(cherry picked from commit 5eae613c2e1e65101c5d5f7d2e8ffd7cc6edc7d5)

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agoUse node UUIDs for locking instead of node names
Thomas Thrainer [Mon, 19 Aug 2013 13:51:23 +0000 (15:51 +0200)]
Use node UUIDs for locking instead of node names

LUInstanceMultiAlloc used node names instead of node UUIDs to lock
required nodes. This patch fixes this bug.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agoAllow instance mods if only osparams are given
Thomas Thrainer [Tue, 20 Aug 2013 10:37:08 +0000 (12:37 +0200)]
Allow instance mods if only osparams are given

osparams are now recognized as changes, so changing only those without
other changes works too now.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

10 years agoFix a node name vs. UUID bug in instance import
Thomas Thrainer [Mon, 19 Aug 2013 12:10:18 +0000 (14:10 +0200)]
Fix a node name vs. UUID bug in instance import

This patch fixes a bug where node names were incorrectly used as node
UUID's.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

10 years agoTypo in hroller man page
Helga Velroyen [Mon, 19 Aug 2013 11:22:43 +0000 (13:22 +0200)]
Typo in hroller man page

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoUse node UUID for locking in LUInstanceMove
Thomas Thrainer [Mon, 19 Aug 2013 07:53:12 +0000 (09:53 +0200)]
Use node UUID for locking in LUInstanceMove

This LU (incorrectly) used the node name for locking. This patch
corrects this error.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

10 years agoFix harep manpage title
Apollon Oikonomopoulos [Fri, 16 Aug 2013 11:58:03 +0000 (14:58 +0300)]
Fix harep manpage title

The harep manpage title underline was one character short, leading in
pandoc producing an invalid manpage header.

Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoFix IPolicy violation check in LUGroupSetParams
Thomas Thrainer [Tue, 13 Aug 2013 09:54:52 +0000 (11:54 +0200)]
Fix IPolicy violation check in LUGroupSetParams

cfg.GetMultiInstanceInfoByName returns a list of tuples, not a list of
instance objects which is required by ComputeNewInstanceViolations.
This patch fixes this type error.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agoUse FQDN to check master node status
Thomas Thrainer [Tue, 13 Aug 2013 07:50:42 +0000 (09:50 +0200)]
Use FQDN to check master node status

The master node name in SS conf is stored as FQDN, so also use the FQDN
on each node to check if it is the master node.

This fixes issue 551.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agoRevert "Display node name instead of UUID in error message"
Thomas Thrainer [Tue, 13 Aug 2013 06:55:29 +0000 (08:55 +0200)]
Revert "Display node name instead of UUID in error message"

This reverts commit fbff213691328562cc4029f3babaa2e72e2012c4.
When running hooks, the node name is used to identify nodes, not (as
wrongly assumed in the patch) the node UUID.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agoDisplay node name instead of UUID in error message
Thomas Thrainer [Mon, 12 Aug 2013 13:56:00 +0000 (15:56 +0200)]
Display node name instead of UUID in error message

The hooks callback in LUClusterGroupVerify misinterpreted the key in the
node result as name instead of node UUID. This patch fixes this, which
leads to more user friendly error messages.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agoUse node name in error message
Thomas Thrainer [Mon, 12 Aug 2013 07:10:17 +0000 (09:10 +0200)]
Use node name in error message

CheckNodeNotDrained displayed only the node UUID if the node is drained.
In order to provide a more helpful error message, use the node name
instead.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agoQA: make ipolicy test respect enabled disk templates
Helga Velroyen [Thu, 8 Aug 2013 16:41:45 +0000 (18:41 +0200)]
QA: make ipolicy test respect enabled disk templates

This makes the 'gnt-cluster modify --ipolicy-*' tests
respect the enabled disk templates on the QA cluster.
If the required disk templates are not enabled, the
test is skipped.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoQA: adjust tests wrt to ipolicy disk templates
Helga Velroyen [Wed, 7 Aug 2013 13:39:14 +0000 (15:39 +0200)]
QA: adjust tests wrt to ipolicy disk templates

This adjusts the cluster QA with respect to the new checks
between the ipolicy disk templates and the enabled disk
templates.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoClusterSetParams: move vg-name checks from to CheckPrereq
Helga Velroyen [Wed, 7 Aug 2013 15:52:38 +0000 (17:52 +0200)]
ClusterSetParams: move vg-name checks from to CheckPrereq

This fixes a bug in the logic of 'gnt-cluster modify'.
Some checks that should better be done in 'CheckPrereq'
were actually done in 'Exec'. This lead to a strange
behavior in case the execution failed, because an
inconsistent state of the cluster's config was kept in
memory.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoman gnt-cluster: mention ipolicy check
Helga Velroyen [Wed, 7 Aug 2013 12:30:21 +0000 (14:30 +0200)]
man gnt-cluster: mention ipolicy check

This updates the 'gnt-cluster' man page to mention the
relationship between the ipolicy's list of allowed disk
templates and the cluster-wide enabled-disk templates.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoUpdate NEWS file regarding ipolicy checks
Helga Velroyen [Wed, 7 Aug 2013 12:26:37 +0000 (14:26 +0200)]
Update NEWS file regarding ipolicy checks

This patch updates the NEWS file to mention the new checks
between the ipolicy's list of allowed disk tempaltes and
the cluster-wide enabled disk templates.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agognt-group add/modify: ipolicy vs disk templates
Helga Velroyen [Wed, 7 Aug 2013 12:08:51 +0000 (14:08 +0200)]
gnt-group add/modify: ipolicy vs disk templates

This patch adds a consistency check between the ipolicy's
list of allowed disk templates with the cluster-wide
enable disk templates when a new node group is added
or a group is modified.

It also fixes a bug in gnt-group where the list of allowed
disk templates was not propagated properly.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoMove Ipolicy utility function to cmdlib/common.py
Helga Velroyen [Wed, 7 Aug 2013 11:50:27 +0000 (13:50 +0200)]
Move Ipolicy utility function to cmdlib/common.py

Since the check of consistency between an ipolicy and
the list of enabled disk templates will not only be
needed on cluster modification, but also on group
modification, we move the respective function and its
unit tests to the 'common' module.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agobootstrap: restrict ipolicy to enabled disk templates
Helga Velroyen [Wed, 7 Aug 2013 11:39:51 +0000 (13:39 +0200)]
bootstrap: restrict ipolicy to enabled disk templates

With this patch, on cluster creation, the initial instance
policy's list of allowed disk templates will be modified
in a way that it does not contain any disk templates which
are not enabled cluster-wise.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agognt-cluster modify: ipolicy vs enabled disk templates
Helga Velroyen [Wed, 7 Aug 2013 11:04:45 +0000 (13:04 +0200)]
gnt-cluster modify: ipolicy vs enabled disk templates

This patch adds a check to LUClusterSetParams which
ensures that the list of allowed disk templates is a
subset of the list of cluster-wide enabled disk
templates. Unit tests are included.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agognt-cluster modify: factor out ipolicy check
Helga Velroyen [Wed, 7 Aug 2013 09:41:51 +0000 (11:41 +0200)]
gnt-cluster modify: factor out ipolicy check

This refactors the LUClusterSetParams to do all ipolicy
sanity / validity checks in a separate function
in order to increase testability. No function changes
otherwise.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoMerge branch 'stable-2.8' into stable-2.9
Thomas Thrainer [Wed, 7 Aug 2013 11:21:55 +0000 (13:21 +0200)]
Merge branch 'stable-2.8' into stable-2.9

* stable-2.8
  Fix batch creation of instances
  Fix documentation of gnt-instance batch-create
  Support multi instance allocs without iallocator
  Support DSA SSH keys in bootstrap
  Include VCS version in `gnt-cluster version`
  Document 'viridian' hypervisor parameter
  Support 'viridian' parameter in Xen HVM
  Document --no-conflicts-check for gnt-network
  Version bump for 2.8.0 rc1
  Add Make to the list of dependencies
  Check for luxid permission during verify config
  Add monitoring-query-format.rst to $(docinput)
  Fix documentation building rules
  Check disk template in right dict when copying
  Check disk template in right dict when copying
  ganeti.backend_unittest: chmod restricted cmd dir
  Fix formatting of tuple in error message
  Mark the UUID design doc as implemented
  Clarify that cmdlib/ must be removed downgrading
  Fix formatting error in the UPGRADE document
  Make build_chroot compatible with Squeeze
  Update security doc and NEWS for luxid
  Add --cleanup to instance failover manpage
  Update NEWS with failover cleanup
  Add cleanup parameter to instance failover
  Fix 'prcre' typo in INSTALL
  Update NEWS file for 2.8 wrt vnet_hdr KVM hvparam
  Document the vnet_hdr HV parameter for KVM
  Format gnt-network info group output
  Add 2.7.2 NEWS entry
  Prepare NEWS for 2.8.0 beta2
  Fix the downgrade function of cfgupgrade
  Increase maximum HTTP message size
  Clarify hbal man page
  Properly add the UUID to all the disks

Conflicts:
NEWS
configure.ac
doc/design-draft.rst
doc/index.rst
lib/cmdlib/instance.py
lib/cmdlib/instance_migration.py
lib/constants.py
lib/hypervisor/hv_xen.py
man/gnt-instance.rst
man/gnt-network.rst
test/hs/Test/Ganeti/OpCodes.hs
tools/cfgupgrade

All trivially merged.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agoMerge branch 'stable-2.7' into stable-2.8
Thomas Thrainer [Wed, 7 Aug 2013 09:43:44 +0000 (11:43 +0200)]
Merge branch 'stable-2.7' into stable-2.8

* stable-2.7
  Fix documentation of gnt-instance batch-create
  Support multi instance allocs without iallocator
  Document --no-conflicts-check for gnt-network
  Check disk template in right dict when copying
  ganeti.backend_unittest: chmod restricted cmd dir
  Fix formatting of tuple in error message
  Fix 'prcre' typo in INSTALL
  Format gnt-network info group output
  Add 2.7.2 NEWS entry

Conflicts:
INSTALL
      (trivial)
NEWS
      (added entry to unreleased 2.8 section with remark that it was
       merged from 2.7)
lib/cmdlib.py
      (followed cmdlib split)

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agoFix batch creation of instances
Thomas Thrainer [Mon, 5 Aug 2013 09:06:13 +0000 (11:06 +0200)]
Fix batch creation of instances

During batch creation of instances the 'reason' field in opcodes is set
to None (but the field is present). This caused problems when adding a
reasons to the reason trail.

Setting the default value for the 'reason' field to the empty list fixes
this issue.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

10 years agoFix documentation of gnt-instance batch-create
Thomas Thrainer [Mon, 5 Aug 2013 10:50:37 +0000 (12:50 +0200)]
Fix documentation of gnt-instance batch-create

The documentation of gnt-instance batch-create was outdated and
contained invalid examples. This patch corrects the man page and
includes working example inputs.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

10 years agoSupport multi instance allocs without iallocator
Thomas Thrainer [Mon, 5 Aug 2013 10:11:21 +0000 (12:11 +0200)]
Support multi instance allocs without iallocator

If all instances in the multi allocation request have already their
primary and secondary node set, there is no need for an iallocator. Thus
don't require it in this case and omit the call to it all together.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

10 years agoSupport DSA SSH keys in bootstrap
Thomas Thrainer [Tue, 6 Aug 2013 15:10:15 +0000 (17:10 +0200)]
Support DSA SSH keys in bootstrap

As outlined in issue 338, Ganeti failed to initialize a cluster if no
RSA SSH key is present on the master node. This patch extends Ganetis
support to DSA keys, so clusters with only DSA keys are possible now.

This fixes issue 338.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

10 years agoInclude VCS version in `gnt-cluster version`
Thomas Thrainer [Tue, 6 Aug 2013 10:54:15 +0000 (12:54 +0200)]
Include VCS version in `gnt-cluster version`

Also print the VCS version in the output of `gnt-cluster version`. This
makes the VCS version also available over RAPI, etc.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

10 years agoDocument 'viridian' hypervisor parameter
Thomas Thrainer [Tue, 6 Aug 2013 08:09:10 +0000 (10:09 +0200)]
Document 'viridian' hypervisor parameter

List the 'viridian' hypervisor parameter (valid for Xen HVM) in the
gnt-instance manpage.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

10 years agoSupport 'viridian' parameter in Xen HVM
Thomas Thrainer [Tue, 6 Aug 2013 08:04:58 +0000 (10:04 +0200)]
Support 'viridian' parameter in Xen HVM

This parameter is required to prevent bluescreens in Windows instances.

This fixes issue 233.

Signed-off-by: Heiko Baumann <heibau@googlemail.com>
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

10 years agoFix formatting of instance names in config verify
Thomas Thrainer [Fri, 2 Aug 2013 13:11:45 +0000 (15:11 +0200)]
Fix formatting of instance names in config verify

Instance object were incorrectly treated as instance UUID's which caused
an exception to be raised. Using the names of the instance objects
directly fixes this problem.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

10 years agoDocument --no-conflicts-check for gnt-network
Thomas Thrainer [Mon, 5 Aug 2013 07:46:30 +0000 (09:46 +0200)]
Document --no-conflicts-check for gnt-network

gnt-network add and connect do support the --no-conflicts-check option.
This is now also documented in the man pages.

This fixes issue 526.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

10 years agoFix verify config if a node has no instances
Thomas Thrainer [Fri, 2 Aug 2013 05:29:45 +0000 (07:29 +0200)]
Fix verify config if a node has no instances

Do not try to provide a fake instance UUID called "no instances", as
trying to get the name for would fail and raise an exception.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

10 years agoVersion bump for 2.8.0 rc1 v2.8.0rc1
Michele Tartara [Wed, 31 Jul 2013 13:21:28 +0000 (13:21 +0000)]
Version bump for 2.8.0 rc1

Update NEWS file and version number.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agoAdd Make to the list of dependencies
Michele Tartara [Fri, 2 Aug 2013 07:40:44 +0000 (07:40 +0000)]
Add Make to the list of dependencies

Make is a required dependency, but it was not specified in the install guide.
This commit adds it.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoCheck for luxid permission during verify config
Thomas Thrainer [Thu, 1 Aug 2013 14:43:40 +0000 (16:43 +0200)]
Check for luxid permission during verify config

confd no longer needs access to the noded certificate file, but luxid
does. Change the check to use the right user.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

10 years agoAdd monitoring-query-format.rst to $(docinput)
Apollon Oikonomopoulos [Thu, 1 Aug 2013 09:45:20 +0000 (12:45 +0300)]
Add monitoring-query-format.rst to $(docinput)

Commit 431ff2c10 split the monitoring system documentation in two parts but did
not include the new monitoring-query-format.rst to $(docinput). As a result,
current tarballs of 2.8 do not ship doc/monitoring-query-format.rst.

Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

10 years agoFix documentation building rules
Michele Tartara [Thu, 1 Aug 2013 08:41:04 +0000 (10:41 +0200)]
Fix documentation building rules

Implement the correct behavior to be kept when sphinx-build is not installed.
It was already correctly checked, but instead of just disabling the
documentation generation, an error message was printed, having "make" fail.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoCheck disk template in right dict when copying
Thomas Thrainer [Wed, 31 Jul 2013 13:41:43 +0000 (15:41 +0200)]
Check disk template in right dict when copying

Due to the structure of the code this condition can't possibly be true.
We have to look in the new_diskparams dict instead, otherwise it'd be
possible to try to update a non-existing entry.

(The same patch is in stable-2.7 as 106441d already).

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agoCheck disk template in right dict when copying
Thomas Thrainer [Wed, 31 Jul 2013 14:16:39 +0000 (16:16 +0200)]
Check disk template in right dict when copying

Due to the structure of the code this condition can't possibly be true.
We have to look in the new_diskparams dict instead, otherwise it'd be
possible to try to update a non-existing entry.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agoganeti.backend_unittest: chmod restricted cmd dir
Apollon Oikonomopoulos [Wed, 31 Jul 2013 14:30:29 +0000 (17:30 +0300)]
ganeti.backend_unittest: chmod restricted cmd dir

TestVerifyRestrictedCmdDirectory.testNormal implicitly relies on the current
umask to check the behaviour of backend._VerifyRestrictedCmdDirectory. However,
when run under a more relaxed umask (as in the case of the Debian buildd's
using sbuild and - apparently - umask 0002), it fails.

Since this kind of failure is already tested for previously and since we should
check that a "known-normal" directory passes the test, we explicitly chmod()
the temporary directory to 0755.

Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agoFix formatting of tuple in error message
Thomas Thrainer [Wed, 31 Jul 2013 12:58:29 +0000 (14:58 +0200)]
Fix formatting of tuple in error message

The missing str() call caused to raise another exception than the wanted
one. Transforming the tuple to string fixes this problem.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

10 years agoMark the UUID design doc as implemented
Michele Tartara [Wed, 31 Jul 2013 09:33:55 +0000 (09:33 +0000)]
Mark the UUID design doc as implemented

The code implementing the UUID design document is included in Ganeti 2.8.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agoClarify that cmdlib/ must be removed downgrading
Michele Tartara [Wed, 31 Jul 2013 08:54:14 +0000 (08:54 +0000)]
Clarify that cmdlib/ must be removed downgrading

Downgrading from 2.8 to a previous version will fail if the new cmdlib/
directory is not removed.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agoFix formatting error in the UPGRADE document
Michele Tartara [Wed, 31 Jul 2013 08:53:27 +0000 (08:53 +0000)]
Fix formatting error in the UPGRADE document

An item of the enumerated list was not rendered correctly.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agoMake build_chroot compatible with Squeeze
Michele Tartara [Tue, 30 Jul 2013 15:17:11 +0000 (15:17 +0000)]
Make build_chroot compatible with Squeeze

Modify build_chroot to make it compatible with debian Squeeze. This
is done by using a function instead of a alias for the command that
was failing.

Fixes Issue 507.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoUpdate security doc and NEWS for luxid
Thomas Thrainer [Tue, 30 Jul 2013 07:18:14 +0000 (09:18 +0200)]
Update security doc and NEWS for luxid

Document the split of luxid from confd in security.rst and in the NEWS
file.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agoAdd --cleanup to instance failover manpage
Michele Tartara [Tue, 30 Jul 2013 13:02:14 +0000 (13:02 +0000)]
Add --cleanup to instance failover manpage

Describe the new parameter in the manpage of gnt-instance.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agoUpdate NEWS with failover cleanup
Michele Tartara [Tue, 30 Jul 2013 12:06:22 +0000 (12:06 +0000)]
Update NEWS with failover cleanup

Describe the new feature in the NEWS file.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agoAdd cleanup parameter to instance failover
Michele Tartara [Tue, 30 Jul 2013 11:59:52 +0000 (11:59 +0000)]
Add cleanup parameter to instance failover

Most of the code is shared with instance migrate, so we actually only need
to add the parameter and pass its value along the the common code.

Also, tests and harep are updated to support the right set of options to
the "failover" opcode.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agoFix 'prcre' typo in INSTALL
Guido Trotter [Tue, 30 Jul 2013 09:48:35 +0000 (11:48 +0200)]
Fix 'prcre' typo in INSTALL

Thanks to "Izhar ul Hassan" for reporting the issue.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

10 years agoUpdate NEWS file for 2.8 wrt vnet_hdr KVM hvparam
Stratos Psomadakis [Mon, 29 Jul 2013 14:14:49 +0000 (17:14 +0300)]
Update NEWS file for 2.8 wrt vnet_hdr KVM hvparam

Document the addition of the vnet_hdr HV parameter for KVM in the NEWS
file for 2.8.

Signed-off-by: Stratos Psomadakis <psomas@grnet.gr>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agoDocument the vnet_hdr HV parameter for KVM
Stratos Psomadakis [Mon, 29 Jul 2013 14:14:48 +0000 (17:14 +0300)]
Document the vnet_hdr HV parameter for KVM

Document the vnet_hdr HV parameter for KVM in the gnt-instance man page.

Signed-off-by: Stratos Psomadakis <psomas@grnet.gr>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agoFormat gnt-network info group output
Apollon Oikonomopoulos [Mon, 29 Jul 2013 12:50:00 +0000 (15:50 +0300)]
Format gnt-network info group output

gnt-network info currently displays the connected group output unformatted:

 # gnt-network info
 ...
   connected to node groups:
    ['med', 'bridged', 'staging']

This patch adds formatting to the node group output.

Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agoAdd 2.7.2 NEWS entry
Apollon Oikonomopoulos [Mon, 29 Jul 2013 12:49:41 +0000 (15:49 +0300)]
Add 2.7.2 NEWS entry

Prepare to list changes for 2.7.2.

Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agoTypos in ganeti-os-interface.rst
Helga Velroyen [Fri, 26 Jul 2013 08:32:32 +0000 (10:32 +0200)]
Typos in ganeti-os-interface.rst

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

10 years agoUse exact option name --enabled-disk-templates consistently
Helga Velroyen [Mon, 29 Jul 2013 11:43:10 +0000 (13:43 +0200)]
Use exact option name --enabled-disk-templates consistently

It is possible to use both, --enabled-disk-template
(singular) or --enabled-disk-tempaltes (plural),
but the usage of it has been documented and used in QA
inconsistently. This is fixed by this patch now.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

10 years agoUpdate NEWS file wrt shared file storage
Helga Velroyen [Wed, 24 Jul 2013 16:03:54 +0000 (18:03 +0200)]
Update NEWS file wrt shared file storage

Mention the the changes related to shared file storage
in the NEWS file.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoUpdate manpage of gnt-cluster wrt shared file storage
Helga Velroyen [Wed, 24 Jul 2013 15:29:43 +0000 (17:29 +0200)]
Update manpage of gnt-cluster wrt shared file storage

This updates the man page of gnt-cluster {init, modify}
to mention the new --shared-file-storage-dir option.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoQA: skip lvm-based tests if lvm disabled
Helga Velroyen [Wed, 24 Jul 2013 14:53:20 +0000 (16:53 +0200)]
QA: skip lvm-based tests if lvm disabled

QA tests should make sure not to be run if the necessary
environment for them is not present. This patch fixes that
for a couple of tests that fail to check that before being
executed.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoQA: test for --{shared,}-file-storage-dir
Helga Velroyen [Tue, 23 Jul 2013 15:19:14 +0000 (17:19 +0200)]
QA: test for --{shared,}-file-storage-dir

This adds tests for 'gnt-cluster modify' wrt to the
options --shared-file-storage-dir=... and
--file-storage-dir. It also separates the two directories'
specification in the QA configuration.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agognt-cluster verify: consider shared file storage
Helga Velroyen [Tue, 23 Jul 2013 14:56:53 +0000 (16:56 +0200)]
gnt-cluster verify: consider shared file storage

This patch enhances 'gnt-cluster verify' in a way that it
now validates the acceptance and existance of the shared
storage directory.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agognt-cluster modify --shared-file-storage-dir
Helga Velroyen [Tue, 23 Jul 2013 13:55:00 +0000 (15:55 +0200)]
gnt-cluster modify --shared-file-storage-dir

This patch introduces to 'gnt-cluster modify' the option
'--shared-file-storage-dir' to change the default directory
for instances using shared file storage at cluster runtime.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoRemove obsolete autoconf variable from remaining files
Helga Velroyen [Tue, 23 Jul 2013 13:54:51 +0000 (15:54 +0200)]
Remove obsolete autoconf variable from remaining files

This removes the obsolete autoconf variable
'ENABLE_SHARED_FILE_STORAGE' from all remaining files.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoobjects.py: remove fallback to autoconf
Helga Velroyen [Tue, 23 Jul 2013 13:02:34 +0000 (15:02 +0200)]
objects.py: remove fallback to autoconf

The online-update function of the cluster config so far
inspected the autoconf data to determine whether shared
file storage is enabled. This should now totally rely
on the options given at cluster initialization and thus
this legacy fallback is removed.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoCluster-merge: determine shared file storage use from config
Helga Velroyen [Tue, 23 Jul 2013 13:01:11 +0000 (15:01 +0200)]
Cluster-merge: determine shared file storage use from config

This patch makes cluster merge read the cluster's
configuration to find out whether or not shared
file storage is enabled.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoOpcodes: remove obsolete RequireSharedFileStorage function
Helga Velroyen [Tue, 23 Jul 2013 13:00:07 +0000 (15:00 +0200)]
Opcodes: remove obsolete RequireSharedFileStorage function

While looking for occurences of the soon-to-be-eliminated
autoconf option 'ENABLE_SHARED_FILE_STORAGE', I discovered
that this function uses it, but is actually never used
anyware, thus we just delete it.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoBootstrap: factor out and prepare shared-file-storage
Helga Velroyen [Tue, 23 Jul 2013 12:54:42 +0000 (14:54 +0200)]
Bootstrap: factor out and prepare shared-file-storage

This patch makes 'gnt-cluster init' use the
'--shared-file-storage-dir' option to set the default
shared file storage dir. Additionally, it performs the
same sanity and validity checks for the path as for
the default file storage directory. For this, we tried
to re-use as much code from file storage as possible.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoMove default shared file storage directory to pathutils
Helga Velroyen [Tue, 23 Jul 2013 12:37:19 +0000 (14:37 +0200)]
Move default shared file storage directory to pathutils

This patch moves the default shared-file storage directory
to the pathutils file. It will be removed from configure.ac
at the end of this patch series.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoPrepare NEWS for 2.8.0 beta2
Guido Trotter [Mon, 29 Jul 2013 11:52:56 +0000 (13:52 +0200)]
Prepare NEWS for 2.8.0 beta2

- Create stub "initial release" entry for beta1.
- Keep main 2.8 release information at top
- Add initial "since beta1" section

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

10 years agoAdd Ganeti 2.9 design document
Klaus Aehlig [Mon, 29 Jul 2013 08:57:39 +0000 (10:57 +0200)]
Add Ganeti 2.9 design document

This document lists the designs that have been implemented
in Ganeti 2.9 that hadn't been implemented in 2.8.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

10 years agoUpdate NEWS for version 2.9
Klaus Aehlig [Mon, 29 Jul 2013 08:37:58 +0000 (10:37 +0200)]
Update NEWS for version 2.9

Also for version 2.9, sort the news entries into incompatible and
compatible changes. In this way, we keep the list of items that have
to be taking into considerations before upgrading as short as possible.

Also mention that our tests now have an additional dependency.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

10 years agoFix the downgrade function of cfgupgrade
Michele Tartara [Thu, 25 Jul 2013 17:17:18 +0000 (19:17 +0200)]
Fix the downgrade function of cfgupgrade

The downgrade was not correctly removing some of the UUIDs (namely, those
of disks and NICs).

Fixes Issue 510.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

10 years agoIncrease maximum HTTP message size
Michele Tartara [Fri, 26 Jul 2013 10:12:35 +0000 (12:12 +0200)]
Increase maximum HTTP message size

After adding a new KVM parameter, RAPI queries related to KVM have become
too big, so we need to increase this.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

10 years agoClarify hbal man page
Klaus Aehlig [Thu, 25 Jul 2013 17:05:45 +0000 (19:05 +0200)]
Clarify hbal man page

In the sense of hbal, and, in fact, all htools, drained nodes
are considered as offline. Also, the cluster score is not just
the sum of its component, but, e.g., the count of instances on
offline nodes is weighted stronger.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

10 years agoProperly add the UUID to all the disks
Michele Tartara [Thu, 25 Jul 2013 14:00:17 +0000 (14:00 +0000)]
Properly add the UUID to all the disks

Starting from Ganeti 2.8 all the disks need to have a UUID.
A function for adding a UUID automatically to disks was present, but it didn't
consider disks with children (like DRBD).

The function is modified to work recursively.

Partially fixes Issue 510.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

10 years agoMerge branch 'stable-2.8' into stable-2.9
Guido Trotter [Thu, 25 Jul 2013 13:40:32 +0000 (15:40 +0200)]
Merge branch 'stable-2.8' into stable-2.9

* stable-2.8:
  Update NEWS and version for Ganeti 2.7.1
  Add hvparam to disable VNET_HDR on tap devices
  daemon-util: pass --oknodo at rotate_logs
  Add logrotate example
  daemon-util: provide rotate_logs and rotate_all_logs actions
  Fix permission errors for split users
  Make RAPI export device names and UUIDs

Conflicts:
lib/constants.py: trivial
lib/rapi/rlib2.py: trivial

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoMerge branch 'stable-2.7' into stable-2.8
Guido Trotter [Thu, 25 Jul 2013 12:38:24 +0000 (14:38 +0200)]
Merge branch 'stable-2.7' into stable-2.8

* stable-2.7:
  Update NEWS and version for Ganeti 2.7.1
  daemon-util: pass --oknodo at rotate_logs
  Add logrotate example
  daemon-util: provide rotate_logs and rotate_all_logs actions

Conflicts:
NEWS: trivial
configure.ac: trivial (keep 2.8 version)

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

10 years agoUpdate NEWS and version for Ganeti 2.7.1 v2.7.1
Guido Trotter [Thu, 25 Jul 2013 10:36:54 +0000 (12:36 +0200)]
Update NEWS and version for Ganeti 2.7.1

Release 2.7.1 with a handful of minor fixes.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

10 years agoAdd hvparam to disable VNET_HDR on tap devices
Stratos Psomdakis [Wed, 24 Jul 2013 11:52:55 +0000 (14:52 +0300)]
Add hvparam to disable VNET_HDR on tap devices

IFF_VNET_HDR allows tap devices to extract a VIRTIO_NET_HDR from pkts
going through the tap iface, enabling segmentation offload for the
virtio nics.

Current (Debian) kernels (3.2 for Debian Squeeze backrports / Wheezy)
don't seem able to handle well VMs with 'broken' virtio ifaces (e.g.
FreeBSD virtio-net driver), using GSO. Broken or malicious virtio-net
drivers can cause the host kernel to flood the logs with WARNs(),
effectively live-locking the system and affecting its overall stabitlity
(eg DRBD disconnects).

The WARN() flooding has been fixed / ratelimited in Linus' tree, but it
hasn't been backported to -stable.

This patch adds the vnet_hdr hvparam for KVM, to select whether the tap
devices used for KVM virtio ifaces will get created with VNET_HDR
support (IFF_VNET_HDR), even when the underlying kernel supports it, in
order to avoid this issue.

Signed-off-by: Stratos Psomadakis <psomas@grnet.gr>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agodaemon-util: pass --oknodo at rotate_logs
Apollon Oikonomopoulos [Wed, 24 Jul 2013 06:22:00 +0000 (09:22 +0300)]
daemon-util: pass --oknodo at rotate_logs

daemon-util's rotate_logs() did not pass --oknodo to start-stop-daemon while
HUPing the daemon processes. As a result, rotate_logs would fail for a
non-running daemon causing rotate_all_logs to exit prematurely.

We can fix this by either passing --oknodo to start-stop-daemon, or have
rotate_all_logs ignore any errors. The former is probably a safer approach - as
it doesn't mask any potential coding errors in rotate_logs - and is also
semantically correct (we only care about log rotation if a daemon is actually
running).

Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agoFix another missing renaming
Helga Velroyen [Tue, 23 Jul 2013 15:08:00 +0000 (17:08 +0200)]
Fix another missing renaming

This fixes a (due to a merge) slipped occurence of
VALID_STORAGE_TYPES which was renamed to STORAGE_TYPES.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

10 years agoAdd logrotate example
Apollon Oikonomopoulos [Tue, 23 Jul 2013 14:22:24 +0000 (17:22 +0300)]
Add logrotate example

Add an example logrotate snippet, along with the relevant documentation.

Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agodaemon-util: provide rotate_logs and rotate_all_logs actions
Apollon Oikonomopoulos [Tue, 23 Jul 2013 14:21:31 +0000 (17:21 +0300)]
daemon-util: provide rotate_logs and rotate_all_logs actions

Modify daemon-util to allow sending SIGHUP to one or all daemons. This is meant
as a utility function to be used in logrotate definitions.

Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agoFix usage of mapping from disk templates to storage types
Helga Velroyen [Tue, 23 Jul 2013 14:22:42 +0000 (16:22 +0200)]
Fix usage of mapping from disk templates to storage types

This fixes the currently broken tests due to a slipped
occurrence of the mapping from disk templates to storage
types due to a merge.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

10 years agoRename VALID_STORAGE_TYPES to STORAGE_TYPES
Helga Velroyen [Tue, 23 Jul 2013 12:13:21 +0000 (14:13 +0200)]
Rename VALID_STORAGE_TYPES to STORAGE_TYPES

For consistency, this patch renames 'VALID_STORAGE_TYPES'
to 'STORAGE_TYPES', because the set of valid disk
templates is also just names 'DISK_TEMPLATES'.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agoUnit tests for constants consistency
Helga Velroyen [Tue, 23 Jul 2013 11:41:49 +0000 (13:41 +0200)]
Unit tests for constants consistency

This patch adds some unit tests to ensure the consistency
of various constants regarding disk templates.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>