qa_filters: Use retry in more cases

Even starting a (delay 0.01) job without filters does not happen
within the 0.5 seconds we allowed if run in a big cluster.
Use retry here as well.

Signed-off-by: Niklas Hambuechen <niklash@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>
Add a design document for removal of the config lock

This design document describes how the negative effect of the config
lock can be removed in an incremental way.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
The config lock still exists

...so update the daemons-refactoring design document accordingly
to fit with implementation. The mentioned design document already
exists on the master branch.

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
  The config lock still exists

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>
Link to the config-lock design document

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

Fixes issues 758 and 912.
Since ghc -M does not generate inter object dependency rule for object
files, dependencies from a target executable seed object
(e.g. src/hluxid.o) to objects which finally will be linked to the
target object (e.g. src/Ganeti/Daemon.o) are missing in Makefile.ghc.
For instance, following commands will not rebuild src/hluxid inspite of
its dependent object src/Ganeti/Daemon.o has been updated.

    $ make # rebuild all once
    $ touch src/Ganeti/Daemon.hs
    $ make # this will rebuild src/Ganeti/Daemon.o, not src/hluxid.o

This patch adds simple substitution code after the Makefile.ghc
generation to add additional inter object dependency for all object
files to force relink related objects when a linked object has been
updated.

Signed-off-by: Yuto KAWAMURA(kawamuray) <kawamuray.dadada@gmail.com>
Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Really run wconfd as masterd and metad as root

Commits 9decc439eb4 and 4ddce51deb were incomplete, missing the relevant
group specifications. Since the decision was made to run wconfd as
masterd and metad as root, we use the respective existing groups.

Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Merge branch 'stable-2.11' into stable-2.12

* stable-2.11
  Fix broken haskell dependencies

No conflicts.

Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
use the Python interpreter from env

use the Python interpreter which has been set via PYTHON env-var at
configure time

Signed-off-by: Neal Oakey <neal.oakey@googlemail.com>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Merge branch 'stable-2.12' into master

* stable-2.12
  Really run wconfd as masterd and metad as root

* stable-2.11
  Fix broken haskell dependencies

No conflicts.

Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Add a 'with' context for running tests with paused watcher

The context is responsible for stopping and re-starting the watcher for
the corresponding block of code.

Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Run the EPO tests with watcher turned off

Otherwise the watcher might restart instances just after the EPO,
failing the test.

Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Fix check for sphinx-build from python2-sphinx

if using python2-sphinx '/usr/bin/sphinx-build2 --version' prints
"Sphinx (sphinx-build2) 1.2.3" which didn't match the regex

Signed-off-by: Neal Oakey <neal.oakey@googlemail.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Prepare master branch for 2.14 devel cycle

Bump versions in various places to 2.14 and remove the downgrade code
from cfgupgrade.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Allow unlocked reading of the config

As all writes to the config bring in all changes in an atomic
fashion, we can allow reading the configuration without owning
the ConfigLock.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Read the configuration without locking it

As reads to the config are consistent anyway (changes go in
by a single change to WConfD), do not acquire the config lock
for read-only operations. To keep the transition smooth, this
read without locking is built into the config manager as the
new "shared" synchronisation.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Replace 'DISKLESS' check w/ 'not inst.disks'

The disk templates are going away for the instances, so the new
definition of being diskless is to be actually without any disks
attached.

Signed-off-by: Aaron Karper <akarper@google.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Remove duplication for DiskTemplate/StorageType mapping

Currently both Ganeti.Constants and Ganeti.Types define the mapping of
disk templates and storage types independently. This change automates
the generation of the mapping in Ganeti.Constants.

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

This change enables tools like 'nose2' to execute only one single test
method, which is a great help when debugging. Plus using wraps is good
style for a wrapper.

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

Use Applicative in disk type parsing

remove unnecessary lambda in THH code

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