ganeti-local
13 years agoMove locking.RunningTimeout to utils
René Nussbaumer [Tue, 9 Nov 2010 12:43:30 +0000 (13:43 +0100)]
Move locking.RunningTimeout to utils

As we need this functionality in other places than just locking it makes
sense to move it to utils rather than keeping it in locking

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoSome further man tweaks
Iustin Pop [Sat, 13 Nov 2010 20:46:57 +0000 (21:46 +0100)]
Some further man tweaks

This fixes one non-defined @CUSTOM_@ entry, and replaces two hardcoded
paths with further configure-time variables.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoRemove last vestiges of docbook
Iustin Pop [Sat, 13 Nov 2010 20:30:44 +0000 (21:30 +0100)]
Remove last vestiges of docbook

This patch removes the last traces of docbook.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoRemove the SGML man sources
Iustin Pop [Sat, 13 Nov 2010 20:28:34 +0000 (21:28 +0100)]
Remove the SGML man sources

… finally!

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoSwitch man pages from SGML to RST
Iustin Pop [Sat, 13 Nov 2010 19:41:14 +0000 (20:41 +0100)]
Switch man pages from SGML to RST

This patch changes the Makefile rules to build the man pages from the
RST sources instead of the SGML ones.

Note: pandoc quotes by default the ‘@’ character in manpage output, so
we explicitely undo this before writing the .in file.

Note 2: The docs unittest has switched from checking cmdsynopsis
elements to search for either '**command**' or '| **command**' at the
beggining of lines. This is not as safe as the sgml checker, but it
should be fine.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoAdd RST version of ganeti man page
Iustin Pop [Sat, 13 Nov 2010 19:30:50 +0000 (20:30 +0100)]
Add RST version of ganeti man page

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoAdd RST version of ganeti-os-interface man page
Iustin Pop [Sat, 13 Nov 2010 18:43:24 +0000 (19:43 +0100)]
Add RST version of ganeti-os-interface man page

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoAdd RST version of ganeti-cleaner man page
Iustin Pop [Sat, 13 Nov 2010 17:06:12 +0000 (18:06 +0100)]
Add RST version of ganeti-cleaner man page

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoAdd RST version of ganeti-confd man page
Iustin Pop [Sat, 13 Nov 2010 19:24:40 +0000 (20:24 +0100)]
Add RST version of ganeti-confd man page

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoAdd RST version of ganeti-rapi man page
Iustin Pop [Sat, 13 Nov 2010 19:22:53 +0000 (20:22 +0100)]
Add RST version of ganeti-rapi man page

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoAdd RST version of ganeti-noded man page
Iustin Pop [Sat, 13 Nov 2010 19:17:35 +0000 (20:17 +0100)]
Add RST version of ganeti-noded man page

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoAdd RST version of ganeti-watcher man page
Iustin Pop [Sat, 13 Nov 2010 19:14:32 +0000 (20:14 +0100)]
Add RST version of ganeti-watcher man page

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoAdd RST version of ganeti-masterd man page
Iustin Pop [Sat, 13 Nov 2010 19:08:41 +0000 (20:08 +0100)]
Add RST version of ganeti-masterd man page

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoAdd RST version of gnt-os man page
Iustin Pop [Sat, 13 Nov 2010 19:02:53 +0000 (20:02 +0100)]
Add RST version of gnt-os man page

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoAdd RST version of gnt-job man page
Iustin Pop [Sat, 13 Nov 2010 18:59:21 +0000 (19:59 +0100)]
Add RST version of gnt-job man page

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoAdd RST version of gnt-debug man page
Iustin Pop [Sat, 13 Nov 2010 18:55:47 +0000 (19:55 +0100)]
Add RST version of gnt-debug man page

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoAdd RST version of gnt-backup man page
Iustin Pop [Sat, 13 Nov 2010 18:50:32 +0000 (19:50 +0100)]
Add RST version of gnt-backup man page

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoAdd RST version of gnt-node man page
Iustin Pop [Sat, 13 Nov 2010 18:33:40 +0000 (19:33 +0100)]
Add RST version of gnt-node man page

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoAdd RST version of gnt-cluster man page
Iustin Pop [Sat, 13 Nov 2010 18:17:41 +0000 (19:17 +0100)]
Add RST version of gnt-cluster man page

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoAdd RST version of gnt-instance man page
Iustin Pop [Sat, 13 Nov 2010 18:02:10 +0000 (19:02 +0100)]
Add RST version of gnt-instance man page

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoAdd a footer.rst
Iustin Pop [Thu, 11 Nov 2010 16:04:15 +0000 (17:04 +0100)]
Add a footer.rst

This is the conversion from footer.sgml. Will be used later for the
rst-to-man conversion.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoAdd pandoc to configure.ac
Iustin Pop [Thu, 11 Nov 2010 15:51:35 +0000 (16:51 +0100)]
Add pandoc to configure.ac

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoDesign document for new query infrastructure
Michael Hanselmann [Fri, 12 Nov 2010 14:03:40 +0000 (15:03 +0100)]
Design document for new query infrastructure

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoAdd group, group.uuid fields in node list
Iustin Pop [Thu, 11 Nov 2010 10:50:23 +0000 (11:50 +0100)]
Add group, group.uuid fields in node list

This is needed to at least see the current group configuration.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoimpexpd: Disable OpenSSL compression in socat if possible
Michael Hanselmann [Wed, 10 Nov 2010 18:43:01 +0000 (19:43 +0100)]
impexpd: Disable OpenSSL compression in socat if possible

This uses an option only available in patched socat versions. More
information is available from the INSTALL update included in this
patch.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

13 years agoMerge branch 'devel-2.3'
Michael Hanselmann [Tue, 9 Nov 2010 15:35:36 +0000 (16:35 +0100)]
Merge branch 'devel-2.3'

* devel-2.3:
  devel/release: Use release-specific Makefile targets
  Makefile: Add new dist target for releases
  Makefile: Stricter checks for release distchecks

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoMerge branch 'devel-2.2' into devel-2.3
Michael Hanselmann [Tue, 9 Nov 2010 13:56:49 +0000 (14:56 +0100)]
Merge branch 'devel-2.2' into devel-2.3

* devel-2.2:
  devel/release: Use release-specific Makefile targets
  Makefile: Add new dist target for releases
  Makefile: Stricter checks for release distchecks

Conflicts:
Makefile.am: Trivial

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agodevel/release: Use release-specific Makefile targets
Michael Hanselmann [Mon, 8 Nov 2010 19:44:00 +0000 (20:44 +0100)]
devel/release: Use release-specific Makefile targets

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoMakefile: Add new dist target for releases
Michael Hanselmann [Mon, 8 Nov 2010 19:43:39 +0000 (20:43 +0100)]
Makefile: Add new dist target for releases

A new script, autotools/check-tar, is used to check the resulting
.tar.gz file for unwanted contents like wrong file owners or
permissions.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoMerge branch 'devel-2.3'
Michael Hanselmann [Mon, 8 Nov 2010 16:05:37 +0000 (17:05 +0100)]
Merge branch 'devel-2.3'

* devel-2.3:
  Update ganeti-os-interface documentation
  Makefile: Check for empty files and dirs on distcheck
  Revert commit e7e23e73, work around Automake bug

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoUpdate ganeti-os-interface documentation
Apollon Oikonomopoulos [Fri, 5 Nov 2010 14:32:48 +0000 (16:32 +0200)]
Update ganeti-os-interface documentation

man/ganeti-os-interace.sgml lacked complete information for the NIC-related
environment variables. Added a reference to NIC_%N_LINK and NIC_%N_MODE and
clarified the reference to NIC_%N_BRIDGE.

Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoMakefile: Check for empty files and dirs on distcheck
Michael Hanselmann [Thu, 4 Nov 2010 13:39:12 +0000 (14:39 +0100)]
Makefile: Check for empty files and dirs on distcheck

Including empty files can cause unnecessary warnings for packagers.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoRevert commit e7e23e73, work around Automake bug
Michael Hanselmann [Thu, 4 Nov 2010 14:56:13 +0000 (15:56 +0100)]
Revert commit e7e23e73, work around Automake bug

After commit e7e23e73 the build would fail in distcheck on systems with
Automake 1.10. An investigation identified Automake bug #533[1] as the
cause. Applying the changes in Automake commit 3a12ed5e[2] to the
generated Makefile.in file made distcheck work again.

The underlying problem is that in our case both doc/html and
doc/html/.dir were included in the distributed files. When distcheck
copied the former from the source to the staging directory, it was
marked as read-only (distcheck makes the whole source read-only). It
then tried to copy doc/html/.dir from the build directory, which failed.
Automake 1.11 and newer avoid this problem by adjusting the permissions.

Since depending on Automake 1.11 or above is not an option at this time,
a work-around was found by not using a “.dir” file in doc/html, but
using “index.html” as a flag for creating the directory.

[1] http://sourceware.org/cgi-bin/gnatsweb.pl?cmd=view&database=automake&pr=533
[2] http://git.savannah.gnu.org/gitweb/?p=automake.git;a=commit;h=3a12ed5e97dc193a38dd14e031658cbd329b50ca

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoDesign Doc: Ganeti Node OOB Management Framework
Marc Schmitt [Thu, 28 Oct 2010 11:42:36 +0000 (13:42 +0200)]
Design Doc: Ganeti Node OOB Management Framework

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoFix disk checks in “gnt-cluster verify”
Michael Hanselmann [Wed, 3 Nov 2010 12:56:16 +0000 (13:56 +0100)]
Fix disk checks in “gnt-cluster verify”

Tests have shown that the changes in commit b8d26c6e5 don't work as
wanted. If any disk wasn't found on the node, all disks located on the
same node would show as faulty. The cause was incorrect exception
handling on the node.

This patch changes the RPC call to return a per-disk success/error
status, avoiding the problem.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Luca Bigliardi <shammash@google.com>

13 years agoQA: Run “gnt-cluster verify” while DRBD instance exists
Michael Hanselmann [Wed, 3 Nov 2010 12:49:43 +0000 (13:49 +0100)]
QA: Run “gnt-cluster verify” while DRBD instance exists

This tests some parts of the disk information collection.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Luca Bigliardi <shammash@google.com>

13 years agoRemove empty file from doc/html in distribution
Michael Hanselmann [Tue, 2 Nov 2010 13:42:32 +0000 (14:42 +0100)]
Remove empty file from doc/html in distribution

It's not needed and some packaging systems complain about empty
files.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoRemove shebang line from ganeti.server.*
Michael Hanselmann [Tue, 2 Nov 2010 13:41:58 +0000 (14:41 +0100)]
Remove shebang line from ganeti.server.*

Some of then were forgotten.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoFix typos in NEWS
Michael Hanselmann [Tue, 2 Nov 2010 13:16:34 +0000 (14:16 +0100)]
Fix typos in NEWS

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoBump version for Ganeti 2.3 v2.3.0rc0
Michael Hanselmann [Tue, 2 Nov 2010 10:49:55 +0000 (11:49 +0100)]
Bump version for Ganeti 2.3

Also update cfgupgrade and NEWS.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoAdd -s option to gnt-node modify
Guido Trotter [Sat, 30 Oct 2010 08:39:22 +0000 (09:39 +0100)]
Add -s option to gnt-node modify

We can now change a nodes' secondary ip.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoluxi: disable two lint errors
Guido Trotter [Mon, 1 Nov 2010 10:17:21 +0000 (10:17 +0000)]
luxi: disable two lint errors

This is already disabled for the same type of request a couple of lines
above. The new code was introduced in e986f20c but didn't have the
disables.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoRemove private ip mention in error message
Guido Trotter [Mon, 1 Nov 2010 12:44:22 +0000 (12:44 +0000)]
Remove private ip mention in error message

There is no "private" ip in Ganeti, we only have primary and secondary
ones. Whether they are public or private is a per-installation detail.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoAdd ConfigWriter.GetNodeGroup
Guido Trotter [Sat, 30 Oct 2010 09:16:20 +0000 (10:16 +0100)]
Add ConfigWriter.GetNodeGroup

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoImprove LookupNodeGroup's docstring
Guido Trotter [Sat, 30 Oct 2010 09:15:58 +0000 (10:15 +0100)]
Improve LookupNodeGroup's docstring

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoMerge the common options between import and add
Guido Trotter [Fri, 29 Oct 2010 11:43:13 +0000 (12:43 +0100)]
Merge the common options between import and add

The "I always wanted to do this" commit.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoDrop the -g shortcut for --vg-name
Guido Trotter [Fri, 29 Oct 2010 10:42:11 +0000 (11:42 +0100)]
Drop the -g shortcut for --vg-name

Changing the volume group is a lot less frequent than acting on a node
group. As such we drop the "-g" shortcut and require the long option to
be passed. In 2.3 the commands which used to accept the volume group as
"-g" won't have any node group option, so no confusion will arise. Later
on we may pass "-g" as the initial node group name to gnt-cluster init,
although that's not strictly necessary, as modifying it later is always
possible.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoUpdate NEWS for Ganeti 2.3
Michael Hanselmann [Mon, 1 Nov 2010 15:00:57 +0000 (16:00 +0100)]
Update NEWS for Ganeti 2.3

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoQA: Test ssconf_instance_list file on rename and creation
Michael Hanselmann [Mon, 1 Nov 2010 13:01:23 +0000 (14:01 +0100)]
QA: Test ssconf_instance_list file on rename and creation

This test would've caught the bug fixed in the previous patch.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoconfig: Write ssconf after renaming instance
Michael Hanselmann [Mon, 1 Nov 2010 13:00:33 +0000 (14:00 +0100)]
config: Write ssconf after renaming instance

This fixes a bug where the ssconf_instance_list file was
not updated after an instance rename.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoChange qa_utils.ResolveInstanceName to take name
Michael Hanselmann [Mon, 1 Nov 2010 12:59:47 +0000 (13:59 +0100)]
Change qa_utils.ResolveInstanceName to take name

… instead of an object. Allows it to be used in places where
only the name is available.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoMakefile: Add PYTHON_BOOTSTRAP to linted code
Michael Hanselmann [Fri, 29 Oct 2010 14:55:05 +0000 (16:55 +0200)]
Makefile: Add PYTHON_BOOTSTRAP to linted code

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoMake *.in non-executable
Michael Hanselmann [Fri, 29 Oct 2010 14:26:28 +0000 (16:26 +0200)]
Make *.in non-executable

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoMove ganeti-rapi to ganeti.server.rapi
Michael Hanselmann [Fri, 29 Oct 2010 14:10:50 +0000 (16:10 +0200)]
Move ganeti-rapi to ganeti.server.rapi

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoMove ganeti-noded to ganeti.server.noded
Michael Hanselmann [Fri, 29 Oct 2010 14:08:48 +0000 (16:08 +0200)]
Move ganeti-noded to ganeti.server.noded

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoMove ganeti-confd to ganeti.server.confd
Michael Hanselmann [Fri, 29 Oct 2010 14:05:20 +0000 (16:05 +0200)]
Move ganeti-confd to ganeti.server.confd

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoMove ganeti-masterd to ganeti.server.masterd
Michael Hanselmann [Fri, 29 Oct 2010 13:26:20 +0000 (15:26 +0200)]
Move ganeti-masterd to ganeti.server.masterd

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoPrepare move of daemons to ganeti.server
Michael Hanselmann [Fri, 29 Oct 2010 13:13:51 +0000 (15:13 +0200)]
Prepare move of daemons to ganeti.server

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoMove ganeti-watcher to ganeti.watcher
Michael Hanselmann [Wed, 27 Oct 2010 17:51:30 +0000 (19:51 +0200)]
Move ganeti-watcher to ganeti.watcher

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoMakefile: Generalize bootstrap script generator
Michael Hanselmann [Wed, 27 Oct 2010 17:52:17 +0000 (19:52 +0200)]
Makefile: Generalize bootstrap script generator

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoMakefile: Stricter checks for release distchecks
Michael Hanselmann [Wed, 27 Oct 2010 15:20:20 +0000 (17:20 +0200)]
Makefile: Stricter checks for release distchecks

This should avoid cases like commit f64de30f where the release
date was forgotten from NEWS.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agosetup-ssh: Better error reporting
René Nussbaumer [Fri, 29 Oct 2010 12:52:52 +0000 (14:52 +0200)]
setup-ssh: Better error reporting

Together with Michael we refactored the code to make it better and
easier error reporting. Without printing backtraces for authentication
and verification issues.

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoMakefile: Streamline directory creation
Michael Hanselmann [Thu, 28 Oct 2010 15:06:21 +0000 (17:06 +0200)]
Makefile: Streamline directory creation

Some directories don't exist in the repository, but are required at build time
(e.g. doc/html). Until now some were created explicitly, some through the
target “stamp-directories” and other target simply relied on a previous target
to create the directory.

This patch tries to clean this up by getting rid of “stamp-directories” and
instead use rules to recreate any missing directory. As described in a comment
in the code, a file inside each directory is necessary, named “.dir”.

Order-only dependencies are used for directory creation to avoid rebuilding
where only the “.dir” file is missing (see “info make”, section “4.3 Types of
Prerequisites”).

The target for building the documentation is also changed to use “…/index.html”
instead of a hidden file. Some style changes are also made.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoAdd support and checks for version in LUXI
Michael Hanselmann [Thu, 28 Oct 2010 16:48:20 +0000 (18:48 +0200)]
Add support and checks for version in LUXI

A new constant, LUXI_VERSION, is used to verify the peer's version. The
version is optional, so old(er) clients and servers talking to peers not
supporting it won't break. Example with mismatching library:

$ gnt-instance list
Unhandled Ganeti error: LUXI version mismatch, server 2020000, request
1010000

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoluxi.ProtocolError: Derive from errors.LuxiError
Michael Hanselmann [Thu, 28 Oct 2010 15:11:43 +0000 (17:11 +0200)]
luxi.ProtocolError: Derive from errors.LuxiError

This allows LUXI errors to be encoded and serialized.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoLUExportInstance: Accept instance already shut down
Michael Hanselmann [Thu, 28 Oct 2010 16:03:14 +0000 (18:03 +0200)]
LUExportInstance: Accept instance already shut down

To remove the instance after an export it needs to be stopped. This can
be achived using the parameter “shutdown”, or by explicitly shutting
down the instance before exporting. The latter would still require the
“shutdown” parameter to be set. To make it more intuitive, this
requirement is changed with this patch. Instances already stopped are
accepted for automatic removal.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoQA: Allow job queue test to be disabled
Michael Hanselmann [Thu, 28 Oct 2010 15:58:45 +0000 (17:58 +0200)]
QA: Allow job queue test to be disabled

On my machine it takes over 30 seconds, disabling it can
speed up the QA.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoConfigWriter.GetNodeGroupList
Guido Trotter [Wed, 27 Oct 2010 13:47:12 +0000 (14:47 +0100)]
ConfigWriter.GetNodeGroupList

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoGanetiLockManager, remove default values
Guido Trotter [Wed, 27 Oct 2010 13:14:47 +0000 (14:14 +0100)]
GanetiLockManager, remove default values

The nodes and instances parameters to the constructor are mandatory
anyway, as a value of None will fail when creating the LockSet. Rather
than fixing this adding code lines, since we never used the default
value, let's remove them and require that the parameters are passed.

This also fixes the only places where we inited GanetiLockManager with
keyed parameters and without arguments.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoAdd test for modifiable locking levels
Guido Trotter [Wed, 27 Oct 2010 14:09:01 +0000 (15:09 +0100)]
Add test for modifiable locking levels

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoUpdate 2.3 design doc regarding node group features and behavior.
Adeodato Simo [Thu, 28 Oct 2010 11:57:04 +0000 (12:57 +0100)]
Update 2.3 design doc regarding node group features and behavior.

In particular:

  - introduce a "gnt-group" command to hold group-level operations.
  - ditch the concept of "default node group", except for single-group
    clusters.
  - introduce an "alloc_policy" attribute for node groups, indicating
    how they should be treated by automated allocation tools.
  - introduce a "drain" operation on node groups.
  - define iallocator modes for new instance allocation and
    inter-group moves (choosing among all groups, or providing a
    limiting list).
  - indicate and explain that changing the group of a node will be
    initially only supported for nodes that are empty.

Signed-off-by: Adeodato Simo <dato@google.com>
Signed-off-by: Balazs Lecz <leczb@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

13 years agoPrevent onlining a node without working noded
Iustin Pop [Thu, 28 Oct 2010 12:32:07 +0000 (14:32 +0200)]
Prevent onlining a node without working noded

This is just a basic check, plus a warning. In the future, we might do
more checks, or prevent simple onlining (without readd) if --force is
not passed.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

13 years agoYet another rework in LUSetNodeParms
Iustin Pop [Thu, 28 Oct 2010 11:57:28 +0000 (13:57 +0200)]
Yet another rework in LUSetNodeParms

We will need the new role in CheckPrereq, so move its computation there
and save the new role to self.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

13 years agoPrevent moving/creating instances on non-vm nodes
Iustin Pop [Wed, 27 Oct 2010 15:17:14 +0000 (17:17 +0200)]
Prevent moving/creating instances on non-vm nodes

This small patch modifies LUCreateInstance, LUReplaceDisks and
LUMoveInstance to not use non-vm_capable nodes.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoAdd a CheckNodeVmCapable helper in cmdlib
Iustin Pop [Wed, 27 Oct 2010 15:11:05 +0000 (17:11 +0200)]
Add a CheckNodeVmCapable helper in cmdlib

Also changes the error code for the other CheckNode* helpers to
ECODE_STATE, not ECODE_INVAL: ECODE_INVAL is for requests that are
invalid (e.g. create drbd instance with one node), whereas ECODE_STATE
denote requests that are not satisfiable due to cluster/node/instance
state.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoAdd the capability flags in node info output
Iustin Pop [Wed, 27 Oct 2010 15:06:23 +0000 (17:06 +0200)]
Add the capability flags in node info output

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoAdd the master/vm_capable flags in node add
Iustin Pop [Wed, 27 Oct 2010 15:03:03 +0000 (17:03 +0200)]
Add the master/vm_capable flags in node add

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoAdd support for vm_capable in file distribution
Iustin Pop [Wed, 27 Oct 2010 14:36:42 +0000 (16:36 +0200)]
Add support for vm_capable in file distribution

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoAdd an UploadHelper to cmdlib
Iustin Pop [Wed, 27 Oct 2010 14:34:01 +0000 (16:34 +0200)]
Add an UploadHelper to cmdlib

This is used in two places already, and will be needed in a third, so
let's abstract it.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoAdd support for vm_capable in cluster verify
Iustin Pop [Wed, 27 Oct 2010 14:12:01 +0000 (16:12 +0200)]
Add support for vm_capable in cluster verify

The method to make vm_capable integrate easily into cluster verify is as follows:

- we add a new NV_VMNODES that represents *non*-vm-capable nodes
- the LU populates this list (it's expected that non-vm_capable nodes
  are few compared to vm_capable nodes)
- backend skips the checks that are related to VM hosting
- in the LU, we reorder the VM-related checks so that they occur after
  the non-VM (generic) tests, and we only execute them conditionally

Additionally, we add some support to the instance checks to detect
instances living on bad nodes.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoAdd vm_capable to gnt-node modify
Iustin Pop [Wed, 27 Oct 2010 12:43:32 +0000 (14:43 +0200)]
Add vm_capable to gnt-node modify

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoAdd vm_capable to LUSetNodeParams
Iustin Pop [Wed, 27 Oct 2010 11:53:27 +0000 (13:53 +0200)]
Add vm_capable to LUSetNodeParams

And also do some cleanup: we only run the role changed actions if the
node has actually changed roles.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoConfigWriter: add some helper functions
Iustin Pop [Wed, 27 Oct 2010 11:30:16 +0000 (13:30 +0200)]
ConfigWriter: add some helper functions

This can be used to compute a node's instances easily, and a small
function to get all non-vm_capable nodes.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

13 years agoLUClusterVerify: Complain if disk is marked faulty
Michael Hanselmann [Wed, 27 Oct 2010 15:50:16 +0000 (17:50 +0200)]
LUClusterVerify: Complain if disk is marked faulty

This will show a warning if, for example, one side of a DRBD
disk becomes unavailable. The data is collected separately
from the other verification data.

Example output:

* Verifying instance status
 - ERROR: instance inst1: disk/0 on node2 is faulty

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoMakefile: Stricter checks for release distchecks
Michael Hanselmann [Wed, 27 Oct 2010 15:20:20 +0000 (17:20 +0200)]
Makefile: Stricter checks for release distchecks

This should avoid cases like commit f64de30f where the release
date was forgotten from NEWS.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoA number of Makefile fixes
Michael Hanselmann [Wed, 27 Oct 2010 12:32:14 +0000 (14:32 +0200)]
A number of Makefile fixes

- run-in-tempdir should depend on what it copies to the temporary dir
- Add PYTHON_BOOTSTRAP to BUILT_SOURCES
- Don't use “mkdir -p” directly
- Create directory if necessary for writing bootstrap script

In summary, this should make “make distcheck” in pristine
checkout work again.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoRebuild bash completion if client scripts change
Michael Hanselmann [Wed, 27 Oct 2010 12:05:34 +0000 (14:05 +0200)]
Rebuild bash completion if client scripts change

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoMove gnt-backup to ganeti.client.gnt_backup
Michael Hanselmann [Wed, 27 Oct 2010 11:41:47 +0000 (13:41 +0200)]
Move gnt-backup to ganeti.client.gnt_backup

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoMove gnt-instance to ganeti.client.gnt_instance
Michael Hanselmann [Wed, 27 Oct 2010 11:37:48 +0000 (13:37 +0200)]
Move gnt-instance to ganeti.client.gnt_instance

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoMove gnt-job to ganeti.client.gnt_job
Michael Hanselmann [Wed, 27 Oct 2010 11:33:28 +0000 (13:33 +0200)]
Move gnt-job to ganeti.client.gnt_job

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoMove gnt-node to ganeti.client.gnt_node
Michael Hanselmann [Wed, 27 Oct 2010 11:30:44 +0000 (13:30 +0200)]
Move gnt-node to ganeti.client.gnt_node

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoMove gnt-cluster to ganeti.client.gnt_cluster
Michael Hanselmann [Wed, 27 Oct 2010 11:27:32 +0000 (13:27 +0200)]
Move gnt-cluster to ganeti.client.gnt_cluster

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoPython bootstrapper: hardcode /usr/bin/python
Michael Hanselmann [Wed, 27 Oct 2010 11:52:14 +0000 (13:52 +0200)]
Python bootstrapper: hardcode /usr/bin/python

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoMove gnt-os to ganeti.client.gnt_os
Michael Hanselmann [Wed, 27 Oct 2010 11:02:13 +0000 (13:02 +0200)]
Move gnt-os to ganeti.client.gnt_os

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoMove gnt-debug to ganeti.client.gnt_debug
Michael Hanselmann [Wed, 27 Oct 2010 11:00:49 +0000 (13:00 +0200)]
Move gnt-debug to ganeti.client.gnt_debug

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoAllow programs to be part of the Ganeti library
Michael Hanselmann [Wed, 27 Oct 2010 10:58:13 +0000 (12:58 +0200)]
Allow programs to be part of the Ganeti library

Eventually this will help ensuring that clients and servers are of the
same version, as long as they're imported from the same path. Currently
it's relatively easy for gnt-* and ganeti-* to be from a different
version.

Scripts will be at ganeti.client.gnt_* and a small bootstrap script
calls a “Main” function from the module.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoAdd master_capab to gnt-node modify
Iustin Pop [Tue, 26 Oct 2010 15:43:37 +0000 (17:43 +0200)]
Add master_capab to gnt-node modify

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoImplement the master_capable flag in node modify
Iustin Pop [Tue, 26 Oct 2010 15:36:35 +0000 (17:36 +0200)]
Implement the master_capable flag in node modify

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoExport the capability flags in query, rapi, ialloc
Iustin Pop [Tue, 26 Oct 2010 15:59:10 +0000 (17:59 +0200)]
Export the capability flags in query, rapi, ialloc

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoAdd the master/vm_capable flags to objects
Iustin Pop [Tue, 26 Oct 2010 12:05:56 +0000 (14:05 +0200)]
Add the master/vm_capable flags to objects

This adds the flag and some initial handling. The rest of the changes,
for cmdlib, come in a separate patch.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>