[libvirt] [PATCH v2] qemu: handle reconnect on chardev hotplug

2017-09-12 Thread ZhiPeng Lu
The patch passes the reconnect timeout to QEMU by monitor on chardev hotplug. Signed-off-by: ZhiPeng Lu --- v1->v2: - Fix syntax errors about Curly brackets --- src/qemu/qemu_monitor_json.c | 17 + 1 file changed, 17 insertions(+) diff --git

Re: [libvirt] [PATCH 2/2] qemu: Use secret objects to pass iSCSI passwords

2017-09-12 Thread John Ferlan
On 09/12/2017 09:36 AM, Peter Krempa wrote: > On Tue, Sep 05, 2017 at 15:09:35 -0400, John Ferlan wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=1425757 >> >> The blockdev-add code provides a mechanism to sanely provide user >> and password-secret arguments for iscsi without placing them

Re: [libvirt] [PATCH 2/2] qemu: add capability checking for qcow2 cache configuration

2017-09-12 Thread John Ferlan
On 09/07/2017 02:09 AM, Liu Qing wrote: > Add qemu capabilities QEMU_CAPS_L2_CACHE_SIZE, > QEMU_CAPS_REFCOUNT_CACHE_SIZE, QEMU_CAPS_CACHE_CLEAN_INTERVAL. > Add testing for the above qemu capabilities. > > Signed-off-by: Liu Qing > --- > > Patch 2 - a) use QMP instead of

Re: [libvirt] [PATCH 1/2] conf, docs: Add qcow2 cache configuration support

2017-09-12 Thread John Ferlan
On 09/07/2017 02:09 AM, Liu Qing wrote: > Random write IOPS will drop dramatically if qcow2 l2 cache could not > cover the whole disk. This patch gives libvirt user a chance to adjust > the qcow2 cache configuration. > > Three new qcow2 driver parameters are added. They are l2-cache-size, >

Re: [libvirt] [PATCH 5/5] qemu: Implement usernet address

2017-09-12 Thread Laine Stump
On 09/12/2017 05:32 AM, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1075520 > > Apart from generic checks, we need to constrain netmask/prefix > lenght a bit. Thing is, with current implementation QEMU needs to > be able to 'assign' some IP addresses to the virtual

Re: [libvirt] [PATCH] qemu: Clean up qemuDomainSecretPrepare

2017-09-12 Thread John Ferlan
ping? It's perhaps trivial, but nonetheless... Tks, John On 08/30/2017 03:48 PM, John Ferlan wrote: > No need to pass a @driver parameter since all that's done is deref > the @cfg especially since the only caller can just pass an already > referenced @cfg. > > Also, looks like commit id

[libvirt] [PATCH v7 06.5/11] merge with previous...

2017-09-12 Thread John Ferlan
This patch would be merged with the existing 06/11 patch for the following changes: 1. Use qemuBlockStorageSourceBuildJSONSocketAddress to build a single server address 2. Alter the output file to remove the server index "0." values 3. Alter the commit message appropriately as

[libvirt] [PATCH v7 05.5/13] qemu: Refactor qemuBlockStorageSourceBuildHostsJSONSocketAddress

2017-09-12 Thread John Ferlan
Extract out the "guts" of building a server entry into it's own separately callable/usable function in order to allow building a server entry for a consumer with src->nhosts == 1. Signed-off-by: John Ferlan --- This patch would go after patch 5 and before patch 6 in the

Re: [libvirt] [PATCH v7 06/11] qemu: Add qemu command line generation for a VxHS block device

2017-09-12 Thread ashish mittal
Hi, Updating the list with some test results of the base VxHS functionality (without TLS), and some changes resulting therefrom - (A) Qemu did not work with the changed file.server.0.host=127.0.0.1 syntax. Threw an error "Parameter 'server.host' is missing". Whereas the old syntax

Re: [libvirt] [PATCH 4/5] conf: Allow usernet to have an address

2017-09-12 Thread Laine Stump
On 09/12/2017 05:53 AM, Martin Kletzander wrote: > On Tue, Sep 12, 2017 at 11:32:52AM +0200, Michal Privoznik wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=1075520 >> >> Currently, all that users can specify for an interface type of >> 'user' is the common attributes: PCI address, NIC

[libvirt] external snapshots bug

2017-09-12 Thread Khasan Khafizov
Suppose we have a disk with several external snapshots of it. This disk is attached to some domain. I found that after destroying and starting the domain the xml of attached disk doesn't contain all backingStore that it has to. Before the restart the part of domain xml that relates to attached

[libvirt] [PATCH] news: document spice rendernode DAC changes

2017-09-12 Thread Cole Robinson
Signed-off-by: Cole Robinson --- docs/news.xml | 11 +++ 1 file changed, 11 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 483f9d6d1..17f00a25e 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -37,6 +37,17 @@ + + +

Re: [libvirt] [PATCH 2/2] qemu: Use secret objects to pass iSCSI passwords

2017-09-12 Thread John Ferlan
On 09/12/2017 09:36 AM, Peter Krempa wrote: > On Tue, Sep 05, 2017 at 15:09:35 -0400, John Ferlan wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=1425757 >> >> The blockdev-add code provides a mechanism to sanely provide user >> and password-secret arguments for iscsi without placing them

Re: [libvirt] [PATCH 4/4] qemu: hot-unplug of watchdog

2017-09-12 Thread John Ferlan
On 09/05/2017 07:45 AM, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1447169 > > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_driver.c | 4 +- > src/qemu/qemu_hotplug.c| 61 >

Re: [libvirt] [PATCH 3/4] qemu: hot-plug of watchdog

2017-09-12 Thread John Ferlan
On 09/05/2017 07:45 AM, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1447169 > > Once again, since domain can have at most one watchdog it > simplifies things a bit. However, since we must be able to set > the watchdog action as well, new monitor command needs to be >

Re: [libvirt] [PATCH 2/4] qemu: cold-unplug of watchdog

2017-09-12 Thread Michal Privoznik
On 09/12/2017 03:31 PM, John Ferlan wrote: > > > On 09/05/2017 07:45 AM, Michal Privoznik wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=1447169 >> >> Again, no special here. >> >> Signed-off-by: Michal Privoznik >> --- >> src/libvirt_private.syms | 1 + >>

Re: [libvirt] [PATCH] qemu: blockcopy: Probe image format only with VIR_DOMAIN_BLOCK_COPY_REUSE_EXT

2017-09-12 Thread Eric Blake
On 09/12/2017 08:00 AM, Peter Krempa wrote: > Commit 703abf1d7 changed the logic so that we don't attempt to re-create > the image if it's a block device. This was done by modifying the > 'reuse' variable. Unfortunately after modifying it one of the uses was > to infer whether we should probe the

Re: [libvirt] libvirt stats units

2017-09-12 Thread Michal Privoznik
On 09/11/2017 08:58 AM, Marko Myllynen wrote: > Hi, > > virsh.pod states: > > "balloon.maximum" - the maximum memory in kiB allowed > "balloon.swap_in" - the amount of data read from swap space (in kB) > > But to me it seems there's not such kb vs kib difference [1] so it would > be nice to

Re: [libvirt] [PATCH 1/4] qemu: cold-plug of watchdog

2017-09-12 Thread Michal Privoznik
On 09/12/2017 03:26 PM, John Ferlan wrote: > > > On 09/05/2017 07:45 AM, Michal Privoznik wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=1447169 >> >> With this patch users can cold plug a watchdog. Things are pretty >> simple because a domain can have at most one watchdog device. >> >>

Re: [libvirt] [PATCH 1/2] qemu: Get capabilities for iscsi usage of password-secret argument

2017-09-12 Thread Peter Krempa
On Tue, Sep 05, 2017 at 15:09:34 -0400, John Ferlan wrote: > Add the capability to use the blockdev-add query-qmp-schema option > to find the 'password-secret' parameter that will allow the iSCSI > code to use the master secret object (a/k/a AES) to encrypt the > secret in an object and only need

Re: [libvirt] [PATCH 2/2] qemu: Use secret objects to pass iSCSI passwords

2017-09-12 Thread Peter Krempa
On Tue, Sep 05, 2017 at 15:09:35 -0400, John Ferlan wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1425757 > > The blockdev-add code provides a mechanism to sanely provide user > and password-secret arguments for iscsi without placing them on the > command line to be viewable by a 'ps -ef'

Re: [libvirt] [PATCH 2/4] qemu: cold-unplug of watchdog

2017-09-12 Thread John Ferlan
On 09/05/2017 07:45 AM, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1447169 > > Again, no special here. > > Signed-off-by: Michal Privoznik > --- > src/libvirt_private.syms | 1 + > src/qemu/qemu_driver.c | 11 ++- > 2 files changed,

Re: [libvirt] [PATCH 1/2] qemu: Get capabilities for iscsi usage of password-secret argument

2017-09-12 Thread Peter Krempa
On Tue, Sep 05, 2017 at 15:09:34 -0400, John Ferlan wrote: > Add the capability to use the blockdev-add query-qmp-schema option > to find the 'password-secret' parameter that will allow the iSCSI > code to use the master secret object (a/k/a AES) to encrypt the > secret in an object and only need

Re: [libvirt] [PATCH 1/4] qemu: cold-plug of watchdog

2017-09-12 Thread John Ferlan
On 09/05/2017 07:45 AM, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1447169 > > With this patch users can cold plug a watchdog. Things are pretty > simple because a domain can have at most one watchdog device. > > Signed-off-by: Michal Privoznik

Re: [libvirt] [PATCH v2] storage: Adjust expected format for Disk startup processing

2017-09-12 Thread Peter Krempa
On Mon, Sep 11, 2017 at 17:25:51 -0400, John Ferlan wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1464313 > > If a Disk pool was defined/created using XML that either didn't > specify a specific format or specified format type='unknown', then > restarting a pool after an initial disk

Re: [libvirt] [PATCH v2] qemu: Provide default LUN=0 for iSCSI if not provided

2017-09-12 Thread Peter Krempa
On Mon, Sep 11, 2017 at 19:26:18 -0400, John Ferlan wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1477880 > > If the "/#" is missing from the provided iSCSI path, then we need > to provide the default LUN of /0; otherwise, QEMU will fail to parse > the URL causing a failure to either

[libvirt] [PATCH] qemu: blockcopy: Probe image format only with VIR_DOMAIN_BLOCK_COPY_REUSE_EXT

2017-09-12 Thread Peter Krempa
Commit 703abf1d7 changed the logic so that we don't attempt to re-create the image if it's a block device. This was done by modifying the 'reuse' variable. Unfortunately after modifying it one of the uses was to infer whether we should probe the disk format. After changes in the commit mentioned

Re: [libvirt] Yet another RFC for CAT

2017-09-12 Thread Eli Qiao
> > > > We didn't want to exec external python programs because that certainly > *does* have bad scalability, terrible error reporting facilities and > need to parse ill defined data formats from stdout, etc. It doesn't > magically solve the complexity, just moves it elsewhere where we have > less

Re: [libvirt] [PATCH] domain: add limit description of parameter 'size' for blockPeek and memoryPeek

2017-09-12 Thread Chen Hanxiao
At 2017-09-05 22:01:56, "Chen Hanxiao" wrote: >From: Chen Hanxiao > > We had 'size' limits for virDomainMemoryPeek > and virDomainBlockPeek by macro > REMOTE_DOMAIN_BLOCK_PEEK_BUFFER_MAX and > REMOTE_DOMAIN_MEMORY_PEEK_BUFFER_MAX. > > The

[libvirt] [PATCH 1/3] util: error: Add helpers for saving and restoring of last error

2017-09-12 Thread Peter Krempa
Some cleanup paths overwrite a usefull error message with a less useful one and we then try to preserve the original message. The handlers added in this patch will simplify the operations since they are designed right for the purpose. --- src/libvirt_private.syms | 2 ++ src/util/virerror.c

[libvirt] [PATCH 3/3] qemu: Restore errors when rolling back disk image state

2017-09-12 Thread Peter Krempa
Some operations done to rollback disk image labelling and locking might overwrite (or clear) the actual error. Remember the original error when tearing down disk access so that it's not obscured. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1461301 --- src/qemu/qemu_hotplug.c | 4

[libvirt] [PATCH 2/3] qemu: hotplug: Use new helpers for storing libvirt errors

2017-09-12 Thread Peter Krempa
The helpers allow to simplify restoring original errors in most cases. --- src/qemu/qemu_hotplug.c | 93 +++-- 1 file changed, 28 insertions(+), 65 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index b365078ec..35d73f74e

[libvirt] [PATCH 0/3] qemu: hotplig: Improve error reporting

2017-09-12 Thread Peter Krempa
Add helpers to remember existing errors when they might be overwritten and use it to fix "unknown error" reported when attaching disk with lock manager enabled. Peter Krempa (3): util: error: Add helpers for saving and restoring of last error qemu: hotplug: Use new helpers for storing libvirt

Re: [libvirt] [PATCH 5/5] qemu: Implement usernet address

2017-09-12 Thread Martin Kletzander
On Tue, Sep 12, 2017 at 11:32:53AM +0200, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1075520 Apart from generic checks, we need to constrain netmask/prefix lenght a bit. Thing is, with current implementation QEMU needs to be able to 'assign' some IP addresses to the

Re: [libvirt] [PATCH 4/5] conf: Allow usernet to have an address

2017-09-12 Thread Martin Kletzander
On Tue, Sep 12, 2017 at 11:32:52AM +0200, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1075520 Currently, all that users can specify for an interface type of 'user' is the common attributes: PCI address, NIC model (and that's basically it). However, some need to configure

Re: [libvirt] [PATCH 0/5] Misc

2017-09-12 Thread Martin Kletzander
On Tue, Sep 12, 2017 at 11:32:48AM +0200, Michal Privoznik wrote: *** BLURB HERE *** Michal Privoznik (5): rng: Drop useless rng: Fix formatting qemuBuildHostNetStr: Don't leak buffer ACK to those ^^ conf: Allow usernet to have an address Let's discuss ^^ qemu: Implement usernet

Re: [libvirt] Yet another RFC for CAT

2017-09-12 Thread Daniel P. Berrange
On Tue, Sep 12, 2017 at 11:33:53AM +0200, Martin Kletzander wrote: > On Thu, Sep 07, 2017 at 11:02:21AM +0800, 乔立勇(Eli Qiao) wrote: > > > I'm concerned about the idea of not checking 'from' for collisions, > > > if there's allowed a mix of guests with & within 'from'. > > > > eg consider > > > >

Re: [libvirt] Yet another RFC for CAT

2017-09-12 Thread Martin Kletzander
On Thu, Sep 07, 2017 at 11:02:21AM +0800, 乔立勇(Eli Qiao) wrote: 2017-09-04 23:57 GMT+08:00 Daniel P. Berrange : On Mon, Sep 04, 2017 at 04:14:00PM +0200, Martin Kletzander wrote: > * The current design (finally something libvirt-related, right?) > > The discussion ended

[libvirt] [PATCH 3/5] qemuBuildHostNetStr: Don't leak buffer

2017-09-12 Thread Michal Privoznik
If there was an error when constructing the buffer, NULL is returned. The buffer is never freed though. Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_command.c

[libvirt] [PATCH 4/5] conf: Allow usernet to have an address

2017-09-12 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1075520 Currently, all that users can specify for an interface type of 'user' is the common attributes: PCI address, NIC model (and that's basically it). However, some need to configure other address range than the default one. Signed-off-by: Michal

[libvirt] [PATCH 2/5] rng: Fix formatting

2017-09-12 Thread Michal Privoznik
Some elements are offset just one space compared to their parent, some are misaligned completely, and so on. Signed-off-by: Michal Privoznik --- docs/schemas/capability.rng | 28 +- docs/schemas/domaincommon.rng | 66

[libvirt] [PATCH 1/5] rng: Drop useless

2017-09-12 Thread Michal Privoznik
If we have with just one value to chose from, it's no choice. Signed-off-by: Michal Privoznik --- docs/schemas/domaincommon.rng | 72 +++--- docs/schemas/nodedev.rng | 4 +-- docs/schemas/storagecommon.rng | 4 +-- 3 files

[libvirt] [PATCH 0/5] Misc

2017-09-12 Thread Michal Privoznik
*** BLURB HERE *** Michal Privoznik (5): rng: Drop useless rng: Fix formatting qemuBuildHostNetStr: Don't leak buffer conf: Allow usernet to have an address qemu: Implement usernet address docs/formatdomain.html.in | 13 +- docs/schemas/capability.rng

[libvirt] [PATCH 5/5] qemu: Implement usernet address

2017-09-12 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1075520 Apart from generic checks, we need to constrain netmask/prefix lenght a bit. Thing is, with current implementation QEMU needs to be able to 'assign' some IP addresses to the virtual network. For instance, the default gateway is at x.x.x.2, dns

Re: [libvirt] [PATCH] qemu: handle reconnect on chardev hotplug

2017-09-12 Thread Peter Krempa
On Tue, Sep 12, 2017 at 10:06:10 +0800, ZhiPeng Lu wrote: > The patch passes the reconnect timeout to QEMU by monitor on chardev hotplug. > > Signed-off-by: ZhiPeng Lu > --- > src/qemu/qemu_monitor_json.c | 19 +++ > 1 file changed, 19 insertions(+) > >