ganeti-local
10 years agoBump revision for 2.9.1 v2.9.1
Klaus Aehlig [Tue, 12 Nov 2013 15:44:22 +0000 (16:44 +0100)]
Bump revision for 2.9.1

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

10 years agoUpdate NEWS and schedule release for 2.9.1
Klaus Aehlig [Tue, 12 Nov 2013 15:43:46 +0000 (16:43 +0100)]
Update NEWS and schedule release for 2.9.1

Now that issue 608 fixed, schedule a new release date
for 2.9.1.

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

10 years agoFix retrieval of xen command in class method
Helga Velroyen [Tue, 12 Nov 2013 13:45:53 +0000 (14:45 +0100)]
Fix retrieval of xen command in class method

This patch fixes issue 608. When introducing the
configurability of the xen toolstack in commit
8ef418bb92, the hypervisor api was accidentally changed
in a way that let to this error in KVM.

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

10 years agoFix docstring for ganeti.storage.filestorage_unittest.py
Santi Raffa [Mon, 11 Nov 2013 17:44:29 +0000 (18:44 +0100)]
Fix docstring for ganeti.storage.filestorage_unittest.py

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

10 years agoUndo revision bump
Klaus Aehlig [Fri, 8 Nov 2013 16:06:09 +0000 (17:06 +0100)]
Undo revision bump

Before releasing 2.9.2, we still have issue 608 to fix; if
no release date is set, we still have to be at the lower
version.

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

10 years agoPostpone release of 2.9.1
Klaus Aehlig [Fri, 8 Nov 2013 15:08:55 +0000 (16:08 +0100)]
Postpone release of 2.9.1

...until issue 608 is fixed.

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

10 years agoRevision bump for 2.9.1
Klaus Aehlig [Thu, 7 Nov 2013 15:21:46 +0000 (16:21 +0100)]
Revision bump for 2.9.1

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

10 years agoUpdate NEWS for 2.9.1 release
Klaus Aehlig [Thu, 7 Nov 2013 15:20:23 +0000 (16:20 +0100)]
Update NEWS for 2.9.1 release

Add a section in the file for the new upcoming release. Besides
the fix of the DRBD race condition inherited from 2.8.2, this
also fixes handling and readding of offline nodes.

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

10 years agoReadd nodes as online
Klaus Aehlig [Thu, 7 Nov 2013 14:19:22 +0000 (15:19 +0100)]
Readd nodes as online

Patch d0d7d7cf accidentally removed the offline-flag reset
when readding a node. Readd it.

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

10 years agoWhen verifying BRBD version, ignore missing values
Klaus Aehlig [Thu, 7 Nov 2013 13:42:10 +0000 (14:42 +0100)]
When verifying BRBD version, ignore missing values

When comparing for consistency of the DRBD versions, some
versions might not be available via RPC, typically, if the
node is offline. In this case, leave these nodes out of the
test, instead of failing with an internal python error.

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

10 years agoMerge branch 'stable-2.8' into stable-2.9
Klaus Aehlig [Thu, 7 Nov 2013 12:37:08 +0000 (13:37 +0100)]
Merge branch 'stable-2.8' into stable-2.9

* stable-2.8
  Version bump for 2.8.2
  Update NEWS file for 2.8.2 release
  DRBD: ensure peers are UpToDate for dual-primary

Conflicts:
NEWS: trivial
configure.ac: ignore version bump on stable-2.8
lib/bdev.py: manually apply the part of commit
            73e15b5e that applies to lib/bdev.py to
            lib/storage/drbd_info.py, and keep lib/bdev.py
            removed

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

10 years agoVersion bump for 2.8.2 v2.8.2
Michele Tartara [Wed, 6 Nov 2013 12:26:24 +0000 (12:26 +0000)]
Version bump for 2.8.2

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

10 years agoUpdate NEWS file for 2.8.2 release
Michele Tartara [Wed, 6 Nov 2013 12:25:16 +0000 (12:25 +0000)]
Update NEWS file for 2.8.2 release

Add a section in the file for the new upcoming release.

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

10 years agoDRBD: ensure peers are UpToDate for dual-primary
Apollon Oikonomopoulos [Tue, 5 Nov 2013 14:30:45 +0000 (16:30 +0200)]
DRBD: ensure peers are UpToDate for dual-primary

DrbdAttachNet supports both, normal primary/secondary node operation, and
(during live migration) dual-primary operation. When resources are newly
attached, we poll until we find all of them in connected or syncing operation.

Although aggressive, this is enough for primary/secondary operation, because
the primary/secondary role is not changed from within DrbdAttachNet. However,
in the dual-primary ("multimaster") case, both peers are subsequently upgraded
to the primary role.  If - for unspecified reasons - both disks are not
UpToDate, then a resync may be triggered after both peers have switched to
primary, causing the resource to disconnect:

  kernel: [1465514.164009] block drbd2: I shall become SyncTarget, but I am
    primary!
  kernel: [1465514.171562] block drbd2: ASSERT( os.conn == C_WF_REPORT_PARAMS )
    in /build/linux-rrsxby/linux-3.2.51/drivers/block/drbd/drbd_receiver.c:3245

This seems to be extremely racey and is possibly triggered by some underlying
network issues (e.g. high latency), but it has been observed in the wild. By
logging the DRBD resource state in the old secondary, we managed to see a
resource getting promoted to primary while it was:

  WFSyncUUID Secondary/Primary Outdated/UpToDate

We fix this by explicitly waiting for "Connected" cstate and
"UpToDate/UpToDate" disks, as advised in [1]:

  "For this purpose and scenario,
   you only want to promote once you are Connected UpToDate/UpToDate."

[1] http://lists.linbit.com/pipermail/drbd-user/2013-July/020173.html

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

10 years agoRevision bump for 2.9.0 v2.9.0
Klaus Aehlig [Mon, 4 Nov 2013 09:40:13 +0000 (10:40 +0100)]
Revision bump for 2.9.0

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

10 years agoSchedule release of 2.9.0
Klaus Aehlig [Mon, 4 Nov 2013 09:39:36 +0000 (10:39 +0100)]
Schedule release of 2.9.0

...and mention the last change pulled in from stable-2.8.

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 [Mon, 4 Nov 2013 15:36:02 +0000 (16:36 +0100)]
Merge branch 'stable-2.8' into stable-2.9

* stable-2.8
  Improve error message for replace-disks

Conflicts:
lib/cmdlib/instance_storage.py
Resolved by manually applying the node name to uuid
transition on the version of stable-2.9.

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

10 years agoImprove error message for replace-disks
Michele Tartara [Mon, 4 Nov 2013 15:20:07 +0000 (15:20 +0000)]
Improve error message for replace-disks

In some conditions, replace-disks will fail if the disks are not properly
activated. Improve the error message suggesting to run activate-disks before
executing replace-disks.

Fixes Issue 606.

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 [Wed, 30 Oct 2013 12:33:58 +0000 (13:33 +0100)]
Merge branch 'stable-2.8' into stable-2.9

* stable-2.8
  Add all dependencies for confd as test dependencies
  Add snap-server to the test-relevenat packages
  Placate warnings on ganeti.outils_unittest.py

Conflicts:
configure.ac: take both additions (and fix)

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

10 years agoAdd all dependencies for confd as test dependencies
Klaus Aehlig [Wed, 30 Oct 2013 10:13:48 +0000 (11:13 +0100)]
Add all dependencies for confd as test dependencies

Since our tests pull in confd as a dependency, all build dependencies
for confd are also necessary to run the tests.

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

10 years agoAdd snap-server to the test-relevenat packages
Klaus Aehlig [Tue, 29 Oct 2013 15:09:14 +0000 (16:09 +0100)]
Add snap-server to the test-relevenat packages

While snap-server is only needed for the optional monitoring daemon,
some tests, notably those testing these optional features, still depend
on it. So, if snap-server is missing, the Haskell tests should not be
run, as they cannot even be build.

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

10 years agoPlacate warnings on ganeti.outils_unittest.py
Santi Raffa [Wed, 23 Oct 2013 14:20:24 +0000 (16:20 +0200)]
Placate warnings on ganeti.outils_unittest.py

Change ovf.py from using 'if foo:' to 'if foo is not None:' checks as
suggested by the FutureWarnings the OVF library raises otherwise.
This fixes issue 557.

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

10 years agoStart NEWS entry for 2.9.0 rc4
Klaus Aehlig [Thu, 17 Oct 2013 13:40:26 +0000 (15:40 +0200)]
Start NEWS entry for 2.9.0 rc4

So far, we have correct start/stop of luxid during gnt-cluster master-failover
inherited form stable-2.8

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 [Thu, 17 Oct 2013 11:43:34 +0000 (13:43 +0200)]
Merge branch 'stable-2.8' into stable-2.9

* stable-2.8
  Version bump for 2.8.1
  Verify that ConfD is running after master-failover
  daemon-util: handle luxid in {start,stop}_master()
  Fix typo in storage.FileStorage docstring
  Fix path for serial file

Conflicts:
NEWS: take both changes
configure.ac: ignore version bump
lib/bdev.py: apply change to lib/storage/bdev.py

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

10 years agoVersion bump for 2.8.1 v2.8.1
Michele Tartara [Thu, 17 Oct 2013 10:36:44 +0000 (12:36 +0200)]
Version bump for 2.8.1

Also, update the NEWS file accordingly.

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

10 years agoVerify that ConfD is running after master-failover
Helga Velroyen [Wed, 16 Oct 2013 11:11:18 +0000 (13:11 +0200)]
Verify that ConfD is running after master-failover

This patch adds additional 'gnt-node list' commands to
the testing of 'gnt-cluster master-failover' in order to
test if ConfD (or LuxiD) is still running after a
master-failover.

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

10 years agodaemon-util: handle luxid in {start,stop}_master()
Apollon Oikonomopoulos [Wed, 16 Oct 2013 09:17:23 +0000 (12:17 +0300)]
daemon-util: handle luxid in {start,stop}_master()

Luxid was not handled in start_master() and stop_master() at all. As a result,
during a master-failover, luxid would be left running on the old master and
would not start on the new master, leaving the cluster without management until
luxid was manually started.

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 typo in storage.FileStorage docstring
Santi Raffa [Tue, 15 Oct 2013 08:13:28 +0000 (10:13 +0200)]
Fix typo in storage.FileStorage docstring

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

10 years agoFix path for serial file
Klaus Aehlig [Wed, 16 Oct 2013 07:32:02 +0000 (09:32 +0200)]
Fix path for serial file

It is actually located inside the queue directory.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@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 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>