Export: saving data to ovf file
Signed-off-by: Agata Murawska <agatamurawska@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Export: parsing data from config file
Export: initial commit - manifest, ova creation etc
Import: backend, hypervisor and os
Import: networks
Import: disk conversion
Import: reading ovf file
Initial commit for ovfconverter tool
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>
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...
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>
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>
RAPI: Add resource to recreate instance's disks
This was still missing from RAPI.
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
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.
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.
rapi: Re-add “/2” resource
Like “/”, it'll just return a JSON null.
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.
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
Switch other commonprefix to IsBelowDir
utils: Introduce IsBelowDir
This is mainly a wrapper to overcome the limitation of commonprefixwhich makes a string by string comparisation and reports the commonprefix in both strings. However this is bad for directory handling.
IsBelowDir works around this limitation and should be used in favour of...
Fixed a typo in gnt_cluster.py
Added password for SPICE sessions
Added an optional parameter called spice_password_file that allowsthe user to protect the SPICE login with the password contained inthe specified file.
Draft implementation of QMP connection
Basic implementation of the QMP connection and related tests.
cmdlib: Support for CPU pinning
Signed-off-by: Tsachy Shacham <tsachy@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Fix for auto parameters on import
Fixes to errors/warnings raised by pylint 0.24
Running pylint 0.24.0 revealed 2 errors and 1 warning. Here is how Ifixed them:
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 ofDeprecationWarning being emitted even if one uses the recommendedversion of pylint (0.21.1, as stated in devnotes.rst)....
Merge branch 'devel-2.4' into devel-2.5
Conflicts: NEWS (trivial) configure.ac (trivial) daemons/ensure-dirs.in (deleted)
utils: Fix UnescapeAndSplit parsing bug
If a value passed to UnescapeAndSplit ended with a backslash anexception would be raised:
$ gnt-instance modify -H mem=x\\ inst1.example.com[…] e2 = slist.pop(0)IndexError: pop from empty list
Two more PEP8 fixes
cmdlib: Avoid wrapping using backslash
gnt_group: Avoid * magic using keyword arguments (the “pep8” tooldoesn't like the inline comment in this case and will complain aboutspaces around the “*” operator)
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>
PEP8 style fixes
Identified using the “pep8” utility.
hv_kvm: initial support for CPU pinning
hv_base: Support for multiple CPU mask
Added function for parsing multiple CPU pinning mask
Adding CPU pinning constants
Allow importing instance with full auto parameters
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>
Documentation fix for importing with --src-dir option
Signed-off-by: Agata Murawska <agatamurawska@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>(cherry picked from commit b7d7876bd0e9844fab8be28bfa1fd5d563ec7412)
Conflicts:
lib/cmdlib.py (easily fixed)
Fix a parsing issue with DRBD 8.3.11 in the Linux Kernel
In the Linux kernel commit 4b0715f096 introduced a display bug into/proc/drbd which broke our regex.
The bug was first introduced into Linux 2.6.39-rc1. This bug is stillunfixed as of today.
This patch adapt the regular expression to workaround this bug for the...
watcher: Wait for child processes by default
This patch retains the behaviour of ganeti-watcher in previous Ganetiversions.
sphinx_ext: workaround epydoc warning
Similar to commit c29e35f, this works around epydoc breakage byaliasing the module. Makes 'apidoc' pass again on my machine.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>