Re: [libvirt] [PATCH v3] qemu: Ignore nwfilter binding instantiation issues during reconnect

2018-08-30 Thread John Ferlan
ping? Tks, John On 08/24/2018 10:02 AM, John Ferlan wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1607202 > > It's essentially stated in the nwfilterBindingDelete that we > will allow the admin to shoot themselves in the foot by deleting > the nwfilter binding which then allows them to

Re: [libvirt] [PATCH v3 15/28] locking: Introduce virLockManagerClearResources

2018-08-30 Thread John Ferlan
On 08/27/2018 04:08 AM, Michal Privoznik wrote: > This is a counterpart to virLockManagerAddResource. It is going > to be handy when using one lock manager to lock multiple files > step by step. OK, sure, but knowing what the purpose is now would perhaps be more a more useful commit message.

Re: [libvirt] [PATCH v3 14/28] lock_daemon_dispatch: Check for ownerPid rather than ownerId

2018-08-30 Thread John Ferlan
On 08/27/2018 04:08 AM, Michal Privoznik wrote: > At the beginning of each dispatch function we check if owner > attributes were registered (these consist of ID, UUID, PID and > name). The check then consists of checking if ID is not zero. > This is not going to work with >

Re: [libvirt] [PATCH v3 13/28] lock_driver: Introduce VIR_LOCK_MANAGER_RESOURCE_TYPE_METADATA

2018-08-30 Thread John Ferlan
On 08/27/2018 04:08 AM, Michal Privoznik wrote: > This is a new type of object that lock drivers can handle. > Currently, it is supported by lockd driver only. > > Signed-off-by: Michal Privoznik > --- > src/locking/lock_driver.h | 2 ++ > src/locking/lock_driver_lockd.c | 43 >

Re: [libvirt] [PATCH v3 12/28] _virLockManagerLockDaemonPrivate: Move @hasRWDisks into dom union

2018-08-30 Thread John Ferlan
On 08/27/2018 04:08 AM, Michal Privoznik wrote: > The fact whether domain has or hasn't RW disks is specific to "or doesn't have" > VIR_LOCK_MANAGER_OBJECT_TYPE_DOMAIN and therefore should reside > in union specific to it. > > Signed-off-by: Michal Privoznik > --- >

Re: [libvirt] [PATCH v3 11/28] lock_driver: Introduce new VIR_LOCK_MANAGER_OBJECT_TYPE_DAEMON

2018-08-30 Thread John Ferlan
On 08/27/2018 04:08 AM, Michal Privoznik wrote: > We will want virtlockd to lock files on behalf of libvirtd and > not qemu process, because it is libvirtd that needs an exclusive > access not qemu. This requires new lock context. > > Signed-off-by: Michal Privoznik > --- >

[libvirt] libvirt-4.7.0 release candidate 2 available

2018-08-30 Thread Daniel Veillard
I just pushed the RC2 to usual place, it is also tagged in git. I'm on the road so testing was very limited, I will assert Friday/w.e. where we are and see if we need to go though rc3 or push a GA release, thanks, Daniel -- Daniel Veillard | Red Hat Developers Tools

Re: [libvirt] [PATCH v3 10/28] lock_driver_lockd: Introduce VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_METADATA flag

2018-08-30 Thread John Ferlan
On 08/27/2018 04:08 AM, Michal Privoznik wrote: > This flag causes virtlockd to use different offset when locking > the file. > > Signed-off-by: Michal Privoznik > --- > src/locking/lock_daemon_dispatch.c | 10 -- > src/locking/lock_driver_lockd.c| 3 ++- >

Re: [libvirt] [PATCH v3 08/28] virLockManagerLockDaemonAddResource: Switch to cleanup label rather than error

2018-08-30 Thread John Ferlan
On 08/27/2018 04:08 AM, Michal Privoznik wrote: > This will help in future expansions of the code when it is be > harder to track if @newName and/or @newLockspace were already > allocated or not and thus whether it is safe to 'return' or we > need to 'goto error'. By using the 'cleanup' label

Re: [libvirt] [PATCH v3 07/28] locking: Don't leak private data in virLockManagerLockDaemonNew

2018-08-30 Thread John Ferlan
On 08/27/2018 04:08 AM, Michal Privoznik wrote: > If drvNew callback fails, nobody calls drvFree and thus private > data of the driver might leak. > > Signed-off-by: Michal Privoznik > --- > src/locking/lock_driver_lockd.c | 37 - > 1 file changed, 24

Re: [libvirt] [PATCH v2 1/2] nwfilter: Disallow binding creation in session mode

2018-08-30 Thread Daniel P . Berrangé
On Thu, Aug 30, 2018 at 12:50:09PM -0400, John Ferlan wrote: > > > On 08/30/2018 12:27 PM, Daniel P. Berrangé wrote: > > On Thu, Aug 30, 2018 at 11:06:07AM -0400, John Ferlan wrote: > >> Similar to nwfilterDefineXML, let's be sure the a filter binding > >> creation is not attempted in session

Re: [libvirt] [PATCH v3 06/28] virLockManagerSanlockAddResource: Do not ignore unknown resource types

2018-08-30 Thread John Ferlan
On 08/27/2018 04:08 AM, Michal Privoznik wrote: > Currently, there are only two types of resource. So effectively > this is a dead code. However, that assumption can change and we > shouldn't just silently ignore the error. > > Signed-off-by: Michal Privoznik > --- >

Re: [libvirt] [PATCH v3 05/28] virLockManagerLockDaemonAcquire: Drop useless check

2018-08-30 Thread John Ferlan
On 08/27/2018 04:08 AM, Michal Privoznik wrote: > The if() is completely useless since args.path is set to NULL in > the line just above. > > Signed-off-by: Michal Privoznik > --- > src/locking/lock_driver_lockd.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > Reviewed-by:

Re: [libvirt] [PATCH v3 04/28] lock_driver_lockd: Don't leak lockspace dirs

2018-08-30 Thread John Ferlan
On 08/27/2018 04:08 AM, Michal Privoznik wrote: > On daemon deinit only fileLockSpaceDir is freed. The other two > (scsiLockSpaceDir and lvmLockSpaceDir) are missing even though > they are allocated in virLockManagerLockDaemonLoadConfig(). > > Signed-off-by: Michal Privoznik > --- >

Re: [libvirt] [PATCH v3 03/28] lock_daemon: Fix some memleaks

2018-08-30 Thread John Ferlan
On 08/27/2018 04:08 AM, Michal Privoznik wrote: > 28 bytes in 1 blocks are definitely lost in loss record 26 of 66 >at 0x4C2CF0F: malloc (vg_replace_malloc.c:299) >by 0x7A02719: strdup (strdup.c:42) >by 0x197DC1: virStrdup (virstring.c:961) >by 0x12B478:

Re: [libvirt] [PATCH v2 1/2] nwfilter: Disallow binding creation in session mode

2018-08-30 Thread John Ferlan
On 08/30/2018 12:27 PM, Daniel P. Berrangé wrote: > On Thu, Aug 30, 2018 at 11:06:07AM -0400, John Ferlan wrote: >> Similar to nwfilterDefineXML, let's be sure the a filter binding >> creation is not attempted in session mode and generate the proper >> error message. >> >> Failure to open

Re: [libvirt] [PATCH v3 02/28] virSecurityManagerNewStack: Don't ignore virSecurityStackAddNested retval

2018-08-30 Thread John Ferlan
On 08/27/2018 04:08 AM, Michal Privoznik wrote: > The virSecurityStackAddNested() can fail in which case > virSecurityManagerNewStack() should fail too. > > Signed-off-by: Michal Privoznik > --- > src/security/security_manager.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) >

Re: [libvirt] [PATCH v3 01/28] virSecurityManagerNewDriver: Fix code pattern

2018-08-30 Thread John Ferlan
On 08/27/2018 04:08 AM, Michal Privoznik wrote: > Use 'error' label to free allocated memory. > > Signed-off-by: Michal Privoznik > --- > src/security/security_manager.c | 22 +++--- > 1 file changed, 11 insertions(+), 11 deletions(-) > Reviewed-by: John Ferlan John --

Re: [libvirt] [PATCH v2 2/2] nwfilter: Check for filter presence before open connect during teardown

2018-08-30 Thread Daniel P . Berrangé
On Thu, Aug 30, 2018 at 11:06:08AM -0400, John Ferlan wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1608275 > > Instantiation of an nwfilter binding is only allowed when > the net->filter is defined for the network; however, the > teardown of the binding does not make this check. This >

Re: [libvirt] [PATCH v2 1/2] nwfilter: Disallow binding creation in session mode

2018-08-30 Thread Daniel P . Berrangé
On Thu, Aug 30, 2018 at 11:06:07AM -0400, John Ferlan wrote: > Similar to nwfilterDefineXML, let's be sure the a filter binding > creation is not attempted in session mode and generate the proper > error message. > > Failure to open nwfilter in session mode (nwfilterConnectOpen) > fails already,

[libvirt] [PATCH] qemu: Don't overwrite stats in qemuDomainBlocksStatsGather

2018-08-30 Thread Peter Krempa
The size/capacity stats gathered in qemuDomainBlocksStatsGather when using -blockdev would be overwritten by assigning/copying the transfered data statistics at the end. Fix it by moving the assignment prior to fetching the capacity data. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c |

[libvirt] [PATCH v2 2/2] nwfilter: Check for filter presence before open connect during teardown

2018-08-30 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1608275 Instantiation of an nwfilter binding is only allowed when the net->filter is defined for the network; however, the teardown of the binding does not make this check. This leaves open the possibility that the teardown could be called during guest

[libvirt] [PATCH v2 1/2] nwfilter: Disallow binding creation in session mode

2018-08-30 Thread John Ferlan
Similar to nwfilterDefineXML, let's be sure the a filter binding creation is not attempted in session mode and generate the proper error message. Failure to open nwfilter in session mode (nwfilterConnectOpen) fails already, but that doesn't stop the free thinker from using a different connection

[libvirt] [PATCH v2 0/2] nwfilter: Fix a couple of session mode issues

2018-08-30 Thread John Ferlan
v1: https://www.redhat.com/archives/libvir-list/2018-August/msg01464.html Changes in v2 - different approach as review pointed out we should never open the nwfilter driver in session mode (although driver initialization does set up some barebones list infrastructure). First, let's make sure we

Re: [libvirt] [PATCH 01/10] docs: don't refer to deprecated 'linux' ostype in example

2018-08-30 Thread Daniel P . Berrangé
On Thu, Aug 30, 2018 at 04:27:06PM +0200, Marek Marczykowski-Górecki wrote: > On Mon, Aug 27, 2018 at 03:23:16PM -0600, Jim Fehlig wrote: > > On 08/05/2018 03:48 PM, Marek Marczykowski-Górecki wrote: > > > Use preferred name: 'xen'. > > > > I'd be fine with this change if the actual code used the

Re: [libvirt] [PATCH 01/10] docs: don't refer to deprecated 'linux' ostype in example

2018-08-30 Thread Marek Marczykowski-Górecki
On Mon, Aug 27, 2018 at 03:23:16PM -0600, Jim Fehlig wrote: > On 08/05/2018 03:48 PM, Marek Marczykowski-Górecki wrote: > > Use preferred name: 'xen'. > > I'd be fine with this change if the actual code used the preferred name too > :-). E.g. config containing > > xen > > will be shown as >

Re: [libvirt] [PATCH] storage: Fix mention of disk pool default

2018-08-30 Thread John Ferlan
On 08/30/2018 10:04 AM, Eric Blake wrote: > On 08/30/2018 08:41 AM, John Ferlan wrote: > >> >> "dos" is the expected value; however, "msdos" is >> the value used by "parted mklabel --script msdos" (see >> virStorageBackendDiskBuildPool) >> >> So that line in the storage page for the Disk pool

Re: [libvirt] [PATCH] storage: Fix mention of disk pool default

2018-08-30 Thread Eric Blake
On 08/30/2018 08:41 AM, John Ferlan wrote: "dos" is the expected value; however, "msdos" is the value used by "parted mklabel --script msdos" (see virStorageBackendDiskBuildPool) So that line in the storage page for the Disk pool description isn't entirely wrong, but it is somewhat

Re: [libvirt] [PATCH] storage: Fix mention of disk pool default

2018-08-30 Thread John Ferlan
On 08/29/2018 06:22 PM, Eric Blake wrote: > The default disk storage pool type is 'dos', not 'msdos'. > > Signed-off-by: Eric Blake > --- > > I ran into this doc bug when trying to figure out why a disk storage > pool that I had copied from another machine wouldn't autostart; it > turns out

Re: [libvirt] [PATCH] qemu: clear seccomp capability if TSYNC is not supported by host

2018-08-30 Thread Daniel P . Berrangé
On Thu, Aug 30, 2018 at 02:37:48PM +0200, Marc-André Lureau wrote: > Hi > > On Thu, Aug 30, 2018 at 2:25 PM, Ján Tomko wrote: > > On Thu, Aug 30, 2018 at 02:09:41PM +0200, marcandre.lur...@redhat.com wrote: > >> > >> From: Marc-André Lureau > >> > >> With qemu <= 3.0, when using "-seccomp on",

Re: [libvirt] [PATCH] qemu: clear seccomp capability if TSYNC is not supported by host

2018-08-30 Thread Marc-André Lureau
Hi On Thu, Aug 30, 2018 at 2:25 PM, Ján Tomko wrote: > On Thu, Aug 30, 2018 at 02:09:41PM +0200, marcandre.lur...@redhat.com wrote: >> >> From: Marc-André Lureau >> >> With qemu <= 3.0, when using "-seccomp on", the seccomp policy is only >> applied to the main thread, the vcpu worker thread

Re: [libvirt] [PATCH] qemuDomainAttachNetDevice: use only one virErrorPtr variable

2018-08-30 Thread John Ferlan
On 08/28/2018 06:23 AM, Ján Tomko wrote: > Commit f7b5566 added 'save_error' even though the function > already has 'originalError' used in the 'try_remove' section. > > Signed-off-by: Ján Tomko > --- > src/qemu/qemu_hotplug.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) >

Re: [libvirt] [PATCH] qemu: clear seccomp capability if TSYNC is not supported by host

2018-08-30 Thread Ján Tomko
On Thu, Aug 30, 2018 at 02:09:41PM +0200, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau With qemu <= 3.0, when using "-seccomp on", the seccomp policy is only applied to the main thread, the vcpu worker thread and other worker threads created after seccomp policy is applied; the

Re: [libvirt] [PATCH] qemu: clear seccomp capability if TSYNC is not supported by host

2018-08-30 Thread Daniel P . Berrangé
On Thu, Aug 30, 2018 at 02:09:41PM +0200, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > With qemu <= 3.0, when using "-seccomp on", the seccomp policy is only > applied to the main thread, the vcpu worker thread and other worker > threads created after seccomp policy is

Re: [libvirt] [PATCH] virDomainNetDefCheckABIStability: Check for MTU change too

2018-08-30 Thread Daniel P . Berrangé
On Thu, Aug 30, 2018 at 02:14:27PM +0200, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1623157 > > Changing MTU on a running guest is not possible and trying to do > so made us face many problems. That's why we forbid it in > 5f44d7e357f61f7. However, there is still one

[libvirt] [PATCH] virDomainNetDefCheckABIStability: Check for MTU change too

2018-08-30 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1623157 Changing MTU on a running guest is not possible and trying to do so made us face many problems. That's why we forbid it in 5f44d7e357f61f7. However, there is still one possible path where users can sneak in change: migration XML. Signed-off-by:

[libvirt] [PATCH] qemu: clear seccomp capability if TSYNC is not supported by host

2018-08-30 Thread marcandre . lureau
From: Marc-André Lureau With qemu <= 3.0, when using "-seccomp on", the seccomp policy is only applied to the main thread, the vcpu worker thread and other worker threads created after seccomp policy is applied; the seccomp policy is not applied to e.g. the RCU thread because it is created

[libvirt] [PATCH] qemuBuildMemPathStr: Produce -mem-path more frequently

2018-08-30 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1622455 If a domain is configured to use under we have to honour that setting and produce -mem-path on the command line. We are not doing so if domain has no guest NUMA nodes nor hugepages. Signed-off-by: Michal Privoznik ---

Re: [libvirt] [PATCH] qemuDomainSnapshotCreateActiveExternal: Remove memory snapshot on failure less frequently

2018-08-30 Thread Peter Krempa
On Thu, Aug 30, 2018 at 13:06:40 +0200, Michal Privoznik wrote: > On 08/30/2018 12:57 PM, Peter Krempa wrote: > > On Thu, Aug 30, 2018 at 11:22:35 +0200, Michal Privoznik wrote: > >> https://bugzilla.redhat.com/show_bug.cgi?id=1589115 > >> > >> When creating a memory snapshot the domain is

Re: [libvirt] [PATCH] qemuDomainSnapshotCreateActiveExternal: Remove memory snapshot on failure less frequently

2018-08-30 Thread Michal Privoznik
On 08/30/2018 12:57 PM, Peter Krempa wrote: > On Thu, Aug 30, 2018 at 11:22:35 +0200, Michal Privoznik wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=1589115 >> >> When creating a memory snapshot the domain is suspended and qemu >> is told to dump memory into the desired file. After that we

Re: [libvirt] [PATCH] qemuDomainSnapshotCreateActiveExternal: Remove memory snapshot on failure less frequently

2018-08-30 Thread Peter Krempa
On Thu, Aug 30, 2018 at 11:22:35 +0200, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1589115 > > When creating a memory snapshot the domain is suspended and qemu > is told to dump memory into the desired file. After that we set a > flag so that the file is not left behind

[libvirt] [PATCH] qemuDomainSnapshotCreateActiveExternal: Remove memory snapshot on failure less frequently

2018-08-30 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1589115 When creating a memory snapshot the domain is suspended and qemu is told to dump memory into the desired file. After that we set a flag so that the file is not left behind if a failure occurs at some later point (e.g. when creating disk snapshot

Re: [libvirt] [jenkins-ci PATCH 5/8] Drop "branch" variable

2018-08-30 Thread Erik Skultety
On Wed, Aug 29, 2018 at 05:09:02PM +0200, Andrea Bolognani wrote: > It's no longer used anywhere. > > Signed-off-by: Andrea Bolognani > --- Reviewed-by: Erik Skultety -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [jenkins-ci PATCH 3/8] jobs: Hardcode "master" branch

2018-08-30 Thread Erik Skultety
On Wed, Aug 29, 2018 at 05:09:00PM +0200, Andrea Bolognani wrote: > We never build from any other branch on the CentOS > CI environment, so treating this as a configurable > parameter is pointless and will only get in the way > of making further changes. > > Signed-off-by: Andrea Bolognani > ---

Re: [libvirt] [PATCH] Add virNetlinkNewLink for simplifying virNetDev*Create

2018-08-30 Thread Shi Lei
Thanks for your comments. But I have several questions, please see below... On 2018-08-29 at 19:43, Erik Skultety wrote: >On Thu, Aug 23, 2018 at 12:15:08PM +0800, Shi Lei wrote: >> This patch adds virNetlinkNewLink for simplifying virNetDevMacVLanCreate >> and virNetDevBridgeCreate. >> >>