Michael Hanselmann [Thu, 15 Sep 2011 15:41:59 +0000 (17:41 +0200)]
RAPI: Add resource to recreate instance's disks
This was still missing from RAPI.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
René Nussbaumer [Thu, 15 Sep 2011 11:16:53 +0000 (13:16 +0200)]
Adding an updated design doc for the caching mechanism
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Tsachy Shacham [Thu, 15 Sep 2011 08:58:44 +0000 (10:58 +0200)]
hv_xen: fix use of CPU pinning constants
… to be consistent with hv_kvm
Signed-off-by: Tsachy Shacham <tsachy@google.com>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Tsachy Shacham [Thu, 15 Sep 2011 08:49:51 +0000 (10:49 +0200)]
hv_kvm: fix hardcoded KVM command string
Signed-off-by: Tsachy Shacham <tsachy@google.com>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Tsachy Shacham [Wed, 14 Sep 2011 15:48:01 +0000 (17:48 +0200)]
hv_kvm: support for CPU pinning
Signed-off-by: Tsachy Shacham <tsachy@google.com>
Signed-off-by: Iustin Pop <iustin@google.com>
[iustin@google.com: fixed some small code and style issues]
Reviewed-by: Iustin Pop <iustin@google.com>
Tsachy Shacham [Thu, 15 Sep 2011 08:32:34 +0000 (10:32 +0200)]
constants: support for CPU pinning under KVM
Signed-off-by: Tsachy Shacham <tsachy@google.com>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Guido Trotter [Thu, 15 Sep 2011 13:10:00 +0000 (14:10 +0100)]
Merge branch 'devel-2.5'
* devel-2.5: (33 commits)
htools: remove dead code
hail: don't select the primary as new secondary
hail: add an extra safety check in relocate
Fix RAPI documentation for gnt-instance console
Add SPICE compression and streaming options
Add SPICE support to gnt-instance console
Make KVM use the QXL vga driver with SPICE
Use a loop to check SPICE parameters dependency
import: Fix a logic error due to missing "not"
import: Make sure the disk_dump path is in EXPORT_DIR
Switch other commonprefix to IsBelowDir
utils: Introduce IsBelowDir
Fixed a typo in gnt_cluster.py
Added password for SPICE sessions
Draft implementation of QMP connection
Pylint fixes for autogenerated files
Version bump for 2.5.0~beta3
Makefile: Use $(LN_S) instead of “ln -s”
Fixes to errors/warnings raised by pylint 0.24
PEP8 for QA
...
Conflicts:
Makefile.am
- preserve both changes
lib/rapi/rlib2.py
- keep master version
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Iustin Pop [Thu, 15 Sep 2011 09:59:22 +0000 (11:59 +0200)]
Make affinity module optional
This was overlooked in the review, sorry.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Tsachy Shacham [Wed, 14 Sep 2011 15:47:58 +0000 (17:47 +0200)]
configure.ac: changes for CPU pinning
Also added optional affinity Python package for CPU pinning under KVM
to the INSTALL doc.
Signed-off-by: Tsachy Shacham <tsachy@google.com>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Wed, 14 Sep 2011 11:10:58 +0000 (13:10 +0200)]
docs unittest: Add verification of opcodes covered by RAPI
All opcodes which are not yet covered or can't with the current design
(e.g. cluster initialization) are excluded. This test is added to the
docs unittest since here the code already has access to a list of all
RAPI resources and does more checks on them.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Wed, 14 Sep 2011 10:31:14 +0000 (12:31 +0200)]
docs unittest: Split into two separate test cases
The RAPI and hooks documentation aren't related at all.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Wed, 14 Sep 2011 10:23:36 +0000 (12:23 +0200)]
docs unittest: Make _ReadDocFile a global function
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Wed, 14 Sep 2011 10:20:30 +0000 (12:20 +0200)]
rlib2: Declare all opcodes and equivalents
By declaring all used opcodes or opcodes equivalent to the operations
executed in a resource we will be able to ensure all opcodes are covered
by RAPI (with some exceptions).
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Wed, 14 Sep 2011 10:21:53 +0000 (12:21 +0200)]
baserlib: Function to retrieve opcodes used by handler
This will be used to verify opcodes used by RAPI.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Iustin Pop [Wed, 14 Sep 2011 10:58:18 +0000 (12:58 +0200)]
htools: remove dead code
The tryEvac/evacuateInstance functions are no longer used in the new
multi-group world order, so we remove them and change the unit-test to
test the actual IAllocator function.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Wed, 14 Sep 2011 10:44:18 +0000 (12:44 +0200)]
hail: don't select the primary as new secondary
This just adds the primary node of the instance as 'non-allocable'
during the choosing of the new secondary.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Wed, 14 Sep 2011 10:43:38 +0000 (12:43 +0200)]
hail: add an extra safety check in relocate
If we select the primary as new secondary, better to fail than return
wrong data to Ganeti.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Andrea Spadaccini [Tue, 13 Sep 2011 13:12:01 +0000 (14:12 +0100)]
Fix RAPI documentation for gnt-instance console
Fix a failing pyassert in the RAPI docs and update it to reflect the
addition of SPICE to gnt-instance console.
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Andrea Spadaccini [Thu, 8 Sep 2011 10:03:06 +0000 (11:03 +0100)]
Add SPICE compression and streaming options
Add the following SPICE audio/image compression and video streaming
detection hypervisor options:
* spice_image_compression
* spice_jpeg_wan_compression
* spice_zlib_glz_wan_compression
* spice_streaming_video
* spice_playback_compression
Also add the related documentation and silence pylint R0914 warning
about too many local variables in hv_kvm._GenerateKVMRuntime.
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Andrea Spadaccini [Fri, 9 Sep 2011 14:37:25 +0000 (16:37 +0200)]
Add SPICE support to gnt-instance console
Also update related unit tests.
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Tue, 13 Sep 2011 12:24:58 +0000 (14:24 +0200)]
Fix unittest breakage from commit
132cdb87159e
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Tue, 13 Sep 2011 10:53:15 +0000 (12:53 +0200)]
rapi: Re-add “/2” resource
Like “/”, it'll just return a JSON null.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Tue, 13 Sep 2011 09:55:24 +0000 (11:55 +0200)]
Wrap long line in ganeti.rapi.rlib2_unittest.py
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Fri, 9 Sep 2011 10:55:28 +0000 (12:55 +0200)]
rlib2: Improve test for _ParseInstanceReinstallRequest
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Fri, 9 Sep 2011 10:45:20 +0000 (12:45 +0200)]
rlib2: Add test for /2/info
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Fri, 9 Sep 2011 10:30:31 +0000 (12:30 +0200)]
rlib2: Add tests for /, /version and /2/features
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Andrea Spadaccini [Wed, 7 Sep 2011 12:25:14 +0000 (13:25 +0100)]
Make KVM use the QXL vga driver with SPICE
Enable by default the QXL paravirtualized graphic card if SPICE is
enabled. The QXL driver is VESA compatible, so it degrades gracefully if
the guest OS does not have QXL drivers.
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Andrea Spadaccini [Tue, 6 Sep 2011 08:52:55 +0000 (09:52 +0100)]
Use a loop to check SPICE parameters dependency
Use a loop to check if the user specified any SPICE option and SPICE
support is disabled.
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
René Nussbaumer [Tue, 6 Sep 2011 07:02:13 +0000 (09:02 +0200)]
import: Fix a logic error due to missing "not"
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
René Nussbaumer [Wed, 31 Aug 2011 12:33:56 +0000 (14:33 +0200)]
import: Make sure the disk_dump path is in EXPORT_DIR
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
René Nussbaumer [Mon, 5 Sep 2011 13:09:23 +0000 (15:09 +0200)]
Switch other commonprefix to IsBelowDir
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
René Nussbaumer [Mon, 5 Sep 2011 11:59:06 +0000 (13:59 +0200)]
utils: Introduce IsBelowDir
This is mainly a wrapper to overcome the limitation of commonprefix
which makes a string by string comparisation and reports the common
prefix in both strings. However this is bad for directory handling.
IsBelowDir works around this limitation and should be used in favour of
commonprefix.
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Andrea Spadaccini [Mon, 5 Sep 2011 14:15:00 +0000 (15:15 +0100)]
Fixed a typo in gnt_cluster.py
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Andrea Spadaccini [Wed, 24 Aug 2011 14:11:44 +0000 (15:11 +0100)]
Added password for SPICE sessions
Added an optional parameter called spice_password_file that allows
the user to protect the SPICE login with the password contained in
the specified file.
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Andrea Spadaccini [Sat, 3 Sep 2011 10:00:58 +0000 (11:00 +0100)]
Draft implementation of QMP connection
Basic implementation of the QMP connection and related tests.
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Andrea Spadaccini [Tue, 30 Aug 2011 16:19:58 +0000 (17:19 +0100)]
Pylint fixes for autogenerated files
Applied s/disable-msg/disable/ also to Makefile.am, in order to inhibit
pylint warnings for autogenerated files.
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Wed, 31 Aug 2011 13:47:47 +0000 (15:47 +0200)]
Version bump for 2.5.0~beta3
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
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>
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>
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>
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>
Michael Hanselmann [Tue, 30 Aug 2011 15:37:54 +0000 (17:37 +0200)]
Makefile: Use $(LN_S) instead of “ln -s”
Some platforms apparently don't support “ln -s”, otherwise Autoconf
wouldn't have AC_PROG_LN_S.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
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>
Andrea Spadaccini [Mon, 29 Aug 2011 19:28:41 +0000 (20:28 +0100)]
Fixes to errors/warnings raised by pylint 0.24
Running pylint 0.24.0 revealed 2 errors and 1 warning. Here is how I
fixed them:
* jqueue.py: silenced E1101
* netutils.py: rewrote the list comprehension using extend()
* watcher/__init__.py: fixed a missing format string parameter
These changes are backwards-compatible with pylint 0.21.1.
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Andrea Spadaccini [Fri, 26 Aug 2011 15:31:12 +0000 (16:31 +0100)]
PEP8 for QA
- Makefile.am: added QA directory to the paths checked by pep8
- qa/: fixed the reported errors
- Makefile.am: also, added qa_group.py to qa_scripts
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Tue, 30 Aug 2011 08:47:49 +0000 (10:47 +0200)]
listrunner: Allow passing of arguments to executable
This wasn't possible until now.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Andrea Spadaccini [Mon, 29 Aug 2011 19:15:15 +0000 (20:15 +0100)]
DeprecationWarning fixes for pylint
In version 0.21, pylint unified all the disable-* (and enable-*)
directives to disable (resp. enable). This leads to a lot of
DeprecationWarning being emitted even if one uses the recommended
version of pylint (0.21.1, as stated in devnotes.rst).
This commit changes all the disable-msg directives to disable.
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Mon, 29 Aug 2011 15:34:24 +0000 (17:34 +0200)]
listrunner: Replace str.split with library functions
- str.split("/").pop() should be os.path.basename
- str.split("\n") should be str.splitlines()
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Tsachy Shacham [Wed, 24 Aug 2011 08:30:22 +0000 (10:30 +0200)]
Minor updates and fixes to CPU pinning design doc
Signed-off-by: Tsachy Shacham <tsachy@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
René Nussbaumer [Fri, 26 Aug 2011 14:50:58 +0000 (16:50 +0200)]
Merge branch 'devel-2.4' into devel-2.5
Conflicts:
NEWS (trivial)
configure.ac (trivial)
daemons/ensure-dirs.in (deleted)
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
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>
Michael Hanselmann [Fri, 26 Aug 2011 12:21:35 +0000 (14:21 +0200)]
utils: Fix UnescapeAndSplit parsing bug
If a value passed to UnescapeAndSplit ended with a backslash an
exception would be raised:
$ gnt-instance modify -H mem=x\\ inst1.example.com
[…]
e2 = slist.pop(0)
IndexError: pop from empty list
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>