Export: documentation
Signed-off-by: Agata Murawska <agatamurawska@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Export: saving data to ovf file
Export: parsing data from config file
Export: initial commit - manifest, ova creation etc
Import: unittests
Import: backend, hypervisor and os
Import: networks
Import: disk conversion
Import: reading ovf file
Initial commit for ovfconverter tool
doc: sphinx config file changes
I wanted to just enable another extension (the graphviz one), but thenI went and did a lot of changes:
- replaced ' with " for consistency with our style guide- imported new settings (commented out) that current python-sphinx...
doc: re-wrap design-oob to 72 chars
I started with just adding some :term:`SoW` and similar to design-oob,but then I realised this was 80-chars wrapped, not 72-chars. So I wentand re-wrapped most of it, plus adding the glossary references.
Signed-off-by: Iustin Pop <iustin@google.com>...
doc: glossary improvements
These will be used to remove some inline definitions and replace themwith :term:`foo`.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
serializer: Add comment about simplejson vs. built-in json
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Revert "Fail if dictionary uses invalid keys" and "Support newer “json” module"
This reverts commit fd0351aef246f5d36e641209429e2ec093d325f8 and9869e771704ada62bab001e729c52a36525ef081. The built-in module is a lotslower in Python 2.6.
Signed-off-by: Michael Hanselmann <hansmi@google.com>...
serializer: Fail if dictionary uses invalid keys
JSON only supports a very restricted set of types for dictionary keys,among them strings, booleans and “null”. Integers and floats areconverted to strings. Since this can cause a lot of confusion in Python,...
serializer: Support newer “json” module
This module is included from Python 2.6 and is based onsimplejson.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
htools: man page improvements
This patch moves all the backend options into the main htools manpage, and it adds documentation for the -t option, which so far wasnot documented w.r.t. the file structure.
hspace: add short forms for the group policy
This adds a shortened versions of the allocation policies, as writingout the whole name in the command line can become tedious.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Agata Murawska <agatamurawska@google.com>
Fix interaction between CPU pinning and KVM migration
CPU pinning requires the KVM hypervisor to start in the paused state, inorder to retrieve information, and immediately unpauses it.
This does not play well with live migration, as the unpausing was done...
htools: add a MonadPlus instance for Result
This will be used to implement more easily 'choice' parsing of inputdata, without resorting to syntax (case … of Bad _ -> …).
Merge branch 'devel-2.5'
RAPI: Add resource to powercycle node
Add tls_ciphers and use_vdagent options
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Updated man pages with new SPICE TLS options
Implementation of TLS-protected SPICE connections
Added support for TLS-protected SPICE connections:
Added SPICE TLS option and related cert paths
Fix OS creation's error handling when pausing sync
Commit 41e1e79 introduced a feature in which when wait_for_sync is notset, DRBD sync is paused during the OS installation.
Doing so, however, broke OS creation's error handling: the result valuefrom the instance_os_add RPC call was overwritten by the one of the...
Fix two pylint errors
- hv_kvm.py: silence F0401, that is raised if pylint does not find the affinity module- rlib2.py: change disable-msg to disable
Fix backend.MigrateInstance docs
The MigrateInstance function does not return anything, so the relevantlines are removed from the documentation. Instead, the raised exceptionis documented.
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
hv_kvm: bugfix
Signed-off-by: Tsachy Shacham <tsachy@google.com>Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
Import: further doc updates
Signed-off-by: Agata Murawska <agatamurawska@google.com>Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
RAPI: Add resource to recreate instance's disks
This was still missing from RAPI.
Adding an updated design doc for the caching mechanism
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
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>
hv_kvm: fix hardcoded KVM command string
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>
constants: support for CPU pinning under KVM
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>
configure.ac: changes for CPU pinning
Also added optional affinity Python package for CPU pinning under KVMto 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>...
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 thedocs unittest since here the code already has access to a list of all...
docs unittest: Split into two separate test cases
The RAPI and hooks documentation aren't related at all.
docs unittest: Make _ReadDocFile a global function
rlib2: Declare all opcodes and equivalents
By declaring all used opcodes or opcodes equivalent to the operationsexecuted in a resource we will be able to ensure all opcodes are coveredby RAPI (with some exceptions).
baserlib: Function to retrieve opcodes used by handler
This will be used to verify opcodes used by RAPI.
htools: remove dead code
The tryEvac/evacuateInstance functions are no longer used in the newmulti-group world order, so we remove them and change the unit-test totest the actual IAllocator function.
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.
hail: add an extra safety check in relocate
If we select the primary as new secondary, better to fail than returnwrong data to Ganeti.
Fix RAPI documentation for gnt-instance console
Fix a failing pyassert in the RAPI docs and update it to reflect theaddition of SPICE to gnt-instance console.
Add SPICE compression and streaming options
Add the following SPICE audio/image compression and video streamingdetection hypervisor options:
Add SPICE support to gnt-instance console
Also update related unit tests.
Fix unittest breakage from commit 132cdb87159e
rapi: Re-add “/2” resource
Like “/”, it'll just return a JSON null.
Wrap long line in ganeti.rapi.rlib2_unittest.py
rlib2: Improve test for _ParseInstanceReinstallRequest
rlib2: Add test for /2/info
rlib2: Add tests for /, /version and /2/features
rlib2: Convert /2/instances to OpcodeResource
rlib2: Convert /2/*/tags to OpcodeResource
rlib2: Convert /2/nodes/[node_name]/storage/repair to OpcodeResource
rlib2: Convert /2/nodes/[node_name]/storage/modify to OpcodeResource
rlib2: Convert /2/nodes/[node_name]/storage to OpcodeResource
rlib2: Convert /2/groups/[group_name] to OpcodeResource
rlib2: Convert /2/nodes/[node_name]/role to OpcodeResource
Also fix a typo in a constant name.
rlib2: Convert /2/instances/[inst]/disk/[idx]/grow to OpcodeResource
rlib2: Convert /2/instances/[inst]/modify to OpcodeResource
rlib2: Convert /2/instances/[inst]/rename to OpcodeResource
rlib2: Convert /2/instances/[inst]/failover to OpcodeResource
rlib2: Convert /2/instances/[inst]/migrate to OpcodeResource
rlib2: Convert /2/instances/[inst]/export to OpcodeResource
rlib2: Convert /2/instances/[inst]/prepare-export to OpcodeResource
rlib2: Convert /2/instances/[inst]/deactivate-disks to OpcodeResource
rlib2: Convert /2/instances/[inst]/activate-disks to OpcodeResource
rlib2: Convert /2/instances/[inst]/replace-disks to OpcodeResource
rlib2: Convert /2/instances/[inst]/shutdown to OpcodeResource
rlib2: Convert /2/instances/[inst]/startup to OpcodeResource
rlib2: Convert /2/instances/[inst]/reboot to OpcodeResource
rlib2: Convert /2/instances/[inst]/info to OpcodeResource
rlib2: Convert /2/instances/[inst] to OpcodeResource
rlib2: Convert /2/groups/[group_name]/assign-nodes to OpcodeResource
rlib2: Convert /2/groups/[group_name]/rename to OpcodeResource
rlib2: Convert /2/groups/[group_name]/modify to OpcodeResource
rlib2: Convert /2/groups to OpcodeResource
rlib2: Convert /2/nodes/[node_name]/evacuate to OpcodeResource
rlib2: Convert /2/nodes/[node_name]/migrate to OpcodeResource
rlib2: Convert /2/redistribute-config to OpcodeResource
rlib2: Convert /2/modify to OpcodeResource
Also add unittests.
rlib2: Add unittests for two error conditions
Adds tests for errors on connecting to the server and for a full queue.
baserlib: Accept empty body in FillOpcode
baserlib.ResourceBase: Allow overriding of LUXI client
This enables unittesting of RAPI resources.
baserlib: Add more generic base class for opcode resources
This base class, which employs a meta class for the actual work, allowseasier definitions of RAPI resources using opcodes. Follow-up patcheswill change some of the existing RAPI resources.
The long-term goal with these changes is to make it easier to verify the...
baserlib: Rename R_Generic to ResourceBase
Apart from making match Ganeti's code style the name is also moredescriptive.
baserlib: Move GetClient/SubmitJob into base class
Unlike stand-alone functions these will be relatively easy to overridefor unittests.
rapi: Merge tag helpers into resource
They were only used in one place and upcoming changes, enabling testingof resource classes, will be easier with this merge.
rapi: Remove “/2” resource, deprecate “/”
These were never really useful. Neither gave a complete list ofavailable resources—the documentation in doc/rapi.rst is much better atthat.
Since some monitoring code might use the “/” resource it's kept around...
Make KVM use the QXL vga driver with SPICE
Enable by default the QXL paravirtualized graphic card if SPICE isenabled. The QXL driver is VESA compatible, so it degrades gracefully ifthe guest OS does not have QXL drivers.
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>...
Use a loop to check SPICE parameters dependency
Use a loop to check if the user specified any SPICE option and SPICEsupport is disabled.
import: Fix a logic error due to missing "not"
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
import: Make sure the disk_dump path is in EXPORT_DIR