ganeti-local
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 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 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 agoMerge branch 'stable-2.8' into stable-2.9
Klaus Aehlig [Tue, 8 Oct 2013 11:45:00 +0000 (13:45 +0200)]
Merge branch 'stable-2.8' into stable-2.9

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

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

10 years agoFix typo in walkthrough documentation
Jose A. Lopes [Tue, 8 Oct 2013 11:26:47 +0000 (13:26 +0200)]
Fix typo in walkthrough documentation

Fix typo in walkthrough documentation, where 'instance3' should read
'instance1' in order to be consistent with the output below in the
example.

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

10 years agoDowngrade 'vif_script'
Helga Velroyen [Tue, 8 Oct 2013 09:35:30 +0000 (11:35 +0200)]
Downgrade 'vif_script'

This patch adds removing the 'vif_script' attribute
from the cluster's config when downgrading from 2.9
to 2.8. Adaption of the unit test is included.

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

10 years agoDowngrade 'xen_cmd'
Helga Velroyen [Tue, 8 Oct 2013 09:00:42 +0000 (11:00 +0200)]
Downgrade 'xen_cmd'

This downgrades the cluster's hypervisor parameters for the
xen hypervisors with respect to the 'xen_cmd' attribute.
A unit tests is provided.

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

10 years agoAdd test cluster config for version 2.9
Helga Velroyen [Tue, 8 Oct 2013 09:09:35 +0000 (11:09 +0200)]
Add test cluster config for version 2.9

This adds a cluster config example for version 2.9 to
the test data collection. It will be used in subsequent
tests.

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

10 years agoRemove superfluous import of 'errors'
Helga Velroyen [Tue, 8 Oct 2013 09:03:06 +0000 (11:03 +0200)]
Remove superfluous import of 'errors'

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

10 years agoDon't attemp ipv6 ssh in case of ipv4 cluster
Costas Drogos [Thu, 3 Oct 2013 09:37:14 +0000 (12:37 +0300)]
Don't attemp ipv6 ssh in case of ipv4 cluster

In case of a cluster with primary-ip-version=4, there is no need
for cluster to try ipv6 ssh connections which may timeout.
So append '-4' on ssh if cluster is ipv4-only

Signed-off-by: Costas Drogos <costas.drogos@gmail.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

10 years agoMerge branch 'stable-2.8' into stable-2.9
Klaus Aehlig [Mon, 7 Oct 2013 15:10:42 +0000 (17:10 +0200)]
Merge branch 'stable-2.8' into stable-2.9

* stable-2.8
  Fix outdated documentation for users-setup

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

10 years agoStart NEWS entry for 2.9.0 rc2
Klaus Aehlig [Mon, 7 Oct 2013 14:06:12 +0000 (16:06 +0200)]
Start NEWS entry for 2.9.0 rc2

So far, there is one important change since 2.9.0 rc1, the fix
in cfgupgrade.

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

10 years agoFix lint errors
Helga Velroyen [Mon, 7 Oct 2013 14:01:06 +0000 (16:01 +0200)]
Fix lint errors

This fixes a couple of lint errors that I missed with
the patch "Fix upgrade and downgrade regarding
disk.dev_type".

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

10 years agoFix upgrade and downgrade regarding disk.dev_type
Helga Velroyen [Mon, 7 Oct 2013 11:00:01 +0000 (13:00 +0200)]
Fix upgrade and downgrade regarding disk.dev_type

The up/downgrade procedure so far did not consider the
changes in the 'dev_type' attribute of disks. This patch
adds relevant checks and updates. A related problem
was that the logical IDs of disks were adjusted depending
on the dev_type, which made the order of updates not
arbitrary anymore. To make this more robust, the upgrade
procedure also considers the old versions of dev_types
(at least for 2.9).

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

10 years agoRename LDS_DRBD to DTS_DRBD
Helga Velroyen [Mon, 7 Oct 2013 11:50:07 +0000 (13:50 +0200)]
Rename LDS_DRBD to DTS_DRBD

This patch renames the constant 'LDS_DRBD' to 'DTS_DRBD'
to make it consistent with the renaming of LD_* constants
to DT_* constants.

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

10 years agoFix outdated documentation for users-setup
Michele Tartara [Mon, 7 Oct 2013 07:51:30 +0000 (07:51 +0000)]
Fix outdated documentation for users-setup

The --yes-do-it parameter was not properly documented yet. Add it to the
administration guide.

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

10 years agoVersion bump for 2.9.0 rc1 v2.9.0rc1
Klaus Aehlig [Mon, 30 Sep 2013 14:57:51 +0000 (16:57 +0200)]
Version bump for 2.9.0 rc1

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

10 years agoUpdate NEWS for 2.9.0 rc1
Klaus Aehlig [Mon, 30 Sep 2013 14:57:11 +0000 (16:57 +0200)]
Update NEWS for 2.9.0 rc1

Make the main 2.9 entry now describe 2.9.0 rc1
and a short "Since 2.9.0 beta1" section.

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

10 years agoconfigure: check for hslogger
Klaus Aehlig [Mon, 30 Sep 2013 11:06:01 +0000 (13:06 +0200)]
configure: check for hslogger

As hslogger is, from 2.9 onwards, a mandatory dependency,
check for it unconditionally.

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

10 years agoDocument hslogger dependency in NEWS
Klaus Aehlig [Mon, 30 Sep 2013 11:13:34 +0000 (13:13 +0200)]
Document hslogger dependency in NEWS

hslogger is now no longer optional (as it used to be in 2.8). Update
the NEWS file accordingly.

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

10 years agoUpdate INSTALL: hslogger is mandatory
Klaus Aehlig [Mon, 30 Sep 2013 11:11:26 +0000 (13:11 +0200)]
Update INSTALL: hslogger is mandatory

hslogger is a mandatory Haskell dependency form 2.9 onwards. Hence
update the INSTALL instructions accordingly.

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

10 years agoUpdate installation instruction for Debian
Klaus Aehlig [Mon, 30 Sep 2013 09:14:25 +0000 (11:14 +0200)]
Update installation instruction for Debian

In the instructions on how to install Ganeti on Debian, have
the commands for Wheezy as default and mention the commands for
Squeeze as other versions, rather than defaulting to Squeeze.

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

10 years agoAdd documentation for diskstats collector
Michele Tartara [Mon, 30 Sep 2013 09:09:17 +0000 (11:09 +0200)]
Add documentation for diskstats collector

The data collector for /proc/diskstats was undocumented. Add an entry for it in
the mon-collector man page.

Also, remove some end of line whitespaces from the file.

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
Klaus Aehlig [Mon, 30 Sep 2013 07:45:54 +0000 (09:45 +0200)]
Merge branch 'stable-2.8' into stable-2.9

* stable-2.8
  Fix wrong release date in the NEWS file
  Version bump for 2.8.0
  Add daemon split design doc

* stable-2.7
  Version bump for 2.7.2

Conflicts:
Makefile.am
NEWS
configure.ac
doc/design-draft.rst
configure.ac: ignore version change in stable-2.8
rest: take both additions

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

10 years agoFix wrong release date in the NEWS file v2.8.0
Michele Tartara [Fri, 27 Sep 2013 13:02:14 +0000 (15:02 +0200)]
Fix wrong release date in the NEWS file

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

10 years agoVersion bump for 2.8.0
Michele Tartara [Fri, 27 Sep 2013 12:32:58 +0000 (14:32 +0200)]
Version bump for 2.8.0

Also, update the NEWS file accordingly.

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

10 years agoAdd daemon split design doc
Michele Tartara [Tue, 6 Aug 2013 15:19:49 +0000 (15:19 +0000)]
Add daemon split design doc

This describes the future planned structure of Ganeti daemons.

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

10 years agoMake the inst-status-xen collector more resilient
Michele Tartara [Thu, 26 Sep 2013 16:49:21 +0000 (16:49 +0000)]
Make the inst-status-xen collector more resilient

The data collectors should be able to provide as much information as possible
even when the system is badly degraded. This patch modifies the instance status
collector for xen so that it can keep providing as much data as possible, even
when some of the queries it performs fail, by removing exitIfBad calls and
substituting them with logging and returning empty fields instead.

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

10 years agoUse secondary IP when moving instances
Thomas Thrainer [Thu, 26 Sep 2013 09:12:35 +0000 (11:12 +0200)]
Use secondary IP when moving instances

All data traffic usually goes over the secondary network, but
gnt-instance move didn't. This patch corrects this problem by using the
target nodes secondary IP as move target.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
(cherry picked from commit f56ab6d13212868e3ebffd14c05746dab8fb1103)

10 years agoMerge branch 'stable-2.7' into stable-2.8
Michele Tartara [Thu, 26 Sep 2013 11:32:57 +0000 (13:32 +0200)]
Merge branch 'stable-2.7' into stable-2.8

Conflicts are trivially solved.

* stable-2.7
  Version bump for 2.7.2 (updated NEWS file)

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

Conflicts:
NEWS
configure.ac

10 years agoVersion bump for 2.7.2 v2.7.2
Michele Tartara [Thu, 26 Sep 2013 07:53:10 +0000 (09:53 +0200)]
Version bump for 2.7.2

Change the version number and the NEWS file for the 2.7.2 bugfix release.

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

10 years agoMerge branch 'stable-2.8' into stable-2.9
Klaus Aehlig [Wed, 25 Sep 2013 11:53:24 +0000 (13:53 +0200)]
Merge branch 'stable-2.8' into stable-2.9

* stable-2.8
  Add additional tests for utils.Retry
  Make retry tests independent of actual time
  Fix corner-case in handling of remaining retry time
  Perform proper cleanup on termination of Haskell daemons

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

10 years agoIncluding missing RST files in packaging
Robin H. Johnson [Sat, 21 Sep 2013 18:50:42 +0000 (18:50 +0000)]
Including missing RST files in packaging

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>

The patch was released by the author into the public domain.

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

10 years agoUpdate supported lint tools version numbers
Michele Tartara [Mon, 8 Jul 2013 07:50:34 +0000 (07:50 +0000)]
Update supported lint tools version numbers

Linting is now verified against the lint tools version numbers as listed in this
patch.

These version are corresponding to the ones that can be found in the
repositories of Ubuntu 13.04.

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

10 years agoFix some wrong indentations in the code
Michele Tartara [Tue, 24 Sep 2013 16:41:41 +0000 (16:41 +0000)]
Fix some wrong indentations in the code

Fix all instances of pep8's error: "E128 continuation line under-indented for
visual indent".

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

10 years agoDisable parenthesis indentation check
Michele Tartara [Tue, 24 Sep 2013 16:29:37 +0000 (16:29 +0000)]
Disable parenthesis indentation check

More recent versions of pep8 check for the indentation level of closing
parenthesis in a way that is incompatible with the way we use in our code. Our
style is still pep8 compliant, and was re-allowed in even more recent versions
of the tool, but still we have to disable the check, for the time being.

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

10 years agoFix an improperly escaped string
Michele Tartara [Tue, 24 Sep 2013 14:56:42 +0000 (16:56 +0200)]
Fix an improperly escaped string

Mark a string representing a "sed" command including a regular expression as a
raw string, so that the entire escaping is performed by "sed" itself.

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

10 years agoMake QaConfig a proper container
Michele Tartara [Tue, 24 Sep 2013 14:43:56 +0000 (14:43 +0000)]
Make QaConfig a proper container

Newer pylint versions complain that QaConfig is not a proper container because
it does not implement the __len__(), __delitem__() and __setitem__() methods.
This commit implements them.

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

10 years agoMake QmpMessage a proper container
Michele Tartara [Tue, 24 Sep 2013 13:26:54 +0000 (13:26 +0000)]
Make QmpMessage a proper container

Newer pylint versions complain that QmpMessage is not a proper container because
it does not implement the __len__() and __delitem__() methods. This commit
implements them.

Also, tests are added.

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

10 years agoPrevent static field checking for dynamic classes
Michele Tartara [Tue, 24 Sep 2013 14:22:59 +0000 (14:22 +0000)]
Prevent static field checking for dynamic classes

In order to check for the correctness of the accesses to fields of objects,
pylint uses astng, but this is known to fail on some dynamically generated
classes. Still, newer pylint versions are stricter at performing this check, and
therefore fail while testing our codebase. Disable the checking of a few
selected classes that incur in this problem.

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

10 years agoFix metaclasses support in recent pylint versions
Michele Tartara [Tue, 24 Sep 2013 12:47:53 +0000 (12:47 +0000)]
Fix metaclasses support in recent pylint versions

Recent versions of pylint require the first parameter of a metaclass to be
"cls". Older versions want "mcs". There's no way to support both by changing the
code, so the configuration file of pylint is changed instead, to have the
current codebase work with both versions.

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

10 years agoAdd additional tests for utils.Retry
Klaus Aehlig [Fri, 20 Sep 2013 11:45:47 +0000 (13:45 +0200)]
Add additional tests for utils.Retry

Also have some tests where the time the various components
(inspecting the time function, calling the function, etc) have
a non-trivial time. Also, have two tests demonstrating that
the number of retries actually depends on the amount of time
the function takes to complete.

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

10 years agoMake retry tests independent of actual time
Klaus Aehlig [Thu, 19 Sep 2013 15:05:29 +0000 (17:05 +0200)]
Make retry tests independent of actual time

Even in the tests, real time is used. While, generally, the assumptions
about execution time are pretty safe, in some rare circumstances, e.g.,
on machines with extremely heavy load they do not hold true, thus rendering
the tests flaky. Fix this, by mocking time.

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

10 years agoFix corner-case in handling of remaining retry time
Klaus Aehlig [Thu, 19 Sep 2013 16:12:21 +0000 (18:12 +0200)]
Fix corner-case in handling of remaining retry time

Consider a remaining time of 0 as already timed out. Otherwise,
there is no guarantee that calling utils.Retry with timeout 0
will call the function precisely once; it might run in time
shorter than the resolution of timer.

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

10 years agoPerform proper cleanup on termination of Haskell daemons
Michele Tartara [Wed, 18 Sep 2013 13:38:18 +0000 (15:38 +0200)]
Perform proper cleanup on termination of Haskell daemons

Haskell deamons did not perform proper cleanup at termination. There was no code
for removing the pid file, and the code in LuxiD for removing the unix socket
file was not working, because it is implemented with a "finally" statement,
which is executed only when the main loop of the daemon is exited (either
normally, or through an exception), but not when it is terminated by a SIGTERM.

This commit adds a proper handler for SIGTERM, which transforms it into a
successful termination exception. This allows both the newly added cleanup code
for pid files and the unmodified cleanup code for unix sockets to be executed.

Fixes Issue 581 and 582.

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

10 years agoFix strings invalid with newer lint versions
Michele Tartara [Tue, 17 Sep 2013 15:33:48 +0000 (15:33 +0000)]
Fix strings invalid with newer lint versions

Generating ASCII characters via a supported but not official escape sequence
leads to a "Anomalous backslash in string" error in newer pylint versions. This
patch fixes the issue.

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

10 years agoFix incorrect conflict resolution in lib/cmdlib/instance.py
Klaus Aehlig [Tue, 17 Sep 2013 12:36:56 +0000 (14:36 +0200)]
Fix incorrect conflict resolution in lib/cmdlib/instance.py

Between the last two merges, nothing happened on stable-2.9. The
only change on stable-2.8 that touched lib/cmdlib/instance.py is
ff34fb97. So make sure, the net change since the last merge to
this file is that of the said commit. This also fixes the doclint
errors.

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

10 years agoMerge branch 'stable-2.8' into stable-2.9
Klaus Aehlig [Tue, 17 Sep 2013 09:59:36 +0000 (11:59 +0200)]
Merge branch 'stable-2.8' into stable-2.9

* stable-2.8
  Add a default to file-driver when unspecified over RAPI
  Remove typo from RAPI documentation
  Describe the files in doc/users in NEWS
  Update the upgrade procedure

* stable-2.7
  Fix incorrect manpage reference to htools

Conflicts:
NEWS
configure.ac
lib/cmdlib/instance.py
man/hroller.rst

All trivial, except for man/hrooler.rst, where the
fix in the section number was manually applied to the
new text.

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

10 years agoVersion bump for 2.8 rc3 v2.8.0rc3
Michele Tartara [Tue, 17 Sep 2013 08:43:02 +0000 (10:43 +0200)]
Version bump for 2.8 rc3

Also, add to the NEWS file a couple of items that were still missing.

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

10 years agoMerge branch 'stable-2.7' into stable-2.8
Klaus Aehlig [Mon, 16 Sep 2013 11:52:45 +0000 (13:52 +0200)]
Merge branch 'stable-2.7' into stable-2.8

* stable-2.7
  Fix incorrect manpage reference to htools

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

10 years agoFix incorrect manpage reference to htools
Martin Zobel-Helas [Mon, 16 Sep 2013 11:42:46 +0000 (13:42 +0200)]
Fix incorrect manpage reference to htools

the manpages for hcheck, hinfo and hroller have an incorrect reference
to htools(7) which does not exist. This patch links them to htools(1).

This bug also fixes Debian BTS#721824 (http://bugs.debian.org/721824)

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

10 years agoAdd a default to file-driver when unspecified over RAPI
Michele Tartara [Mon, 16 Sep 2013 11:06:31 +0000 (11:06 +0000)]
Add a default to file-driver when unspecified over RAPI

The file-driver value, used by file-based instances, had a default value when
an instance was being created over the CLI, but not when the instance was
created through the RAPI.

This patch introduces a default value for the remote API and, while doing so,
also centralizes in a single place the definition of such a value, for both the
interfaces, in order to remove the possibility for them to be out of sync.

Fixes Issue 571.

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

10 years agoRemove typo from RAPI documentation
Michele Tartara [Fri, 13 Sep 2013 09:27:51 +0000 (09:27 +0000)]
Remove typo from RAPI documentation

"be used instead." was repeated twice.

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

10 years agoDescribe the files in doc/users in NEWS
Klaus Aehlig [Thu, 12 Sep 2013 09:38:24 +0000 (11:38 +0200)]
Describe the files in doc/users in NEWS

While only a small feature, the files in doc/users can influence
the way ganeti is packaged. Hence it should be mentioned in the
news file.

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

10 years agoUpdate the upgrade procedure
Klaus Aehlig [Thu, 12 Sep 2013 09:08:34 +0000 (11:08 +0200)]
Update the upgrade procedure

Now that users-setup asks for confirmation, explain in the
procedure how asking for this confirmation can be skipped.
This skipping is particularly important for users following
the recommendation of using the distributed shell (dsh).

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

10 years agoMerge branch 'stable-2.8' into stable-2.9
Thomas Thrainer [Thu, 12 Sep 2013 08:55:43 +0000 (10:55 +0200)]
Merge branch 'stable-2.8' into stable-2.9

* stable-2.8
  Make tools/users-setup explain its actions first
  Generate tools/users-setup from descriptions
  Provide ganeti user and group data in easy-to-parse form
  Remove dsahostkeypub during config downgrade
  Mark the DSA host pubkey as optional
  Fix documentation for gnt-node evacuate -p option

Conflicts:
Makefile.am (trivial)
tools/cfgupgrade (removed downgrade code to 2.7)

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

10 years agoMake tools/users-setup explain its actions first
Klaus Aehlig [Wed, 11 Sep 2013 09:00:15 +0000 (11:00 +0200)]
Make tools/users-setup explain its actions first

Before doing any changes, make tools/users-setup explain its
actions first, and ask the user for confirmation. If the first
argument is --yes-do-it, this step will be skipped.

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

10 years agoGenerate tools/users-setup from descriptions
Klaus Aehlig [Wed, 11 Sep 2013 08:27:23 +0000 (10:27 +0200)]
Generate tools/users-setup from descriptions

Now that we have a machine readable description of the users
to be added to the system, use it to generate the tools/users-setup
script, so that we again have only one authoritative source of
the user and group requirements. This also has the advantage of
of avoiding duplicate additions and attemps add a user root.

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

10 years agoProvide ganeti user and group data in easy-to-parse form
Klaus Aehlig [Tue, 10 Sep 2013 16:00:23 +0000 (18:00 +0200)]
Provide ganeti user and group data in easy-to-parse form

Upon build time, also generate, in the directory doc/users, files
containing the groups, the users with their primary group, and the
additional groupmemberships to be added. In this way, packages can use
their own way of adding users to the system, instead of telling the
adiministrator to run tools/users-setup.

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

10 years agoFix bridging in net-common
Sebastian Gebhard [Wed, 4 Sep 2013 13:12:02 +0000 (13:12 +0000)]
Fix bridging in net-common

Bridging does not work correctly in net-common. The parameters passed
by Ganeti are put in /var/run/ganeti/xen-hypervisor/nic/$domname/$devid
and read again from there before running the setup functions according
to the $MODE which is read from the file.

When using MODE=bridged, the script expects to get the name of the
bridge passed as $BRIDGE, but is actually stored and passed as $LINK.
This patch fixes the issue.

Signed-off-by: Sebastian Gebhard <sege@fs.ei.tum.de>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

10 years agoRemove dsahostkeypub during config downgrade
Apollon Oikonomopoulos [Sun, 1 Sep 2013 20:37:08 +0000 (23:37 +0300)]
Remove dsahostkeypub during config downgrade

Remove the newly-added DSA host public key field from the configuration file
when downgrading to 2.7, if present. Otherwise masterd will refuse to start.

Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

10 years agoMark the DSA host pubkey as optional
Apollon Oikonomopoulos [Sun, 1 Sep 2013 20:36:29 +0000 (23:36 +0300)]
Mark the DSA host pubkey as optional

Commit a9542a4 introduced support for DSA SSH keys. However, the dsahostkeypub
field added to the config is not marked as optional in the Haskell components.
As a result, luxid thinks the config file is corrupt and refuses to start. We
fix this by marking the dsahostkeypub as an optionalField.

This fixes issue 560.

Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

10 years agoSync build_chroot with buildbot slack role
Michele Tartara [Fri, 30 Aug 2013 12:25:22 +0000 (14:25 +0200)]
Sync build_chroot with buildbot slack role

Keep the build_chroot script as similar as possible to the buildbot's slack role
for squeeze.

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

10 years agoAuto-upgrade of disks' config wrt LD-renaming
Helga Velroyen [Thu, 29 Aug 2013 12:30:02 +0000 (14:30 +0200)]
Auto-upgrade of disks' config wrt LD-renaming

This patch adds auto-upgrade functionality to the disk
objects with respected to the switch from LD constants
to DT constants. Unit tests are provided.

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

10 years agoFix tests regarding DISK_LD_DEFAULTS
Helga Velroyen [Thu, 29 Aug 2013 07:52:29 +0000 (09:52 +0200)]
Fix tests regarding DISK_LD_DEFAULTS

This fixes two remaining issues regarding the renaming
of DISK_LD_DEFAULTS:

- The keys of the map DISK_LD_DEFAULTS cannot be compared
to DISK_TEMPLATES right away, because there are no
defaults for the diskless template. This patch adjusts
the test.

- The test data for the LV collector of the monitoring
agent needed to be adjusted to the new usage of the
DT constants.

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

10 years agoFixing renaming of DISK_LD_DEFAULTS
Helga Velroyen [Wed, 28 Aug 2013 16:46:10 +0000 (18:46 +0200)]
Fixing renaming of DISK_LD_DEFAULTS

This fixes the somewhat over-eager renaming of
DISK_LD_DEFAULTS to DISK_DT_DEFAULTS, which clashes
with another occurence of DISK_DT_DEFAULTS. This
patch just undoes the renaming and additionally fixes
a test regarding shared file storage.

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

10 years agoFix documentation for gnt-node evacuate -p option
Leon Handreke [Wed, 28 Aug 2013 15:10:49 +0000 (16:10 +0100)]
Fix documentation for gnt-node evacuate -p option

Update the documentation to remove the claim that the --primary-only
option results in data copies while in fact it only fails over/migrates
the all primary instances.

Signed-off-by: Leon Handreke <lhandreke@google.com>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

10 years agoReplace LD_* constants with DT_* constants
Helga Velroyen [Tue, 27 Aug 2013 13:38:58 +0000 (15:38 +0200)]
Replace LD_* constants with DT_* constants

LD_* constants are basically like DT_* constants, except
for that both file and shared file were mapped to file.
In order to not having to maintain three slightly different
sets of disk-related constants (DT, LD and ST), we merge
DT and LD here. This patch does the renaming of the
various constants and then fixes the handling of shared
file disks.

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

10 years agoQA: fix file storage QA wrt ipolicy
Helga Velroyen [Tue, 27 Aug 2013 13:15:18 +0000 (15:15 +0200)]
QA: fix file storage QA wrt ipolicy

Ipolicy-allowed disk templates are now dependend on the
cluster-wide enabled disk-templates. The QA for file
storage did not consider this updated logic so far.

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

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>