Re: [libvirt] [PATCH 3/4] Use mockup cache

2015-09-21 Thread Ján Tomko
On Mon, Sep 21, 2015 at 03:03:20PM +0200, Michal Privoznik wrote: > On 15.09.2015 10:05, Ján Tomko wrote: > > From: Pavel Fedin > > > > Use the new API in order to correctly add capability sets to the cache > > before parsing XML files > > > > Signed-off-by: Pavel Fedin > > s/^/tests: / in $SU

[libvirt] [libvirt-test-api][PATCHv2] Add new test case for allocPages API

2015-09-21 Thread Luyao Huang
Signed-off-by: Luyao Huang --- cases/test_connection.conf | 10 repos/virconn/connection_allocPages.py | 84 ++ 2 files changed, 94 insertions(+) create mode 100644 repos/virconn/connection_allocPages.py diff --git a/cases/test_connection.conf b/

Re: [libvirt] [PATCH 3/3] virsh: Notify users about disconnects

2015-09-21 Thread John Ferlan
On 09/17/2015 08:23 AM, Jiri Denemark wrote: > After my "client rpc: Report proper error for keepalive disconnections" > patch, virsh would no long print a warning when it closes a connection > to a daemon after a keepalive timeout. Although the warning > > virsh # 2015-09-15 10:59:26.729+00

Re: [libvirt] [PATCH sandbox] docker: don't assume X-Docker-Token is set

2015-09-21 Thread Cedric Bosdonnat
On Mon, 2015-09-21 at 15:12 +0100, Daniel P. Berrange wrote: > The Red Hat docker registry (registry.access.redhat.com) does > not set any X-Docker-Token HTTP header in its responses. Change > the code so it only passes around this header if it is actually > present. > > Signed-off-by: Daniel P. B

Re: [libvirt] [PATCH v2 sandbox] virt-sandbox-image: switch to use URI to identify templates

2015-09-21 Thread Cedric Bosdonnat
On Mon, 2015-09-21 at 15:45 +0100, Daniel P. Berrange wrote: > Currently the CLI syntax is somewhat docker specific requiring > inclusion of --registry arg to identify the docker download > server. Other app containers have a notion of download server, > but don't separate it from the template name

[libvirt] New software based on libvirt

2015-09-21 Thread Gustav Fransson Nyvell
Hello, I'm introducing to you the decentralized cloud Cherrypop. Combining libvirt and LizardFS (as of now) it becomes a cloud completely without masters. Thus, any node is sufficient for the cloud to be up and therefore no wasted resources and no single point of failure. It's still pretty cr

[libvirt] [PATCH v2] virsh: Fix job status indicator for 0 length block jobs

2015-09-21 Thread Peter Krempa
Although 0 length block jobs aren't entirely useful, the output of virsh blockjob is empty due to the condition that suppresses the output for migration jobs that did not start. Since the only place that actually uses the condition that suppresses the output is in migration, let's move the check th

Re: [libvirt] [PATCH v2] test driver: don't unlock pool after freeing it

2015-09-21 Thread Peter Krempa
On Thu, Sep 17, 2015 at 09:12:31 -0400, David Mansfield wrote: > > > On 09/17/2015 01:58 AM, Peter Krempa wrote: > > On Wed, Sep 16, 2015 at 17:14:28 -0400, David Mansfield wrote: > ... > From 08927d6ff222603e1be2a032c5fed68a5df8c68f Mon Sep 17 00:00:00 2001 > From: David Mansfield > Date: Th

[libvirt] [PATCH 06/13] conf: Add XML parser flag that will allow us to do incompatible updates

2015-09-21 Thread Peter Krempa
Add a new parser flag that will mark code paths that parse XML files wich will not be used with existing VM state so that post parse callbacks can possibly do ABI incompatible changes if needed. --- src/conf/domain_conf.h| 2 ++ src/qemu/qemu_driver.c| 12 src/qemu/qemu_migra

[libvirt] [PATCH 02/13] conf: Add helper to determine whether memory hotplug is enabled for a vm

2015-09-21 Thread Peter Krempa
Add a simple helper so that the code doesn't have to rewrite the same condition multiple times. --- src/conf/domain_conf.c| 9 - src/conf/domain_conf.h| 1 + src/libvirt_private.syms | 1 + src/qemu/qemu_command.c | 2 +- src/qemu/qemu_domain.c| 2 +- src/qemu/qemu_migration

[libvirt] [PATCH 01/13] libxl: vz: Use accessor instead of direct access for max_balloon

2015-09-21 Thread Peter Krempa
Commits 45697fe5 and f863ac80 used direct access to the variable instead of the preferred accessor method. --- src/libxl/libxl_driver.c | 2 +- src/vz/vz_driver.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index

[libvirt] [PATCH 12/13] qemu: ppc64: Align memory sizes to 256MiB blocks

2015-09-21 Thread Peter Krempa
For some machine types ppc64 machines now require that memory sizes are aligned to 256MiB increments (due to the dynamically reconfigurable memory). As now we treat existing configs reasonably in regards to migration, we can round all the sizes unconditionally. The only drawback will be that the me

[libvirt] [PATCH 07/13] conf: Split memory related post parse stuff into separate function

2015-09-21 Thread Peter Krempa
The post parse func is growing rather large. Since later patches will introduce more logic in the memory post parse code, split it into a separate handler. --- src/conf/domain_conf.c | 32 +--- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/src/conf/dom

[libvirt] [PATCH 03/13] qemu: Make memory alignment helper more universal

2015-09-21 Thread Peter Krempa
Extract the size determination into a separate function and reuse it across the memory device alignment functions. Since later we will need to decide the alignment size according to architecture let's pass def to the functions. --- src/qemu/qemu_domain.c | 26 ++ src/qemu/

[libvirt] [PATCH 09/13] conf: Pre-calculate initial memory size instead of always calculating it

2015-09-21 Thread Peter Krempa
Add 'initial_memory' member to struct virDomainMemtune so that the memory size can be pre-calculated once instead of inferring it always again and again. Separating of the fields will also allow finer granularity of decisions in later patches where it will allow to keep the old initial memory valu

[libvirt] [PATCH 00/13] Memory alignment vs. migration fixes

2015-09-21 Thread Peter Krempa
The refactorings that I've done in preparation for memory hotplug had the right idea in regards to handling of the various memory size fields in libvirt, but the execution of the refactors was suboptimal for migration compatibilty. This patchset fixes problems when migrating from older libvirt ver

[libvirt] [PATCH 05/13] conf: Document all VIR_DOMAIN_DEF_PARSE_* flags

2015-09-21 Thread Peter Krempa
--- src/conf/domain_conf.h | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index fcb6854..15a8576 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2632,19 +2632,25 @@ void virDomainObjListRemoveLocke

[libvirt] [PATCH 04/13] conf: Drop VIR_DOMAIN_DEF_PARSE_CLOCK_ADJUST flag

2015-09-21 Thread Peter Krempa
The flag was used only for formatting the XML and once the parser and formatter flags were split in 0ecd6851093945dd5ddc78266c61b577c65394ae it doesn't make sense any more to have it. --- src/conf/domain_conf.c | 1 - src/conf/domain_conf.h | 7 +++ tests/qemuxml2xmltest.c | 3 +-- 3 files c

[libvirt] [PATCH 13/13] test: Add test to validate that memory sizes don't get updated on migration

2015-09-21 Thread Peter Krempa
--- .../qemuxml2argv-migrate-numa-unaligned.args | 13 + .../qemuxml2argv-migrate-numa-unaligned.xml| 33 ++ tests/qemuxml2argvtest.c | 13 +++-- 3 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 tests/qem

[libvirt] [PATCH 11/13] qemu: command: Align memory sizes only on fresh starts

2015-09-21 Thread Peter Krempa
When we are starting a qemu process for an incomming migration or snapshot reloading we should not modify the memory sizes in the domain since we could potentially change the guest ABI that was tediously checked before. Additionally the function now updates the initial memory size according to the

[libvirt] [PATCH 10/13] conf: Don't always recalculate initial memory size from NUMA size totals

2015-09-21 Thread Peter Krempa
When implementing memory hotplug I've opted to recalculate the initial memory size (contents of the element) as a sum of the sizes of NUMA nodes when NUMA was enabled. This was based on an assumption that qemu did not allow starting when the NUMA node size total didn't equal to the initial memory

[libvirt] [PATCH 08/13] conf: Rename max_balloon to total_memory

2015-09-21 Thread Peter Krempa
The name of the variable was misleading. Rename it and it's setting accessor before other fixes. --- src/conf/domain_conf.c | 18 +- src/conf/domain_conf.h | 7 --- src/hyperv/hyperv_driver.c | 2 +- src/libvirt_private.syms | 2 +- src/libxl/libxl_driver.c | 4

Re: [libvirt] [PATCH v2] Close the source fd if the destination qemu exits during tunnelled migration

2015-09-21 Thread John Ferlan
On 09/21/2015 05:09 AM, Shivaprasad bhat wrote: > Thanks John for the comments. > > > On Fri, Sep 18, 2015 at 10:34 PM, John Ferlan wrote: >> >> >> On 09/14/2015 10:44 AM, Shivaprasad G Bhat wrote: >>> Tunnelled migration can hang if the destination qemu exits despite all the >>> ABI checks. T

[libvirt] [PATCH v2 sandbox] virt-sandbox-image: switch to use URI to identify templates

2015-09-21 Thread Daniel P. Berrange
Currently the CLI syntax is somewhat docker specific requiring inclusion of --registry arg to identify the docker download server. Other app containers have a notion of download server, but don't separate it from the template name. This patch removes that docker-ism by changing to use a URI for id

[libvirt] [PATCH sandbox] docker: don't assume X-Docker-Token is set

2015-09-21 Thread Daniel P. Berrange
The Red Hat docker registry (registry.access.redhat.com) does not set any X-Docker-Token HTTP header in its responses. Change the code so it only passes around this header if it is actually present. Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/image/sources/DockerSource.py | 12

[libvirt] [PATCH sandbox] virt-sandbox-image: switch to use URI to identify templates

2015-09-21 Thread Daniel P. Berrange
Currently the CLI syntax is somewhat docker specific requiring inclusion of --registry arg to identify the docker download server. Other app containers have a notion of download server, but don't separate it from the template name. This patch removes that docker-ism by changing to use a URI for id

[libvirt] [PATCH v2 1/4] virfile: Rename virFileUnlink to virFileRemove

2015-09-21 Thread John Ferlan
Similar to commit id '35847860', it's possible to attempt to create a 'netfs' directory in an NFS root-squash environment which will cause the 'vol-delete' command to fail. It's also possible error paths from the 'vol-create' would result in an error to remove a created directory if the permission

Re: [libvirt] [PATCH 1/4] tests: split out common qemu driver initialization

2015-09-21 Thread Michal Privoznik
On 15.09.2015 10:05, Ján Tomko wrote: > From: Pavel Fedin > > Two utility functions are introduced for proper initialization and > cleanup of the driver. > > Signed-off-by: Pavel Fedin > Signed-off-by: Ján Tomko > --- > tests/domainsnapshotxml2xmltest.c | 10 +++--- > tests/qemuagenttest.

Re: [libvirt] [PATCH 3/4] Use mockup cache

2015-09-21 Thread Michal Privoznik
On 15.09.2015 10:05, Ján Tomko wrote: > From: Pavel Fedin > > Use the new API in order to correctly add capability sets to the cache > before parsing XML files > > Signed-off-by: Pavel Fedin s/^/tests: / in $SUBJ. > --- > tests/qemuhotplugtest.c | 23 +++ > tests/qemuxml

Re: [libvirt] [PATCH 4/4] Removed unneeded check

2015-09-21 Thread Michal Privoznik
On 15.09.2015 10:05, Ján Tomko wrote: > From: Pavel Fedin > > Since test suite now correctly creates capabilities cache, the hack is not > needed any more. > > Signed-off-by: Pavel Fedin > Signed-off-by: Ján Tomko > --- > src/qemu/qemu_domain.c | 10 ++ > 1 file changed, 2 insertions(

Re: [libvirt] [PATCH 2/4] Implement infrastracture for mocking up QEMU capabilities cache

2015-09-21 Thread Michal Privoznik
On 15.09.2015 10:05, Ján Tomko wrote: > From: Pavel Fedin > > The main purpose of this patch is to introduce test mode to > virQEMUCapsCacheLookup(). This is done by adding a global variable, which > effectively overrides binary name. This variable is supposed to be set by > test suite. > > The

Re: [libvirt] [PATCH] qemu: Update balloon state after migration finishes

2015-09-21 Thread Michal Privoznik
On 21.09.2015 13:43, Peter Krempa wrote: > Since qemu doesn't know at the beginning of migration what the actual > balloon size is until the migration stream transfers the appropriate > fields we also need to update the balloon size unconditionally in the > finish phase of the migration. > --- Oka

Re: [libvirt] [PATCH v2 1/4] virfile: Rename virFileUnlink to virFileRemove

2015-09-21 Thread Michal Privoznik
On 21.09.2015 14:08, John Ferlan wrote: > Similar to commit id '35847860', it's possible to attempt to create > a 'netfs' directory in an NFS root-squash environment which will cause > the 'vol-delete' command to fail. It's also possible error paths from > the 'vol-create' would result in an error

Re: [libvirt] [PATCH 1/4] storage: Use virFileUnlink instead of rmdir

2015-09-21 Thread John Ferlan
On 09/21/2015 06:43 AM, Michal Privoznik wrote: > On 18.09.2015 20:20, John Ferlan wrote: >> Similar to commit id '35847860', it's possible to attempt to create >> a 'netfs' directory in an NFS root-squash environment which will cause >> the 'vol-delete' command to fail. It's also possible error

Re: [libvirt] [PATCH] vz: remove error logging from prlsdkUUIDParse

2015-09-21 Thread Maxim Nestratov
21.09.2015 14:56, Michal Privoznik пишет: On 21.09.2015 13:08, Maxim Nestratov wrote: From: Maxim Nestratov As far as not every call of prlsdkUUIDParse assume correct UUID supplied, there is no use to complain about wrong format in it. Otherwise our log is flooded with false error messages. Fo

Re: [libvirt] [PATCH] vz: remove error logging from prlsdkUUIDParse

2015-09-21 Thread Maxim Nestratov
21.09.2015 14:59, Dmitry Guryanov пишет: On 09/21/2015 02:08 PM, Maxim Nestratov wrote: From: Maxim Nestratov As far as not every call of prlsdkUUIDParse assume correct UUID supplied, there is no use to complain about wrong format in it. Otherwise our log is flooded with false error messages.

Re: [libvirt] [PATCH] vz: remove error logging from prlsdkUUIDParse

2015-09-21 Thread Dmitry Guryanov
On 09/21/2015 02:08 PM, Maxim Nestratov wrote: From: Maxim Nestratov As far as not every call of prlsdkUUIDParse assume correct UUID supplied, there is no use to complain about wrong format in it. Otherwise our log is flooded with false error messages. For instance, calling prlsdkUUIDParse from

Re: [libvirt] [PATCH] vz: remove error logging from prlsdkUUIDParse

2015-09-21 Thread Michal Privoznik
On 21.09.2015 13:08, Maxim Nestratov wrote: > From: Maxim Nestratov > > As far as not every call of prlsdkUUIDParse assume correct UUID > supplied, there is no use to complain about wrong format in it. > Otherwise our log is flooded with false error messages. > For instance, calling prlsdkUUIDPar

[libvirt] [PATCH] qemu: Update balloon state after migration finishes

2015-09-21 Thread Peter Krempa
Since qemu doesn't know at the beginning of migration what the actual balloon size is until the migration stream transfers the appropriate fields we also need to update the balloon size unconditionally in the finish phase of the migration. --- src/qemu/qemu_migration.c | 4 src/qemu/qemu_proc

[libvirt] [PATCH] vz: remove error logging from prlsdkUUIDParse

2015-09-21 Thread Maxim Nestratov
From: Maxim Nestratov As far as not every call of prlsdkUUIDParse assume correct UUID supplied, there is no use to complain about wrong format in it. Otherwise our log is flooded with false error messages. For instance, calling prlsdkUUIDParse from prlsdkEventsHandler works as a filter and in cas

Re: [libvirt] [PATCH 1/4] storage: Use virFileUnlink instead of rmdir

2015-09-21 Thread Michal Privoznik
On 18.09.2015 20:20, John Ferlan wrote: > Similar to commit id '35847860', it's possible to attempt to create > a 'netfs' directory in an NFS root-squash environment which will cause > the 'vol-delete' command to fail. It's also possible error paths from > the 'vol-create' would result in an error

Re: [libvirt] [PATCH 0/4] Remove open coding virProcessWait for root-squash

2015-09-21 Thread Michal Privoznik
On 18.09.2015 20:20, John Ferlan wrote: > A followup of sorts to recently pushed patches regarding NFS root-squash. > During libvirt-security list review it was pointed out that the new code > was essentially open coding what virProcessWait does. However, since the > model being used also was open

Re: [libvirt] [libvirt-python][PATCH] generator: fix build fail with old xml lib

2015-09-21 Thread Michal Privoznik
On 02.09.2015 07:58, Luyao Huang wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1222795#c6 > > if build libvirt-python with some old xml lib (python-pyxml), > build will fail and error like this: > > File "generator.py", line 139, in start > if "string" in attrs: > File

Re: [libvirt] [PATCH] vz: set mount point for container image-based disks

2015-09-21 Thread Maxim Nestratov
21.09.2015 12:23, Daniel P. Berrange пишет: On Mon, Sep 21, 2015 at 12:14:57PM +0300, Maxim Nestratov wrote: 21.09.2015 11:44, Daniel P. Berrange пишет: On Sun, Sep 20, 2015 at 10:17:51PM +0300, Maxim Nestratov wrote: From: Maxim Nestratov In order to support not only root disks with type=fi

Re: [libvirt] [PATCH] vz: set mount point for container image-based disks

2015-09-21 Thread Daniel P. Berrange
On Mon, Sep 21, 2015 at 12:14:57PM +0300, Maxim Nestratov wrote: > 21.09.2015 11:44, Daniel P. Berrange пишет: > >On Sun, Sep 20, 2015 at 10:17:51PM +0300, Maxim Nestratov wrote: > >>From: Maxim Nestratov > >> > >>In order to support not only root disks with type=file for containers, > >>we need t

Re: [libvirt] [PATCH] vz: set mount point for container image-based disks

2015-09-21 Thread Maxim Nestratov
21.09.2015 11:44, Daniel P. Berrange пишет: On Sun, Sep 20, 2015 at 10:17:51PM +0300, Maxim Nestratov wrote: From: Maxim Nestratov In order to support not only root disks with type=file for containers, we need to specify mount points for them. For instance, if a secondary disk is added by the

Re: [libvirt] [PATCH v2] Close the source fd if the destination qemu exits during tunnelled migration

2015-09-21 Thread Shivaprasad bhat
Thanks John for the comments. On Fri, Sep 18, 2015 at 10:34 PM, John Ferlan wrote: > > > On 09/14/2015 10:44 AM, Shivaprasad G Bhat wrote: >> Tunnelled migration can hang if the destination qemu exits despite all the >> ABI checks. This happens whenever the destination qemu exits before the >> c

Re: [libvirt] [PATCH] vz: set mount point for container image-based disks

2015-09-21 Thread Daniel P. Berrange
On Sun, Sep 20, 2015 at 10:17:51PM +0300, Maxim Nestratov wrote: > From: Maxim Nestratov > > In order to support not only root disks with type=file for containers, > we need to specify mount points for them. > For instance, if a secondary disk is added by the following record in > xml: > >

Re: [libvirt] crash in virDomainNumaGetMemorySize

2015-09-21 Thread Peter Krempa
On Fri, Sep 18, 2015 at 17:10:20 +0200, Olaf Hering wrote: > With current master (56945e1), while toying around with a WS2008R2 Hyper-V > host: > > root@probook:~ # gdb --quiet -ex 'r -c hv dumpxml all-sles12-dev' -ex bt -ex > detach -ex quit virsh > Reading symbols from virsh...Reading symbols

[libvirt] [libvirt-test-api][PATCH] Add a new test case for setUserPassword

2015-09-21 Thread Luyao Huang
Signed-off-by: Luyao Huang --- cases/linux_domain.conf | 22 repos/domain/set_user_passwd.py | 111 2 files changed, 133 insertions(+) create mode 100644 repos/domain/set_user_passwd.py diff --git a/cases/linux_domain.conf b/cases/linux

Re: [libvirt] [PATCH] Add a new test case for setUserPassword

2015-09-21 Thread Luyao Huang
Please ignore this one, i have forgot set the header. - Original Message - From: "Luyao Huang" To: libvir-list@redhat.com Cc: "Luyao Huang" Sent: Monday, September 21, 2015 3:27:02 PM Subject: [libvirt] [PATCH] Add a new test case for setUserPassword Signed-off-by: Luyao Huang --- cas

[libvirt] [PATCH] Add a new test case for setUserPassword

2015-09-21 Thread Luyao Huang
Signed-off-by: Luyao Huang --- cases/linux_domain.conf | 22 repos/domain/set_user_passwd.py | 111 2 files changed, 133 insertions(+) create mode 100644 repos/domain/set_user_passwd.py diff --git a/cases/linux_domain.conf b/cases/linux