ganeti-local
10 years agoAdd dynamic hbal entry to the NEWS file
Michele Tartara [Thu, 17 Oct 2013 07:33:44 +0000 (07:33 +0000)]
Add dynamic hbal entry to the NEWS file

This feature is new in Ganeti 2.10.

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

10 years agoUpdate NEWS file about cpuid and soundhw
Santi Raffa [Thu, 17 Oct 2013 08:33:07 +0000 (10:33 +0200)]
Update NEWS file about cpuid and soundhw

Add entry to the news file, per request.

Signed-off-by: Santi Raffa <rsanti@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

10 years agoMention cmdlib unit tests and python-mock in NEWS
Thomas Thrainer [Wed, 16 Oct 2013 20:47:24 +0000 (22:47 +0200)]
Mention cmdlib unit tests and python-mock in NEWS

Add a NEWS entry about the cmdlib test framework and increased test
coverage, and mention that at least python-mock 1.0.1 is required as of
Ganeti 2.10.

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

10 years agoUpdate NEWS file about Hs2Py opcodes and constants
Jose A. Lopes [Thu, 17 Oct 2013 09:04:53 +0000 (11:04 +0200)]
Update NEWS file about Hs2Py opcodes and constants

Add information about Haskell to Python opcode and constant
generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

10 years agoFix unit test regarding recent changes in node_info RPC
Helga Velroyen [Thu, 17 Oct 2013 09:47:40 +0000 (11:47 +0200)]
Fix unit test regarding recent changes in node_info RPC

This fixes a unit test in instance_storage_unittest.py,
which was affected by the recent change in the RCP
'node_info'.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Hrovje Ribicic <riba@google.com>

10 years agoUpdate NEWS file about move-instance improvements
Hrvoje Ribicic [Thu, 17 Oct 2013 08:22:11 +0000 (10:22 +0200)]
Update NEWS file about move-instance improvements

Add information about disk template changes and using default
iallocators on the target cluster.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

10 years agoRPC: request spindle information properly
Helga Velroyen [Wed, 16 Oct 2013 14:49:09 +0000 (16:49 +0200)]
RPC: request spindle information properly

This patch fixes a problem with the RPC call 'node_info'.
Depending on the exclusive storage flag, we need to add
a storage unit for physical volumes in order to obtain
storage space information for them.

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

10 years agoFix indentation of devel/build_chroot
Santi Raffa [Wed, 16 Oct 2013 08:59:39 +0000 (10:59 +0200)]
Fix indentation of devel/build_chroot

This commit is separated from the previous one for reviewing
convenience. If git-blame points to this revision as the culprit of
your problem, you probably have to go deeper.

Signed-off-by: Santi Raffa <rsanti@google.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

10 years agoSupport wheezy schroots
Santi Raffa [Wed, 16 Oct 2013 08:59:38 +0000 (10:59 +0200)]
Support wheezy schroots

Add support for wheezy in build_chroot.

* Run squeeze-specific install logic only when building squeeze
  * Collapse consecutive apt-get commands
* Add wheezy-specific install logic
  * Ask for python-pyinotify 0.9.4 to avoid py-apidoc failures
* Add generic setup logic

Commands inside the new case construct were not indented inside the
new case construct for reviewing convenience. This will be fixed in
the next patch. The changes allow "make commit-check" to run to completion
without errors inside the newly created chroot.

Signed-off-by: Santi Raffa <rsanti@google.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

10 years agoMove orphaned unit tests to cmdlib/cluster_unittest.py
Helga Velroyen [Tue, 15 Oct 2013 11:07:21 +0000 (13:07 +0200)]
Move orphaned unit tests to cmdlib/cluster_unittest.py

Through some merge from 2.9 to master, some unit tests
in the file ganeti.comdlib.common_unittest.py were
no longer referenced in the Makefile and as such not
run anymore. With the introduction of the cmdlib test
suite and the following extension of the unit tests,
the orphaned unit tests (which are not already subsumed
by others) are moved into the new unit test files.

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

10 years agoFix bug with epydoc of BlockDev.GetUserspaceAccessUri
Raffa Santi [Mon, 14 Oct 2013 17:12:57 +0000 (19:12 +0200)]
Fix bug with epydoc of BlockDev.GetUserspaceAccessUri

Signed-off-by: Santi Raffa <rsanti@google.com>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>

10 years agoAdd implemented design docs to hidden toc section
Thomas Thrainer [Tue, 15 Oct 2013 14:54:53 +0000 (16:54 +0200)]
Add implemented design docs to hidden toc section

This is required in order to calm a doclint warning.

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

10 years agoPrepare version numbers for 2.10 release cycle
Thomas Thrainer [Wed, 9 Oct 2013 07:55:59 +0000 (09:55 +0200)]
Prepare version numbers for 2.10 release cycle

- Bump version numbers to 2.10 in various files
- Move implemented designs to design-2.10

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

10 years agoMerge branch 'stable-2.9'
Thomas Thrainer [Tue, 15 Oct 2013 14:13:10 +0000 (16:13 +0200)]
Merge branch 'stable-2.9'

* stable-2.9:
  Version bump for 2.9.0 rc3
  Add NEWS entry for 2.9.0 rc3
  Remove incorrect comment
  cfg auto update: match ipolicy with enabled disk templates
  Remove obsolete configure option for shared file storage
* stable-2.8:
  Improve harep documentation

Conflicts:
Makefile.am
NEWS
configure.ac
(all trivial merges)

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

10 years agoAdd unit tests for LUBackupExport
Thomas Thrainer [Mon, 14 Oct 2013 14:31:16 +0000 (16:31 +0200)]
Add unit tests for LUBackupExport

This patch adds unit tests for LUBackupExport.

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

10 years agoAdd unit tests for LUBackupPrepare
Thomas Thrainer [Mon, 14 Oct 2013 11:38:33 +0000 (13:38 +0200)]
Add unit tests for LUBackupPrepare

This patch adds unit tests for LUBackupPrepare.

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

10 years agoAdd unit tests for LUBackupQuery
Thomas Thrainer [Mon, 14 Oct 2013 11:03:34 +0000 (13:03 +0200)]
Add unit tests for LUBackupQuery

This patch adds unit tests for LUBackupQuery.

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

10 years agoUse node names in LUBackupQuery
Thomas Thrainer [Mon, 14 Oct 2013 11:01:58 +0000 (13:01 +0200)]
Use node names in LUBackupQuery

The result of LUBackupQuery has to be indexed by node name rather than
by node UUID, otherwise the automatically constructed filter won't
return any results.

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

10 years agoUpdate design doc design-storagetypes.rst
Helga Velroyen [Thu, 10 Oct 2013 14:23:57 +0000 (16:23 +0200)]
Update design doc design-storagetypes.rst

This patch updates the design doc with the current
state of the code base.

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

10 years agoMake 'gnt-node list-storage' use default storage type
Helga Velroyen [Thu, 10 Oct 2013 12:40:23 +0000 (14:40 +0200)]
Make 'gnt-node list-storage' use default storage type

Currently, when no explicit storage type is given, the
'gnt-node list-storage' command defaults to file storage
whether or not file storage is enabled on the cluster
or not. This patch fixes it by defaulting to the default
storage type (which is the storage type of the default
disk template). If this storage type does not support
space reporting, an error message is emitted.

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

10 years agoMake 'gnt-cluster modify' respect the order of templates
Helga Velroyen [Thu, 10 Oct 2013 11:51:36 +0000 (13:51 +0200)]
Make 'gnt-cluster modify' respect the order of templates

This fixes a bug where the order of enabled disk templates
was not respected when manipulating it with 'gnt-cluster
modify'.

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

10 years agoMention reporting behavior in man page of 'gnt-node info'
Helga Velroyen [Thu, 10 Oct 2013 09:06:58 +0000 (11:06 +0200)]
Mention reporting behavior in man page of 'gnt-node info'

This patch extends the man page of 'gnt-node info' to
document the space reporting behavior with respect to
the enabled disk templates.

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

10 years agoStreamlining handling of spindles and default templates
Helga Velroyen [Wed, 9 Oct 2013 14:56:58 +0000 (16:56 +0200)]
Streamlining handling of spindles and default templates

This rather lenghy patch comprises a couple of refactorings
to achieve the following goals:
- 'gnt-node info' should only report space information about
  spindles, when exclusive storage is enabled on the node
  (so far it always did when lvm-based storage was enabled).
- 'gnt-node info' should report the disks' space information
  for the default disk template's storage. So far it did it
  always for LVM, which is irrelevant for a cluster running
  for example file-based instances.
- Performance tweaking of storage reporting and gnt-node
  info.
- Consider the future work on storage pools for any changes.

This is is achieved by the following refactorings:
- Move the decision whether or not to ask for spindle
  from cmdlib-level to rpc level.
- Move the decision for which disk template's storage
  information to ask for to cmdlib level (instead of
  requesting information for all storage units and
  later discarding most of them).
- Adjustments to storage utility functions.
- Affected unit tests are adjusted as well.

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

10 years agoRename entities of unit test for MakeLegacyNodeInfo
Helga Velroyen [Wed, 9 Oct 2013 15:32:19 +0000 (17:32 +0200)]
Rename entities of unit test for MakeLegacyNodeInfo

This is a small preparation step for the next patch.
It just renames the key/value constants for the unit
test of MakeLegacyNodeInfo, because they were rather
undescriptive and thus made changes to the test cumbersome.

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

10 years agoAdd test suite for some names in 'AutoConf'
Jose A. Lopes [Fri, 11 Oct 2013 09:06:12 +0000 (11:06 +0200)]
Add test suite for some names in 'AutoConf'

Add test suite for some names in 'AutoConf' to test whether the values
generated from 'configure' and the 'Makefile' are valid filepaths,
user names, group names, among others.  Fixes issue 601.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

10 years agoFix several search path configure options
Jose A. Lopes [Fri, 11 Oct 2013 08:12:32 +0000 (10:12 +0200)]
Fix several search path configure options

Fix several search path configure options to properly handle
separators.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

10 years agoDesign document for hsqueeze
Klaus Aehlig [Tue, 8 Oct 2013 07:31:25 +0000 (09:31 +0200)]
Design document for hsqueeze

This design document describes a new htool, hsqueeze, to
be used to move the externally-mirrored instances in such a
way that as few nodes as possible host instances at all.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Martin Zobel-Helas <zobel@debian.org>
Reviewed-by: Guido Trotter <ultrotter@google.com>

10 years agoVersion bump for 2.9.0 rc3 v2.9.0rc3
Klaus Aehlig [Mon, 14 Oct 2013 08:15:07 +0000 (10:15 +0200)]
Version bump for 2.9.0 rc3

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

10 years agoAdd NEWS entry for 2.9.0 rc3
Klaus Aehlig [Fri, 11 Oct 2013 15:46:15 +0000 (17:46 +0200)]
Add NEWS entry for 2.9.0 rc3

The main news is, that we fixed another issue with the configuration
upgrading process.

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 [Mon, 14 Oct 2013 07:24:58 +0000 (09:24 +0200)]
Merge branch 'stable-2.8' into stable-2.9

* stable-2.8
 Improve harep documentation

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>

10 years agoRemove incorrect comment
Helga Velroyen [Fri, 11 Oct 2013 15:16:22 +0000 (17:16 +0200)]
Remove incorrect comment

Removing a comment which falsely states that Ganeti will
stop supporting certain upgrades at some point.

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

10 years agocfg auto update: match ipolicy with enabled disk templates
Helga Velroyen [Fri, 11 Oct 2013 09:33:41 +0000 (11:33 +0200)]
cfg auto update: match ipolicy with enabled disk templates

This patch fixes issue 599. The problem was that with 2.9,
a sanity check was introduced that made sure that the
ipolicies' set of disk templates is a subset of the
cluster-wide enabled disk templates. In order to make
upgrading from 2.8 smoother we add functionaliy to adapt
the ipolicies to the enabled disk templates.

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

10 years agoRemove obsolete configure option for shared file storage
Helga Velroyen [Fri, 11 Oct 2013 14:15:31 +0000 (14:15 +0000)]
Remove obsolete configure option for shared file storage

This patch removes an obsolete configure option related
to shared file storage. It was remove a while ago, but
accidentally reintroduced through a merge.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>

10 years agoFix typos and indentation for cluster.py
Helga Velroyen [Fri, 11 Oct 2013 14:07:33 +0000 (16:07 +0200)]
Fix typos and indentation for cluster.py

This patches fixes a typo and some indentation errors
that were accidentally introduced by premature pushing
of the patch series "Improvements on disk templates, in
particular file storage".

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>

10 years agoImprove harep documentation
Michele Tartara [Thu, 10 Oct 2013 14:03:44 +0000 (14:03 +0000)]
Improve harep documentation

Add a more complete description of how the tool works.

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

10 years agoQA: remove subsumed QA test wrt disk templates
Helga Velroyen [Wed, 9 Oct 2013 13:45:53 +0000 (15:45 +0200)]
QA: remove subsumed QA test wrt disk templates

This patch removes a QA test that was supposed to test
that unused disk templates can be disabled safely. The
test is now subsumed by unit tests and thus we remove it
here. Besides that, it was actually testing the wrong
thing, as it tested that a _used_ disk template could
be disabled.

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

10 years agoNEWS: mention restrictions wrt disabling disk templates
Helga Velroyen [Wed, 9 Oct 2013 13:16:29 +0000 (15:16 +0200)]
NEWS: mention restrictions wrt disabling disk templates

Mention the newly introduced feature, that disk templates
can no longer be disabled when there are instances still
using those.

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

10 years agoMove unit tests for --file-storage-dir to cmdlib/*
Helga Velroyen [Wed, 9 Oct 2013 11:50:28 +0000 (13:50 +0200)]
Move unit tests for --file-storage-dir to cmdlib/*

There were some unit tests for the '--file-storage-dir'
option of 'gnt-cluster modify' still left in the unit
test file ganeti.cmdlib.cluster_unittest.py.
With the introducion of the unit test framework for
cmdlib, they now get converted into
cmdlib/cluster_unittest.py.

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

10 years agoCorrect properties of the cluster's file storage dir
Helga Velroyen [Wed, 9 Oct 2013 12:16:40 +0000 (14:16 +0200)]
Correct properties of the cluster's file storage dir

This patch does:
- Rename the haskell opcode parameter
  'pGlobalFileStorageDir' and 'pGlobalSharedfileStorageDir'
  to 'pClusterFileStorageDir' and
  'pClusterSharedfileStorageDir', respectively, because
  the old name was misleading.
- The two parameters are made optional strings instead of
  non-empty strings. This actually used to be like this
  before, but was accidentally overriden by the switch to
  opcode generation from haskell to python.
- The ClusterFileStorageDir parameter had to be renamed in
  Haskell to not clash with the FileStorageDir parameter
  of the OpInstanceCreate code.

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

10 years agoMove disk template unit tests to test/py/cmdlib/
Helga Velroyen [Wed, 9 Oct 2013 11:34:26 +0000 (13:34 +0200)]
Move disk template unit tests to test/py/cmdlib/

This patch moves some unit tests related to dis/enabling
disk templates from ganeti.cmdlib.cluster_unittest.py
to cmdlib/cluster_unittest.py to utilized the new cmdlib
unit test framework.

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

10 years agoMake GetDiskTemplateSets output disabled disk templates
Helga Velroyen [Wed, 9 Oct 2013 10:48:23 +0000 (12:48 +0200)]
Make GetDiskTemplateSets output disabled disk templates

This patch extends the 'GetDiskTemplateSets' function to
also output the list of disk templates that were enabled
before this operation, but will be disabled afterwards.
This patch also includes code to check for instances using
disk templates that are about to be disabled.

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

10 years agoRename GetEnabledDiskTemplates to include disabled ones
Helga Velroyen [Wed, 9 Oct 2013 09:39:48 +0000 (11:39 +0200)]
Rename GetEnabledDiskTemplates to include disabled ones

This patch solely renames the functions
_GetEnabledDiskTemplates* to _GetDiskTemplateSets, because
in later patches, we will refactor it to not only output
disk templates that are or get enabled, but also the ones
that get disabled. The list of disabled disk templates
will be used for further sanity checks of operations.

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

10 years agoCheck for running instances when disabling templates
Helga Velroyen [Wed, 9 Oct 2013 09:24:03 +0000 (11:24 +0200)]
Check for running instances when disabling templates

This patch introduces a function to be used in
'gnt-cluster modify' when disabling a couple of disk
templates. It checks whether there are still instances
running that use these templates.

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

10 years agoMerge branch 'stable-2.9' into master
Klaus Aehlig [Wed, 9 Oct 2013 14:05:20 +0000 (16:05 +0200)]
Merge branch 'stable-2.9' into master

* stable-2.9
  Version bump for 2.9.0 rc2
  Update NEWS for 2.9.0 rc2
  Downgrade 'vif_script'
  Downgrade 'xen_cmd'
  Add test cluster config for version 2.9
  Remove superfluous import of 'errors'
  Start NEWS entry for 2.9.0 rc2
  Fix lint errors
  Fix upgrade and downgrade regarding disk.dev_type
  Rename LDS_DRBD to DTS_DRBD

* stable-2.8
  Fix typo in walkthrough documentation
  Don't attemp ipv6 ssh in case of ipv4 cluster
  Fix outdated documentation for users-setup

Conflicts:
NEWS: trivial
configure.ac: ignore suffix bump on stable-2.9
lib/constants.py: manually replay 66a37e on master
lib/objects.py: manually apply the LDS -> DTS change on master
test/data/cluster_config_2.9.json: take version of stable-2.9
tools/cfgupgrade: union of all Upgrade tasks, remove all downgrade paths from stable-2.9

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>

10 years agoSuggest running 'gnt-cluster upgrade --resume' at reboots
Klaus Aehlig [Wed, 9 Oct 2013 11:27:19 +0000 (13:27 +0200)]
Suggest running 'gnt-cluster upgrade --resume' at reboots

In the example crontab, add an entry to run 'gnt-cluster upgrade --resume'
upon reboot of the node, as suggested in the design document.

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

10 years agoMention 'gnt-cluster upgrade' in NEWS
Klaus Aehlig [Wed, 9 Oct 2013 11:13:23 +0000 (13:13 +0200)]
Mention 'gnt-cluster upgrade' in NEWS

We added a new command, so mention it as news.

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

10 years agoUpdate man page for 'gnt-cluster upgrade --resume'
Klaus Aehlig [Wed, 9 Oct 2013 11:03:44 +0000 (13:03 +0200)]
Update man page for 'gnt-cluster upgrade --resume'

This option is now implemented, and this change should be
mentioned in the man page. Also, document that it is safe
call on all nodes, and if no update was going on.

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

10 years agoNEWS: mention improvements on instance allocation
Helga Velroyen [Wed, 9 Oct 2013 08:16:41 +0000 (10:16 +0200)]
NEWS: mention improvements on instance allocation

This patch mentions the improvements of the iallocator
with respect to instance allocation of non-LVM disk
templates.

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

10 years agoUse 'DTS_LVM' when possible
Helga Velroyen [Tue, 8 Oct 2013 15:12:35 +0000 (17:12 +0200)]
Use 'DTS_LVM' when possible

This patch replaces all usages of the utility function
'GetLvmDiskTemplate' by the new 'DTS_LVM' constant
to make it consistant with the usage of other DTS_*
constants.

Additionally, it provides a unit tests to ensure
consistancy between DTS_LVM and the mapping of disk
templates and storage types.

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

10 years agoiallocator: use lookup by disk template
Helga Velroyen [Tue, 8 Oct 2013 12:20:43 +0000 (14:20 +0200)]
iallocator: use lookup by disk template

So far, the iallocator requested storage information
about all enabled disk templates but discarded all but
the LVM information, even if it was allocating space
for a non-LVM instance. With this patch, it now only
asks for the one that is relevant for
the allocation request.

This has the following advantages:
- less load in the RPC call
- meaningful storage information is used for non-LVM
  instance and thus better allocation

Note that this so far works only for instance allocation.
The code introduces some FIXMEs which will be resolved
when utilizing the improvements in other iallocator
requests as well.

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

10 years agoutils/storage.py: storage info lookup by disk template
Helga Velroyen [Tue, 8 Oct 2013 12:47:44 +0000 (14:47 +0200)]
utils/storage.py: storage info lookup by disk template

This patch improves the handling of storage information
before and after a call to the RPC 'node_info'. It
adds a function to not only call for all storage
information on the cluster (as it is used right now),
but to ask only for storage information for a particular
disk template. This way, in many cases, for example
by the iallocator, less information is requested and thus
performance is increased. Unit tests are provided.

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

10 years agoReplace GetLvmDiskTemplates by 'DTS_LVM'
Helga Velroyen [Tue, 8 Oct 2013 12:26:47 +0000 (14:26 +0200)]
Replace GetLvmDiskTemplates by 'DTS_LVM'

To reach consistency by how we manage different
categorizations of disk templates, this patch
introduces the set of disk templates which are lvm-based:
'DTS_LVM'.

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

10 years agoIf possible, replace symbolic links in place
Klaus Aehlig [Tue, 8 Oct 2013 16:09:26 +0000 (18:09 +0200)]
If possible, replace symbolic links in place

Naive 'ln -s -f a b' will put the link inside 'b', if
'b' is (a symlink to) a directory; so, during upgrades,
the links in $(sysconfdir) cannot be updated this way.
Removing and readding works, however leaves the risk
of the upgrade process dying in that very moment, thus
leaving 'gnt-cluster' a dangling link, so that the --resume
option is of no help. On GNU systems, avoid this problem
by using the -T option of GNU ln.

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

10 years agoMake information about GNU ln available to programs
Klaus Aehlig [Tue, 8 Oct 2013 15:10:09 +0000 (17:10 +0200)]
Make information about GNU ln available to programs

Propagate the information on whether we have the GNU version of ln
to all programs by making it available as a constant.

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

10 years agoAdd simple test whether ln is the GNU version
Klaus Aehlig [Tue, 8 Oct 2013 14:53:27 +0000 (16:53 +0200)]
Add simple test whether ln is the GNU version

If the GNU version is present, we can use certain GNU-extensions,
like the -T option, rendering some parts more robust.

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

10 years agoVersion bump for 2.9.0 rc2 v2.9.0rc2
Klaus Aehlig [Tue, 8 Oct 2013 12:57:54 +0000 (14:57 +0200)]
Version bump for 2.9.0 rc2

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

10 years agoUpdate NEWS for 2.9.0 rc2
Klaus Aehlig [Tue, 8 Oct 2013 12:56:24 +0000 (14:56 +0200)]
Update NEWS for 2.9.0 rc2

Document that we have also taken care of the bug in 'cfgupgrade --downgrade'
and schedule release date.

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

10 years agoFix 'AutoConf' import
Jose A. Lopes [Fri, 4 Oct 2013 17:51:40 +0000 (19:51 +0200)]
Fix 'AutoConf' import

Fix 'AutoConf' import to be qualified.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoFix import order
Jose A. Lopes [Mon, 7 Oct 2013 11:37:16 +0000 (13:37 +0200)]
Fix import order

Fix import order to be alphabetically sorted.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: improve auto repair
Jose A. Lopes [Fri, 4 Oct 2013 17:45:43 +0000 (19:45 +0200)]
Hs2Py constants: improve auto repair

Fix auto repair related constants to use the Haskell type 'AutoRepairResult' instead of simple 'String' values.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: opcodes
Jose A. Lopes [Fri, 4 Oct 2013 17:44:39 +0000 (19:44 +0200)]
Hs2Py constants: opcodes

Add opcode related constants to the Haskell to Python constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: node daemon setup
Jose A. Lopes [Fri, 4 Oct 2013 17:43:51 +0000 (19:43 +0200)]
Hs2Py constants: node daemon setup

Add node daemon setup related constants to the Haskell to Python constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: hail, opcode, and SSH
Jose A. Lopes [Fri, 4 Oct 2013 17:43:11 +0000 (19:43 +0200)]
Hs2Py constants: hail, opcode, and SSH

Add hail, opcode, and SSH related constants to the Haskell to Python constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: assorted constants
Jose A. Lopes [Fri, 4 Oct 2013 17:42:07 +0000 (19:42 +0200)]
Hs2Py constants: assorted constants

Add assorted constants to the Haskell to Python constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: UID pool
Jose A. Lopes [Fri, 4 Oct 2013 17:40:57 +0000 (19:40 +0200)]
Hs2Py constants: UID pool

Add UID pool related constants to the Haskell to Python constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: 'maxUdpDataSize'
Jose A. Lopes [Fri, 4 Oct 2013 17:40:01 +0000 (19:40 +0200)]
Hs2Py constants: 'maxUdpDataSize'

Add 'maxUdpDataSize' constant to the Haskell to Python constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: remove comments
Jose A. Lopes [Fri, 4 Oct 2013 17:39:09 +0000 (19:39 +0200)]
Hs2Py constants: remove comments

Remove several comment from 'lib/constants.py' because these have been moved to Haskell.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: assorted constants
Jose A. Lopes [Fri, 4 Oct 2013 17:36:28 +0000 (19:36 +0200)]
Hs2Py constants: assorted constants

Add some assorted constants to the Haskell to Python constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: 'ispecsMinmaxDefaults'
Jose A. Lopes [Fri, 4 Oct 2013 17:35:40 +0000 (19:35 +0200)]
Hs2Py constants: 'ispecsMinmaxDefaults'

Add 'ispecsMinmaxDefaults' to the Haskell to Python constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: 'hvcGlobals' and 'ndcGlobals'
Jose A. Lopes [Fri, 4 Oct 2013 17:34:16 +0000 (19:34 +0200)]
Hs2Py constants: 'hvcGlobals' and 'ndcGlobals'

Add 'hvcGlobals' and 'ndcGlobals' to the Haskell to Python constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: 'defaultEnabledHypervisor'
Jose A. Lopes [Fri, 4 Oct 2013 17:32:44 +0000 (19:32 +0200)]
Hs2Py constants: 'defaultEnabledHypervisor'

Add 'defaultEnabledHypervisor' to the Haskell to Python constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: SSCONF
Jose A. Lopes [Fri, 4 Oct 2013 17:32:01 +0000 (19:32 +0200)]
Hs2Py constants: SSCONF

Add SSCONF related constants to the Haskell to Python constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: dynamic devices
Jose A. Lopes [Fri, 4 Oct 2013 17:30:51 +0000 (19:30 +0200)]
Hs2Py constants: dynamic devices

Add dynamic devices related constants to the Haskell to Python constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: HT related constants
Jose A. Lopes [Fri, 4 Oct 2013 17:29:56 +0000 (19:29 +0200)]
Hs2Py constants: HT related constants

Add HT related constants to the Haskell to Python constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2py constants: query resources
Jose A. Lopes [Fri, 4 Oct 2013 17:27:12 +0000 (19:27 +0200)]
Hs2py constants: query resources

Add query resources related constants to the Haskell to Python constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: '/etc/hosts' and job queue
Jose A. Lopes [Fri, 4 Oct 2013 17:24:55 +0000 (19:24 +0200)]
Hs2Py constants: '/etc/hosts' and job queue

Add '/etc/hosts' and job queue related constants to the Haskell to Python constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: VNC
Jose A. Lopes [Fri, 4 Oct 2013 17:23:01 +0000 (19:23 +0200)]
Hs2Py constants: VNC

Add VNC related constants to the Haskell to Python constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: SSL, job queue, and locks
Jose A. Lopes [Fri, 4 Oct 2013 17:21:17 +0000 (19:21 +0200)]
Hs2Py constants: SSL, job queue, and locks

Add SSL, job queue, and locks related constants to the Haskell to Python constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: node verify
Jose A. Lopes [Fri, 4 Oct 2013 16:35:33 +0000 (18:35 +0200)]
Hs2Py constants: node verify

Add node verify constants to the Haskell to Python constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: assorted, idisk, and inic
Jose A. Lopes [Mon, 7 Oct 2013 08:49:39 +0000 (10:49 +0200)]
Hs2Py constants: assorted, idisk, and inic

Add assorted, idisk, and inic related constants to the Haskell to
Python constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: nics
Jose A. Lopes [Fri, 4 Oct 2013 16:28:12 +0000 (18:28 +0200)]
Hs2Py constants: nics

Add nics related constants to the Haskell to Python constant
generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constant: DRBD and dynamic disk
Jose A. Lopes [Mon, 7 Oct 2013 08:03:23 +0000 (10:03 +0200)]
Hs2Py constant: DRBD and dynamic disk

Add DRBD and dynamic disk parameter constants to the Haskell to Python
constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: backend and logical disks
Jose A. Lopes [Mon, 7 Oct 2013 08:18:07 +0000 (10:18 +0200)]
Hs2Py constants: backend and logical disks

Add backend and logical disks related constants to the Haskell to
Python constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: HVST and disk state
Jose A. Lopes [Mon, 7 Oct 2013 08:12:23 +0000 (10:12 +0200)]
Hs2Py constants: HVST and disk state

Add HVST and disk state related constants to the Haskell to Python
constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: assorted and HVS
Jose A. Lopes [Mon, 7 Oct 2013 08:11:45 +0000 (10:11 +0200)]
Hs2Py constants: assorted and HVS

Add asserted and HVS related constants to the Haskell to Python constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: move reboot types
Jose A. Lopes [Fri, 4 Oct 2013 16:12:01 +0000 (18:12 +0200)]
Hs2Py constants: move reboot types

Move constants 'instanceReboot*' to correct place according to
'lib/constants.py'.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: reboot behaviour
Jose A. Lopes [Fri, 4 Oct 2013 16:11:46 +0000 (18:11 +0200)]
Hs2Py constants: reboot behaviour

Add reboot behaviour constants to the Haskell to Python constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: scripts and actions
Jose A. Lopes [Mon, 7 Oct 2013 08:38:11 +0000 (10:38 +0200)]
Hs2Py constants: scripts and actions

Add script and action related constants to the Haskell to Python
constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: move 'ipCommandPath'
Jose A. Lopes [Fri, 4 Oct 2013 16:08:52 +0000 (18:08 +0200)]
Hs2Py constants: move 'ipCommandPath'

Move constant 'ipCommandPath' to the appropriate place according to
'lib/constants.py'.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: 'jobIdsKey', 'runparts' and 'rpc'
Jose A. Lopes [Fri, 4 Oct 2013 16:08:36 +0000 (18:08 +0200)]
Hs2Py constants: 'jobIdsKey', 'runparts' and 'rpc'

Add several groups of constants to the Haskell to Python constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: 'diskTransferConnectTimeout'
Jose A. Lopes [Fri, 4 Oct 2013 16:07:15 +0000 (18:07 +0200)]
Hs2Py constants: 'diskTransferConnectTimeout'

Add 'diskTransferConnectTimeout' constant to the Haskell to Python constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: remove comments
Jose A. Lopes [Fri, 4 Oct 2013 16:06:14 +0000 (18:06 +0200)]
Hs2Py constants: remove comments

Remove useless comments from 'lib/constants.py'.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: network related
Jose A. Lopes [Fri, 4 Oct 2013 16:03:36 +0000 (18:03 +0200)]
Hs2Py constants: network related

Add network related constants to the Haskell to Python constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: add import/export config
Jose A. Lopes [Fri, 4 Oct 2013 16:02:04 +0000 (18:02 +0200)]
Hs2Py constants: add import/export config

Add import/export config constants to the Haskell to Python constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: add 'RIE' related
Jose A. Lopes [Fri, 4 Oct 2013 16:01:12 +0000 (18:01 +0200)]
Hs2Py constants: add 'RIE' related

Add remote import/export related constants to the Haskell to Python constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: add DRBD and RBD
Jose A. Lopes [Fri, 4 Oct 2013 15:57:04 +0000 (17:57 +0200)]
Hs2Py constants: add DRBD and RBD

Add DRBD and RBD related constants to the Haskell to Python constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: storage related groups
Jose A. Lopes [Fri, 4 Oct 2013 15:54:40 +0000 (17:54 +0200)]
Hs2Py constants: storage related groups

Add several groups of storage related constants to the Haskell to Python constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: add several groups of constants
Jose A. Lopes [Fri, 4 Oct 2013 15:42:51 +0000 (17:42 +0200)]
Hs2Py constants: add several groups of constants

Add several groups of constants, namely, console types, security, I/O
compression, import/export, hooks, and hkr related, to the Haskell to
Python constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: add 2 more constants
Jose A. Lopes [Fri, 4 Oct 2013 15:29:55 +0000 (17:29 +0200)]
Hs2Py constants: add 2 more constants

Add 2 more constants to the Haskell to Python constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

10 years agoHs2Py constants: add CPU pinning
Jose A. Lopes [Fri, 4 Oct 2013 15:25:18 +0000 (17:25 +0200)]
Hs2Py constants: add CPU pinning

Add CPU pinning constants to the Haskell to Python constant
generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>