[libvirt] [PATCH v2 06/10] Make qemu attach/detach functions public

2016-07-15 Thread Tomasz Flendrich
They will be used to test device attachment and detachment, so they have to be visible to the outside. --- src/qemu/qemu_driver.c | 4 ++-- src/qemu/qemu_driver.h | 14 ++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c

[libvirt] [PATCH v2 10/10] Add a persistent attachment testcase

2016-07-15 Thread Tomasz Flendrich
This is the first testcase for qemuhotplugtest for attaching and detaching a device to the persistent domain. --- tests/qemuhotplugtest.c| 7 .../qemuhotplug-base-config+qemu-agent+config.xml | 45 ++ .../qemuhotplug-base-config.xml

[libvirt] [PATCH v2 02/10] Remove an unnecessary variable

2016-07-15 Thread Tomasz Flendrich
qemuCaps is no longer used anywhere in these functions, so it can be deleted. --- src/qemu/qemu_driver.c | 20 1 file changed, 20 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 9d1f256..0362f0e 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qe

[libvirt] [PATCH v2 09/10] Make qemuhotplugtest work with persistent domains

2016-07-15 Thread Tomasz Flendrich
It was previously working only with attachments/detachments to the live domain. Now it can test attaching/detaching to the persistent domain too. --- tests/qemuhotplugtest.c | 43 +++ 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/tests/qemu

[libvirt] [PATCH v2 08/10] Use more generic functions in qemuhotplugtest

2016-07-15 Thread Tomasz Flendrich
More generic functions, qemuDomainAttachDeviceLiveAndConfig and qemuDomainDetachDeviceLiveAndConfig, are now used instead of other functions in qemuhotplugtest to attach and detach devices. --- tests/qemuhotplugtest.c | 157 +++- 1 file changed, 88 inse

[libvirt] [PATCH v2 07/10] Narrow down a parameter to function

2016-07-15 Thread Tomasz Flendrich
Attaching to both live and config will soon be tested, so testQemuHotplugCheckResult will be used on both def and newDef. --- tests/qemuhotplugtest.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index 0a5f068..d86

[libvirt] [PATCH v2 05/10] Split qemuDomainDetachDeviceFlags in two

2016-07-15 Thread Tomasz Flendrich
Previously, qemuDomainDetachDeviceFlags was doing two things: handling the job and detaching devices. Now the second part is in a new function. --- src/qemu/qemu_driver.c | 92 +- 1 file changed, 54 insertions(+), 38 deletions(-) diff --git a/src/q

[libvirt] [PATCH v2 03/10] Split qemuDomainAttachDeviceFlags in two

2016-07-15 Thread Tomasz Flendrich
Previously, qemuDomainAttachDeviceFlags was doing two things: handling the job and attaching devices. Now the second part is in a new function. This change is required to make it possible to test more complex device attachment situations, like attaching a device to both config and live at once. -

[libvirt] [PATCH v2 00/10] Test persistent device attachment

2016-07-15 Thread Tomasz Flendrich
Changes in v2: * rebased This patch requires another one, otherwise a small conflict appears: https://www.redhat.com/archives/libvir-list/2016-July/msg00402.html In qemu_driver.c, two functions were split to have less responsibility. They were also modified so that they could be used in qemuhotpl

[libvirt] [PATCH v2 01/10] Change parameters to qemuDomainAttachDeviceLive

2016-07-15 Thread Tomasz Flendrich
We want to be able to pass a NULL instead of the connection and use this function in tests. To achieve this, the virConnectPtr is passed instead of virDomainPtr, and the driver is a new separate parameter. --- src/qemu/qemu_driver.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-

[libvirt] [PATCH v2 04/10] Narrow down a parameter

2016-07-15 Thread Tomasz Flendrich
This will make splitting up qemuDomainDetachDeviceFlags into two functions easier. --- src/qemu/qemu_driver.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 5dde81f..ce22eff 100644 --- a/src/qemu/qemu_driver.c +++ b/s

Re: [libvirt] [Qemu-block] [libvirt RFC PATCH 00/10] Add support for qemu's JSON pseudo'protocol for backing store

2016-07-15 Thread Eric Blake
On 07/15/2016 07:49 AM, Daniel P. Berrange wrote: > On Fri, Jul 15, 2016 at 03:46:33PM +0200, Peter Krempa wrote: >> Libvirt didn't handle this for a long time and VMs with such config would not >> start we should implement it. >> >> Using JSON is basically the only option to specify advanced confi

Re: [libvirt] [PATCH] qemu: fix domain id after domainCreate(), domainCreateWithFlags()

2016-07-15 Thread Sascha Silbe
Dear Daniel, "Daniel P. Berrange" writes: > On Fri, Jul 15, 2016 at 06:30:32PM +0200, Sascha Silbe wrote: >> Ever since a041de15 [Update to comply with internal driver API] >> changed the code to use virDomain.id instead of _virDomainObj.id >> (qemud_vm.id back then) directly, the domain ID retr

Re: [libvirt] [PATCH 4/4] hvsupport: skip non-matching lines early

2016-07-15 Thread John Ferlan
On 06/29/2016 02:40 AM, Ján Tomko wrote: > This speeds up the whole script almost twice. "This" ?? Might be nice to know what this is. > --- > docs/hvsupport.pl | 1 + > 1 file changed, 1 insertion(+) > I have to assume This is ignoring lines that don't contain '$grps' If so, ACK, but ple

Re: [libvirt] [PATCH 3/4] hvsupport: construct regex up front

2016-07-15 Thread John Ferlan
On 06/29/2016 02:40 AM, Ján Tomko wrote: > This lets perl cache the regex. > > Even though there are only eight groups, the speedup is more than that. eight groups? I'm glad someone knows what they are... > --- > docs/hvsupport.pl | 33 - > 1 file changed, 16

Re: [libvirt] [PATCH 2/4] hvsupport: drop XML::XPath

2016-07-15 Thread John Ferlan
On 06/29/2016 02:40 AM, Ján Tomko wrote: > Doing an XPath query for every single 'function' element in the > file is inefficient. > > Since the XML file is generated by another of our build scripts > (apibuild.py, using Python's standard 'output.write' XML library), > just find the function name

Re: [libvirt] [PATCH 1/4] hvsupport: Introduce parseSymsFile

2016-07-15 Thread John Ferlan
On 06/29/2016 02:40 AM, Ján Tomko wrote: > The code for parsing the different public syms files only differs > in the filenames and version prefix. > > Unify it to a single subroutine. > --- > docs/hvsupport.pl | 168 > -- > 1 file changed, 5

Re: [libvirt] [PATCH v4 7/7] qemu: Add luks support for domain disk

2016-07-15 Thread John Ferlan
[...] >> diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c >> index 376e6aa..d8a9fee 100644 >> --- a/src/qemu/qemu_hotplug.c >> +++ b/src/qemu/qemu_hotplug.c >> @@ -311,8 +311,10 @@ qemuDomainAttachVirtioDiskDevice(virConnectPtr conn, >> virQEMUDriverConfigPtr cfg = virQEMUDriver

Re: [libvirt] [PATCH v4 5/7] qemu: Add secinfo for hotplug virtio disk

2016-07-15 Thread John Ferlan
[...] >> qemuDomainObjEnterMonitor(driver, vm); >> >> +if (secobjProps && qemuMonitorAddObject(priv->mon, "secret", >> +secinfo->s.aes.alias, >> +secobjProps) < 0) >> +goto exit_monitor; >> + >

Re: [libvirt] [PATCH v4 4/7] storage: Add support to create a luks volume

2016-07-15 Thread John Ferlan
On 07/15/2016 03:17 AM, Peter Krempa wrote: > On Thu, Jul 14, 2016 at 16:55:01 -0400, John Ferlan wrote: >> >> >> [...] >> + +void +virQEMUBuildLuksOpts(virBufferPtr buf, + virStorageEncryptionInfoDefPtr enc, + const char *alias) >>

[libvirt] [PATCH 2/8] util: conf: Improve virConfGet*() logic

2016-07-15 Thread Andrea Bolognani
When parsing numeric values, we always store them as unsigned unless they're negative. We can use this fact to simplify the logic by removing a bunch of unnecessary checks. --- src/util/virconf.c | 40 +--- 1 file changed, 13 insertions(+), 27 deletions(-) diff

[libvirt] [PATCH 3/8] util: conf: Add integer casts

2016-07-15 Thread Andrea Bolognani
For good measure. --- src/util/virconf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/virconf.c b/src/util/virconf.c index 433b57b..2d42227 100644 --- a/src/util/virconf.c +++ b/src/util/virconf.c @@ -1126,7 +1126,7 @@ int virConfGetValueInt(virConfPtr conf,

[libvirt] [PATCH 4/8] util: conf: Claim the proper range for signed numbers

2016-07-15 Thread Andrea Bolognani
virConfGetValueLLong() errors out if the value is too big to fit into a long long integer, but claims the supported range to be (0,LLONG_MAX) instead of (LLONG_MIN,LLONG_MAX). --- src/util/virconf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/virconf.c b/src/ut

[libvirt] [PATCH 5/8] util: conf: Fix comment for virConfGetValueULLong()

2016-07-15 Thread Andrea Bolognani
The name of the function is not virConfGetValueULongLong(). --- src/util/virconf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virconf.c b/src/util/virconf.c index 6e1d2f4..d635539 100644 --- a/src/util/virconf.c +++ b/src/util/virconf.c @@ -1336,7 +1336,7 @@ int v

[libvirt] [PATCH 0/8] virConf fixes and cleanups

2016-07-15 Thread Andrea Bolognani
The interesting bits: * patch 1 fixes a bug affecting 32-bit systems * patch 2 removes some unnecessary code The rest: * very minor stuff Andrea Bolognani (8): util: conf: Use long long when parsing util: conf: Improve virConfGet*() logic util: conf: Add integer casts util: conf

[libvirt] [PATCH 8/8] util: conf: Rename VIR_CONF_{U, }LONG -> VIR_CONF_{U, }LLONG

2016-07-15 Thread Andrea Bolognani
Since commit 6381c89f8cce, we're storing long long integers instead of long integers. Rename the corresponding virConfType value accordingly. --- src/util/virconf.c | 26 +- src/util/virconf.h | 4 ++-- src/xenconfig/xen_common.c | 8 tests/vircon

[libvirt] [PATCH 6/8] util: conf: Fix parameters alignment

2016-07-15 Thread Andrea Bolognani
The parameters for virConfGetValueLLong() were not aligned properly. --- src/util/virconf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/virconf.c b/src/util/virconf.c index d635539..f2d543c 100644 --- a/src/util/virconf.c +++ b/src/util/virconf.c @@ -1304,8 +13

[libvirt] [PATCH 7/8] util: conf: Clarify choice between VIR_CONF_LONG and VIR_CONF_ULONG

2016-07-15 Thread Andrea Bolognani
We use unsigned long long integers unless we need to store a negative value. Rewrite the condition to make this more obvious. --- src/util/virconf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virconf.c b/src/util/virconf.c index f2d543c..eb55a1a 100644 --- a/src/u

[libvirt] [PATCH 1/8] util: conf: Use long long when parsing

2016-07-15 Thread Andrea Bolognani
Commit 6381c89f8cce changed virConfValue to store long long integers instead of long integers; however, the temporary variable used in virConfParseLong() was not updated accordingly, causing trouble for 32-bit machines. --- src/util/virconf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletion

Re: [libvirt] [PATCH] qemu: fix domain id after domainCreate(), domainCreateWithFlags()

2016-07-15 Thread Daniel P. Berrange
On Fri, Jul 15, 2016 at 06:30:32PM +0200, Sascha Silbe wrote: > Ever since a041de15 [Update to comply with internal driver API] > changed the code to use virDomain.id instead of _virDomainObj.id > (qemud_vm.id back then) directly, the domain ID retrieved with > virDomainGetID() is incorrect after v

[libvirt] [PATCH] qemu: fix domain id after domainCreate(), domainCreateWithFlags()

2016-07-15 Thread Sascha Silbe
Ever since a041de15 [Update to comply with internal driver API] changed the code to use virDomain.id instead of _virDomainObj.id (qemud_vm.id back then) directly, the domain ID retrieved with virDomainGetID() is incorrect after virDomainCreate() or virDomainCreateWithFlags() was called. The API con

[libvirt] [libvirt RFC PATCH 07/10] Add JSON backing volume parser for 'nbd' protocol

2016-07-15 Thread Peter Krempa
--- src/util/virstoragefile.c | 45 + tests/virstoragetest.c| 14 ++ 2 files changed, 59 insertions(+) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 0679824..06f9737 100644 --- a/src/util/virstoragefile.c +++ b

Re: [libvirt] [libvirt RFC PATCH 00/10] Add support for qemu's JSON pseudo'protocol for backing store

2016-07-15 Thread Daniel P. Berrange
On Fri, Jul 15, 2016 at 03:46:33PM +0200, Peter Krempa wrote: > Libvirt didn't handle this for a long time and VMs with such config would not > start we should implement it. > > Using JSON is basically the only option to specify advanced configuration for > a > backing file. > > Field names were

[libvirt] [libvirt RFC PATCH 05/10] util: storage: Add json pseudo protocol support for gluster volumes

2016-07-15 Thread Peter Krempa
Extract the common code of the URI parser and reuse it with gluster volumes. The gluster code has a separate function as multi-host support will add an alternative to the URI syntax. --- src/util/virstoragefile.c | 52 +-- tests/virstoragetest.c| 5

[libvirt] [libvirt RFC PATCH 01/10] tests: Add testing of backing store string parser

2016-07-15 Thread Peter Krempa
As we already test that the extraction of the backing store string works well additional tests for the backing store string parser can be made simpler. Export virStorageSourceNewFromBackingAbsolute and use it to parse the backing store strings, format them using virDomainDiskSourceFormat and match

[libvirt] [libvirt RFC PATCH 10/10] util: storage: Add JSON backing volume parser for 'ssh' protocol

2016-07-15 Thread Peter Krempa
--- src/util/virstoragefile.c | 38 ++ tests/virstoragetest.c| 9 + 2 files changed, 47 insertions(+) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 4aa1a9b..9c7b5a4 100644 --- a/src/util/virstoragefile.c +++ b/src/util/vi

[libvirt] [libvirt RFC PATCH 09/10] util: storage: Add 'ssh' network storage protocol

2016-07-15 Thread Peter Krempa
Allow using 'ssh' protocol in backing chains and later for disks themselves. --- src/libxl/libxl_conf.c| 1 + src/qemu/qemu_command.c | 7 +++ src/qemu/qemu_driver.c| 3 +++ src/qemu/qemu_parse_command.c | 1 + src/util/virstoragefile.c | 4 +++- src/util/virstoragefi

[libvirt] [libvirt RFC PATCH 06/10] util: storage: Add json pseudo protocol support for iSCSI volumes

2016-07-15 Thread Peter Krempa
iSCSI is a bit odd in this aspect since it only supports URIs but using the 'filename' property and does not have any alternative syntax. --- src/util/virstoragefile.c | 21 + 1 file changed, 21 insertions(+) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c i

[libvirt] [libvirt RFC PATCH 08/10] util: storage: Add JSON backing store parser for 'sheepdog' protocol

2016-07-15 Thread Peter Krempa
--- src/util/virstoragefile.c | 25 + 1 file changed, 25 insertions(+) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 06f9737..7c6d507 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -2659,6 +2659,30 @@ virStorageSourcePa

[libvirt] [libvirt RFC PATCH 00/10] Add support for qemu's JSON pseudo'protocol for backing store

2016-07-15 Thread Peter Krempa
Libvirt didn't handle this for a long time and VMs with such config would not start we should implement it. Using JSON is basically the only option to specify advanced configuration for a backing file. Field names were taken from qemu's source since there isn't really documentation for this. CCi

[libvirt] [libvirt RFC PATCH 04/10] util: storage: Add support for URI based backing volumes in qemu's JSON pseudo-protocol

2016-07-15 Thread Peter Krempa
http(s), ftp(s) and tftp use URIs for volume definitions in the JSON pseudo protocol so it's pretty straightforward to add support for them. --- src/util/virstoragefile.c | 34 ++ tests/virstoragetest.c| 8 2 files changed, 42 insertions(+) diff --git

[libvirt] [libvirt RFC PATCH 02/10] util: storage: Add parser for qemu's "json" backing pseudo-protocol

2016-07-15 Thread Peter Krempa
Add a modular parser that will allow to parse 'json' backing definitions that are supported by qemu. The initial implementation adds support for the 'file' driver. --- src/util/virstoragefile.c | 87 +++ tests/virstoragetest.c| 8 + 2 files chan

[libvirt] [libvirt RFC PATCH 03/10] util: storage: Add support for host device backing specified via JSON

2016-07-15 Thread Peter Krempa
JSON pseudo protocol for qemu allows to explicitly specify devices. Add convertor to the internal type. --- src/util/virstoragefile.c | 2 ++ tests/virstoragetest.c| 6 ++ 2 files changed, 8 insertions(+) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 826e4ba..2e

[libvirt] [PATCH sandbox 23/24] docker: add support for v2 registry server

2016-07-15 Thread Daniel P. Berrange
Many images are no longer available to download the via v1 registry server. Implement the v2 registry server protocol, in combination with the v2.1 metadata file format. Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/image/sources/docker.py | 61 + 1 file c

[libvirt] [PATCH sandbox 11/24] docker: check exit status of qemu-img command

2016-07-15 Thread Daniel P. Berrange
Use check_call() instead of call() so that we abort if something goes wrong with qemu-img Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/image/sources/docker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvirt-sandbox/image/sources/docker.py b/libvirt-sandbox/i

[libvirt] [PATCH sandbox 00/24] Add support for docker v2 registry

2016-07-15 Thread Daniel P. Berrange
I was on the verge of doing a release of libvirt-sandbox to include the docker/virt-builder support when I discovered it didn't work with many new images since docker is only exposing them over its v2 registry API. Hence this series to add support for the v2 API. It also includes a tonne of fixes f

[libvirt] [PATCH sandbox 06/24] image: add support for --debug arg

2016-07-15 Thread Daniel P. Berrange
Add a --debug arg which disables catching of exceptions when running virt-sandbox-image, to make it easier to diagnose unexpected crashes Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/image/cli.py | 54 +++- 1 file changed, 33 insertions(+), 21 del

[libvirt] [PATCH sandbox 09/24] virt-builder: check exit status of commands run

2016-07-15 Thread Daniel P. Berrange
Currently if any command fails, the virt-builder source just carries on, with predictably bad results. Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/image/sources/virtbuilder.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libvirt-sandbox/image/sources/virt

[libvirt] [PATCH sandbox 08/24] image: check for errors running mkfs / virt-sandbox

2016-07-15 Thread Daniel P. Berrange
When running the sandbox commands, use check_call() instead of call() so that we detect errors running external commands. Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/image/sources/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libvirt-sandbox/image/sour

[libvirt] [PATCH sandbox 01/24] Remove transfer annotations on scalar parameters

2016-07-15 Thread Daniel P. Berrange
The (transfer) annotation is only valid on parameters which are non-scalar in nature. Latest gobject will warn about this mistake. Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/libvirt-sandbox-config-interactive.c | 4 ++-- libvirt-sandbox/libvirt-sandbox-config-network-route.c | 2 +

[libvirt] [PATCH sandbox 07/24] image: don't assume ValueError has a multi-line message

2016-07-15 Thread Daniel P. Berrange
Just print out the value error text directly, instead of trying to interpret it as a multi-line message. Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/image/cli.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libvirt-sandbox/image/cli.py b/libvirt-sandbox/image/

[libvirt] [PATCH sandbox 12/24] docker: rename destdir to templatedir

2016-07-15 Thread Daniel P. Berrange
Use the more common naming for the variable pointing to the template directory Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/image/sources/docker.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libvirt-sandbox/image/sources/docker.py b/libvirt-sandbox/imag

[libvirt] [PATCH sandbox 21/24] docker: refactor download method exception handling

2016-07-15 Thread Daniel P. Berrange
Split off code which rolls back and deletes files when download fails. Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/image/sources/docker.py | 91 + 1 file changed, 46 insertions(+), 45 deletions(-) diff --git a/libvirt-sandbox/image/sources/docker.py b/

[libvirt] [PATCH sandbox 19/24] docker: refactor authentication method handling

2016-07-15 Thread Daniel P. Berrange
The docker registry v1 and v2 versions have completely different authentication methods that need handling. The v2 OAuth scheme requires modifying request headers and re-trying requests after getting an auth token. Introduce a pluggable framework for auth can be hooked into the _get_url() method to

[libvirt] [PATCH sandbox 03/24] init: search $PATH for user specified binary

2016-07-15 Thread Daniel P. Berrange
When launching a sandbox, don't assume the binary is a fully qualified path, let the kernel search $PATH for it. This is required by many docker images as their init program has no qualified path. Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/libvirt-sandbox-init-common.c | 2 +- 1 file

[libvirt] [PATCH sandbox 17/24] docker: introduce a DockerImage class

2016-07-15 Thread Daniel P. Berrange
Instead of directly using the Template class in docker code, introduce a DockerImage class which represents the data in a more convenient manner. In particular it will canonicalize the image names eg a bare image name with no "/", like "ubuntu", should be "library/ubuntu" The index.json file now s

[libvirt] [PATCH sandbox 20/24] docker: introduce a DockerRegistry class

2016-07-15 Thread Daniel P. Berrange
Introduce a class to handle HTTP requests with a docker registry server, and associated auth credentials. Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/image/sources/docker.py | 264 1 file changed, 136 insertions(+), 128 deletions(-) diff --git a/libvir

[libvirt] [PATCH sandbox 22/24] docker: implement support for oauth

2016-07-15 Thread Daniel P. Berrange
Latest docker v2 registry uses OAuth for creating tokens, identified by the "Bearer" method in the 'WWW-Authenticate' header. Add a DockerAuthBearer impl to deal with this. Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/image/sources/docker.py | 54 + 1 fil

[libvirt] [PATCH sandbox 18/24] docker: fix setting of Accept header

2016-07-15 Thread Daniel P. Berrange
The code for adding the Accept header was doing so based on whether 'if json' but 'json' resolved to a module import name, not a local boolean. So the header was always added even for requests not expected to be json. Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/image/sources/docker.py

[libvirt] [PATCH sandbox 16/24] docker: remove unused variables & code in download method

2016-07-15 Thread Daniel P. Berrange
Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/image/sources/docker.py | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/libvirt-sandbox/image/sources/docker.py b/libvirt-sandbox/image/sources/docker.py index 3b59051..c989662 100644 --- a/libvirt-sandbox/imag

[libvirt] [PATCH sandbox 02/24] Improve error message for unsupported URIs

2016-07-15 Thread Daniel P. Berrange
Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/libvirt-sandbox-context-interactive.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libvirt-sandbox/libvirt-sandbox-context-interactive.c b/libvirt-sandbox/libvirt-sandbox-context-interactive.c index 3ab63ec..5ecaf

[libvirt] [PATCH sandbox 14/24] docker: add missing hashlib import statement

2016-07-15 Thread Daniel P. Berrange
Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/image/sources/docker.py | 1 + 1 file changed, 1 insertion(+) diff --git a/libvirt-sandbox/image/sources/docker.py b/libvirt-sandbox/image/sources/docker.py index 1e5859e..3e0aa9f 100644 --- a/libvirt-sandbox/image/sources/docker.py +++ b/li

[libvirt] [PATCH sandbox 10/24] virt-builder: disable setup of network for virt-builder

2016-07-15 Thread Daniel P. Berrange
When getting the pristine image, we don't customize it or run any scripts, so we can safely disable use of the network. This avoids a possible failure scenario that virt-builder cannot report upfront, where is not configured virbr0. Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/image/sou

[libvirt] [PATCH sandbox 13/24] docker: Remove duplicated call to download_template

2016-07-15 Thread Daniel P. Berrange
Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/image/sources/docker.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/libvirt-sandbox/image/sources/docker.py b/libvirt-sandbox/image/sources/docker.py index 57256f3..1e5859e 100644 --- a/libvirt-sandbox/image/sources/docker.py +++ b/l

[libvirt] [PATCH sandbox 15/24] docker: fix download progress target value

2016-07-15 Thread Daniel P. Berrange
The download code was mistakenly using the length of the json manifest in place of the length of the image file blob. Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/image/sources/docker.py | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libvirt-sandbox/image

[libvirt] [PATCH sandbox 05/24] image: remove execute permission from cli.py

2016-07-15 Thread Daniel P. Berrange
Individual python module files do not need to have execute permissions. Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/image/cli.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 libvirt-sandbox/image/cli.py diff --git a/libvirt-sandbox/image/cli.py b/

[libvirt] [PATCH sandbox 04/24] image: rename python source impl modules

2016-07-15 Thread Daniel P. Berrange
It is more normal to have python source files in all lowercase, so rename the existing modules. --- libvirt-sandbox/image/sources/Makefile.am | 6 +++--- libvirt-sandbox/image/sources/{Source.py => base.py}| 0 libvirt-sandbox/image/sources/{DockerSource.p

[libvirt] [PATCH sandbox 24/24] image: add 'list' command for viewing local templates

2016-07-15 Thread Daniel P. Berrange
Introduce a command able to list locally stored image templates: $ virt-sandbox-image list docker:library/ubuntu?tag=14.04.1 docker:library/ubuntu?tag=14.04.2 virt-builder:/fedora-23 or restrict to a single source type $ virt-sandbox-image list --source docker docker:library/ubuntu?t

Re: [libvirt] [PATCH 1/2] storage: Don't delete Ploop volumes twice

2016-07-15 Thread Martin Kletzander
On Fri, Jul 15, 2016 at 02:51:21PM +0300, Olga Krishtal wrote: On 15/07/16 11:37, Martin Kletzander wrote: On Fri, Jul 15, 2016 at 09:41:11AM +0200, Ján Tomko wrote: On Thu, Jul 14, 2016 at 02:27:40PM +0200, Martin Kletzander wrote: When reinitializing Ploop volumes we also went through the ru

Re: [libvirt] [PATCH 1/2] storage: Don't delete Ploop volumes twice

2016-07-15 Thread Olga Krishtal
On 15/07/16 11:37, Martin Kletzander wrote: On Fri, Jul 15, 2016 at 09:41:11AM +0200, Ján Tomko wrote: On Thu, Jul 14, 2016 at 02:27:40PM +0200, Martin Kletzander wrote: When reinitializing Ploop volumes we also went through the rutine of the normal wipe, effectively removing the root.hds file

[libvirt] [PATCH 0/7] Error path cleanup for hotplug and one function move/rename

2016-07-15 Thread John Ferlan
During review of the LUKS series: http://www.redhat.com/archives/libvir-list/2016-July/msg00488.html it was noted that the error paths should use bools rather than goto failxxx type labels. So this series does that for a few of the affect APIs. There's also changes to qemuDomainAttachMemory sinc

[libvirt] [PATCH 1/7] qemu: Alter error path cleanup for qemuDomainAttachHostSCSIDevice

2016-07-15 Thread John Ferlan
Based on recent review comment - rather than have a spate of goto fail, change to a boolean based model. Ensures that the original error can be preserved and cleanup is a bit more orderly if more objects are added. Signed-off-by: John Ferlan --- src/qemu/qemu_hotplug.c | 20 +

[libvirt] [PATCH 5/7] qemu: Alter error path cleanup for qemuDomainAttachRNGDevice

2016-07-15 Thread John Ferlan
Based on recent review comment - rather than have a spate of goto fail, change to a boolean based model. Ensures that the original error can be preserved and cleanup is a bit more orderly if more objects are added. Signed-off-by: John Ferlan --- src/qemu/qemu_hotplug.c | 44 +

[libvirt] [PATCH 6/7] qemu: Alter error path cleanup for qemuDomainAttachMemory

2016-07-15 Thread John Ferlan
A recent adjustment to qemuDomainAttachRNGDevice to properly cleanup the props object after a qemuMonitorAddObject also would affect this code. Alter the cleanup to be similar to RNG changes. Signed-off-by: John Ferlan --- src/qemu/qemu_hotplug.c | 38 +++--- 1 fi

[libvirt] [PATCH 3/7] qemu: Alter error path cleanup for qemuDomainAttachSCSIDisk

2016-07-15 Thread John Ferlan
Based on recent review comment - rather than have a spate of goto fail, change to a boolean based model. Ensures that the original error can be preserved and cleanup is a bit more orderly if more objects are added. Signed-off-by: John Ferlan --- src/qemu/qemu_hotplug.c | 22 ++---

[libvirt] [PATCH 2/7] qemu: Alter error path cleanup for qemuDomainAttachVirtioDiskDevice

2016-07-15 Thread John Ferlan
Based on recent review comment - rather than have a spate of goto fail, change to a boolean based model. Ensures that the original error can be preserved and cleanup is a bit more orderly if more objects are added. Signed-off-by: John Ferlan --- src/qemu/qemu_hotplug.c | 20 +

[libvirt] [PATCH 7/7] qemu: Move and rename qemuBufferEscapeComma

2016-07-15 Thread John Ferlan
Move to virqemu and rename to virQEMUBuildBufferEscapeComma. This can then be shared by the storage driver when it builds the command line for qemuimg Signed-off-by: John Ferlan --- src/libvirt_private.syms | 1 + src/qemu/qemu_command.c | 33 + src/util/virqemu

[libvirt] [PATCH 4/7] qemu: Alter error path cleanup for qemuDomainAttachChrDevice

2016-07-15 Thread John Ferlan
Based on recent review comment - rather than have a spate of goto fail, change to a boolean based model. Ensures that the original error can be preserved and cleanup is a bit more orderly if more objects are added. Signed-off-by: John Ferlan --- src/qemu/qemu_hotplug.c | 19 ++---

Re: [libvirt] [libvirt-perl PATCH] Revert "Add support for VIR_SECRET_USAGE_TYPE_PASSPHRASE"

2016-07-15 Thread Martin Kletzander
On Fri, Jul 15, 2016 at 06:25:41AM -0400, John Ferlan wrote: This reverts commit c74c7608fc1fdb2dc96ca12fcf601ac12990b0ba. The libvirt changes that caused this were reverted via libvirt.git commit id 'dae3b965' ACK signature.asc Description: Digital signature -- libvir-list mailing list lib

Re: [libvirt] [PATCH] virconf: clarify type range checks for integers

2016-07-15 Thread Andrea Bolognani
On Thu, 2016-07-14 at 11:22 +0100, Daniel P. Berrange wrote: > When virConf 'l' field is a 'signed long long', so whenever s/When// > the 'type' field is VIR_CONF_ULONG, we should explicitly cast > 'l' to a 'unsigned long long' before doing range checks. >  > Signed-off-by: Daniel P. Berrange >

[libvirt] [libvirt-perl PATCH] Revert "Add support for VIR_SECRET_USAGE_TYPE_PASSPHRASE"

2016-07-15 Thread John Ferlan
This reverts commit c74c7608fc1fdb2dc96ca12fcf601ac12990b0ba. The libvirt changes that caused this were reverted via libvirt.git commit id 'dae3b965' Signed-off-by: John Ferlan --- Virt.xs| 1 - lib/Sys/Virt/Secret.pm | 5 - 2 files changed, 6 deletions(-) diff --git a/Virt

[libvirt] NPIV storage pools do not map to same LUN units across hosts.

2016-07-15 Thread Nitesh Konkar
Link: http://wiki.libvirt.org/page/NPIV_in_libvirt Topic: Virtual machine configuration change to use vHBA LUN There is a NPIV storage pool defined on two hosts and pool contains a total of 8 volumes, allocated from a storage device. Source: # virsh vol-list poolvhba0 Name Pat

Re: [libvirt] [PATCH 2/2] storage: Forbid wiping formatted volume types that are not supported

2016-07-15 Thread Martin Kletzander
On Fri, Jul 15, 2016 at 09:46:50AM +0200, Ján Tomko wrote: On Thu, Jul 14, 2016 at 02:27:41PM +0200, Martin Kletzander wrote: Until now we allowed that to happen, however the only thing we supported was either rewiting the file or truncating it. That however doesn't keep the format of that file

Re: [libvirt] [PATCH 1/2] storage: Don't delete Ploop volumes twice

2016-07-15 Thread Martin Kletzander
On Fri, Jul 15, 2016 at 09:41:11AM +0200, Ján Tomko wrote: On Thu, Jul 14, 2016 at 02:27:40PM +0200, Martin Kletzander wrote: When reinitializing Ploop volumes we also went through the rutine of the normal wipe, effectively removing the root.hds file twice. The file was wiped with the selected

Re: [libvirt] [PATCH v3 0/4] devices: filesystem: type volume

2016-07-15 Thread Ján Tomko
On Thu, Jul 14, 2016 at 04:52:37PM +0300, Olga Krishtal wrote: The patches introduce new filesystem type volume: This makes possible to use storage volumes as the source for disks. v2: -split patches -rebased v3: - fixed check for template fs. - refactoring Olga Krishtal (4): file

Re: [libvirt] [PATCH 2/2] storage: Forbid wiping formatted volume types that are not supported

2016-07-15 Thread Ján Tomko
On Thu, Jul 14, 2016 at 02:27:41PM +0200, Martin Kletzander wrote: Until now we allowed that to happen, however the only thing we supported was either rewiting the file or truncating it. That however doesn't keep the format of that file, so QCOWs, VDIs and all others just became RAW with arbitra

Re: [libvirt] [PATCH 1/2] storage: Don't delete Ploop volumes twice

2016-07-15 Thread Ján Tomko
On Thu, Jul 14, 2016 at 02:27:40PM +0200, Martin Kletzander wrote: When reinitializing Ploop volumes we also went through the rutine of the normal wipe, effectively removing the root.hds file twice. The file was wiped with the selected algorithm first (without deletion), then reinitialized to m

Re: [libvirt] [PATCH v4 4/7] storage: Add support to create a luks volume

2016-07-15 Thread Peter Krempa
On Thu, Jul 14, 2016 at 16:55:01 -0400, John Ferlan wrote: > > > [...] > > >> + > >> +void > >> +virQEMUBuildLuksOpts(virBufferPtr buf, > >> + virStorageEncryptionInfoDefPtr enc, > >> + const char *alias) > >> +{ > >> +virBufferAsprintf(buf, "key-secre