ganeti-local
12 years agorlib2: Convert /2/instances to OpcodeResource
Michael Hanselmann [Fri, 9 Sep 2011 10:16:38 +0000 (12:16 +0200)]
rlib2: Convert /2/instances to OpcodeResource

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

12 years agorlib2: Convert /2/*/tags to OpcodeResource
Michael Hanselmann [Fri, 9 Sep 2011 09:56:10 +0000 (11:56 +0200)]
rlib2: Convert /2/*/tags to OpcodeResource

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

12 years agorlib2: Convert /2/nodes/[node_name]/storage/repair to OpcodeResource
Michael Hanselmann [Fri, 9 Sep 2011 09:40:05 +0000 (11:40 +0200)]
rlib2: Convert /2/nodes/[node_name]/storage/repair to OpcodeResource

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

12 years agorlib2: Convert /2/nodes/[node_name]/storage/modify to OpcodeResource
Michael Hanselmann [Fri, 9 Sep 2011 09:36:51 +0000 (11:36 +0200)]
rlib2: Convert /2/nodes/[node_name]/storage/modify to OpcodeResource

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

12 years agorlib2: Convert /2/nodes/[node_name]/storage to OpcodeResource
Michael Hanselmann [Fri, 9 Sep 2011 09:26:31 +0000 (11:26 +0200)]
rlib2: Convert /2/nodes/[node_name]/storage to OpcodeResource

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

12 years agorlib2: Convert /2/groups/[group_name] to OpcodeResource
Michael Hanselmann [Fri, 9 Sep 2011 08:50:15 +0000 (10:50 +0200)]
rlib2: Convert /2/groups/[group_name] to OpcodeResource

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

12 years agorlib2: Convert /2/nodes/[node_name]/role to OpcodeResource
Michael Hanselmann [Fri, 9 Sep 2011 08:46:51 +0000 (10:46 +0200)]
rlib2: Convert /2/nodes/[node_name]/role to OpcodeResource

Also fix a typo in a constant name.

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

12 years agorlib2: Convert /2/instances/[inst]/disk/[idx]/grow to OpcodeResource
Michael Hanselmann [Thu, 8 Sep 2011 16:39:14 +0000 (18:39 +0200)]
rlib2: Convert /2/instances/[inst]/disk/[idx]/grow to OpcodeResource

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

12 years agorlib2: Convert /2/instances/[inst]/modify to OpcodeResource
Michael Hanselmann [Thu, 8 Sep 2011 16:34:25 +0000 (18:34 +0200)]
rlib2: Convert /2/instances/[inst]/modify to OpcodeResource

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

12 years agorlib2: Convert /2/instances/[inst]/rename to OpcodeResource
Michael Hanselmann [Thu, 8 Sep 2011 16:28:26 +0000 (18:28 +0200)]
rlib2: Convert /2/instances/[inst]/rename to OpcodeResource

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

12 years agorlib2: Convert /2/instances/[inst]/failover to OpcodeResource
Michael Hanselmann [Thu, 8 Sep 2011 16:23:21 +0000 (18:23 +0200)]
rlib2: Convert /2/instances/[inst]/failover to OpcodeResource

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

12 years agorlib2: Convert /2/instances/[inst]/migrate to OpcodeResource
Michael Hanselmann [Thu, 8 Sep 2011 16:20:51 +0000 (18:20 +0200)]
rlib2: Convert /2/instances/[inst]/migrate to OpcodeResource

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

12 years agorlib2: Convert /2/instances/[inst]/export to OpcodeResource
Michael Hanselmann [Thu, 8 Sep 2011 16:16:58 +0000 (18:16 +0200)]
rlib2: Convert /2/instances/[inst]/export to OpcodeResource

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

12 years agorlib2: Convert /2/instances/[inst]/prepare-export to OpcodeResource
Michael Hanselmann [Thu, 8 Sep 2011 15:54:47 +0000 (17:54 +0200)]
rlib2: Convert /2/instances/[inst]/prepare-export to OpcodeResource

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

12 years agorlib2: Convert /2/instances/[inst]/deactivate-disks to OpcodeResource
Michael Hanselmann [Thu, 8 Sep 2011 15:47:59 +0000 (17:47 +0200)]
rlib2: Convert /2/instances/[inst]/deactivate-disks to OpcodeResource

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

12 years agorlib2: Convert /2/instances/[inst]/activate-disks to OpcodeResource
Michael Hanselmann [Thu, 8 Sep 2011 15:42:07 +0000 (17:42 +0200)]
rlib2: Convert /2/instances/[inst]/activate-disks to OpcodeResource

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

12 years agorlib2: Convert /2/instances/[inst]/replace-disks to OpcodeResource
Michael Hanselmann [Thu, 8 Sep 2011 15:39:31 +0000 (17:39 +0200)]
rlib2: Convert /2/instances/[inst]/replace-disks to OpcodeResource

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

12 years agorlib2: Convert /2/instances/[inst]/shutdown to OpcodeResource
Michael Hanselmann [Thu, 8 Sep 2011 13:02:41 +0000 (15:02 +0200)]
rlib2: Convert /2/instances/[inst]/shutdown to OpcodeResource

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

12 years agorlib2: Convert /2/instances/[inst]/startup to OpcodeResource
Michael Hanselmann [Thu, 8 Sep 2011 13:00:28 +0000 (15:00 +0200)]
rlib2: Convert /2/instances/[inst]/startup to OpcodeResource

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

12 years agorlib2: Convert /2/instances/[inst]/reboot to OpcodeResource
Michael Hanselmann [Thu, 8 Sep 2011 12:56:44 +0000 (14:56 +0200)]
rlib2: Convert /2/instances/[inst]/reboot to OpcodeResource

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

12 years agorlib2: Convert /2/instances/[inst]/info to OpcodeResource
Michael Hanselmann [Thu, 8 Sep 2011 12:43:57 +0000 (14:43 +0200)]
rlib2: Convert /2/instances/[inst]/info to OpcodeResource

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

12 years agorlib2: Convert /2/instances/[inst] to OpcodeResource
Michael Hanselmann [Thu, 8 Sep 2011 12:40:31 +0000 (14:40 +0200)]
rlib2: Convert /2/instances/[inst] to OpcodeResource

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

12 years agorlib2: Convert /2/groups/[group_name]/assign-nodes to OpcodeResource
Michael Hanselmann [Thu, 8 Sep 2011 12:35:16 +0000 (14:35 +0200)]
rlib2: Convert /2/groups/[group_name]/assign-nodes to OpcodeResource

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

12 years agorlib2: Convert /2/groups/[group_name]/rename to OpcodeResource
Michael Hanselmann [Thu, 8 Sep 2011 12:29:37 +0000 (14:29 +0200)]
rlib2: Convert /2/groups/[group_name]/rename to OpcodeResource

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

12 years agorlib2: Convert /2/groups/[group_name]/modify to OpcodeResource
Michael Hanselmann [Thu, 8 Sep 2011 12:17:36 +0000 (14:17 +0200)]
rlib2: Convert /2/groups/[group_name]/modify to OpcodeResource

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

12 years agorlib2: Convert /2/groups to OpcodeResource
Michael Hanselmann [Thu, 8 Sep 2011 11:59:17 +0000 (13:59 +0200)]
rlib2: Convert /2/groups to OpcodeResource

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

12 years agorlib2: Convert /2/nodes/[node_name]/evacuate to OpcodeResource
Michael Hanselmann [Thu, 8 Sep 2011 11:49:08 +0000 (13:49 +0200)]
rlib2: Convert /2/nodes/[node_name]/evacuate to OpcodeResource

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

12 years agorlib2: Convert /2/nodes/[node_name]/migrate to OpcodeResource
Michael Hanselmann [Thu, 8 Sep 2011 11:48:45 +0000 (13:48 +0200)]
rlib2: Convert /2/nodes/[node_name]/migrate to OpcodeResource

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

12 years agorlib2: Convert /2/redistribute-config to OpcodeResource
Michael Hanselmann [Thu, 8 Sep 2011 11:35:57 +0000 (13:35 +0200)]
rlib2: Convert /2/redistribute-config to OpcodeResource

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

12 years agorlib2: Convert /2/modify to OpcodeResource
Michael Hanselmann [Thu, 8 Sep 2011 11:35:21 +0000 (13:35 +0200)]
rlib2: Convert /2/modify to OpcodeResource

Also add unittests.

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

12 years agorlib2: Add unittests for two error conditions
Michael Hanselmann [Thu, 8 Sep 2011 10:05:28 +0000 (12:05 +0200)]
rlib2: Add unittests for two error conditions

Adds tests for errors on connecting to the server and for a full queue.

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

12 years agobaserlib: Accept empty body in FillOpcode
Michael Hanselmann [Thu, 8 Sep 2011 11:36:15 +0000 (13:36 +0200)]
baserlib: Accept empty body in FillOpcode

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

12 years agobaserlib.ResourceBase: Allow overriding of LUXI client
Michael Hanselmann [Thu, 8 Sep 2011 10:04:55 +0000 (12:04 +0200)]
baserlib.ResourceBase: Allow overriding of LUXI client

This enables unittesting of RAPI resources.

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

12 years agobaserlib: Add more generic base class for opcode resources
Michael Hanselmann [Thu, 8 Sep 2011 09:46:09 +0000 (11:46 +0200)]
baserlib: Add more generic base class for opcode resources

This base class, which employs a meta class for the actual work, allows
easier definitions of RAPI resources using opcodes. Follow-up patches
will change some of the existing RAPI resources.

The long-term goal with these changes is to make it easier to verify the
consistency of RAPI with CLI (or the underlying opcodes).

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

12 years agobaserlib: Rename R_Generic to ResourceBase
Michael Hanselmann [Thu, 8 Sep 2011 09:38:39 +0000 (11:38 +0200)]
baserlib: Rename R_Generic to ResourceBase

Apart from making match Ganeti's code style the name is also more
descriptive.

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

12 years agobaserlib: Move GetClient/SubmitJob into base class
Michael Hanselmann [Thu, 8 Sep 2011 09:35:16 +0000 (11:35 +0200)]
baserlib: Move GetClient/SubmitJob into base class

Unlike stand-alone functions these will be relatively easy to override
for unittests.

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

12 years agorapi: Merge tag helpers into resource
Michael Hanselmann [Thu, 8 Sep 2011 09:34:26 +0000 (11:34 +0200)]
rapi: Merge tag helpers into resource

They were only used in one place and upcoming changes, enabling testing
of resource classes, will be easier with this merge.

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

12 years agorapi: Remove “/2” resource, deprecate “/”
Michael Hanselmann [Wed, 7 Sep 2011 11:07:10 +0000 (13:07 +0200)]
rapi: Remove “/2” resource, deprecate “/”

These were never really useful. Neither gave a complete list of
available resources—the documentation in doc/rapi.rst is much better at
that.

Since some monitoring code might use the “/” resource it's kept around
but will only return a JSON “null”.

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

12 years agocmdlib: Support for CPU pinning
Tsachy Shacham [Wed, 31 Aug 2011 10:03:13 +0000 (12:03 +0200)]
cmdlib: Support for CPU pinning

Signed-off-by: Tsachy Shacham <tsachy@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

12 years agoUpdate design doc with cmd line description
Agata Murawska [Mon, 29 Aug 2011 16:21:37 +0000 (18:21 +0200)]
Update design doc with cmd line description

Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

12 years agoFix for auto parameters on import
Agata Murawska [Fri, 26 Aug 2011 15:23:19 +0000 (17:23 +0200)]
Fix for auto parameters on import

Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

12 years agoFix standalone module import check
Michael Hanselmann [Tue, 30 Aug 2011 15:35:15 +0000 (17:35 +0200)]
Fix standalone module import check

Turns out my attempts to get it work nicely with “make distcheck” broke
the detection and of course I only notice after pushing.

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

12 years agoAdd check for standalone modules' imports
Michael Hanselmann [Tue, 30 Aug 2011 11:44:59 +0000 (13:44 +0200)]
Add check for standalone modules' imports

This check will abort if one of the standalone modules (currently
lib/rapi/client.py and tools/ganeti-listrunner) imports anything from
the Ganeti source directory.

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

12 years agoMerge branch 'devel-2.5'
Michael Hanselmann [Fri, 26 Aug 2011 14:32:01 +0000 (16:32 +0200)]
Merge branch 'devel-2.5'

* devel-2.5:
  Delete master IPs from mergee master nodes
  Use pep8 utility in “make lint”
  Two more PEP8 fixes
  check-python-code: Give location(s) of lines longer than 80 chars

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

12 years agoDelete master IPs from mergee master nodes
Andrea Spadaccini [Thu, 25 Aug 2011 16:47:07 +0000 (17:47 +0100)]
Delete master IPs from mergee master nodes

Added a step in cluster-merge that removes the cluster IP from the
master node of the mergee clusters.

Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

12 years agoUse pep8 utility in “make lint”
Michael Hanselmann [Thu, 25 Aug 2011 10:15:10 +0000 (12:15 +0200)]
Use pep8 utility in “make lint”

This utility checks whether the code conforms to PEP8. Some checks had
to be disabled for Ganeti.

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

12 years agoTwo more PEP8 fixes
Michael Hanselmann [Thu, 25 Aug 2011 15:57:25 +0000 (17:57 +0200)]
Two more PEP8 fixes

cmdlib: Avoid wrapping using backslash

gnt_group: Avoid ** magic using keyword arguments (the “pep8” tool
doesn't like the inline comment in this case and will complain about
spaces around the “**” operator)

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

12 years agocheck-python-code: Give location(s) of lines longer than 80 chars
Michael Hanselmann [Tue, 23 Aug 2011 13:12:44 +0000 (15:12 +0200)]
check-python-code: Give location(s) of lines longer than 80 chars

Until now it would only say that there was a line longer than 80
characters, but not where.

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

12 years agohv_xen: Support for CPU pinning
Tsachy Shacham [Wed, 24 Aug 2011 08:30:26 +0000 (10:30 +0200)]
hv_xen: Support for CPU pinning

Signed-off-by: Tsachy Shacham <tsachy@google.com>
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

12 years agoMerge branch 'devel-2.5'
Michael Hanselmann [Thu, 25 Aug 2011 10:54:04 +0000 (12:54 +0200)]
Merge branch 'devel-2.5'

* devel-2.5: (32 commits)
  PEP8 style fixes
  Wrap a few long lines
  listrunner: Avoid exception if machine is rebooted
  Remove wrong type declaration from option
  Fix wrong method name in cluster-merge
  Fix --skip-stop-instances help message
  cluster-merge: Add the --skip-stop-instances opt
  watcher: Wait for child processes by default
  Update release date in NEWS for 2.5.0~beta2
  Try 3 times before giving up on per-node commands
  Allow retrying commands in cluster-merge
  Add a TODO on the VerifyCluster option
  Transform node readd exceptions into just errors
  Offline node when adding it to a merged cluster
  Bump version to 2.5.0~beta2
  sphinx_ext: workaround epydoc warning
  check-news: Show per-file line number
  Unify some file headers
  Makefile: Add design-ovf-support to list of doc files
  ensure-dirs: Fix epydoc error
  ...

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

12 years agoPEP8 style fixes
Michael Hanselmann [Thu, 25 Aug 2011 10:36:56 +0000 (12:36 +0200)]
PEP8 style fixes

Identified using the “pep8” utility.

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

12 years agohv_kvm: initial support for CPU pinning
Tsachy Shacham [Wed, 24 Aug 2011 08:30:28 +0000 (10:30 +0200)]
hv_kvm: initial support for CPU pinning

Signed-off-by: Tsachy Shacham <tsachy@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

12 years agohv_base: Support for multiple CPU mask
Tsachy Shacham [Thu, 25 Aug 2011 10:04:53 +0000 (12:04 +0200)]
hv_base: Support for multiple CPU mask

Signed-off-by: Tsachy Shacham <tsachy@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

12 years agoAdded function for parsing multiple CPU pinning mask
Tsachy Shacham [Wed, 24 Aug 2011 15:49:27 +0000 (17:49 +0200)]
Added function for parsing multiple CPU pinning mask

Signed-off-by: Tsachy Shacham <tsachy@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

12 years agoAdding CPU pinning constants
Tsachy Shacham [Thu, 25 Aug 2011 08:55:11 +0000 (10:55 +0200)]
Adding CPU pinning constants

Signed-off-by: Tsachy Shacham <tsachy@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

12 years agoWrap a few long lines
Guido Trotter [Tue, 23 Aug 2011 12:42:33 +0000 (13:42 +0100)]
Wrap a few long lines

Had to break it as well, today! ;)

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

12 years agoAllow importing instance with full auto parameters
Agata Murawska [Wed, 24 Aug 2011 11:43:25 +0000 (13:43 +0200)]
Allow importing instance with full auto parameters

Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

12 years agoDisk template is no longer required when importing instance
Michael Hanselmann [Wed, 24 Aug 2011 10:12:50 +0000 (12:12 +0200)]
Disk template is no longer required when importing instance

… provided that disk_template value is set in the config.ini file.

Signed-off-by: Agata Murawska <agatamurawska@google.com>
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

12 years agobash completion: Shorten function names
Michael Hanselmann [Wed, 24 Aug 2011 09:46:15 +0000 (11:46 +0200)]
bash completion: Shorten function names

This saves another 5 kB from the generated script. An old debug comment
written to the generated output is also removed.

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

12 years agolistrunner: Avoid exception if machine is rebooted
Michael Hanselmann [Tue, 23 Aug 2011 16:07:09 +0000 (18:07 +0200)]
listrunner: Avoid exception if machine is rebooted

Handle exceptions gracefully when trying to read the command's output.

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

12 years agoRemove wrong type declaration from option
Guido Trotter [Tue, 23 Aug 2011 11:15:12 +0000 (12:15 +0100)]
Remove wrong type declaration from option

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Andrea Spadaccini <spadaccio@google.com>

12 years agoFix wrong method name in cluster-merge
Andrea Spadaccini [Tue, 23 Aug 2011 10:28:42 +0000 (11:28 +0100)]
Fix wrong method name in cluster-merge

Fixed a wrong method name in the last patch.

Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

12 years agoFix --skip-stop-instances help message
Guido Trotter [Tue, 23 Aug 2011 09:47:08 +0000 (10:47 +0100)]
Fix --skip-stop-instances help message

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

12 years agocluster-merge: Add the --skip-stop-instances opt
Andrea Spadaccini [Tue, 23 Aug 2011 08:48:40 +0000 (09:48 +0100)]
cluster-merge: Add the --skip-stop-instances opt

This option allows to do a check for running instances on the mergee
clusters instead of stopping them.

Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

12 years agowatcher: Wait for child processes by default
Michael Hanselmann [Mon, 22 Aug 2011 15:44:11 +0000 (17:44 +0200)]
watcher: Wait for child processes by default

This patch retains the behaviour of ganeti-watcher in previous Ganeti
versions.

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

12 years agoUpdate release date in NEWS for 2.5.0~beta2 v2.5.0beta2
Michael Hanselmann [Mon, 22 Aug 2011 09:20:06 +0000 (11:20 +0200)]
Update release date in NEWS for 2.5.0~beta2

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

12 years agoTry 3 times before giving up on per-node commands
Guido Trotter [Fri, 19 Aug 2011 11:29:28 +0000 (12:29 +0100)]
Try 3 times before giving up on per-node commands

When contacting lots of nodes some may fail. Give it a couple more
chances before giving up on them.

Possible future TODO: continue, but just mark them as offline.

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

12 years agoAllow retrying commands in cluster-merge
Andrea Spadaccini [Thu, 18 Aug 2011 09:25:46 +0000 (10:25 +0100)]
Allow retrying commands in cluster-merge

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

12 years agoAdd a TODO on the VerifyCluster option
Guido Trotter [Fri, 19 Aug 2011 11:23:45 +0000 (12:23 +0100)]
Add a TODO on the VerifyCluster option

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

12 years agoTransform node readd exceptions into just errors
Guido Trotter [Fri, 19 Aug 2011 11:21:59 +0000 (12:21 +0100)]
Transform node readd exceptions into just errors

We are after the point of no return, no point in failing everything
because a node failed to readd. Better to just report it and move on.

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

12 years agoOffline node when adding it to a merged cluster
Guido Trotter [Fri, 19 Aug 2011 11:20:29 +0000 (12:20 +0100)]
Offline node when adding it to a merged cluster

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

12 years agoBump version to 2.5.0~beta2
Michael Hanselmann [Fri, 19 Aug 2011 14:44:11 +0000 (16:44 +0200)]
Bump version to 2.5.0~beta2

Also update NEWS file.

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

12 years agosphinx_ext: workaround epydoc warning
Iustin Pop [Fri, 19 Aug 2011 14:48:26 +0000 (16:48 +0200)]
sphinx_ext: workaround epydoc warning

Similar to commit c29e35f, this works around epydoc breakage by
aliasing the module. Makes 'apidoc' pass again on my machine.

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

12 years agocheck-news: Show per-file line number
Michael Hanselmann [Fri, 19 Aug 2011 14:34:08 +0000 (16:34 +0200)]
check-news: Show per-file line number

… not the global line number.

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

12 years agoUnify some file headers
Michael Hanselmann [Fri, 19 Aug 2011 14:33:48 +0000 (16:33 +0200)]
Unify some file headers

Remove unnecessary commas, add empty lines where necessary to make them
consistent.

I'm working on a script to check this, but it's not yet ready.

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

12 years agoMakefile: Add design-ovf-support to list of doc files
Michael Hanselmann [Fri, 19 Aug 2011 14:31:41 +0000 (16:31 +0200)]
Makefile: Add design-ovf-support to list of doc files

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

12 years agoensure-dirs: Fix epydoc error
Michael Hanselmann [Fri, 19 Aug 2011 12:41:53 +0000 (14:41 +0200)]
ensure-dirs: Fix epydoc error

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

12 years agoDocumentation fix for importing with --src-dir option
Agata Murawska [Fri, 19 Aug 2011 13:01:57 +0000 (15:01 +0200)]
Documentation fix for importing with --src-dir option

Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

12 years agobash completion: Group commands by arguments and options
Michael Hanselmann [Wed, 17 Aug 2011 10:57:07 +0000 (12:57 +0200)]
bash completion: Group commands by arguments and options

This grouping, which was a TODO for a long time, reduces the script size
by about 5kB.

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

12 years agoCheck option name format when building bash completion
Michael Hanselmann [Wed, 17 Aug 2011 10:02:12 +0000 (12:02 +0200)]
Check option name format when building bash completion

This is just a style check. Option names should be consistent. Since all
of them go through the “build-bash-completion” script, this seemed to be
a good place.

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

12 years agoensure-dirs: Check mode and owner before changing
Michael Hanselmann [Fri, 19 Aug 2011 11:14:04 +0000 (13:14 +0200)]
ensure-dirs: Check mode and owner before changing

This avoids many calls to chmod(2) and chown(2), and thereby ctime
updates.

Since I had to update the unittests anyway I untangled the code a bit,
split it into more separate functions and added some more tests.

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

12 years agoensure-dirs: Refine error handling on stat(2)
Michael Hanselmann [Fri, 19 Aug 2011 09:11:19 +0000 (11:11 +0200)]
ensure-dirs: Refine error handling on stat(2)

The “_stat_fn” function is renamed to “_lstat_fn” to reflect its
function. The try/except block just wraps calling lstat(2) and nothing
else.

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

12 years agoensure-dirs: Change wording of some messages
Michael Hanselmann [Fri, 19 Aug 2011 09:04:59 +0000 (11:04 +0200)]
ensure-dirs: Change wording of some messages

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

12 years agoensure-dirs: Implement debug logging
Michael Hanselmann [Fri, 19 Aug 2011 09:00:06 +0000 (11:00 +0200)]
ensure-dirs: Implement debug logging

There was no logging at all.

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

12 years agoensure-dirs: Set permissions on job files in queue
Michael Hanselmann [Fri, 19 Aug 2011 08:52:09 +0000 (10:52 +0200)]
ensure-dirs: Set permissions on job files in queue

This was a regression from 2.4.

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

12 years agoensure-dirs: Set permissions on queue lock file
Michael Hanselmann [Thu, 18 Aug 2011 15:16:10 +0000 (17:16 +0200)]
ensure-dirs: Set permissions on queue lock file

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

12 years agoensure-dirs: Set correct permissions on ssconf files
Michael Hanselmann [Wed, 17 Aug 2011 14:22:11 +0000 (16:22 +0200)]
ensure-dirs: Set correct permissions on ssconf files

The files should be 0444, not 0400. This was a regression from 2.4.

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

12 years agocfgupgrade: Add confirmation message
Michael Hanselmann [Wed, 17 Aug 2011 14:09:06 +0000 (16:09 +0200)]
cfgupgrade: Add confirmation message

A message will be given instead of just dropping the user back to the
prompt in case of a successful upgrade.

[…]
documentation formats). Continue with upgrading configuration?
y/[n]/?: y
Configuration successfully upgraded for version 2.5.0~beta1.
root@master:~#

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

12 years agoGet rid of {disk,nic}_count variables
René Nussbaumer [Tue, 16 Aug 2011 13:20:04 +0000 (15:20 +0200)]
Get rid of {disk,nic}_count variables

This also fixes an issue if "disk_template = diskless" and no
"disk_count" was specified, while doing an import of said instance
specifications.

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

12 years agoHandle network interfaces without IPs
Andrea Spadaccini [Mon, 15 Aug 2011 13:20:27 +0000 (14:20 +0100)]
Handle network interfaces without IPs

If the user specified a network interface with no IPs, he would receive
an unhelpful "list index out of range" error. Fixed that.

Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

12 years agoFixed potential unreferenced variable usage
Andrea Spadaccini [Mon, 15 Aug 2011 12:21:57 +0000 (13:21 +0100)]
Fixed potential unreferenced variable usage

I noticed a path in the code that would use spice_ip_version even if
it was not initialized. This patch fixes it.

Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

12 years agoAdded documentation for gnt-instance remove --force in the man page
Andrea Spadaccini [Fri, 12 Aug 2011 15:22:10 +0000 (16:22 +0100)]
Added documentation for gnt-instance remove --force in the man page

Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

12 years agoAdded documentation for SPICE options in the gnt-instance man page
Andrea Spadaccini [Fri, 12 Aug 2011 14:54:36 +0000 (15:54 +0100)]
Added documentation for SPICE options in the gnt-instance man page

Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

12 years agoAdded basic support for SPICE
Andrea Spadaccini [Wed, 10 Aug 2011 15:13:35 +0000 (16:13 +0100)]
Added basic support for SPICE

Implemented the following parameters:
- spice_bind
- spice_ip_version

Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

12 years agoNEWS: Add release date for 2.5.1~beta1
Michael Hanselmann [Fri, 12 Aug 2011 15:03:39 +0000 (17:03 +0200)]
NEWS: Add release date for 2.5.1~beta1

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

12 years agoFix exit code of “gnt-cluster verify” v2.5.0beta1
Michael Hanselmann [Fri, 12 Aug 2011 13:32:10 +0000 (15:32 +0200)]
Fix exit code of “gnt-cluster verify”

With commit fcad7225e3fc4 LU-generated jobs are used, but the
exit code must still be backwards-compatible.

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

12 years agoUpdate NEWS for 2.5
Michael Hanselmann [Tue, 9 Aug 2011 12:10:33 +0000 (14:10 +0200)]
Update NEWS for 2.5

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

12 years agoSmall improvements for cluster verify
Michael Hanselmann [Fri, 12 Aug 2011 09:08:53 +0000 (11:08 +0200)]
Small improvements for cluster verify

- Check if BGL is actually owned
- Show group name as feedback

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

12 years agowatcher: Use locks when querying for resource information
Michael Hanselmann [Fri, 12 Aug 2011 12:48:11 +0000 (14:48 +0200)]
watcher: Use locks when querying for resource information

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

12 years agoAllow locking to be used via OpQuery
Michael Hanselmann [Fri, 12 Aug 2011 12:47:47 +0000 (14:47 +0200)]
Allow locking to be used via OpQuery

The original design for query2 specifically excluded locking, but now
it's turned out that it would be a good thing to have in watcher. This
patch adds a new parameter to OpQuery and enables its use in LUQuery. A
missing function is added to LUGroupQuery, a comment clarified in
_NodeQuery and all locks declared as shared acquires in the same LU.

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