Re: [libvirt] [libvirt-php][PATCH 4/7] util: Introduce VIR_FREE

2017-12-07 Thread Erik Skultety
On Thu, Dec 07, 2017 at 10:22:59AM +0100, Michal Privoznik wrote: > Just like libvirt has it. After freeing pointer set it to NULL to > avoid double frees. > > Signed-off-by: Michal Privoznik Reviewed-by: Erik Skultety -- libvir-list mailing list

Re: [libvirt] [libvirt-php][PATCH 2/7] Rework libvirt_domain_new a bit

2017-12-07 Thread Erik Skultety
On Thu, Dec 07, 2017 at 10:22:57AM +0100, Michal Privoznik wrote: > Firstly, this API is creating $domName-install for installation > and at the same time it defines $domName (but never runs it). > This is not very optimal - libvirt can handle two definitions for > a single domain (active and

[libvirt] [PATCH v2] libvirt-python : PyObject memory leak

2017-12-07 Thread Peng Hao
libvirt_virConnectDomainEventTunableCallback leak a PyObject. Signed-off-by: Peng Hao Signed-off-by: Wang Yechao --- libvirt-override.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvirt-override.c b/libvirt-override.c

Re: [libvirt] [PATCH v3] qemu: change monitor.sock from /var/lib/libvirt/qemu/domain-*** to /var/run/libvirt/qemu/domain-***

2017-12-07 Thread John Ferlan
On 10/27/2017 09:54 PM, xinhua.Cao wrote: > directory /var/lib alway is Persistence directory, but in redhat system, > /var/run is memory directory. > our running domain xml is saved at /var/run/libvirt/qemu. so if we cold reset > system, > the /var/run/libvirt/qemu directory is clear, but >

Re: [libvirt] [PATCH 7/7] tests: docs: Add schema and testcase for domainsnapshot

2017-12-07 Thread John Ferlan
On 10/30/2017 04:51 AM, Kothapally Madhu Pavan wrote: > Alter the schema of domainsnapshot to add inactive XML of a snapshot. > As, snapshot already has active XML configuration of domain, the inactive > XMl is embedded in tags. Sample XML is: > > > > > > >

Re: [libvirt] [PATCH 6/7] virsh: Allow restoring snapshot with non-persistent configuration

2017-12-07 Thread John Ferlan
On 10/30/2017 04:51 AM, Kothapally Madhu Pavan wrote: > Now, snapshot-restore will allow restoring snapshots with non-persistent > configuration as both active and inactive XML configurations are saved > in snapshot. User can discard non-persistent configuratin of a domain configuration >

Re: [libvirt] Add iSER support in libvirt

2017-12-07 Thread Daniel P. Berrange
On Thu, Dec 07, 2017 at 08:52:43PM +0800, Charles Kelimod wrote: > I want to add iSER support in libvirt project, how can I submit (if > possible) my modification to it? We welcome patches from anyone who is interested - there's some useful info in: https://libvirt.org/hacking.html#patches

Re: [libvirt] [PATCH] qemu: blockjob: Reset disk source index after pivot

2017-12-07 Thread Eric Blake
On 12/07/2017 09:27 AM, Peter Krempa wrote: > Since we are re-detecting the backing chain after pivoting to the active > block commit target (or block copy target) the disk index needs to be > reset to 0. This is necessary since we move a member of the backing > chain to disk->src but clear

Re: [libvirt] [PATCH 5/7] virsh: Edit inactive XML configuration of snapshot using snapshot-edit

2017-12-07 Thread John Ferlan
On 10/30/2017 04:51 AM, Kothapally Madhu Pavan wrote: > Now, snapshot-edit will allow editing inactive XML configuration of snapshot > along with active XML configuration. When --active-only flag is used the > inactive XML will not be displayed and will be removed from snapshot. > --active-only

Re: [libvirt] [PATCH 4/7] virsh: Dump inactive XML configuration of snapshot using snapshot-dumpxml

2017-12-07 Thread John Ferlan
On 10/30/2017 04:51 AM, Kothapally Madhu Pavan wrote: > Now, snapshot-dumpxml will display inactive XML configuration of snapshot > along with active XML configuration. When --active-only flag is used the > inactive XML configuration will not be displayed. > > Signed-off-by: Kothapally Madhu

[libvirt] Add iSER support in libvirt

2017-12-07 Thread Charles Kelimod
I want to add iSER support in libvirt project, how can I submit (if possible) my modification to it? Best Regards, Charles. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 3/7] conf: Allow editing inactive snapshot configuration

2017-12-07 Thread John Ferlan
On 10/30/2017 04:51 AM, Kothapally Madhu Pavan wrote: > This patch will allow user to edit the inactive XML snapshot > configuration when it is available in the snapshot. > > Signed-off-by: Kothapally Madhu Pavan > --- > include/libvirt/libvirt-domain.h | 1 + >

Re: [libvirt] [PATCH] libvirt-python : PyObject memory leak

2017-12-07 Thread Michal Privoznik
On 12/08/2017 12:33 AM, Peng Hao wrote: > libvirt_virConnectDomainEventTunableCallback leak a PyObject > > Signed-off-by: Peng Hao > Signed-off-by: Wang Yechao > --- > libvirt-override.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git

Re: [libvirt] [PATCH 2/7] qemu: Use active and inactive snapshot configuration on restore

2017-12-07 Thread John Ferlan
On 10/30/2017 04:51 AM, Kothapally Madhu Pavan wrote: > By default, active and inactive XMl snapshot configurations are *XML > assigned to domain definition. This will make sure that all the > non-persistent configurations of the snapshot are restored back > as it is. This patch will also make

Re: [libvirt] [PATCH 1/7] qemu: Store inactive domain configuration in snapshot

2017-12-07 Thread John Ferlan
On 10/30/2017 04:51 AM, Kothapally Madhu Pavan wrote: > Inorder to capture the exact state of domain, inactive configuration In order > is needed along with active configuration. This patch stores inactive > domain configuration when creating snapshot of a running domain. It > also captures

[libvirt] [PATCH] libvirt-python : PyObject memory leak

2017-12-07 Thread Peng Hao
libvirt_virConnectDomainEventTunableCallback leak a PyObject Signed-off-by: Peng Hao Signed-off-by: Wang Yechao --- libvirt-override.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libvirt-override.c b/libvirt-override.c index

[libvirt] [PATCH] qemu: blockjob: Reset disk source index after pivot

2017-12-07 Thread Peter Krempa
Since we are re-detecting the backing chain after pivoting to the active block commit target (or block copy target) the disk index needs to be reset to 0. This is necessary since we move a member of the backing chain to disk->src but clear indexes only starting from disk->src->backingStore. The

Re: [libvirt] [libvirt-php][PATCH 1/7] Make installation_get_xml hurt my eyes less.

2017-12-07 Thread Erik Skultety
On Thu, Dec 07, 2017 at 10:22:56AM +0100, Michal Privoznik wrote: > This function has a lot of problems. Fix some of them: > > 1) long lines > 2) useless argument @step > 3) unclear domain XML > 4) unclear difference in generated XMLs for step 1 and step 2 > 5) static 32KB buffer(!) > >

Re: [libvirt] [REBASE PATCH v2 02/10] qemu: Alter dump-guest-memory command generation

2017-12-07 Thread Jiri Denemark
On Tue, Dec 05, 2017 at 06:44:35 -0500, John Ferlan wrote: > The qemuMonitorJSONMakeCommand can properly handle a NULL string > by using the "S:" parameter instead of "s:", so let's use that > of having in if/else condition that only adds the "s:". > > Signed-off-by: John Ferlan

Re: [libvirt] [REBASE PATCH v2 01/10] qemu: Clean up style for the qemuDumpToFd definition

2017-12-07 Thread Jiri Denemark
On Tue, Dec 05, 2017 at 06:44:34 -0500, John Ferlan wrote: > Alter the function definition to follow more recent style > > Signed-off-by: John Ferlan > --- > src/qemu/qemu_driver.c | 11 --- > 1 file changed, 8 insertions(+), 3 deletions(-) ACK Jirka --

Re: [libvirt] [PATCHv2 3/7] Introduce qemuDomainNamespaceMknodPaths

2017-12-07 Thread Ján Tomko
On Thu, Dec 07, 2017 at 07:51:40AM -0500, John Ferlan wrote: On 12/01/2017 11:50 AM, Ján Tomko wrote: Separate the logic of creating devices from their gathering. Use this new function in qemuDomainNamespaceSetupHostdev and qemuDomainNamespaceSetupDisk. --- src/qemu/qemu_domain.c | 74

[libvirt] [PATCH] qemuDomainNamespaceSetupDisk: initialize npaths

2017-12-07 Thread Ján Tomko
Introduced by commit d3db304. Reported-by: John Ferlan --- Pushed as trivial. src/qemu/qemu_domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 75cecb1bb..d7150cae1 100644 ---

Re: [libvirt] [PATCH] docs: domain: Fix documentation of the 'snapshot' attribute for

2017-12-07 Thread Jiri Denemark
On Thu, Dec 07, 2017 at 14:20:18 +0100, Peter Krempa wrote: > Emphasise the valid values by wrapping them in and reword the > last sentence so that the invalid value example can be dropped. > > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1523070 > --- > docs/formatdomain.html.in | 19

Re: [libvirt] [PATCH] virerror: mark VIR_ERR_AGENT_UNSYNCED as DEPRECATED

2017-12-07 Thread Michal Privoznik
On 12/07/2017 11:29 AM, Chen Hanxiao wrote: > > At 2017-12-07 17:30:15, "Michal Privoznik" wrote: >> On 12/07/2017 02:59 AM, Chen Hanxiao wrote: >>> From: Chen Hanxiao >>> >>> Since commit 5e5019bf, we've no longer use >>> VIR_ERR_AGENT_UNSYNCED

[libvirt] [PATCH] docs: domain: Fix documentation of the 'snapshot' attribute for

2017-12-07 Thread Peter Krempa
Emphasise the valid values by wrapping them in and reword the last sentence so that the invalid value example can be dropped. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1523070 --- docs/formatdomain.html.in | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-)

[libvirt] [PATCH 2/2] qemu: Make sure host-model uses CPU model supported by QEMU

2017-12-07 Thread Jiri Denemark
When reconnecting to a running domain started by old libvirt, which did not change host-model into a custom CPU definition, we replace the CPU definition with a specific CPU model from host capabilities. However, that CPU model may not be supported by the running qemu process. We need to translate

[libvirt] [PATCH 1/2] qemu: Separate fetching CPU definitions from filling qemuCaps

2017-12-07 Thread Jiri Denemark
virQEMUCapsProbeQMPCPUDefinitions is now a small wrapper which fills in qemuCaps with CPU models fetched by virQEMUCapsFetchCPUDefinitions. Signed-off-by: Jiri Denemark --- src/qemu/qemu_capabilities.c | 59 +++-

[libvirt] [PATCH 0/2] qemu: Fix upgrade with running domains with host-model CPUs

2017-12-07 Thread Jiri Denemark
When upgrading old libvirt on a host with EPYC host CPU (or any other CPU which was added to cpu_map.xml in newer libvirt releases), we would replace host-model CPU definition for running domains to EPYC even though a different CPU model was used to start the domain. And sync old libvirt doesn't

Re: [libvirt] [PATCHv2 3/7] Introduce qemuDomainNamespaceMknodPaths

2017-12-07 Thread John Ferlan
On 12/01/2017 11:50 AM, Ján Tomko wrote: > Separate the logic of creating devices from their gathering. > > Use this new function in qemuDomainNamespaceSetupHostdev and > qemuDomainNamespaceSetupDisk. > --- > src/qemu/qemu_domain.c | 74 > ++ >

[libvirt] [PATCH v2.1 2/2] news: add change of hot unplug redirdev

2017-12-07 Thread Chen Hanxiao
From: Chen Hanxiao Add hot unplug redirdev in news 'New features' section Signed-off-by: Chen Hanxiao --- v2.1: put news part into a seperate patch docs/news.xml | 9 + 1 file changed, 9 insertions(+) diff --git a/docs/news.xml

[libvirt] [PATCH v2.1 1/2] qemu: Add support for hot unplug redirdev device

2017-12-07 Thread Chen Hanxiao
From: Chen Hanxiao We lacked of hot unplugging redirdev device. This patch add support for it. We could use detach-device --live now. Signed-off-by: Chen Hanxiao --- v2.1: rebase on master src/qemu/qemu_driver.c | 4 +-

[libvirt] [PATCH v2.1 0/2] Add support for hot unplug redirdev

2017-12-07 Thread Chen Hanxiao
v2.1: split original patch into a patchset, put News in a seperate patch Chen Hanxiao (2): qemu: Add support for hot unplug redirdev device news: add change of hot unplug redirdev docs/news.xml | 9 src/qemu/qemu_driver.c | 4 +- src/qemu/qemu_hotplug.c | 111

Re: [libvirt] [PATCH v2] qemu: Add support for hot unplug redirdev device

2017-12-07 Thread Chen Hanxiao
At 2017-12-07 17:35:42, "Peter Krempa" wrote: >On Thu, Dec 07, 2017 at 09:26:12 +0800, Chen Hanxiao wrote: >> From: Chen Hanxiao >> >> We lacked of hot unplugging redirdev device. >> This patch add support for it. >> We could use detach-device

Re: [libvirt] [PATCH] virerror: mark VIR_ERR_AGENT_UNSYNCED as DEPRECATED

2017-12-07 Thread Chen Hanxiao
At 2017-12-07 17:30:15, "Michal Privoznik" wrote: >On 12/07/2017 02:59 AM, Chen Hanxiao wrote: >> From: Chen Hanxiao >> >> Since commit 5e5019bf, we've no longer use >> VIR_ERR_AGENT_UNSYNCED anymore. >> Mark it as DEPRECATED. >> >> Signed-off-by:

Re: [libvirt] Snapshot: Request to review patch

2017-12-07 Thread Jiri Denemark
On Thu, Dec 07, 2017 at 14:00:07 +0530, Madhu Pavan wrote: > Hi all, > > Could someone please review > https://www.redhat.com/archives/libvir-list/2017-October/msg01333.html > This patch is based on comments from Jiri Denemark ( >

Re: [libvirt] [PATCH v2] qemu: Add support for hot unplug redirdev device

2017-12-07 Thread Peter Krempa
On Thu, Dec 07, 2017 at 09:26:12 +0800, Chen Hanxiao wrote: > From: Chen Hanxiao > > We lacked of hot unplugging redirdev device. > This patch add support for it. > We could use detach-device --live now. > > Signed-off-by: Chen Hanxiao > ---

Re: [libvirt] [PATCH] virerror: mark VIR_ERR_AGENT_UNSYNCED as DEPRECATED

2017-12-07 Thread Michal Privoznik
On 12/07/2017 02:59 AM, Chen Hanxiao wrote: > From: Chen Hanxiao > > Since commit 5e5019bf, we've no longer use > VIR_ERR_AGENT_UNSYNCED anymore. > Mark it as DEPRECATED. > > Signed-off-by: Chen Hanxiao > --- > include/libvirt/virterror.h | 2 +- >

[libvirt] [libvirt-php][PATCH 0/7] Rework libvirt_domain_new a bit

2017-12-07 Thread Michal Privoznik
Patches for: https://bugzilla.redhat.com/show_bug.cgi?id=1513190 You can also get the patches from my github: https://github.com/zippy2/libvirt-php/commits/libvirt_domain_new Apart from usual case where I just push patches immediately, I'm gonna give others chance to review since it's not

[libvirt] [libvirt-php][PATCH 5/7] libvirt_domain_new: Resolve couple of memleaks

2017-12-07 Thread Michal Privoznik
There are still some, but it's definitely better now. Signed-off-by: Michal Privoznik --- src/libvirt-domain.c | 27 ++- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 3c4c683..6ae6c0a

[libvirt] [libvirt-php][PATCH 2/7] Rework libvirt_domain_new a bit

2017-12-07 Thread Michal Privoznik
Firstly, this API is creating $domName-install for installation and at the same time it defines $domName (but never runs it). This is not very optimal - libvirt can handle two definitions for a single domain (active and inactive ones). Secondly, this function is leaking domain objects on any

[libvirt] [libvirt-php][PATCH 6/7] installation_get_xml: Resolve couple of memleaks

2017-12-07 Thread Michal Privoznik
There are still some, but it's definitely better now. Signed-off-by: Michal Privoznik --- src/libvirt-php.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libvirt-php.c b/src/libvirt-php.c index 307412e..1525834 100644 --- a/src/libvirt-php.c +++

[libvirt] [libvirt-php][PATCH 7/7] src: Use VIR_FREE instead of free

2017-12-07 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/libvirt-connection.c | 26 +++ src/libvirt-domain.c | 182 --- src/libvirt-network.c| 26 +++ src/libvirt-node.c | 9 +-- src/libvirt-nodedev.c| 52

[libvirt] [libvirt-php][PATCH 1/7] Make installation_get_xml hurt my eyes less.

2017-12-07 Thread Michal Privoznik
This function has a lot of problems. Fix some of them: 1) long lines 2) useless argument @step 3) unclear domain XML 4) unclear difference in generated XMLs for step 1 and step 2 5) static 32KB buffer(!) Signed-off-by: Michal Privoznik --- src/libvirt-domain.c | 8 +--

[libvirt] [libvirt-php][PATCH 3/7] installation_get_xml: Don't override defaults of and friends

2017-12-07 Thread Michal Privoznik
We don't really need to override the defaults because libvirt chooses sane ones. Signed-off-by: Michal Privoznik --- src/libvirt-php.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/libvirt-php.c b/src/libvirt-php.c index 51534a5..307412e 100644 ---

[libvirt] [libvirt-php][PATCH 4/7] util: Introduce VIR_FREE

2017-12-07 Thread Michal Privoznik
Just like libvirt has it. After freeing pointer set it to NULL to avoid double frees. Signed-off-by: Michal Privoznik --- src/util.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/util.h b/src/util.h index fcd4075..3af77d4 100644 --- a/src/util.h +++

Re: [libvirt] [PATCH] storage: Don't dereference driver object if virStorageSource is not initialized

2017-12-07 Thread Peter Krempa
On Wed, Dec 06, 2017 at 16:39:27 -0500, John Ferlan wrote: > > > On 12/06/2017 10:28 AM, Peter Krempa wrote: > > virStorageFileReportBrokenChain uses data from the driver private data > > pointer to print the user and group. This would lead to a crash in call > > paths where we did not

[libvirt] Snapshot: Request to review patch

2017-12-07 Thread Madhu Pavan
Hi all, Could someone please review https://www.redhat.com/archives/libvir-list/2017-October/msg01333.html This patch is based on comments from Jiri Denemark ( https://www.redhat.com/archives/libvir-list/2017-October/msg01275.html ) This patch potentially fixes