Re: [libvirt] [PATCH 0/3] Introduce RW locks to virDomainObjList

2017-07-24 Thread John Ferlan
On 07/24/2017 02:33 PM, Pavel Hrdina wrote: >> EXACTLY! This is why I started down this path... Of course I want far >> too generic for some people's preferences by going with primaryKey and >> secondaryKey type nomenclature, so I was forced by review to use >> UUID/Name which are far less

Re: [libvirt] [PATCH] qemu: fix migration fail of an auto-placementvm after attached memory to it

2017-07-24 Thread Laine Stump
On 07/24/2017 05:37 AM, Peter Krempa wrote: > Please configure your e-mail client so that it does not break threads In particular, your email client is failing to include an "In-Reply-To:" header (which should contain the message-id from the parent message's "Message-Id:" header) (this is

Re: [libvirt] [PATCH 0/3] Introduce RW locks to virDomainObjList

2017-07-24 Thread Pavel Hrdina
On Mon, Jul 24, 2017 at 11:12:01AM -0400, John Ferlan wrote: > > > On 07/24/2017 09:04 AM, Michal Privoznik wrote: > > On 07/23/2017 11:33 PM, John Ferlan wrote: > >> > >> > >> On 07/23/2017 04:46 PM, Michal Privoznik wrote: > >>> On 07/23/2017 07:21 PM, Pavel Hrdina wrote: > On Sun, Jul

Re: [libvirt] [PATCH v2 0/4] More virsecretobj changes to prepare for common object

2017-07-24 Thread John Ferlan
ping ? I think most of this was agreed to in the previous version - it's just the posting and ordering... The only minor "code" differences are in patch 1 and 3. Tks - John On 07/14/2017 10:04 AM, John Ferlan wrote: > v1: https://www.redhat.com/archives/libvir-list/2017-June/msg00168.html >

[libvirt] [PATCH v2] storage: Disallow usage of the HBA for a fc_host backing

2017-07-24 Thread John Ferlan
Disallow providing the wwnn/wwpn of the HBA in the adapter XML: This should be considered a configuration error since a vHBA would not be created. In order to use the HBA as the backing the following XML should be used: So add a check prior to the checkParent call to validate that the

Re: [libvirt] [PATCH v3 4/4] storage: Disallow usage of the HBA for a fc_host backing

2017-07-24 Thread John Ferlan
On 07/24/2017 11:00 AM, Erik Skultety wrote: > On Thu, Jul 20, 2017 at 03:48:49PM -0400, John Ferlan wrote: >> Disallow providing the wwnn/wwpn of the HBA in the adapter XML: >> >> > wwpn='HBA_wwpn'/> >> >> This should be considered a configuration error since a vHBA >> would not be

Re: [libvirt] [PATCH 1/3] virthread: Introduce virRWLockInitPreferWriter

2017-07-24 Thread John Ferlan
On 07/19/2017 10:31 AM, Michal Privoznik wrote: > We already have virRWLockInit. But this uses pthread defaults > which prefer reader to initialize the RW lock. This may lead to > writer starvation. Therefore we need to have the counterpart that > prefers writers. Now, according to the >

Re: [libvirt] [PATCH v2 2/2] conf: Rename virDomainControllerIsPCIHostBridge() to IsPSeriesPHB()

2017-07-24 Thread Peter Krempa
On Mon, Jul 24, 2017 at 13:40:58 +0200, Andrea Bolognani wrote: > The original name didn't hint at the fact that PHBs are > a pSeries-specific concept. > > Suggested-by: Peter Krempa > Signed-off-by: Andrea Bolognani > --- > src/conf/domain_conf.c

Re: [libvirt] [PATCH v2 1/2] conf: Fix backwards migration of pSeries guests

2017-07-24 Thread Peter Krempa
On Mon, Jul 24, 2017 at 13:40:57 +0200, Andrea Bolognani wrote: > Recent commits made it so that pci-root controllers for > pSeries guests are automatically assigned the > spapr-pci-host-bridge model name; however, that prevents > guests to migrate to older versions of libvirt which don't > know

Re: [libvirt] [PATCH v2 0/3] implement migrate-getmaxdowntime command

2017-07-24 Thread Jiri Denemark
On Mon, Jul 24, 2017 at 11:21:43 -0500, s...@us.ibm.com wrote: > > > Currently, the maximum tolerable downtime for a domain being migrated is > write-only. This patch implements a way to query that value nondestructively. > > Changes from [v1]: > > * Fixed formatting and style problems >

[libvirt] [PATCH v2 2/3] migrate-getmaxdowntime public symbols and table indices

2017-07-24 Thread seg
From: Scott Garfinkle virsh migrate-getmaxdowntime public symbols and table indices Signed-off-by: Scott Garfinkle --- src/libvirt_public.syms | 4 src/remote/remote_protocol.x | 16 +++- src/remote_protocol-structs | 8 3

[libvirt] [PATCH v2 3/3] migrate-getmaxdowntime

2017-07-24 Thread seg
From: Scott Garfinkle virsh migrate-getmaxdowntime local/libvirt enablement Signed-off-by: Scott Garfinkle --- include/libvirt/libvirt-domain.h | 4 src/driver-hypervisor.h | 6 ++ src/libvirt-domain.c | 45

[libvirt] [PATCH v2 1/3] migrate-getmaxdowntime command qemu side

2017-07-24 Thread seg
From: Scott Garfinkle virsh migrate-getmaxdowntime qemu driver enablement Signed-off-by: Scott Garfinkle --- src/qemu/qemu_driver.c | 45 src/qemu/qemu_monitor.h | 3 +++ src/qemu/qemu_monitor_json.c |

[libvirt] [PATCH v2 0/3] implement migrate-getmaxdowntime command

2017-07-24 Thread seg
Currently, the maximum tolerable downtime for a domain being migrated is write-only. This patch implements a way to query that value nondestructively. Changes from [v1]: * Fixed formatting and style problems * Add additional JSON error check * Better patch submission mail, I hope

[libvirt] [PATCH] Generate unique socket file

2017-07-24 Thread seg
From: Scott Garfinkle --- src/qemu/qemu_domain.c | 23 +++--- .../qemuxml2argv-channel-virtio-unix.args | 2 +- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c

[libvirt] [PATCH] Generate unique virtio-serial socket file names

2017-07-24 Thread seg
It's possible to have more than one unix channel with type=virtio-serial. We need to generate a unique name for each channel. Currently, we use "unknown.sock" for all of them. Signed-off-by: Scott Garfinkle -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH 2/3] virobject: Introduce virObjectRWLockable

2017-07-24 Thread John Ferlan
[...] > /** > * virObjectLock: > - * @anyobj: any instance of virObjectLockablePtr > + * @anyobj: any instance of virObjectLockable or virObjectRWLockable > * > - * Acquire a lock on @anyobj. The lock must be > - * released by virObjectUnlock. > + * Acquire a lock on @anyobj. The lock must

Re: [libvirt] [PATCH 0/3] Introduce RW locks to virDomainObjList

2017-07-24 Thread John Ferlan
On 07/24/2017 09:04 AM, Michal Privoznik wrote: > On 07/23/2017 11:33 PM, John Ferlan wrote: >> >> >> On 07/23/2017 04:46 PM, Michal Privoznik wrote: >>> On 07/23/2017 07:21 PM, Pavel Hrdina wrote: On Sun, Jul 23, 2017 at 02:33:49PM +0200, Michal Privoznik wrote: > On 07/23/2017 02:10

Re: [libvirt] [PATCH v3 4/4] storage: Disallow usage of the HBA for a fc_host backing

2017-07-24 Thread Erik Skultety
On Thu, Jul 20, 2017 at 03:48:49PM -0400, John Ferlan wrote: > Disallow providing the wwnn/wwpn of the HBA in the adapter XML: > >wwpn='HBA_wwpn'/> > > This should be considered a configuration error since a vHBA > would not be created. In order to use the HBA as the backing the >

[libvirt] [PATCH 3/4] lxc: Make lxcProcessStop callable even without PID being available

2017-07-24 Thread Martin Kletzander
This way the function can work as a central point of clean-up code and we don't have to duplicate code. And it works similarly to the qemu driver. Signed-off-by: Martin Kletzander --- src/lxc/lxc_process.c | 32 ++-- 1 file changed, 2

[libvirt] [PATCH 4/4] Move machineName generation from virsystemd into domain_conf

2017-07-24 Thread Martin Kletzander
It is more related to a domain as we might use it even when there is no systemd and it does not use any dbus/systemd functions. In order not to use code from conf/ in util/ pass machineName in cgroups code as a parameter. That also fixes a leak of machineName in the lxc driver and cleans up and

[libvirt] [PATCH 1/4] conf: Pass config.priv to xmlopt->privateData.alloc

2017-07-24 Thread Martin Kletzander
This will help us to get to some data more easily. Signed-off-by: Martin Kletzander --- src/bhyve/bhyve_domain.c | 2 +- src/conf/domain_conf.c | 3 ++- src/conf/domain_conf.h | 2 +- src/libxl/libxl_domain.c | 2 +- src/lxc/lxc_domain.c | 2 +-

[libvirt] [PATCH 2/4] qemu: Save qemu driver in qemuDomainObjPrivateData

2017-07-24 Thread Martin Kletzander
This way we can finally make it static and not use any externs anywhere. Signed-off-by: Martin Kletzander --- src/qemu/qemu_domain.c | 3 ++- src/qemu/qemu_domain.h | 2 ++ src/qemu/qemu_driver.c | 2 +- src/qemu/qemu_process.c | 5 + 4 files changed, 6

[libvirt] [PATCH 0/4] Clean up machineName-related code

2017-07-24 Thread Martin Kletzander
Just in case we'll want to use the "cleaned-up" machineName for anything else in the future, I decided to modify the code so that it is always generated, saved and cleaned-up. While doing that I identified some code duplication, leak and a TODO/XXX comment that are all fixed with this series.

Re: [libvirt] [PATCH v6 3/4] nodedev: Convert virNodeDeviceObjListPtr to use hash tables

2017-07-24 Thread Erik Skultety
> >> Replies don't include your patch; however, I will note if you jump to > >> patch 13: > > > > What do you mean? Don't you see squash.patch in the attachment? (yes, I > > attached a patch instead of inlining it, the reason for that being that the > > patch is not particularly small and inlining

Re: [libvirt] [PATCH 3/3] virdomainobjlist: Use virObjectRWLockable

2017-07-24 Thread Michal Privoznik
On 07/24/2017 03:36 PM, Pavel Hrdina wrote: > On Wed, Jul 19, 2017 at 04:31:50PM +0200, Michal Privoznik wrote: >> There is no reason why two threads trying to look up two domains >> should mutually exclude each other. Utilize new >> virObjectRWLockable that was just introduced. >> >>

[libvirt] [PATCH] qemu: Split shmem preparation as it's supposed to be

2017-07-24 Thread Martin Kletzander
Since the introduction of shmem, there was a split of preparation code from the formatting code from qemuBuildCommandLine() into qemuProcessPrepareDomain(). Let's fix shmem in this regard, so that we can slowly get to a cleaner codebase. Signed-off-by: Martin Kletzander ---

[libvirt] [PATCH] testutils: Remove unneeded variable

2017-07-24 Thread Martin Kletzander
virDomainXMLOptionNew() gladly accepts NULL and it is used in some drivers. There is no need for additional variable with no members set Signed-off-by: Martin Kletzander --- Pushed as trivial. tests/testutils.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)

Re: [libvirt] [PATCH] tools: virsh: Adding unix socket support to 'domdisplay' command.

2017-07-24 Thread Michal Privoznik
On 07/20/2017 11:11 PM, Julio Faracco wrote: > This commit adds the unix socket URL support to 'domdisplay' command. > Before, even if an user was using unix socket to define a spice graphics, > the command 'domdisplay' showed that the settings were not supported. Now, > the command shows the

[libvirt] [dbus PATCH 4/9] events: split event code into separate file

2017-07-24 Thread Pavel Hrdina
Similarly to the previous patch, split the code into its separate file. Signed-off-by: Pavel Hrdina --- src/Makefile.am | 3 +- src/events.c| 252 src/events.h| 9 ++ src/manager.c | 243

[libvirt] [dbus PATCH 2/9] util: move and rename virDomainsFreep

2017-07-24 Thread Pavel Hrdina
Move it to the same place as virDomainFreep(). Signed-off-by: Pavel Hrdina --- src/manager.c | 18 ++ src/util.h| 14 ++ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/manager.c b/src/manager.c index 6459ec9..0cf0f8e

[libvirt] [dbus PATCH 3/9] domain: split domain code into separate file

2017-07-24 Thread Pavel Hrdina
Instead of having all code only in one file split it logically to have one file for D-Bus object. Signed-off-by: Pavel Hrdina --- src/Makefile.am | 3 +- src/domain.c| 549 +++ src/domain.h| 9 + src/manager.c

[libvirt] [dbus PATCH 9/9] events: rename functions to follow libvirt naming rules

2017-07-24 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/events.c | 66 +-- src/events.h | 2 +- src/manager.c | 2 +- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/events.c b/src/events.c index c94cfd7..c9a1306

[libvirt] [dbus PATCH 0/9] code cleanup

2017-07-24 Thread Pavel Hrdina
Pavel Hrdina (9): util: move bus_path_for_domain and domain_from_bus_path util: move and rename virDomainsFreep domain: split domain code into separate file events: split event code into separate file util: rename function to follow libvirt naming rules main: rename functions to follow

[libvirt] [dbus PATCH 8/9] domain: rename functions to follow libvirt naming rules

2017-07-24 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/domain.c | 230 +- src/domain.h | 5 +- src/manager.c | 2 +- 3 files changed, 119 insertions(+), 118 deletions(-) diff --git a/src/domain.c b/src/domain.c index

[libvirt] [dbus PATCH 7/9] manager: rename functions and structures to follow libvirt naming rules

2017-07-24 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/domain.c | 38 ++-- src/domain.h | 2 +- src/events.c | 14 +++--- src/events.h | 2 +- src/main.c| 4 ++-- src/manager.c | 62 +--

[libvirt] [dbus PATCH 6/9] main: rename functions to follow libvirt naming rules

2017-07-24 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/main.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/main.c b/src/main.c index a1d9cd1..493edcb 100644 --- a/src/main.c +++ b/src/main.c @@ -14,7 +14,7 @@ static int

[libvirt] [dbus PATCH 5/9] util: rename function to follow libvirt naming rules

2017-07-24 Thread Pavel Hrdina
All libvirt-dbus function should use virtDBus preffix and use only one coding style, camelCase. Signed-off-by: Pavel Hrdina --- src/domain.c | 110 +- src/events.c | 20 +-- src/main.c| 2 +-

[libvirt] [dbus PATCH 1/9] util: move bus_path_for_domain and domain_from_bus_path

2017-07-24 Thread Pavel Hrdina
These functions don't require anything from libvirt-dbus. Make them generic and move them into util. Signed-off-by: Pavel Hrdina --- src/manager.c | 68 ++- src/util.c| 26 +++ src/util.h|

Re: [libvirt] [PATCH 3/3] virdomainobjlist: Use virObjectRWLockable

2017-07-24 Thread Pavel Hrdina
On Wed, Jul 19, 2017 at 04:31:50PM +0200, Michal Privoznik wrote: > There is no reason why two threads trying to look up two domains > should mutually exclude each other. Utilize new > virObjectRWLockable that was just introduced. > > Signed-off-by: Michal Privoznik > --- >

Re: [libvirt] [PATCH v6 3/4] nodedev: Convert virNodeDeviceObjListPtr to use hash tables

2017-07-24 Thread John Ferlan
On 07/24/2017 09:08 AM, Erik Skultety wrote: virNodeDeviceObjPtr virNodeDeviceObjListFindBySysfsPath(virNodeDeviceObjListPtr devs, const char *sysfs_path) { -size_t i; +virNodeDeviceObjPtr obj; -for (i =

Re: [libvirt] [PATCH] qemu_capabilities: Fix the formatting with a space

2017-07-24 Thread Michal Privoznik
On 07/24/2017 07:55 AM, Shivaprasad G Bhat wrote: > It was observed while adding new property that there should be a space > before closing a curly brace in intel-iommu object property definition. > Fixing it as a separate patch. > > Signed-off-by: Shivaprasad G Bhat >

Re: [libvirt] [PATCH 2/3] virobject: Introduce virObjectRWLockable

2017-07-24 Thread Pavel Hrdina
On Wed, Jul 19, 2017 at 04:31:49PM +0200, Michal Privoznik wrote: > Up until now we only had virObjectLockable which uses mutexes for > mutually excluding each other in critical section. Well, this is > not enough. Future work will require RW locks so we might as well > have virObjectRWLockable

Re: [libvirt] [PATCH v6 3/4] nodedev: Convert virNodeDeviceObjListPtr to use hash tables

2017-07-24 Thread Erik Skultety
> >> virNodeDeviceObjPtr > >> virNodeDeviceObjListFindBySysfsPath(virNodeDeviceObjListPtr devs, > >> const char *sysfs_path) > >> { > >> -size_t i; > >> +virNodeDeviceObjPtr obj; > >> > >> -for (i = 0; i < devs->count; i++) { > >> -

Re: [libvirt] [PATCH v3 3/4] storage: Check if provided parent is vHBA capable

2017-07-24 Thread Erik Skultety
On Thu, Jul 20, 2017 at 03:48:48PM -0400, John Ferlan wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1458708 > > If the parent provided for the storage pool adapter is not vHBA > capable, then issue a configuration error even though the provided > wwnn/wwpn were found. > > It is a

Re: [libvirt] [PATCH 0/3] Introduce RW locks to virDomainObjList

2017-07-24 Thread Michal Privoznik
On 07/23/2017 11:33 PM, John Ferlan wrote: > > > On 07/23/2017 04:46 PM, Michal Privoznik wrote: >> On 07/23/2017 07:21 PM, Pavel Hrdina wrote: >>> On Sun, Jul 23, 2017 at 02:33:49PM +0200, Michal Privoznik wrote: On 07/23/2017 02:10 PM, John Ferlan wrote: > > > On 07/19/2017

[libvirt] [PATCH] storage: Fix editing mistake in storagePoolSetAutostart

2017-07-24 Thread John Ferlan
Commit id '905f1024b' had a rogue editing mistake that inadvertently dropped a goto cleanup in storagePoolSetAutostart, but Coverity noted it. Signed-off-by: John Ferlan --- NB: Pushed as trivial the other day, but forgot to send the email to the list on it.

Re: [libvirt] [PATCH] qemu: undefine is not allowed during domain starting up

2017-07-24 Thread John Ferlan
On 07/24/2017 04:06 AM, Peter Krempa wrote: > On Sat, Jul 22, 2017 at 04:55:49 -0400, Yi Wang wrote: >> Start a domain whilst undefine it, if starting failed duing ProcessLaunch, >> on which period qemu exited unexpectedly, the operation will lead to failure >> of undefine the domain until

Re: [libvirt] [PATCH v6 3/4] nodedev: Convert virNodeDeviceObjListPtr to use hash tables

2017-07-24 Thread John Ferlan
On 07/24/2017 03:52 AM, Erik Skultety wrote: > On Thu, Jul 20, 2017 at 10:08:14AM -0400, John Ferlan wrote: >> Rather than use a forward linked list of elements, it'll be much more >> efficient to use a hash table to reference the elements by unique name >> and to perform hash searches. >> >>

Re: [libvirt] [PATCH 16/16] network: Privatize virNetworkObj

2017-07-24 Thread Pavel Hrdina
On Fri, May 19, 2017 at 09:03:24AM -0400, John Ferlan wrote: > Move from virnetworkobj.h into virnetworkobj.c > > Signed-off-by: John Ferlan > --- > src/conf/virnetworkobj.c | 21 + > src/conf/virnetworkobj.h | 20 > 2 files changed,

Re: [libvirt] [PATCH 15/16] network: Modify naming for virNetworkObjList* fetching APIs

2017-07-24 Thread Pavel Hrdina
On Fri, May 19, 2017 at 09:03:23AM -0400, John Ferlan wrote: > Use the structure names in the @data setup - makes it easier that going > back to find the struct. > > Use the @maxnames instead of @nnames since that's what it is. Please use camelCase -> @maxNames. > > Modify the @filter to be

Re: [libvirt] [PATCH] conf: Fix backwards migration of pSeries guests

2017-07-24 Thread Andrea Bolognani
On Mon, 2017-07-24 at 10:32 +0200, Peter Krempa wrote: > Please send a fixed version of this patch that will make sure that it > states that the PHB thing is a pSeries thing, so that it does not > confuse others as it did me. Done :) --  Andrea Bolognani / Red Hat / Virtualization --

Re: [libvirt] 答复: Re: 答复: Re: [PATCH] rpc : fix a access for null pointer

2017-07-24 Thread Michal Privoznik
On 07/22/2017 05:07 AM, liu.y...@zte.com.cn wrote: >> On 07/21/2017 08:20 AM, liu.y...@zte.com.cn wrote: > >>> Hi Michal, > >>> > >>> This problem is triggerred by libvirt python's example event-test.py. >>> the original examples has resouce leak issue > >>> > >>> at the remove_handle

[libvirt] [PATCH v2 2/2] conf: Rename virDomainControllerIsPCIHostBridge() to IsPSeriesPHB()

2017-07-24 Thread Andrea Bolognani
The original name didn't hint at the fact that PHBs are a pSeries-specific concept. Suggested-by: Peter Krempa Signed-off-by: Andrea Bolognani --- src/conf/domain_conf.c | 4 ++-- src/conf/domain_conf.h | 2 +- src/libvirt_private.syms

[libvirt] [PATCH v2 1/2] conf: Fix backwards migration of pSeries guests

2017-07-24 Thread Andrea Bolognani
Recent commits made it so that pci-root controllers for pSeries guests are automatically assigned the spapr-pci-host-bridge model name; however, that prevents guests to migrate to older versions of libvirt which don't know about that model name at all, which at the moment is all of them :) To

[libvirt] [PATCH v2 0/2] Fix backwards migration of pSeries guests

2017-07-24 Thread Andrea Bolognani
Changes from [v1]: * don't hide the controller model check inside a function and propely explain the reason not to format it; * rename a confusingly named function. [v1] https://www.redhat.com/archives/libvir-list/2017-July/msg00705.html Andrea Bolognani (2): conf: Fix backwards

Re: [libvirt] [PATCH 14/16] network: Adjust virNetworkObjNew call and return

2017-07-24 Thread Pavel Hrdina
On Fri, May 19, 2017 at 09:03:22AM -0400, John Ferlan wrote: > Have the call take a virNetworkDefPtr and save it in the object. > > Have virNetworkObjNew return a locked obj > > Avoids the need for a virNetworkObjSetDef type API for the one test need. > Update the test code and do some other

Re: [libvirt] [PATCH 13/16] network: Consistent use of @obj for virnetworkobj

2017-07-24 Thread Pavel Hrdina
On Fri, May 19, 2017 at 09:03:21AM -0400, John Ferlan wrote: > Consistently use @obj for a virNetworkObjPtr. > > Signed-off-by: John Ferlan > --- > src/conf/virnetworkobj.c | 333 > +++ > 1 file changed, 166 insertions(+), 167

Re: [libvirt] [PATCH 12/16] network: Introduce virNetworkObjIsPersistent

2017-07-24 Thread Pavel Hrdina
On Fri, May 19, 2017 at 09:03:20AM -0400, John Ferlan wrote: > In preparation to privatize the virNetworkObj - create an accessor function > to get the current @persistent value. Also change the value to a bool rather > than an unsigned int (since that's how it's generated anyway). > >

Re: [libvirt] [PATCH 11/16] network: Introduce virNetworkObj{Is|Set}Active

2017-07-24 Thread Pavel Hrdina
On Fri, May 19, 2017 at 09:03:19AM -0400, John Ferlan wrote: > In order to privatize the virNetworkObj create accessors in virnetworkobj > in order to handle the get/set of the active value. > > Also rather than an unsigned int, convert it to a boolean to match other > drivers representation and

Re: [libvirt] [PATCH 10/16] network: Introduce virNetworkObj{Get|Set}Autostart

2017-07-24 Thread Pavel Hrdina
On Fri, May 19, 2017 at 09:03:18AM -0400, John Ferlan wrote: > In preparation for privatizing the virNetworkObj structure, move the guts > of the Get/Set Autostart from the driver into virnetworkobj. Alter the driver > to make the calls to the networkobj code. > > Signed-off-by: John Ferlan

Re: [libvirt] [PATCH 09/16] network: Add virNetworkObj Get API's for @def and @newDef

2017-07-24 Thread Pavel Hrdina
On Fri, May 19, 2017 at 09:03:17AM -0400, John Ferlan wrote: > In preparation for making the object private, create a couple of API's > to get the obj->def and obj->newDef. > > Signed-off-by: John Ferlan > --- > src/conf/virnetworkobj.c| 14 ++ >

Re: [libvirt] [PATCH 08/16] network: Add virNetworkObj Get/Set API's for @floor_sum

2017-07-24 Thread Pavel Hrdina
On Fri, May 19, 2017 at 09:03:16AM -0400, John Ferlan wrote: > In preparation for making the object private, create a couple of API's > to get/set the obj->floor_sum. > > Signed-off-by: John Ferlan > --- > src/conf/virnetworkobj.c| 15 +++ >

Re: [libvirt] [PATCH 0/2] docs: Fix enum documentation

2017-07-24 Thread Michal Privoznik
On 07/24/2017 11:17 AM, Martin Kletzander wrote: > On Sun, Jul 23, 2017 at 11:16:21PM +0200, Tomáš Golembiovský wrote: >> On Sat, 22 Jul 2017 11:04:32 +0200 >> Michal Privoznik wrote: >> >>> So this patch sent to the list got me roll up my sleeves and get >>> working: >>> >>>

Re: [libvirt] [PATCH 07/16] network: Alter virNetworkObj @class_id to be @classIdMap

2017-07-24 Thread Pavel Hrdina
On Fri, May 19, 2017 at 09:03:15AM -0400, John Ferlan wrote: > Change the variable name to be a bit more descriptive and less confusing > when used with the data.network.actual->class_id. > > In preparation for privatizing virNetworkObj, create accessor function to > fetch the @classIdMap. > >

Re: [libvirt] [PATCH] qemu: fix migration fail of an auto-placementvm after attached memory to it

2017-07-24 Thread Peter Krempa
Please configure your e-mail client so that it does not break threads and also that it does not add spurious newlines between lines of the reply. I've trimmed the spurious newlines in the reply. On Mon, Jul 24, 2017 at 17:11:50 +0800, wang.y...@zte.com.cn wrote: > >On Sat, Jul 22, 2017 at

Re: [libvirt] [PATCH 0/2] docs: Fix enum documentation

2017-07-24 Thread Martin Kletzander
On Sun, Jul 23, 2017 at 11:16:21PM +0200, Tomáš Golembiovský wrote: On Sat, 22 Jul 2017 11:04:32 +0200 Michal Privoznik wrote: So this patch sent to the list got me roll up my sleeves and get working: https://www.redhat.com/archives/libvir-list/2017-July/msg00835.html

Re: [libvirt] [PATCH] qemu: fix migration fail of an auto-placementvm after attached memory to it

2017-07-24 Thread wang.yi59
>On Sat, Jul 22, 2017 at 05:45:59 -0400, Yi Wang wrote: >> This patch fix this condition: >> -vm has the "auto" placement in vcpu >> -hot-plug memory with source node "1-3" through attach-device command >> -migrate the vm to a host with only 2 numa node >> And the migration will fail

Re: [libvirt] An API to copy files.

2017-07-24 Thread Peter Krempa
On Sun, Jul 23, 2017 at 16:28:45 -0300, Julio Faracco wrote: > Hi guys, > > Unfortunately, my company does not allow access to IRC. > I need to ask question by email. > > Why doesn't libvirt have any method to copy files? > A kind of virFileCopy(src, dst) for example. Do you mean a public API

Re: [libvirt] [PATCH 06/16] network: Add virNetworkObj Get/Set API's for @dnsmasqPid and @radvdPid

2017-07-24 Thread Pavel Hrdina
On Fri, May 19, 2017 at 09:03:14AM -0400, John Ferlan wrote: > In preparation for making the object private, create/use a couple of API's > to get/set the obj->dnsmasqPid and obj->radvdPid. > > NB: Since the pid's can sometimes changed based on intervening functions, > be sure to always fetch the

Re: [libvirt] [PATCH] qemu: undefine is not allowed during domainstarting up

2017-07-24 Thread wang.yi59
Hi Peter, Thanks for your reply. >On Sat, Jul 22, 2017 at 04:55:49 -0400, Yi Wang wrote: >> Start a domain whilst undefine it, if starting failed duing ProcessLaunch, >> on which period qemu exited unexpectedly, the operation will lead to failure >> of undefine the domain until libvirtd

Re: [libvirt] [PATCH v2 1/6] qemu: command: Rename and move qemuNetworkDriveGetPort

2017-07-24 Thread Peter Krempa
On Fri, Jul 21, 2017 at 07:58:52 -0400, John Ferlan wrote: > [...] > > Before it's too late... > > > + > > +/** > > + * virStringParsePort: > > + * @str: port number to parse > > + * @port: pointer to parse port into > > + * > > + * Parses a string representation of a network port and validates

Re: [libvirt] [PATCH 2/2] docs: Span cells if there's not doc text for enum val

2017-07-24 Thread Martin Kletzander
On Sat, Jul 22, 2017 at 11:04:34AM +0200, Michal Privoznik wrote: When generating HTML documentation we put enum values into a table so that we can display the value's name, numerical value and description (if it has one). Now the last part is problem. If the value doesn't have description the

Re: [libvirt] [PATCH 05/16] network: Move macmap mgmt from bridge_driver to virnetworkobj

2017-07-24 Thread Pavel Hrdina
On Fri, May 19, 2017 at 09:03:13AM -0400, John Ferlan wrote: > In preparation for having a private virNetworkObj - let's create/move some > API's that handle the obj->macmap. The API's will be renamed to have a > virNetworkObj prefix to follow conventions and the arguments slightly > modified to

Re: [libvirt] [PATCH] conf: Fix backwards migration of pSeries guests

2017-07-24 Thread Peter Krempa
On Fri, Jul 21, 2017 at 10:39:05 +0200, Andrea Bolognani wrote: > On Fri, 2017-07-21 at 10:07 +0200, Andrea Bolognani wrote: [...] > > That makes sense. > >  > > Doesn't it also mean that we don't really need to record > > whether the user set the model name explicitly or not? We > > can just

Re: [libvirt] [PATCH] qemu: fix migration fail of an auto-placement vm after attached memory to it

2017-07-24 Thread Peter Krempa
On Sat, Jul 22, 2017 at 05:45:59 -0400, Yi Wang wrote: > This patch fix this condition: > -vm has the "auto" placement in vcpu > -hot-plug memory with source node "1-3" through attach-device command > -migrate the vm to a host with only 2 numa node > And the migration will fail with error: >

Re: [libvirt] [PATCH] qemu: undefine is not allowed during domain starting up

2017-07-24 Thread Peter Krempa
On Sat, Jul 22, 2017 at 04:55:49 -0400, Yi Wang wrote: > Start a domain whilst undefine it, if starting failed duing ProcessLaunch, > on which period qemu exited unexpectedly, the operation will lead to failure > of undefine the domain until libvirtd restarted. The reason is that libvirtd > will

Re: [libvirt] [PATCH 04/16] network: Use consistent naming in bridge_driver for virNetwork objects

2017-07-24 Thread Pavel Hrdina
On Fri, May 19, 2017 at 09:03:12AM -0400, John Ferlan wrote: > Use @obj for a virNetworkObjPtr > > Use @net for a virNetworkPtr > > Clean up the bridge_driver.h > > Signed-off-by: John Ferlan > --- > src/network/bridge_driver.c | 966 >

Re: [libvirt] [PATCH v3 1/2] qemu: Add AAVMF32 to the list of known UEFIs

2017-07-24 Thread Andrea Bolognani
On Fri, 2017-07-21 at 14:51 -0400, John Ferlan wrote: > > Not your fault of course, but the way this is done at the > > moment is *extremely* yucky. > >  > > I just posted a patch[1] that makes it saner, and although I > > realize that's a bit more work I'd ask you to wait for it to > > land in

Re: [libvirt] [PATCH v6 4/4] nodedev: Remove driver locks around object list mgmt code

2017-07-24 Thread Erik Skultety
On Thu, Jul 20, 2017 at 10:08:15AM -0400, John Ferlan wrote: > Since virnodedeviceobj now has a self-lockable hash table, there's no > need to lock the table from the driver for processing. Thus remove the > locks from the driver for NodeDeviceObjList mgmt. > > This includes the test driver as

Re: [libvirt] [PATCH v6 3/4] nodedev: Convert virNodeDeviceObjListPtr to use hash tables

2017-07-24 Thread Erik Skultety
On Thu, Jul 20, 2017 at 10:08:14AM -0400, John Ferlan wrote: > Rather than use a forward linked list of elements, it'll be much more > efficient to use a hash table to reference the elements by unique name > and to perform hash searches. > > This patch does all the heavy lifting of converting the

Re: [libvirt] [PATCH 02/16] test: Use consistent variable names for network test driver APIs

2017-07-24 Thread Pavel Hrdina
On Fri, May 19, 2017 at 09:03:10AM -0400, John Ferlan wrote: > A virNetworkObjPtr will be an 'obj'. > > A virNetworkPtr will be a 'net'. > > Signed-off-by: John Ferlan > --- > src/test/test_driver.c | 182 > - > 1 file

Re: [libvirt] [PATCH v5 2/3] nodedev: Convert virNodeDeviceObjListPtr to use hash tables

2017-07-24 Thread Erik Skultety
On Thu, Jul 20, 2017 at 04:32:46PM -0400, John Ferlan wrote: > > > On 07/20/2017 10:48 AM, Erik Skultety wrote: > >> @@ -39,13 +40,19 @@ struct _virNodeDeviceObj { > >> }; > >> > >> struct _virNodeDeviceObjList { > >> -size_t count; > >> -virNodeDeviceObjPtr *objs; > >> +

Re: [libvirt] [PATCH] qemu_capabilities: Honour caps values formatting

2017-07-24 Thread Andrea Bolognani
On Sat, 2017-07-22 at 10:39 +0200, Michal Privoznik wrote: > So the way we format this huge virQEMUCaps enum is we group the > values in groups of five. And then at the beginning of each group > we have a small comment that says what's the number of the first > item in the group. Well, the last