Add watcher as reason source

...given that the watcher also submits op-codes.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Add reason trail to watcher submitted op-codes

For every op-code it should be transparent how it entered the
system. Don't let the watcher be an exception.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Expand "all instances" to names

As by inspection of the code, it turned out that we generally lock
objects by uuid, but there is one exception: instances are always
locked by their name. So change the expanding of the all-set
accordingly.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
As instances are locked by name, fix the Arbitrary

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
LUClusterRepairDiskSizes: also lock instances by name

...and, in particular, expect the "all instanes" lock set
to expand to names.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Add details to soundhw in gnt-instance man

Signed-off-by: Chris Schrier <schrierc@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>
Make the watcher also restart wconfd on master

When this new daemon was added, the watcher wasn't
extended to pet this daemon as well. Do so now.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Fully probe WConfD in watcher

Make the watcher also handle the case that WConfD is up but
not responding. To verify that WConfD is responding, we probe
by using the "Echo" command. If that fails, restart WConfD.

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
  Fully probe WConfD in watcher
  Make the watcher also restart wconfd on master
  LUClusterRepairDiskSizes: also lock instances by name
  As instances are locked by name, fix the Arbitrary
  Expand "all instances" to names
  Add reason trail to watcher submitted op-codes
  Add watcher as reason source

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>
Fix RAPI custom parameter support for recreate-disks

The recreate-disks RAPI call previously ignored almost all parameters
passed to it, and this patch fixes the issue and adds tests.

Signed-off-by: Chris Schrier <schrierc@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>
Prepare NEWS file for 2.12.0~rc1

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

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

Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Make watcher identify itself on disk verification

The watcher also submits GroupVerifyDisks jobs. Make it add
a corresponding reason trail entry.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Pepare NEWS entry for a 2.11 point release

The main news is the relicensing under the 2-clause BSD
license.

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

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
  Bump revision bump 2.11.6
  Pepare NEWS entry for a 2.11 point release

Conflicts:
	NEWS: take all the entries
	configure.ac: ignore revision bump

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
  Bump revision bump 2.11.6
  Pepare NEWS entry for a 2.11 point release

* stable-2.12
  Make watcher identify itself on disk verification
  Suffix bump for 2.12.0~rc2
  Prepare NEWS file for 2.12.0~rc1

Conflicts:
	configure.ac: ignore suffix bump

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
design-optables: Use double quotes in examples

This makes copy-pasting them into `gnt-filter`/curl easier since
JSON requires double quotes.

Admittedly, these were originally thought of as Python dicts so
the single quotes were fine, but in practice these examples are used
more often where JSON is required.

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

When raising an OpPrereqError, an error code always has to be provided,
even if we raise the exception indirectly via result.Raise.

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

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