Also downgrade instance-specific HV-params

The newly added hypervisor parameters exist both, at the cluster
level for global defaults, as well as for instances.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Merge branch 'stable-2.12' into master

* stable-2.12
  Also downgrade instance-specific HV-param

Conflicts:
	tools/cfgupgrade

Resolution:
	take version of master

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
ReasonRateLimiting: Fix scheduling rate-limited jobs

The semantics change in the SlotMap simplification (commit 7a3aa19)
purposely made `hasSlotsFor`/`occupySlots` reject keys that were not
in the SlotMap, for example

    [] `hasSlotsFor` [("key", 1)] == False

Unfortunately, I forgot to adjust the `initSlotMap` in `reasonRateLimit`:
While before it was allowed to start empty (`occupySlots` would create
the slots on the fly), commit 7a3aa19 should have changed it to start
with all keys present and set to all buckets unoccupied.

This led to all jobs with a `rate-limit:n:...` reason to be
rate-limited unconditionally (they were never run).

This commit fixes it by adjusting `initSlotMap` as described above.

Signed-off-by: Niklas Hambuechen <niklash@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Prepare NEWS file for 2.12.0

Mention inherited changes as well as the fixes made to stable-2.12
since rc2.

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

Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Directly call cleanup function from Persistent

...so that that module becomes independent of Core.

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

Extract a function to clean up locks once. This will allow
for out-of-schedule death detection.

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

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Niklas Hambuechen <niklash@google.com>
Add gnt-debug wconfd cleanuplocks

...which asks WConfD to clean up all stale locks.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Niklas Hambuechen <niklash@google.com>
Document gnt-debug wconfd cleanuplocks in the man page

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Niklas Hambuechen <niklash@google.com>
After killing a job inform WConfD

...that now is a good time to check if some resource owners
have died.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Niklas Hambuechen <niklash@google.com>
Generate domain-name unique names in genEmptyCluster

It is a prerequisite that all nodes in a cluster have different names.
In genEmptyCluster, this is achieved by adding a unique suffix to each
name. However, this still allows to have both, 'n-3' and 'n-3.n-4' as
names in the same cluster---and those names are considered equal, as
they might both the legitimate short hands of 'n-3.n-4.example.com'.

To avoid these kinds of name collisions, make genEmptyCluster only
use the first part of the FQDN and suffix it.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Improve retries on RPC communication to daemons

Before the communication was retried "Broken Pipe".

Now retry it on any network error and wait between the retries (to
account for situations like a deamon restart).

Rename the function to better capture the new semantics.

Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Also debug-log the end of local config writes

...to better estimate the cost of it.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Update the release date and add a fixed bug in NEWS

Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
.gitignore scripts/gnt-filter

This command was added in d8f5462, but the corresponding generated file
was not added to the list of files to be ignored. Do this now.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Merge branch 'stable-2.11' into stable-2.12

* stable-2.11
  Generate domain-name unique names in genEmptyCluster

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Merge branch 'stable-2.12' into master

* stable-2.11
  Generate domain-name unique names in genEmptyCluster

* stable-2.12
  Update the release date and add a fixed bug in NEWS
  Improve retries on RPC communication to daemons
  Suffix bump for 2.12.0
  Prepare NEWS file for 2.12.0

Conflicts:
	NEWS: take ALL the entries
	configure.ac: ignore suffix bump

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Remove check for "complex disk layout" from LUMoveInstance

The check is unnecessary because earlier the disk template is checked in
a more restrictive way. Newly the check works on disk types, but gets
rid of the redundancy.

Signed-off-by: Aaron Karper <akarper@google.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Add documentation for LUInstance{Move,Failover,Migrate}

The documentation explains how LUMoveInstance, LUInstanceFailover, and
LUInstanceMigrate are related.

Signed-off-by: Aaron Karper <akarper@google.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>