Make build_chroot self-contained

The configuration file are included in build_chroot, and are
automatically created by the script if it is not able to find them
already in the directory pointed by $DATA_DIR.

Note that the configuration file directory is cleaned if it's temporary,
but it is left untouched if it was esplicitly specified by the user.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Improve the final message of build_chroot

Give more precise instructions on the next steps to actually run the
chroot.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Add tools for building deb packages to build_chroot

The chroot only had tools for building and testing Ganeti, but not for
building its Debian packages. They are added by this commit.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Add a warning about the restriction of gnt-node evacuate

Even though gnt-node evacuate should be able to evacuate all instances
at once, this currently is not the case. Add a warning about this deficit
for the time being.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Fix permissions of the queue archive dir

The permissions were set to 0740, but of course being a directory the
correct permissions are 0750.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Update security document wrt confd access to SSL cert

The fact that confd has been given access to the server.pem certificate
needs to be described in the security document.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Fix typos in the documentation index

This patch fixes some typos in the documentation index.

Signed-off-by: Weiwei Jia <harryxiyou@gmail.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Fix typo in the documentation index

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

Add command for updating the list of cabal packages, before starting
installing them.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Better specify what packages to install

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Disable python test if required libraries are missing

Some python libraries are only needed for the tests, but not for running
Ganeti. If those libraries are missing, just disable the Python tests.

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

TestInstanceConsecutiveFailures now leaves the test instance in the same
state it got it.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
grow disk: call SetDiskID before blockdev_getsize

Missing this call caused blockdev_getsize to be called on the wrong
physical device, and fail.

This fixes Issue 497.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Catch DeviceCreationError unhandled exceptions

_CreateBlockDevInner is called twice in TLReplaceDisks. While this
should be fixed, right now this leaves the DeviceCreationError exception
unhandled, which causes a problem due to the fact that this exception
was never supposed to be sent over the wire. For 2.7 we just catch the
exception and convert it to an OpExecError, but we should later do a
more proper cleanup.

This addresses Issue 472.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Merge branch 'stable-2.7' into stable-2.8

* stable-2.7:
  Add a warning about the restriction of gnt-node evacuate
  Fix permissions of the queue archive dir
  Fix daemon QA tests
  grow disk: call SetDiskID before blockdev_getsize
  Catch DeviceCreationError unhandled exceptions

Conflicts:
	lib/cmdlib.py (due to the cmdlib split)
	qa/qa_daemon.py (trivial)

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Fix issue with python coverage tests

The recently introduced check for python libraries required only for testing
(commit 27df5b736ef72b3b12c07f32d64dbac95fe7a5ba) was not correct. This
patch fixes the issue.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Change version numbers in documentation

Some of the documents have the version number of Ganeti. This commit updates
it in preparation for the 2.8 version bump.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Version bump to 2.8.0~beta1

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
gnt-cluster info (py): add enabled disk templates

This fixes issue 485. In the python implementation of
the cluster config info, the enabled_disk_templates
were missing.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Provide a special filter for host names

For host names, usually short forms are used, e.g., node1 or node1.sub
instead of the full qualified node1.sub.example.com. Therefore comparing
node names only by equality is too restrictive. This patch provides an
alternative makeHostnameFilter to makeSimpleFilter suitable for comparing
host names.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>