ganeti-github.git
5 years agoAdapt NEWS file for 2.15.0 rc1
Helga Velroyen [Tue, 16 Jun 2015 10:27:41 +0000 (12:27 +0200)]
Adapt NEWS file for 2.15.0 rc1

.. to prepare for the new release.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>

5 years agoMerge branch 'stable-2.14' into stable-2.15
Helga Velroyen [Mon, 15 Jun 2015 14:07:40 +0000 (16:07 +0200)]
Merge branch 'stable-2.14' into stable-2.15

* stable-2.14
  (no changes)

* stable-2.13
  Mention migration change in NEWS
  Move misplaced NEWS entry
  Add protection against daemons that may already be listening
  Attempt to cleanup failed migrations using a pidfile
  Add utility that gets the full command line of a process
  Introduce socat as a way of doing xl migrations
  fix typo in UPGRADE notes
  During start, only update job file locally

* stable-2.12
  Fix tests for setting (shared) file storage directory
  Add missing call for setting shared file storage directory
  Update ganeti-luxid synopsis
  Update ganeti-mond synopsis
  Update ganeti-confd synopsis
  Update copyright statement

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>

5 years agoMerge branch 'stable-2.13' into stable-2.14
Helga Velroyen [Mon, 15 Jun 2015 13:37:17 +0000 (15:37 +0200)]
Merge branch 'stable-2.13' into stable-2.14

* stable-2.13
  Mention migration change in NEWS
  Move misplaced NEWS entry
  Add protection against daemons that may already be listening
  Attempt to cleanup failed migrations using a pidfile
  Add utility that gets the full command line of a process
  Introduce socat as a way of doing xl migrations
  fix typo in UPGRADE notes
  During start, only update job file locally

* stable-2.12
  Fix tests for setting (shared) file storage directory
  Add missing call for setting shared file storage directory
  Update ganeti-luxid synopsis
  Update ganeti-mond synopsis
  Update ganeti-confd synopsis
  Update copyright statement

Conflicts:
  NEWS
  lib/cmdlib/cluster/verify.py

Resolutions:
  NEWS: keep all released entries
  lib/cmdlib/cluster/verify.py: put the additional line
    that caused the confict into
    lib/cmdlib/cluster/__init__.py

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>

5 years agoMerge branch 'stable-2.12' into stable-2.13
Hrvoje Ribicic [Mon, 15 Jun 2015 10:58:11 +0000 (12:58 +0200)]
Merge branch 'stable-2.12' into stable-2.13

* stable-2.12
  Fix tests for setting (shared) file storage directory
  Add missing call for setting shared file storage directory
  Update ganeti-luxid synopsis
  Update ganeti-mond synopsis
  Update ganeti-confd synopsis
  Update copyright statement

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

5 years agoMention migration change in NEWS
Hrvoje Ribicic [Wed, 10 Jun 2015 11:51:28 +0000 (13:51 +0200)]
Mention migration change in NEWS

This patch adds information about the xl migration change to the NEWS
file.

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

5 years agoMove misplaced NEWS entry
Hrvoje Ribicic [Wed, 10 Jun 2015 11:50:47 +0000 (13:50 +0200)]
Move misplaced NEWS entry

A section meant for 2.13.0 was moved to a 2.12 release, and this patch
fixes that.

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

5 years agoAdd protection against daemons that may already be listening
Hrvoje Ribicic [Mon, 8 Jun 2015 16:35:27 +0000 (16:35 +0000)]
Add protection against daemons that may already be listening

Should the migration port already be taken, Ganeti will try and start a
socat daemon that will immediately die, leaving Ganeti to pipe the
migration data into whatever process that happens to be listening. This
patch prevents that from happening by checking if the socat daemon
started by Ganeti is ready to accept the migration data.

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

5 years agoAttempt to cleanup failed migrations using a pidfile
Hrvoje Ribicic [Mon, 8 Jun 2015 16:44:15 +0000 (16:44 +0000)]
Attempt to cleanup failed migrations using a pidfile

In the case that a listening socat daemon was started but the migration
failed on the sending side, the daemon will stay in place and occupy
the migration port forever. This patch attempts to remedy this by
saving the PID of the daemon, and attempting to kill it when the next
migration is started, provided the command line roughly matches our
migration workflow.

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

5 years agoAdd utility that gets the full command line of a process
Hrvoje Ribicic [Sun, 7 Jun 2015 21:12:22 +0000 (23:12 +0200)]
Add utility that gets the full command line of a process

This patch provides a simple function which fetches the command line of
a process given its PID, and some tests for it. It was introduced for
safety reasons in introducing socat-based migration to our Xen-handling
code.

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

5 years agoIntroduce socat as a way of doing xl migrations
Hrvoje Ribicic [Tue, 2 Jun 2015 11:05:37 +0000 (11:05 +0000)]
Introduce socat as a way of doing xl migrations

This patch introduces support for socat as a means of doing xl
migrations. The primary reason for doing so is that Ganeti no longer
handles SSH key distribution across nodes which are not master
candidates. By relying on SSH as the only means of doing migrations,
we could only migrate instances off of master candidates.

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

5 years agoFix tests for setting (shared) file storage directory
Petr Pudlak [Wed, 10 Jun 2015 09:10:01 +0000 (11:10 +0200)]
Fix tests for setting (shared) file storage directory

- Fix the test for setting file_storage_dir, which didn't check if the
  value was really set.
- Add tests for shared_file_storage_dir, which were missing completely.

Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

5 years agoAdd missing call for setting shared file storage directory
Petr Pudlak [Wed, 10 Jun 2015 09:20:35 +0000 (11:20 +0200)]
Add missing call for setting shared file storage directory

With the call missing, it wasn't possible to change the directory after
cluster initialization. Fixes #1101.

Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

5 years agoUpdate ganeti-luxid synopsis
Klaus Aehlig [Wed, 10 Jun 2015 09:31:31 +0000 (11:31 +0200)]
Update ganeti-luxid synopsis

The options --syslog, --no-user-checks, --no-voting,
and --yes-do-it were already described in the description.
Add them to the synopsis as well.

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

5 years agoUpdate ganeti-mond synopsis
Klaus Aehlig [Wed, 10 Jun 2015 09:23:42 +0000 (11:23 +0200)]
Update ganeti-mond synopsis

The -b option was already described in the description of the daemon,
add it to the synopsis as well. While there, sort the synopsis to
reflect the order in which the options are described; this is also
consistent with the argument order in the synopsis of other Ganeti
daemons.

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

5 years agoUpdate ganeti-confd synopsis
Klaus Aehlig [Wed, 10 Jun 2015 09:17:24 +0000 (11:17 +0200)]
Update ganeti-confd synopsis

The options -p, -b, --syslog, and --no-user-check were already described
in the description; add them to the synopsis as well.

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

5 years agofix typo in UPGRADE notes
Klaus Aehlig [Tue, 9 Jun 2015 08:17:54 +0000 (10:17 +0200)]
fix typo in UPGRADE notes

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

5 years agoDuring start, only update job file locally
Klaus Aehlig [Wed, 3 Jun 2015 12:57:12 +0000 (14:57 +0200)]
During start, only update job file locally

The first thing the newly forked job will do anyway is
to update its job file as the first op-code is now waiting.
It is enough that this information is replicated to all
master candidates. Note that a local change of the livelock
file will not be helpful to other master candidates, as
the livelock has only a meaning on the current node anyway.

This seemingly little saving of two replications is significant,
however, as it happens under the fork lock by which we avoid
two forks at the same time, as this can cause problems with the
Haskell runtime.

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

Cherry-picked-from: 7684a50192bb
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>

5 years agoSet up Transport properly when communicating with metad
Petr Pudlak [Fri, 5 Jun 2015 12:23:56 +0000 (14:23 +0200)]
Set up Transport properly when communicating with metad

.. so it retries correctly when communicating on a non-master node.

Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

5 years agoAllow the Transport class to be used for non-master nodes
Petr Pudlak [Fri, 5 Jun 2015 12:13:48 +0000 (14:13 +0200)]
Allow the Transport class to be used for non-master nodes

If a communication failure occurred and the caller was not running on
the master node, Transport assumed that this itself was the cause of
the error condition.

However, for communication with the metadata daemon we need to support
non-master nodes as well.

Add a parameter that allows to use the class on non-master nodes.

Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

5 years agoUpdate copyright statement
Klaus Aehlig [Tue, 2 Jun 2015 11:50:24 +0000 (13:50 +0200)]
Update copyright statement

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

5 years agoAllow unconditional failovers off offline nodes, again
Klaus Aehlig [Tue, 2 Jun 2015 10:31:22 +0000 (12:31 +0200)]
Allow unconditional failovers off offline nodes, again

Merge c2607a60 dropped the fix of 4ca31587 instead of following
the code move of applyMoveEx. So re-add that patch at the new
location of applyMoveEx.

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

5 years agoMerge branch 'stable-2.14' into stable-2.15
Petr Pudlak [Tue, 2 Jun 2015 10:01:24 +0000 (12:01 +0200)]
Merge branch 'stable-2.14' into stable-2.15

* stable-2.14
  Suffix bump for 2.14.0
  Prepare NEWS for 2.14.0 release
  Get QuickCheck 2.7 compatibility
  For instances use the real instance disk template
  Log iAllocator request at debug level
  Do not assume all requests are relocation requests
  In opportunistic locking, update NODE_RES locks after nodes
  Suffix bump for 2.14.0~rc2
  Prepare NEWS for 2.14.0~rc2

* stable-2.13
  Increase waiting time to avoid races
  Avoid watcher interaction in TestFilterRateLimit
  Avoid races in TestAdHocReasonRateLimit
  Avoid races in TestFilterRateLimit

* stable-2.12
  Make WConfD's updateLocksWaiting safe
  Tests specifying safeUpdateLocksWaiting
  Provide a repeatable version of updateLocksWaiting
  Verify that updateLocks is idempotent
  Always accept no-op requests
  Allow unconditional failovers off offline nodes
  Remove now unused variable
  Fix bug in ssconf comparison, disable it for vcluster
  QA: test renewing the cluster certificate only
  QA: Assert equality of ssconf_master_candidate_certs
  QA: Add more verify steps in renew crypto QA
  Add a unit test for the Gluster storage type
  Add missing Gluster storage verification checks
  Add Gluster type to the node storage reporting set
  Introduce the Gluster storage type
  Make xend-config.sxp optional
  Revision bump to 2.12.4
  Update NEWS for 2.12.4
  Ignore *.dyn* files generated by GHC 7.8
  Replace HFLAGS_NOPROF with HFLAGS_DYNAMIC in the Makefile

* stable-2.11
  (no news)

* stable-2.10
  Substitute 'suffix' for 'revision'
  Check for gnt-cluster before running gnt-cluster upgrade

Conflicts:
NEWS - keep both 2.14 and 2.15 parts
configure.ac - keep 2.15 version
src/Ganeti/HTools/Cluster.hs - remove applyMoveEx, which was
            moved to Ganeti.HTools.Cluster.Moves

Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

5 years agoSuffix bump for 2.14.0 v2.14.0
Klaus Aehlig [Mon, 1 Jun 2015 07:35:30 +0000 (09:35 +0200)]
Suffix bump for 2.14.0

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

5 years agoPrepare NEWS for 2.14.0 release
Klaus Aehlig [Mon, 1 Jun 2015 07:46:33 +0000 (09:46 +0200)]
Prepare NEWS for 2.14.0 release

Set the release date and describe the fixes since the last release candidate.

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

5 years agoGet QuickCheck 2.7 compatibility
Klaus Aehlig [Mon, 1 Jun 2015 11:00:29 +0000 (13:00 +0200)]
Get QuickCheck 2.7 compatibility

Replace deprecated `printTestCase` by its replacement `counterexample`.
Note that commit 077c415a added a CPP-guarded fallback for QuickCheck < 2.7.

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

5 years agoMerge branch 'stable-2.13' into stable-2.14
Klaus Aehlig [Mon, 1 Jun 2015 10:36:50 +0000 (12:36 +0200)]
Merge branch 'stable-2.13' into stable-2.14

* stable-2.13
  (no changes)

* stable-2.14
  Make WConfD's updateLocksWaiting safe
  Tests specifying safeUpdateLocksWaiting
  Provide a repeatable version of updateLocksWaiting
  Verify that updateLocks is idempotent
  Always accept no-op requests
  Allow unconditional failovers off offline nodes
  Remove now unused variable
  Fix bug in ssconf comparison, disable it for vcluster
  QA: test renewing the cluster certificate only
  QA: Assert equality of ssconf_master_candidate_certs
  QA: Add more verify steps in renew crypto QA

* stable-2.11
  (no changes)

* stable-2.10
  Substitute 'suffix' for 'revision'

Conflicts:
src/Ganeti/HTools/Node.hs (apply condition at new code location)

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

5 years agoMerge branch 'stable-2.12' into stable-2.13
Klaus Aehlig [Mon, 1 Jun 2015 09:14:31 +0000 (11:14 +0200)]
Merge branch 'stable-2.12' into stable-2.13

* stable-2.12
  Make WConfD's updateLocksWaiting safe
  Tests specifying safeUpdateLocksWaiting
  Provide a repeatable version of updateLocksWaiting
  Verify that updateLocks is idempotent
  Always accept no-op requests
  Allow unconditional failovers off offline nodes
  Remove now unused variable
  Fix bug in ssconf comparison, disable it for vcluster
  QA: test renewing the cluster certificate only
  QA: Assert equality of ssconf_master_candidate_certs
  QA: Add more verify steps in renew crypto QA

* stable-2.11
  (no changes)

* stable-2.10
  Substitute 'suffix' for 'revision'

Conflicts:
qa/qa_cluster.py
src/Ganeti/HTools/Cluster.hs
src/Ganeti/HTools/Node.hs
(All trivial by taking the union of the changes.)

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

5 years agoMerge branch 'stable-2.11' into stable-2.12
Klaus Aehlig [Mon, 1 Jun 2015 08:47:09 +0000 (10:47 +0200)]
Merge branch 'stable-2.11' into stable-2.12

* stable-2.11
  (no changes)

* stable-2.10
  Substitute 'suffix' for 'revision'

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

5 years agoMake WConfD's updateLocksWaiting safe
Klaus Aehlig [Thu, 28 May 2015 10:14:25 +0000 (12:14 +0200)]
Make WConfD's updateLocksWaiting safe

...so that the implicit retry on connection failure
is handled gracefully.

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

5 years agoTests specifying safeUpdateLocksWaiting
Klaus Aehlig [Fri, 29 May 2015 16:27:19 +0000 (18:27 +0200)]
Tests specifying safeUpdateLocksWaiting

Add tests that verify the defining properties of safeUpdateLocksWaiting.

1.) If the state contains no pending request by the requester, then
    updateLocksWaiting and safeUpdateLocksWaiting coincide.

2.) safeUpdateLocksWaiting is idempotent on all states.

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

5 years agoProvide a repeatable version of updateLocksWaiting
Klaus Aehlig [Thu, 28 May 2015 09:24:55 +0000 (11:24 +0200)]
Provide a repeatable version of updateLocksWaiting

With our timeouts on connections, we have to deal with connections
being interrupted at any time. Therefore, we provide a repeatable
version of updateLocksWaiting that gracefully ignores requests that
have already been recorded.

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

5 years agoVerify that updateLocks is idempotent
Klaus Aehlig [Fri, 29 May 2015 16:24:39 +0000 (18:24 +0200)]
Verify that updateLocks is idempotent

...so that it can be repeated, if necessary.

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

5 years agoAlways accept no-op requests
Klaus Aehlig [Thu, 28 May 2015 15:53:42 +0000 (17:53 +0200)]
Always accept no-op requests

In order to have update requests repeatable, always
accept requests that do not require any change to the
state. Note that this is not implied by the current
definition, as the request might ask for two locks at
different level, and thus the repetition would violate
lock order.

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

5 years agoAllow unconditional failovers off offline nodes
Klaus Aehlig [Fri, 29 May 2015 15:50:43 +0000 (17:50 +0200)]
Allow unconditional failovers off offline nodes

Normally, we should not place instances on nodes that do
not have enough disks. However, there is one exception: if
we failover an instance from an offline node, that node can
well be secondary of that instance---the fact that it is currently
primary proves it has enough disks space. The reason why we have
to handle that case special is that if a node is offline, we sometimes
cannot determine the amount of disk available, hence the conservative
estimation is 0.

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

5 years agoMerge branch 'stable-2.10' into stable-2.11
Hrvoje Ribicic [Fri, 29 May 2015 15:45:34 +0000 (17:45 +0200)]
Merge branch 'stable-2.10' into stable-2.11

* stable-2.10
  Substitute 'suffix' for 'revision'

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

5 years agoFor instances use the real instance disk template
Klaus Aehlig [Fri, 29 May 2015 12:23:40 +0000 (14:23 +0200)]
For instances use the real instance disk template

...instead of assuming there is a single template that fits all
instances of the cluster.

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

5 years agoLog iAllocator request at debug level
Klaus Aehlig [Fri, 29 May 2015 12:12:57 +0000 (14:12 +0200)]
Log iAllocator request at debug level

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

5 years agoDo not assume all requests are relocation requests
Klaus Aehlig [Fri, 29 May 2015 12:01:48 +0000 (14:01 +0200)]
Do not assume all requests are relocation requests

Commit 717ede373 incorrectly assumed that each iallocator
request is about a specific instance and a specific disk
template. Both assumptions are wrong (consider e.g., a
node evacuation request) yielding a type error that,
unfortunately, in python is only discovered at run time.

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

5 years agoIn opportunistic locking, update NODE_RES locks after nodes
Klaus Aehlig [Wed, 27 May 2015 16:00:16 +0000 (18:00 +0200)]
In opportunistic locking, update NODE_RES locks after nodes

When creating instances, we can only choose from those nodes where
we have both, the NODE and the NODE_RES lock. So, when opportunistically
allocating locks, at the level of NODE_RES, there is no point in considering
more nodes than those we have the node lock for. This change not only
avoids acquiring locks we cannot use, it also make the opportunistic
minimal lock requirement more useful.

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

Cherry-picked-from: e18a6a7d9fd5783e988d2a1e275890a8ae0f682f
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>

5 years agoRemove now unused variable
Klaus Aehlig [Wed, 27 May 2015 16:31:16 +0000 (18:31 +0200)]
Remove now unused variable

Avoiding lint errors on the onehand, and code complexity
on the other.

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

5 years agoFix bug in ssconf comparison, disable it for vcluster
Helga Velroyen [Wed, 27 May 2015 12:49:16 +0000 (14:49 +0200)]
Fix bug in ssconf comparison, disable it for vcluster

This patch fixes a bug in the comparison of the
'ssconf_master_candidate_certs' and disables the test
for vcluster.

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

5 years agoQA: test renewing the cluster certificate only
Helga Velroyen [Fri, 22 May 2015 12:41:33 +0000 (14:41 +0200)]
QA: test renewing the cluster certificate only

Currently, there is not test for just running renew-crypto
to only renew the cluster certificate (and not the node
certificates). This patches adds the test.

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

5 years agoQA: Assert equality of ssconf_master_candidate_certs
Helga Velroyen [Fri, 22 May 2015 12:39:59 +0000 (14:39 +0200)]
QA: Assert equality of ssconf_master_candidate_certs

In order to hunt down some flakiness, this patch adds
and additional check to the QA of renew-crypto to ensure
the state of ssconf_master_candidate_certs.

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

5 years agoQA: Add more verify steps in renew crypto QA
Helga Velroyen [Fri, 22 May 2015 09:20:05 +0000 (11:20 +0200)]
QA: Add more verify steps in renew crypto QA

Currently the cluster is only verified after a series of
renew-crypto operations is carried out. This makes it hard
to trace errors back to originating call. This patch adds
a verifcation step after each renew-crypto call.

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

5 years agoSubstitute 'suffix' for 'revision'
Lisa Velden [Tue, 19 May 2015 11:36:54 +0000 (13:36 +0200)]
Substitute 'suffix' for 'revision'

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

5 years agoSuffix bump for 2.14.0~rc2 v2.14.0rc2
Klaus Aehlig [Mon, 18 May 2015 08:16:57 +0000 (10:16 +0200)]
Suffix bump for 2.14.0~rc2

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

5 years agoPrepare NEWS for 2.14.0~rc2
Klaus Aehlig [Mon, 18 May 2015 08:36:51 +0000 (10:36 +0200)]
Prepare NEWS for 2.14.0~rc2

Describing the changes since the last release candidate. Also, while there,
remove the incorrect "known issue" about 2.14 not being able to be built with
GHC 7.8; that always worked from stable-2.13 onwards. Same for gluster support.

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

5 years agoMerge branch 'stable-2.13' into stable-2.14
Klaus Aehlig [Mon, 18 May 2015 14:54:52 +0000 (16:54 +0200)]
Merge branch 'stable-2.13' into stable-2.14

* stable-2.13
  Increase waiting time to avoid races
  Avoid watcher interaction in TestFilterRateLimit
  Avoid races in TestAdHocReasonRateLimit
  Avoid races in TestFilterRateLimit

* stable-2.12
  Add a unit test for the Gluster storage type
  Add missing Gluster storage verification checks
  Add Gluster type to the node storage reporting set
  Introduce the Gluster storage type
  Make xend-config.sxp optional
  Revision bump to 2.12.4
  Update NEWS for 2.12.4
  Ignore *.dyn* files generated by GHC 7.8
  Replace HFLAGS_NOPROF with HFLAGS_DYNAMIC in the Makefile

* stable-2.11
  (no changes)

* stable-2.10
  Check for gnt-cluster before running gnt-cluster upgrade

Conflicts:
Makefile.am: take stable-2.14 version

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

5 years agoMerge branch 'stable-2.12' into stable-2.13
Klaus Aehlig [Mon, 18 May 2015 14:07:23 +0000 (16:07 +0200)]
Merge branch 'stable-2.12' into stable-2.13

* stable-2.12
  Add a unit test for the Gluster storage type
  Add missing Gluster storage verification checks
  Add Gluster type to the node storage reporting set
  Introduce the Gluster storage type
  Revision bump to 2.12.4
  Update NEWS for 2.12.4
  Ignore *.dyn* files generated by GHC 7.8
  Replace HFLAGS_NOPROF with HFLAGS_DYNAMIC in the Makefile

* stable-2.11
  (no changes)

* stable-2.10
  Check for gnt-cluster before running gnt-cluster upgrade

Conflicts:
NEWS: take all additions
configure.ac: ignore revision bump
lib/cmdlib/cluster.py: trivial

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

5 years agoIncrease waiting time to avoid races
Klaus Aehlig [Mon, 18 May 2015 11:43:11 +0000 (13:43 +0200)]
Increase waiting time to avoid races

In tests, give Ganeti enough time to actually start up jobs before
asserting that they succeed. While normally forking and executing
a job is finished in less than a second in some circumstances it
can take longer; so give enough time to avoid flaky tests.

While there, also pause the watcher, so that it doesn't submit
jobs inbetween that cause our 0.01 second delay jobs to take
longer while waiting for locks taken by the watcher's jobs.

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

5 years agoAvoid watcher interaction in TestFilterRateLimit
Klaus Aehlig [Mon, 18 May 2015 12:03:32 +0000 (14:03 +0200)]
Avoid watcher interaction in TestFilterRateLimit

This test verifies a global limit on the number of jobs running. This
requires knowledge of all jobs submitted between the addition of the
filter and the submission of our last test job. While we send these
commands directly one after the other, this still takes a second or
two, thus giving the watcher slightly less than a 1% change of
interfering. Avoid this by pausing the watcher during this test.

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

5 years agoAvoid races in TestAdHocReasonRateLimit
Klaus Aehlig [Mon, 18 May 2015 11:53:27 +0000 (13:53 +0200)]
Avoid races in TestAdHocReasonRateLimit

The test submits 3 jobs in an environment rate-limited to two, and verifies
that the first 2 jobs are running whereas the third one remains queued. However,
it takes for Ganeti some time to get a submitted job to actually being confirmed
waiting (in some circumstances over a second). So wait a bit longer to avoid
losing the race. While there, increase the time of the delay jobs to avoid
them finishing during that test in an extremely slowly running QA. (Note that
the jobs are killed forcefully at the end of the test, so that time is never
really waited for.)

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

5 years agoAdd a unit test for the Gluster storage type
Dimitris Bliablias [Mon, 18 May 2015 13:01:52 +0000 (15:01 +0200)]
Add a unit test for the Gluster storage type

This patch, extends the 'ganeti.utils.storage_unittest.py' unit test
with a new test for the Gluster storage type. Also, the current unit
tests are updated accordingly to correspond to the latest changes.

Signed-off-by: Dimitris Bliablias <bl.dimitris@gmail.com>
Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>

Cherry-picked from 42fdf9d0d79fb84796ad40ff6eb8c95e3206263e

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

5 years agoAdd missing Gluster storage verification checks
Dimitris Bliablias [Mon, 18 May 2015 13:01:47 +0000 (15:01 +0200)]
Add missing Gluster storage verification checks

This patch, extends the file-based storage type verification checks to
include the new Gluster storage type. Those modifications include a
missing check for the gluster storage directory at cluster
initialization time, and extends the 'gnt-cluster verify' command to
also verify the gluster file-storage path.

Signed-off-by: Dimitris Bliablias <bl.dimitris@gmail.com>
Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>

Cherry-picked from 604c8be2596195d94efcd96f286542f74912b2e5

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

5 years agoAdd Gluster type to the node storage reporting set
Dimitris Bliablias [Mon, 18 May 2015 13:01:43 +0000 (15:01 +0200)]
Add Gluster type to the node storage reporting set

This patch, adds the 'gluster' storage type to the set of storage types
for which full node storage reporting is available. This set is used by
the 'LUNodeQueryStorage' logical unit for getting information on storage
units on node(s).

Signed-off-by: Dimitris Bliablias <bl.dimitris@gmail.com>
Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>

Cherry-picked from 7ec471851400cd878322712309ef996582df02f1

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

5 years agoIntroduce the Gluster storage type
Dimitris Bliablias [Mon, 18 May 2015 13:01:36 +0000 (15:01 +0200)]
Introduce the Gluster storage type

Currently, the 'gluster' and 'sharedfile' disk templates are both mapped
to the Shared File storage type. This compromise causes the Gluster block
devices to be interpreted in the config as 'sharedfile' devices, instead
of 'gluster', and subsequently to be wrongly handled as Shared File
disks. This behavior, currently makes the 'gluster' disk template not
functional.

This patch, fixes this issue by introducing the Gluster storage type,
which will be exclusively used by the 'gluster' disk template.

Signed-off-by: Dimitris Bliablias <bl.dimitris@gmail.com>
Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>

Cherry-picked from ba550291df12b129f843581c098b3896023e7d33

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

5 years agoMerge branch 'stable-2.11' into stable-2.12
Klaus Aehlig [Mon, 18 May 2015 12:12:55 +0000 (14:12 +0200)]
Merge branch 'stable-2.11' into stable-2.12

* stable-2.11
  (no changes)

* stable-2.10
  Check for gnt-cluster before running gnt-cluster upgrade

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

5 years agoAvoid races in TestFilterRateLimit
Klaus Aehlig [Fri, 15 May 2015 18:11:41 +0000 (20:11 +0200)]
Avoid races in TestFilterRateLimit

The test submits 3 jobs in an environment rate-limited to two, and verifies
that the first 2 jobs are running whereas the third one remains queued. However,
it takes for Ganeti some time to get a submitted job to actually being confirmed
waiting (in some circumstances over a second). So wait a bit longer to avoid
losing the race. While there, increase the time of the delay jobs to avoid
them finishing during that test in an extremely slowly running QA. (Note that
the jobs are killed forcefully at the end of the test, so that time is never
really waited for.)

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

5 years agoMerge branch 'stable-2.10' into stable-2.11
Klaus Aehlig [Mon, 18 May 2015 08:09:13 +0000 (10:09 +0200)]
Merge branch 'stable-2.10' into stable-2.11

* stbale-2.10
  Check for gnt-cluster before running gnt-cluster upgrade

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

5 years agoMake xend-config.sxp optional
Hrvoje Ribicic [Wed, 13 May 2015 12:24:42 +0000 (12:24 +0000)]
Make xend-config.sxp optional

With Ganeti imposing no requirement on Xen versions, the configuration
file that should be present varies greatly on the choice of toolstack
and Xen version. xend-config.sxp was considered obligatory, but in
higher versions and with xl, it is superseded by xl.conf and considered
deprecated. This patch makes it have the same status as xl.conf - Ganeti
will distribute it but not require its presence.

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

5 years agoMerge branch 'stable-2.14' into stable-2.15
Hrvoje Ribicic [Wed, 13 May 2015 14:15:20 +0000 (14:15 +0000)]
Merge branch 'stable-2.14' into stable-2.15

* stable-2.14
  Fix mismerge by correcting test import

* stable-2.13
  (no changes)

* stable-2.12
  Expand orphan volume test
  Restrict Ganeti's orphan volume checks to the single VG
  Modify UDS server startup to set permissions for sockets
  Add wheezy chroot files to gitignore file
  Makefile.am: Don't use -dynamic-too for .hpc_o files
  Makefile.am: Don't use dots in -osuf
  Fix compiler invocation for GHC >= 7.8
  Makefile.am: Fix wrong -dep-suffix for GHC 7.8
  Only upgrade configs not upgraded
  Only unlock config if we did lock it
  Mention preferred DRBD module settings when using Xen
  Avoid assertIn
  Test presence of public and private parameters
  Put private parameters into the environment
  Always close pipe on job forking
  Clean up pipes early on failed forks

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

5 years agoCheck for gnt-cluster before running gnt-cluster upgrade
Christos Trochalakis [Tue, 12 May 2015 19:24:10 +0000 (22:24 +0300)]
Check for gnt-cluster before running gnt-cluster upgrade

When ganeti is removed (not purged) `/etc/cron.d/ganeti` is not deleted,
thus after a reboot cron tries to execute gnt-cluster upgrade and fails.

The same pattern is used on all other cron entries.

Signed-off-by: Christos Trochalakis <christos@skroutz.gr>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

5 years agoRevision bump to 2.12.4 v2.12.4
Petr Pudlak [Tue, 12 May 2015 11:19:18 +0000 (13:19 +0200)]
Revision bump to 2.12.4

Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>

5 years agoUpdate NEWS for 2.12.4
Petr Pudlak [Tue, 12 May 2015 11:18:17 +0000 (13:18 +0200)]
Update NEWS for 2.12.4

..  with the latest bugfixes and known issues

Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>

5 years agoIgnore *.dyn* files generated by GHC 7.8
Petr Pudlak [Tue, 12 May 2015 08:50:29 +0000 (10:50 +0200)]
Ignore *.dyn* files generated by GHC 7.8

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

5 years agoReplace HFLAGS_NOPROF with HFLAGS_DYNAMIC in the Makefile
Petr Pudlak [Tue, 12 May 2015 08:48:52 +0000 (10:48 +0200)]
Replace HFLAGS_NOPROF with HFLAGS_DYNAMIC in the Makefile

After cherry-picking the changes needed for GHC7.8, the former isn't
used any more.

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

5 years agoFix mismerge by correcting test import
Hrvoje Ribicic [Fri, 8 May 2015 17:30:23 +0000 (19:30 +0200)]
Fix mismerge by correcting test import

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

5 years agoMerge branch 'stable-2.13' into stable-2.14
Hrvoje Ribicic [Fri, 8 May 2015 15:29:09 +0000 (15:29 +0000)]
Merge branch 'stable-2.13' into stable-2.14

* stable-2.13
  (no changes)

* stable-2.12
  Expand orphan volume test
  Restrict Ganeti's orphan volume checks to the single VG
  Modify UDS server startup to set permissions for sockets
  Add wheezy chroot files to gitignore file
  Makefile.am: Don't use -dynamic-too for .hpc_o files
  Makefile.am: Don't use dots in -osuf
  Fix compiler invocation for GHC >= 7.8
  Makefile.am: Fix wrong -dep-suffix for GHC 7.8
  Only upgrade configs not upgraded
  Only unlock config if we did lock it
  Mention preferred DRBD module settings when using Xen
  Avoid assertIn
  Test presence of public and private parameters
  Put private parameters into the environment
  Always close pipe on job forking
  Clean up pipes early on failed forks

Conflicts:
.gitignore
Makefile.am
lib/config/__init__.py
src/Ganeti/WConfd/Server.hs
test/py/cmdlib/cluster_unittest.py

Resolution:
        .gitignore: Join additions
        Makefile.am: Use Niklas' changes
        __init__.py: Take the 2.14 version, incorporating cherry-picked
                     fix already
        Server.hs: Take 2.13 imports
        cluster_unittest.py: Take 2.13 change with changed import

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>

5 years agoMerge branch 'stable-2.12' into stable-2.13
Hrvoje Ribicic [Fri, 8 May 2015 14:05:17 +0000 (14:05 +0000)]
Merge branch 'stable-2.12' into stable-2.13

* stable-2.12
  Expand orphan volume test
  Restrict Ganeti's orphan volume checks to the single VG
  Modify UDS server startup to set permissions for sockets
  Add wheezy chroot files to gitignore file
  Makefile.am: Don't use -dynamic-too for .hpc_o files
  Makefile.am: Don't use dots in -osuf
  Fix compiler invocation for GHC >= 7.8
  Makefile.am: Fix wrong -dep-suffix for GHC 7.8
  Only upgrade configs not upgraded
  Only unlock config if we did lock it
  Mention preferred DRBD module settings when using Xen
  Avoid assertIn
  Test presence of public and private parameters
  Put private parameters into the environment
  Always close pipe on job forking
  Clean up pipes early on failed forks

Conflicts:
test/py/ganeti.backend_unittest.py

Resolution:
        Merge all test changes.

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

5 years agoExpand orphan volume test
Hrvoje Ribicic [Thu, 7 May 2015 15:35:38 +0000 (15:35 +0000)]
Expand orphan volume test

to ensure we are not reporting stray volumes on other VGs as orphans.

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

5 years agoRestrict Ganeti's orphan volume checks to the single VG
Hrvoje Ribicic [Wed, 6 May 2015 17:17:53 +0000 (17:17 +0000)]
Restrict Ganeti's orphan volume checks to the single VG

Prior to patch eeda588292, Ganeti checked all the LVs on nodes under
its control, and dutifuly declared any stray volumes as orphans in
warnings emitted during cluster-verify. After the patch, the nodes
returned information related only to the LV set as *the* Ganeti VG,
bypassing this problem.

Unfortunately, this led Ganeti to report the disks of instances created
on a different VG as non-existent. This patch fixes things by reverting
patch eeda588292 and making Ganeti warn about orphan volumes only if
they belong to the Ganeti-administered VG.

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

5 years agoModify UDS server startup to set permissions for sockets
Hrvoje Ribicic [Wed, 6 May 2015 15:55:02 +0000 (15:55 +0000)]
Modify UDS server startup to set permissions for sockets

When opening domain sockets for communication, the Haskell daemons did
not set any permissions for the sockets, defaulting to 0700. This was
fine when all of them ran as root, but was bound to cause trouble in a
split-user setup. The first issue is RAPI access after master-failover,
where RAPI could not send make any inquiries until the watcher restored
the desired permissions of the socket.

This patch modifies Luxid to use a g+rw socket, and leaves other servers
to their default of 0600.

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

5 years agoAdd wheezy chroot files to gitignore file
Lisa Velden [Thu, 7 May 2015 12:05:43 +0000 (14:05 +0200)]
Add wheezy chroot files to gitignore file

Signed-off-by: Lisa Velden <velden@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>

5 years agoMakefile.am: Don't use -dynamic-too for .hpc_o files
Niklas Hambuechen [Mon, 3 Nov 2014 18:35:39 +0000 (19:35 +0100)]
Makefile.am: Don't use -dynamic-too for .hpc_o files

It turns out that GHC 7.8's -dynamic-too is forbidden not only for
profiling builds object files, but also for those using HPC coverage.

This commit accordingly renames HFLAGS_NOPROF to HFLAGS_DYNAMIC
(since it now is not conditional on profiling any more),
and makes sure that it is not used for profiling or HPC.

This way we achieve that, for profiling+coverage builds
  - .dyn_o files are available for use in TH in the following 3 cases
  - .o files are for the normal binaries
  - .hpc_o files are for coverage-enabled test binaries
  - .prof_o files are for profiling binaries

We make .hpc_o files depend on the .o files because the creation of
the .o files will also create the .so files needed for TH.
This was already in place for .prof_o files.

This requires that HFLAGS now also contains `-itest/hs` since
the rule for .o files is now also responsible for building .o/.so files
in test/hs.

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

Cherry-picked-from: 1ad14f3
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>

5 years agoMakefile.am: Don't use dots in -osuf
Niklas Hambuechen [Mon, 3 Nov 2014 15:18:42 +0000 (16:18 +0100)]
Makefile.am: Don't use dots in -osuf

This fixes
  ./configure --enable-haskell-tests && make hs-tests
builds on GHC 7.8.

It changes `-osuf .ext` to `-osuf ext`; the old form was allowed in
GHC <= 7.6, but GHC 7.8 seems to have problems with it:
  https://ghc.haskell.org/trac/ghc/ticket/9760

The form without dot works in all GHC versions, and we don't have
dots in other -osuf arguments in the same file either, so this
was probably an accident.

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

Cherry-picked-from: 9664aff
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>

5 years agoFix compiler invocation for GHC >= 7.8
Niklas Hambuechen [Mon, 3 Nov 2014 11:14:09 +0000 (12:14 +0100)]
Fix compiler invocation for GHC >= 7.8

GHC 7.8 switched to dynamic linking being used for ghci, which requires
that .so file are being built for modules that are loaded for TH.

For this reason, GHC >= 7.8 has a -dynamic-too flag, which we now use.

However, -dynamic-too must not be enabled for profiling builds,
which is why this commit introduces a HFLAGS_NOPROF variable
(currently only containing -dynamic-too) that must be passed to
all GHC invocations that are not creating profiling output.

Signed-off-by: Niklas Hambuechen <niklash@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>

Cherry-picked-from: 083776b
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>

5 years agoMakefile.am: Fix wrong -dep-suffix for GHC 7.8
Niklas Hambuechen [Fri, 31 Oct 2014 15:40:27 +0000 (16:40 +0100)]
Makefile.am: Fix wrong -dep-suffix for GHC 7.8

This works around https://ghc.haskell.org/trac/ghc/ticket/9749:

GHC 7.8 (undocumentedly) changed the way in which ghc -M generated
object file dependencies, lacking the underscore that older versions
added automatically to the file names.
It also requires a -dep-suffix for the plain object file (.o).

This commit detects GHC 7.6 and older (7.7 is development only, has no
release and is treated equal to 7.8), and adjusts the -M invocation
appropriately for newer GHC versions.

Signed-off-by: Niklas Hambuechen <niklash@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>

Cherry-picked-from: b78a2c3
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>

5 years agoOnly upgrade configs not upgraded
Klaus Aehlig [Wed, 6 May 2015 10:16:53 +0000 (12:16 +0200)]
Only upgrade configs not upgraded

Whenever we set a configuration, we also upgrade it.
In particular, there is no need for an unconditional upgrade;
so avoid upgrading the configuration over and over again
if it did not change.

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

5 years agoOnly unlock config if we did lock it
Klaus Aehlig [Mon, 3 Nov 2014 19:27:45 +0000 (20:27 +0100)]
Only unlock config if we did lock it

We only acquired a config lock if it was not shared in order
to have lock-free reads. Hence, only release the config lock
if we actually acquired it.

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

Cherry-picked-from: 35056743
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>

5 years agoMention preferred DRBD module settings when using Xen
Hrvoje Ribicic [Tue, 5 May 2015 09:18:29 +0000 (09:18 +0000)]
Mention preferred DRBD module settings when using Xen

Add a mention into the install file, and provide a link to the official
DRBD documentation.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>

5 years agoAvoid assertIn
Klaus Aehlig [Tue, 5 May 2015 07:23:23 +0000 (09:23 +0200)]
Avoid assertIn

...as we still support python versions older than the introduction
of assertIn.

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

5 years agoTest presence of public and private parameters
Lisa Velden [Mon, 4 May 2015 15:32:27 +0000 (17:32 +0200)]
Test presence of public and private parameters

Make sure that there is an environment variable for each parameter
with the correct value.

Signed-off-by: Lisa Velden <velden@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>

5 years agoPut private parameters into the environment
Lisa Velden [Thu, 23 Apr 2015 14:49:22 +0000 (16:49 +0200)]
Put private parameters into the environment

and unobscure them

Signed-off-by: Lisa Velden <velden@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>

5 years agoAlways close pipe on job forking
Klaus Aehlig [Mon, 4 May 2015 12:54:29 +0000 (14:54 +0200)]
Always close pipe on job forking

...even if the initial hand shake succeeded.

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

5 years agoClean up pipes early on failed forks
Klaus Aehlig [Mon, 4 May 2015 12:43:52 +0000 (14:43 +0200)]
Clean up pipes early on failed forks

...so that we do not accumulate open file descriptors.

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

5 years agoQA: use relative path to script location for burnin
Helga Velroyen [Wed, 29 Apr 2015 12:14:44 +0000 (14:14 +0200)]
QA: use relative path to script location for burnin

The QA had the annoying bug that if you run burnin, it
would try to upload the burnin file from the tools/
directory relative to the working directory and not
the location of the qa_cluster.py script. If you
accidentally start the QA from a differen directory
than qa/ it would run for a long while and only
crash when it comes to the burnin part. This patch
fixes the glitch by taking the location of the
QA scripts as a reference rather than the working
directory.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>

5 years agoPrepare release of 2.15.0~beta1 for today v2.15.0beta1
Helga Velroyen [Thu, 30 Apr 2015 07:21:14 +0000 (09:21 +0200)]
Prepare release of 2.15.0~beta1 for today

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>

5 years agoRemove superflouos ~rc1
Helga Velroyen [Wed, 29 Apr 2015 08:38:44 +0000 (10:38 +0200)]
Remove superflouos ~rc1

A merge mishap.

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

5 years agoMerge branch 'stable-2.14' into stable-2.15
Helga Velroyen [Wed, 29 Apr 2015 08:00:25 +0000 (10:00 +0200)]
Merge branch 'stable-2.14' into stable-2.15

* stable-2.14
  Suffix bump for 2.14.0~rc1
  Update NEWS for 2.14.0~rc1
  clean up now dead code
  writeConfigAndUnlock: only unlock after config write
  ConfigLock design: change writeAndUnlock
  Distribute doc/design-file-based-disks-ownership.rst

* stable-2.13
  Rename SSH Update evaluation function more expressively
  Using named tuple for node info in ssh file manager
  Helper functions to assert key existence for sets of nodes
  Add RetryByNumberOfTimes utility function
  Suffix bump for 2.13.0
  Update NEWS file for 2.13.0 release

* stable-2.12
  Revision bump to 2.12.3
  Update NEWS for 2.12.3

Conflicts:
  NEWS
  configure.ac

Solutions:
  NEWS: keep 2.15 entries, change 2.14 from beta2 to rc1
  configure: keep version 2.15.0~alpha1

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

5 years agoSuffix bump for 2.14.0~rc1 v2.14.0rc1
Klaus Aehlig [Mon, 27 Apr 2015 14:58:49 +0000 (16:58 +0200)]
Suffix bump for 2.14.0~rc1

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

5 years agoUpdate NEWS for 2.14.0~rc1
Klaus Aehlig [Mon, 27 Apr 2015 13:36:16 +0000 (15:36 +0200)]
Update NEWS for 2.14.0~rc1

Describing all the fixes that were added since beta2.

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

5 years agoMerge branch 'stable-2.13' into stable-2.14
Klaus Aehlig [Tue, 28 Apr 2015 16:24:02 +0000 (18:24 +0200)]
Merge branch 'stable-2.13' into stable-2.14

* stable-2.13
  Rename SSH Update evaluation function more expressively
  Using named tuple for node info in ssh file manager
  Helper functions to assert key existence for sets of nodes
  Add RetryByNumberOfTimes utility function

* stable-2.12
  Revision bump to 2.12.3
  Update NEWS for 2.12.3

Conflicts:
lib/cmdlib/cluster/verify.py: take stable-2.14
lib/utils/retry.py: take both additions

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

5 years agoMerge branch 'stable-2.12' into stable-2.13
Klaus Aehlig [Tue, 28 Apr 2015 15:44:14 +0000 (17:44 +0200)]
Merge branch 'stable-2.12' into stable-2.13

* stable-2.12
  Revision bump to 2.12.3
  Update NEWS for 2.12.3

Conflicts:
NEWS: take all additions (in correct order)
configure.ac: ignore revision bump

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

5 years agoRevision bump to 2.12.3 v2.12.3
Petr Pudlak [Tue, 28 Apr 2015 15:11:56 +0000 (17:11 +0200)]
Revision bump to 2.12.3

Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

5 years agoUpdate NEWS for 2.12.3
Petr Pudlak [Tue, 28 Apr 2015 15:09:15 +0000 (17:09 +0200)]
Update NEWS for 2.12.3

.. with the latest bugfixes and known issues.

Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

5 years agoRename SSH Update evaluation function more expressively
Helga Velroyen [Thu, 23 Apr 2015 14:45:26 +0000 (16:45 +0200)]
Rename SSH Update evaluation function more expressively

As it emits warnings for any unupdated nodes, lets name
it appropriately.

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

5 years agoUsing named tuple for node info in ssh file manager
Helga Velroyen [Thu, 23 Apr 2015 08:48:29 +0000 (10:48 +0200)]
Using named tuple for node info in ssh file manager

As suggested in a review of previous patches, this patch
uses named tuples instead of just tuples to manage node
information.

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

5 years agoHelper functions to assert key existence for sets of nodes
Helga Velroyen [Wed, 22 Apr 2015 13:51:40 +0000 (15:51 +0200)]
Helper functions to assert key existence for sets of nodes

This patch adds two helper function to the SSH file manager
which given a set of nodes check for the existence of the
public/authorized key on those nodes *and* for the
non-existance on all other nodes.

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

5 years agoAdd RetryByNumberOfTimes utility function
Helga Velroyen [Wed, 22 Apr 2015 11:57:28 +0000 (13:57 +0200)]
Add RetryByNumberOfTimes utility function

This patch adds the RetryByNumberOfTimes utility function
which wraps around a given function and calls that one
up to a maximum number of times before raising a final
exception.

This function is used in the SSH key updating code in
backend.py.

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

5 years agoMerge branch 'stable-2.13' into stable-2.14
Klaus Aehlig [Tue, 28 Apr 2015 14:15:47 +0000 (16:15 +0200)]
Merge branch 'stable-2.13' into stable-2.14

* stable-2.13
  Suffix bump for 2.13.0
  Update NEWS file for 2.13.0 release

Conflicts:
NEWS: take all additions
configure.ac: ignore suffix bump

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