[libvirt] [PATCH RFC 0/2] libxl: migration v3 and p2p support

2015-09-08 Thread Joao Martins
Joao Martins (2): libxl: add p2p migration libxl: add v3 migration w/o params src/libxl/libxl_driver.c| 226 +++- src/libxl/libxl_migration.c | 220 ++ src/libxl/libxl_migration.h | 11 +++ 3 files changed

[libvirt] [PATCH RFC 2/2] libxl: add v3 migration w/o params

2015-09-08 Thread Joao Martins
ariants of virDomainMigrateToURI which don't use v3 with params. The latter is only supported by the latest virDomainMigrateToURI3, thus we broaden the API support of migration in libxl e.g. ability to use virDomainMigrateToURI2 and virDomainMigrate (in P2P mode). Signed-off-by: Joao Martins

[libvirt] [PATCH RFC 1/2] libxl: add p2p migration

2015-09-08 Thread Joao Martins
ence thus it is possible to migrate from a P2P to non-P2P host. Signed-off-by: Joao Martins --- src/libxl/libxl_driver.c| 13 ++- src/libxl/libxl_migration.c | 220 src/libxl/libxl_migration.h | 11 +++ 3 files changed, 241 insertions(+), 3 deletions

[libvirt] [PATCH RFC 1/7] libxl: implement virDomainGetCPUStats

2015-09-08 Thread Joao Martins
Introduce support for domainGetCPUStats API call and consequently allow us to use `virsh cpu-stats`. The latter returns a more brief output than the one provided by`virsh vcpuinfo`. Signed-off-by: Joao Martins --- src/libxl/libxl_driver.c | 111 +++ 1

[libvirt] [PATCH RFC 0/7] libxl: domain statistics support

2015-09-08 Thread Joao Martins
.3 and 4.5 setups plus Openstack Kilo. Any comments or suggestions are welcome, Thanks! Joao Joao Martins (7): libxl: implement virDomainGetCPUStats libxl: implement virDomainMemorystats libxl: implement virDomainInterfaceStats libxl: implement virDomainBlockStats libxl:

[libvirt] [PATCH RFC 7/7] libxl: implement virDomainGetJobStats

2015-09-08 Thread Joao Martins
migration has been completed. But because we don't support completed jobs we will deliver an error. Signed-off-by: Joao Martins --- src/libxl/libxl_driver.c | 53 1 file changed, 53 insertions(+) diff --git a/src/libxl/libxl_driver.c b/src/

[libvirt] [PATCH RFC 6/7] libxl: implement virDomainGetJobInfo

2015-09-08 Thread Joao Martins
e node and will return VIR_DOMAIN_JOB_NONE. Though nova handles this case and will migrate it properly instead of crashing. Signed-off-by: Joao Martins --- src/libxl/libxl_domain.c | 29 + src/libxl/libxl_domain.h | 6 ++ src/libxl/libx

[libvirt] [PATCH RFC 3/7] libxl: implement virDomainInterfaceStats

2015-09-08 Thread Joao Martins
not yet supported in FreeBSD. Signed-off-by: Joao Martins --- src/libxl/libxl_driver.c | 53 1 file changed, 53 insertions(+) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 43e9e47..dc83083 100644 --- a/src/libxl

[libvirt] [PATCH RFC 4/7] libxl: implement virDomainBlockStats

2015-09-08 Thread Joao Martins
xtra dependency namely of xenstore for doing the xs_read. BlockStatsFlags variant is also implemented which has the added benefit of getting the number of flush requests. Signed-off-by: Joao Martins --- configure.ac | 2 +- src/libxl/libxl_driver.c | 420 +++

[libvirt] [PATCH RFC 2/7] libxl: implement virDomainMemorystats

2015-09-08 Thread Joao Martins
cooperation of the guest and thus currently not supported. We build on the data returned from libxl_domain_info and deliver it in the virDomainMemoryStat format. Signed-off-by: Joao Martins --- src/libxl/libxl_driver.c | 68 1 file changed, 68

[libvirt] [PATCH RFC 5/7] libxl: implement virConnectGetAllDomainStats

2015-09-08 Thread Joao Martins
Introduce support for connectGetAllDomainStats call that allow us to _all_ domain(s) statistics including network, block, cpus and memory. Changes are rather mechanical and mostly take care of the format to export the data. Signed-off-by: Joao Martins --- src/libxl/libxl_driver.c | 267

Re: [libvirt] [PATCH RFC 4/7] libxl: implement virDomainBlockStats

2015-09-09 Thread Joao Martins
On 09/09/2015 02:53 PM, Daniel P. Berrange wrote: > On Tue, Sep 08, 2015 at 09:27:27AM +0100, Joao Martins wrote: >> diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c >> index dc83083..fd952a3 100644 >> --- a/src/libxl/libxl_driver.c >> +++ b/src/libx

Re: [libvirt] [PATCH RFC 0/7] libxl: domain statistics support

2015-09-09 Thread Joao Martins
On 09/09/2015 02:56 PM, Daniel P. Berrange wrote: > On Tue, Sep 08, 2015 at 09:27:23AM +0100, Joao Martins wrote: >> Hey Jim, >> >> This series bring support for various statistics about domains >> regarding CPU, Memory, Network Interfaces and BlockStats. Not a

Re: [libvirt] [PATCH RFC 2/2] libxl: add v3 migration w/o params

2015-09-09 Thread Joao Martins
On 09/09/2015 03:03 PM, Daniel P. Berrange wrote: > On Tue, Sep 08, 2015 at 09:26:12AM +0100, Joao Martins wrote: >> This patch introduces migration v3 without ext. params. Most of >> the changes are mechanical and most of it is moving code and handling >> of the argum

Re: [libvirt] [PATCH RFC 1/2] libxl: add p2p migration

2015-09-09 Thread Joao Martins
On 09/09/2015 02:58 PM, Daniel P. Berrange wrote: > On Tue, Sep 08, 2015 at 09:26:11AM +0100, Joao Martins wrote: >> Introduce support for VIR_MIGRATE_PEER2PEER in libvirt migration. >> Most of the changes occur at the source and no modifications >> at the receiver. >&

Re: [libvirt] [PATCH RFC 1/7] libxl: implement virDomainGetCPUStats

2015-09-17 Thread Joao Martins
On 09/17/2015 04:09 AM, Jim Fehlig wrote: > On 09/08/2015 02:27 AM, Joao Martins wrote: >> Introduce support for domainGetCPUStats API call and consequently >> allow us to use `virsh cpu-stats`. The latter returns a more brief >> output than the one provided by`virsh vcpuin

Re: [libvirt] [PATCH RFC 2/7] libxl: implement virDomainMemorystats

2015-09-23 Thread Joao Martins
On 09/17/2015 11:16 PM, Jim Fehlig wrote: > On 09/08/2015 02:27 AM, Joao Martins wrote: >> Introduce support for domainMemoryStats API call, which >> consequently enables the use of `virsh dommemstat` command to >> query for memory statistics of a domain. We support >&g

Re: [libvirt] [PATCH RFC 4/7] libxl: implement virDomainBlockStats

2015-09-24 Thread Joao Martins
On 09/23/2015 11:24 PM, Jim Fehlig wrote: > Joao Martins wrote: >> Introduce initial support for domainBlockStats API call that >> allow us to query block device statistics. openstack nova >> uses this API call to query block statistics, alongside >&g

Re: [libvirt] [PATCH RFC 3/7] libxl: implement virDomainInterfaceStats

2015-09-24 Thread Joao Martins
On 09/23/2015 08:18 PM, Jim Fehlig wrote: > Joao Martins wrote: >> Introduce support for domainInterfaceStats API call for querying >> network interface statistics. Consequently it also enables the >> use of `virsh domifstat ` command. >> >> Fo

Re: [libvirt] [PATCH RFC 5/7] libxl: implement virConnectGetAllDomainStats

2015-10-13 Thread Joao Martins
On 10/12/2015 11:20 PM, Jim Fehlig wrote: > Joao Martins wrote: >> Introduce support for connectGetAllDomainStats call that >> allow us to _all_ domain(s) statistics including network, block, >> cpus and memory. Changes are rather mechanical and mostly >> take care

Re: [libvirt] [PATCH RFC 6/7] libxl: implement virDomainGetJobInfo

2015-10-14 Thread Joao Martins
On 10/13/2015 11:02 PM, Jim Fehlig wrote: > Joao Martins wrote: >> Introduce support for domainGetJobInfo to get info about the >> ongoing job. If the job is active it will update the >> timeElapsed which is computed with the "started" field added to >>

Re: [libvirt] [PATCH RFC 7/7] libxl: implement virDomainGetJobStats

2015-10-14 Thread Joao Martins
On 10/13/2015 11:14 PM, Jim Fehlig wrote: > Joao Martins wrote: >> Introduces support for domainGetJobStats which has the same >> info as domainGetJobInfo but in a slightly different format. >> Another difference is that virDomainGetJobStats can also >> retrieve info on

[libvirt] [PATCH v2 0/8] libxl: domain statistics support

2015-11-10 Thread Joao Martins
urthermore with this series we get to support nova diagnostics. Tested this series on 4.4.3 and 4.5 setups plus Openstack Kilo. Individual patches contain the changelog and comments addressed since v1. Thanks! Joao Martins (8): libxl: implement virDomainGetCPUStats libxl: implement virDomainM

[libvirt] [PATCH v2 3/8] libxl: implement virDomainInterfaceStats

2015-11-10 Thread Joao Martins
rface statistics we resort to virNetInterfaceStats and let libvirt handle the platform specific nits. Note that the latter is not yet supported in FreeBSD. Signed-off-by: Joao Martins --- Changes since v1: - Fill .ifname after domain start with generated name from libxl based on domain id and

[libvirt] [PATCH v2 1/8] libxl: implement virDomainGetCPUStats

2015-11-10 Thread Joao Martins
Introduce support for domainGetCPUStats API call and consequently allow us to use `virsh cpu-stats`. The latter returns a more brief output than the one provided by`virsh vcpuinfo`. Signed-off-by: Joao Martins --- Changes since v1: - Remove libxl_vcpuinfo_dispose() in favor or using

[libvirt] [PATCH v2] libxl: add p2p migration

2015-11-10 Thread Joao Martins
ence thus it is possible to migrate from a P2P to non-P2P host. Signed-off-by: Joao Martins --- Changes since v1: - Move Begin step to libxlDoMigrateP2P to have all 4 steps together. - Remove if before VIR_FREE(dom_xml) --- src/libxl/libxl_driver.c| 13 ++- src/libxl/libxl_mi

[libvirt] [PATCH v2 2/8] libxl: implement virDomainMemorystats

2015-11-10 Thread Joao Martins
cooperation of the guest and thus currently not supported. We build on the data returned from libxl_domain_info and deliver it in the virDomainMemoryStat format. Signed-off-by: Joao Martins --- Changes since v1: - Cleanup properly after error fetching domain stats - Dispose libxl_dominfo after

[libvirt] [PATCH v2 7/8] libxl: implement virDomainGetJobInfo

2015-11-10 Thread Joao Martins
e node and will return VIR_DOMAIN_JOB_NONE. Though nova handles this case and will migrate it properly instead of crashing. Signed-off-by: Joao Martins --- Changes since v1: - s/inexistent/nonexistent/g in commit message - s/estimed/estimated/g - Bump version to 1.2.22 --- src/libxl/libx

[libvirt] [PATCH v2 5/8] libxl: implement virDomainBlockStats

2015-11-10 Thread Joao Martins
ed benefit of getting the number of flush requests. Signed-off-by: Joao Martins --- Changes since v1: - Fix identation issues - Set ret to LIBXL_VBD_SECTOR_SIZE - Reuse VIR_STRDUP error instead of doing virReportError when we fail to set stats->backend - Change virAsprintf(...) error

[libvirt] [PATCH v2 4/8] util: add virDiskNameParse to handle disk and partition idx

2015-11-10 Thread Joao Martins
ned-off-by: Joao Martins --- src/libvirt_private.syms | 1 + src/util/virutil.c | 41 +++ src/util/virutil.h | 1 + tests/utiltest.c | 56 4 files changed, 95 insertions(+), 4 deletions(-) diff -

[libvirt] [PATCH v2 6/8] libxl: implement virConnectGetAllDomainStats

2015-11-10 Thread Joao Martins
Introduce support for connectGetAllDomainStats call that allow us to _all_ domain(s) statistics including network, block, cpus and memory. Changes are rather mechanical and mostly take care of the format to export the data. Signed-off-by: Joao Martins --- Changes since v1: - Rework flags

[libvirt] [PATCH v2 8/8] libxl: implement virDomainGetJobStats

2015-11-10 Thread Joao Martins
migration has been completed. But because we don't support completed jobs we will deliver an error. Signed-off-by: Joao Martins --- Changes since v1: - Fixed indentation on libxlDomainGetJobStats() - s/estimed/estimated/g - Bump version to 1.2.22 --- src/libxl/libxl_driver.c

[libvirt] [PATCH v3 1/8] libxl: implement virDomainGetCPUStats

2015-11-13 Thread Joao Martins
Introduce support for domainGetCPUStats API call and consequently allow us to use `virsh cpu-stats`. The latter returns a more brief output than the one provided by`virsh vcpuinfo`. Signed-off-by: Joao Martins --- Changes since v1: - Remove libxl_vcpuinfo_dispose() in favor or using

[libvirt] [PATCH v3 5/8] libxl: implement virDomainBlockStats

2015-11-13 Thread Joao Martins
ed benefit of getting the number of flush requests. Signed-off-by: Joao Martins --- Changes since v1: - Fix identation issues - Set ret to LIBXL_VBD_SECTOR_SIZE - Reuse VIR_STRDUP error instead of doing virReportError when we fail to set stats->backend - Change virAsprintf(...) error

[libvirt] [PATCH v3 3/8] libxl: implement virDomainInterfaceStats

2015-11-13 Thread Joao Martins
also skip these two steps in case the name of the interface was manually inserted by the adminstrator. For getting the interface statistics we resort to virNetInterfaceStats and let libvirt handle the platform specific nits. Note that the latter is not yet supported in FreeBSD. Signed-off-b

[libvirt] [PATCH v3 2/8] libxl: implement virDomainMemorystats

2015-11-13 Thread Joao Martins
cooperation of the guest and thus currently not supported. We build on the data returned from libxl_domain_info and deliver it in the virDomainMemoryStat format. Signed-off-by: Joao Martins --- Changes since v1: - Cleanup properly after error fetching domain stats - Dispose libxl_dominfo after

[libvirt] [PATCH v3 8/8] libxl: implement virDomainGetJobStats

2015-11-13 Thread Joao Martins
migration has been completed. But because we don't support completed jobs we will deliver an error. Signed-off-by: Joao Martins --- Changes since v1: - Fixed indentation on libxlDomainGetJobStats() - s/estimed/estimated/g - Bump version to 1.2.22 --- src/libxl/libxl_driver.c

[libvirt] [PATCH v3 4/8] util: add virDiskNameParse to handle disk and partition idx

2015-11-13 Thread Joao Martins
ned-off-by: Joao Martins --- Changes since v2: - Sort the newly added symbol in the list --- src/libvirt_private.syms | 1 + src/util/virutil.c | 41 +++ src/util/virutil.h | 1 + tests/utiltest.c | 56 +

[libvirt] [PATCH v3 7/8] libxl: implement virDomainGetJobInfo

2015-11-13 Thread Joao Martins
e node and will return VIR_DOMAIN_JOB_NONE. Though nova handles this case and will migrate it properly instead of crashing. Signed-off-by: Joao Martins --- Changes since v1: - s/inexistent/nonexistent/g in commit message - s/estimed/estimated/g - Bump version to 1.2.22 --- src/libxl/libx

[libvirt] [PATCH v3 0/8] libxl: domain statistics support

2015-11-13 Thread Joao Martins
stack Kilo. Individual patches contain the changelog and comments addressed since v1. Thanks! Joao Martins (8): libxl: implement virDomainGetCPUStats libxl: implement virDomainMemorystats libxl: implement virDomainInterfaceStats util: add virDiskNameParse to handle disk and partition idx libxl:

[libvirt] [PATCH v3 6/8] libxl: implement virConnectGetAllDomainStats

2015-11-13 Thread Joao Martins
Introduce support for connectGetAllDomainStats call that allow us to _all_ domain(s) statistics including network, block, cpus and memory. Changes are rather mechanical and mostly take care of the format to export the data. Signed-off-by: Joao Martins --- Changes since v1: - Rework flags

Re: [libvirt] [PATCH v3 1/8] libxl: implement virDomainGetCPUStats

2015-11-17 Thread Joao Martins
On 11/17/2015 02:59 AM, Jim Fehlig wrote: > On 11/13/2015 06:14 AM, Joao Martins wrote: >> Introduce support for domainGetCPUStats API call and consequently >> allow us to use `virsh cpu-stats`. The latter returns a more brief >> output than the one provided by`virsh vcpuin

Re: [libvirt] [PATCH v3 3/8] libxl: implement virDomainInterfaceStats

2015-11-17 Thread Joao Martins
On 11/17/2015 02:48 AM, Jim Fehlig wrote: > On 11/13/2015 06:14 AM, Joao Martins wrote: >> Introduce support for domainInterfaceStats API call for querying >> network interface statistics. Consequently it also enables the >> use of `virsh domifstat ` command. >&g

Re: [libvirt] [PATCH v3 2/8] libxl: implement virDomainMemorystats

2015-11-18 Thread Joao Martins
On 11/17/2015 11:15 PM, Jim Fehlig wrote: > Joao Martins wrote: >> Introduce support for domainMemoryStats API call, which >> consequently enables the use of `virsh dommemstat` command to >> query for memory statistics of a domain. We support >> the following statisti

Re: [libvirt] [PATCH v3 3/8] libxl: implement virDomainInterfaceStats

2015-11-18 Thread Joao Martins
On 11/17/2015 11:38 PM, Jim Fehlig wrote: > Joao Martins wrote: >> >> On 11/17/2015 02:48 AM, Jim Fehlig wrote: >>> On 11/13/2015 06:14 AM, Joao Martins wrote: >>>> Introduce support for domainInterfaceStats API call for querying >>>> network in

Re: [libvirt] [PATCH v3 1/8] libxl: implement virDomainGetCPUStats

2015-11-18 Thread Joao Martins
On 11/18/2015 05:33 PM, Jim Fehlig wrote: > On 11/16/2015 07:59 PM, Jim Fehlig wrote: >> On 11/13/2015 06:14 AM, Joao Martins wrote: >> @@ -5233,6 +5342,7 @@ static virHypervisorDriver libxlHypervisorDriver = { >> #endif >> .nodeGetFreeMemory = libxl

Re: [libvirt] [PATCH 2/2] libxl: don't unlock virDomainObj if refcnt is 0

2015-11-19 Thread Joao Martins
On 11/18/2015 10:47 PM, Jim Fehlig wrote: > Commit 6472e54a unlocks the virDomainObj even if libxlDomainObjEndJob > returns false, indicating that its refcnt has dropped to 0. > > Signed-off-by: Jim Fehlig > --- > src/libxl/libxl_driver.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions

Re: [libvirt] [PATCH 1/2] libxl: unref libxlDriverConfig object

2015-11-19 Thread Joao Martins
On 11/18/2015 10:47 PM, Jim Fehlig wrote: > Commits b6e19cf4 and 6472e54a missed unref'ing the > libxlDriverConfig object. Add missing calls to virObjectUnref. > > Signed-off-by: Jim Fehlig > --- > src/libxl/libxl_driver.c | 22 -- > 1 file changed, 16 insertions(+), 6 dele

Re: [libvirt] [PATCH v3 5/8] libxl: implement virDomainBlockStats

2015-11-19 Thread Joao Martins
On 11/18/2015 07:01 PM, Jim Fehlig wrote: > On 11/13/2015 06:14 AM, Joao Martins wrote: >> Introduce initial support for domainBlockStats API call that >> allow us to query block device statistics. openstack nova >> uses this API call to query block statistics, alongside &g

Re: [libvirt] [PATCH v3 6/8] libxl: implement virConnectGetAllDomainStats

2015-11-19 Thread Joao Martins
On 11/18/2015 10:03 PM, Jim Fehlig wrote: > On 11/13/2015 06:14 AM, Joao Martins wrote: >> Introduce support for connectGetAllDomainStats call that >> allow us to _all_ domain(s) statistics including network, block, > > allows us to get > >> cpus and memory. Cha

[libvirt] [PATCH 2/3] libxl: rename libxlConsoleCallback

2015-11-19 Thread Joao Martins
. to a more generic name i.e. libxlDomainStartCallback, since it will now cover another case other than the console. Signed-off-by: Joao Martins --- src/libxl/libxl_domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libxl/libxl_domain.c b/src/libxl

[libvirt] [PATCH 1/3] libxl: add libxl_domain_config to libxlDomainObjPrivate

2015-11-19 Thread Joao Martins
This new field in libxlDomainObjPrivate is named "config" and is kept while the domain is active. For now, "config" will be used in libxlDomainStartCallback to set network interface names based on domid and libxl_device_nic devid that is set in the config on domain create.

[libvirt] [PATCH 0/3] libxl: implement virDomainInterfaceStats

2015-11-19 Thread Joao Martins
something more generic and Patch 3 implements virDomainInterfaceStats also taking the previous review (v3 statistics) comments. Regards, Joao Joao Martins (3): libxl: add libxl_domain_config to libxlDomainObjPrivate libxl: Rename libxlConsoleCallback libxl: implement virDomainInterfaceStats

[libvirt] [PATCH 3/3] libxl: implement virDomainInterfaceStats

2015-11-19 Thread Joao Martins
n FreeBSD. Signed-off-by: Joao Martins --- Changes since v3: - Do not unlock vm if libxlDomainObjEndJob() returns false - Set vm->def->net[i]->ifname on DomainStartCallback instead of DomainStart. - Change commit message reflecting the changes on the previous item and mention

Re: [libvirt] [PATCH 3/3] libxl: implement virDomainInterfaceStats

2015-11-20 Thread Joao Martins
On 11/20/2015 07:25 PM, Jim Fehlig wrote: > On 11/19/2015 04:45 PM, Joao Martins wrote: >> Introduce support for domainInterfaceStats API call for querying >> network interface statistics. Consequently it also enables the >> use of `virsh domifstat ` command plus >>

Re: [libvirt] [PATCH 1/3] libxl: add libxl_domain_config to libxlDomainObjPrivate

2015-11-20 Thread Joao Martins
On 11/20/2015 07:05 PM, Jim Fehlig wrote: > On 11/19/2015 04:45 PM, Joao Martins wrote: > > You're not going to be happy with me... > >> This new field in libxlDomainObjPrivate is named "config" >> and is kept while the domain is active. > &g

Re: [libvirt] [PATCH 1/3] libxl: add libxl_domain_config to libxlDomainObjPrivate

2015-11-23 Thread Joao Martins
On 11/23/2015 03:35 PM, Jim Fehlig wrote: > On 11/20/2015 05:40 PM, Joao Martins wrote: >> >> On 11/20/2015 07:05 PM, Jim Fehlig wrote: >>> On 11/19/2015 04:45 PM, Joao Martins wrote: >>> >>> You're not going to be happy with me... >>&g

[libvirt] [PATCH v2 1/2] libxl: rename libxlConsoleCallback

2015-11-23 Thread Joao Martins
. to a more generic name i.e. libxlDomainStartCallback, since it will now cover another case other than the console. Signed-off-by: Joao Martins --- src/libxl/libxl_domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libxl/libxl_domain.c b/src/libxl

[libvirt] [PATCH v2 2/2] libxl: implement virDomainInterfaceStats

2015-11-23 Thread Joao Martins
yet supported in FreeBSD. Signed-off-by: Joao Martins --- Changes since v3: - Use libxl_device_nic_list() for getting each network interface devid in DomainStartCallback. - Improve error reporting by appropriately setting the right error when no interface is known. - Do not unlock vm if libxl

[libvirt] [PATCH v2 0/2] libxl: implement virDomainInterfaceStats

2015-11-23 Thread Joao Martins
taking the previous review (v3 statistics) comments. Changes since v1: - Improve error reporting in case interface is not known - Use libxl_device_nic_list as opposed to libxl_domain_config Regards, Joao Joao Martins (2): libxl: rename libxlConsoleCallback libxl: implement virDomainInterfaceS

Re: [libvirt] [PATCH v2 1/2] libxl: rename libxlConsoleCallback

2015-12-02 Thread Joao Martins
On 12/02/2015 12:08 AM, Jim Fehlig wrote: > On 11/23/2015 11:56 AM, Joao Martins wrote: >> . to a more generic name i.e. libxlDomainStartCallback, >> since it will now cover another case other than the console. >> >> Signed-off-by: Joao Martins >> --- >>

Re: [libvirt] [PATCH v2 2/2] libxl: implement virDomainInterfaceStats

2015-12-02 Thread Joao Martins
On 12/02/2015 12:45 AM, Jim Fehlig wrote: > On 11/23/2015 11:57 AM, Joao Martins wrote: >> Introduce support for domainInterfaceStats API call for querying >> network interface statistics. Consequently it also enables the >> use of `virsh domifstat ` command plus >>

Re: [libvirt] [PATCH v2 2/2] libxl: implement virDomainInterfaceStats

2015-12-02 Thread Joao Martins
On Wed, Dec 02, 2015 at 11:50:41AM -0700, Jim Fehlig wrote: > On 12/02/2015 06:02 AM, Joao Martins wrote: > > > > On 12/02/2015 12:45 AM, Jim Fehlig wrote: > >> On 11/23/2015 11:57 AM, Joao Martins wrote: > >>> Introduce support for domainInterfaceStats

Re: [libvirt] [PATCH v2] libxl: add p2p migration

2015-12-03 Thread Joao Martins
On 12/02/2015 11:27 PM, Jim Fehlig wrote: > On 11/10/2015 08:32 AM, Joao Martins wrote: >> Introduce support for VIR_MIGRATE_PEER2PEER in libxl driver >> for supporting migration in Openstack. Most of the changes >> occur at the source and no modifications at the receiv

Re: [libvirt] [PATCH v3 8/8] libxl: implement virDomainGetJobStats

2015-12-03 Thread Joao Martins
On 12/03/2015 06:48 PM, Jim Fehlig wrote: > Joao Martins wrote: >> Introduces support for domainGetJobStats which has the same >> info as domainGetJobInfo but in a slightly different format. >> Another difference is that virDomainGetJobStats can also >> retriev

[libvirt] [PATCH] libxl: free ifname on migration begin phase

2015-12-04 Thread Joao Martins
. Signed-off-by: Joao Martins --- src/libxl/libxl_domain.c| 32 ++-- src/libxl/libxl_domain.h| 3 +++ src/libxl/libxl_migration.c | 2 ++ 3 files changed, 27 insertions(+), 10 deletions(-) diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index

Re: [libvirt] [PATCH] libxl: free ifname on migration begin phase

2015-12-04 Thread Joao Martins
On 12/04/2015 05:28 PM, Joao Martins wrote: > Commit d2e5538b1 changes virDomainDef to create ifnames > that are autogenerated by libxl, and also clearing them up > on domain cleanup. One place that was missing was also > on migration, when domain xml is sent to dst libvirtd and >

[libvirt] [PATCH v2] libxl: free ifname on libxlDomainMigrationPrepareDef

2015-12-04 Thread Joao Martins
that we don't affect source domain (specially in cases when the migration fails), while still allowing interface stats to be consulted during the migration. Signed-off-by: Joao Martins --- Changes since v1: - Commit message is changed - Clear ifnames on prepare phase as opposed to b

Re: [libvirt] [Xen-devel] [PATCH v2] libxl: free ifname on libxlDomainMigrationPrepareDef

2015-12-06 Thread Joao Martins
On 12/06/2015 06:11 PM, Jim Fehlig wrote: > On 12/06/2015 10:59 AM, Jim Fehlig wrote: >> On 12/06/2015 10:04 AM, Jim Fehlig wrote: >>> On 12/04/2015 12:45 PM, Joao Martins wrote: >>>> Commit d2e5538b1 changes virDomainDef to include ifnames >>>> that

[libvirt] [PATCH v3 0/3] libxl: p2p migration support

2016-01-20 Thread Joao Martins
Hey, This series adds support for p2p migration: Patch 2 and 3 are new in this series and it's purpose is to take the LIBXL_JOB_MODIFY as mentioned in the last review. Changelog in individual patches. Thanks, Joao Joao Martins (3): libxl: add p2p migration libxl: move begin phas

[libvirt] [PATCH v3 1/3] libxl: add p2p migration

2016-01-20 Thread Joao Martins
ence thus it is possible to migrate from a P2P to non-P2P host. Signed-off-by: Joao Martins --- Changes since v2: - Remove Connect Close callback Changes since v1: - Move Begin step to libxlDoMigrateP2P to have all 4 steps together. - Remove if before VIR_FREE(dom_xml) --- src/libxl/libxl_dr

[libvirt] [PATCH v3 2/3] libxl: move begin phase job handling

2016-01-20 Thread Joao Martins
. From libxlMigrationBegin to libxlDomainMigrateBegin3Params(). This is a preparatory patch to be able to begin a job in the perform phase. Signed-off-by: Joao Martins --- src/libxl/libxl_driver.c| 18 +- src/libxl/libxl_migration.c | 16 +++- 2 files changed, 20

[libvirt] [PATCH v3 3/3] libxl: begin job on perform phase

2016-01-20 Thread Joao Martins
Add a job LIBXL_JOB_MODIFY in the perform phase to prevent changes to the domain from happening during migration. Signed-off-by: Joao Martins --- src/libxl/libxl_driver.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl

[libvirt] [PATCH] libxl: dispose libxl_dominfo after libxl_domain_info()

2016-01-20 Thread Joao Martins
As suggested in a previous thread [0] this patch adds some missing calls to libxl_dominfo_dispose when doing some of the libxl_domain_info operations which would otherwise lead to memory leaks. [0] https://www.redhat.com/archives/libvir-list/2015-September/msg00519.html Signed-off-by: Joao

[libvirt] [PATCH RFC 0/2] conf: add net device prefix capability

2016-01-20 Thread Joao Martins
aving this series and the reverted commit applied, I can successfully migrate a domain without seeing the same interface name on both source and destination node. Thoughts? Thanks! Joao [0] https://www.redhat.com/archives/libvir-list/2015-December/msg00279.html Joao Martins (2): conf: add net d

[libvirt] [PATCH RFC 1/2] conf: add net device prefix to capabilities

2016-01-20 Thread Joao Martins
refix will be then copied when domain is created as def->netprefix, which will be then used by virDomainNetDefFormat(). Valid prefixes are VIR_NET_GENERATED_PREFIX or the one announced by the driver. Signed-off-by: Joao Martins --- src/conf/capabilities.c | 21 +

[libvirt] [PATCH RFC 2/2] libxl: set net device prefix

2016-01-20 Thread Joao Martins
Use the newly added virCapabilitiesSetNetPrefix to set the network prefix for the driver. This in return will be use by NetDefFormat() and NetDefParseXML() routines to free any interface name that start with the registered prefix. Signed-off-by: Joao Martins --- src/libxl/libxl_conf.c | 3

Re: [libvirt] [PATCH] libxl: dispose libxl_dominfo after libxl_domain_info()

2016-01-21 Thread Joao Martins
On 01/21/2016 01:41 AM, Jim Fehlig wrote: > Joao Martins wrote: >> As suggested in a previous thread [0] this patch adds some missing calls >> to libxl_dominfo_dispose when doing some of the libxl_domain_info >> operations which would otherwise lead to memory leak

[libvirt] [PATCH v2] libxl: dispose libxl_dominfo after libxl_domain_info()

2016-01-21 Thread Joao Martins
: Joao Martins --- Changes since v1: - Add missing libxl_dominfo_init() on MemoryStats and GetInfo() --- src/libxl/libxl_driver.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 73ed448..560f2a6 100644 --- a

Re: [libvirt] [PATCH RFC 1/2] conf: add net device prefix to capabilities

2016-01-22 Thread Joao Martins
On 01/22/2016 02:50 PM, Daniel P. Berrange wrote: > On Wed, Jan 20, 2016 at 11:41:26PM +0000, Joao Martins wrote: >> In the reverted commit d2e5538b1, the libxl driver was changed to copy >> interface names autogenerated by libxl to the corresponding network def >> in the

Re: [libvirt] [PATCH v3 2/3] libxl: move begin phase job handling

2016-02-02 Thread Joao Martins
On 02/02/2016 01:23 AM, Jim Fehlig wrote: > On 01/20/2016 12:00 PM, Joao Martins wrote: >> . From libxlMigrationBegin to libxlDomainMigrateBegin3Params(). >> This is a preparatory patch to be able to begin a job in the >> perform phase. >> >> Signed-off-by: J

Re: [libvirt] [PATCH v3 2/3] libxl: move begin phase job handling

2016-02-02 Thread Joao Martins
On 02/02/2016 03:39 PM, Jim Fehlig wrote: > Joao Martins wrote: >> >> On 02/02/2016 01:23 AM, Jim Fehlig wrote: >>> On 01/20/2016 12:00 PM, Joao Martins wrote: >>>> . From libxlMigrationBegin to libxlDomainMigrateBegin3Params(). >>>> This is a pr

Re: [libvirt] [PATCH v3 1/3] libxl: add p2p migration

2016-02-03 Thread Joao Martins
On 02/02/2016 11:41 PM, Jim Fehlig wrote: > Joao Martins wrote: >> Introduce support for VIR_MIGRATE_PEER2PEER in libvirt migration. >> Most of the changes occur at the source and no modifications >> at the receiver. >> >> In P2P mode there is only the Perfo

Re: [libvirt] [PATCH] libxl: support feature

2016-02-03 Thread Joao Martins
start > + > +/usr/lib/xen/bin/qemu-system-i386 > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + passwd='123poi'> > + > + > + >

[libvirt] [PATCH RFC v2 0/5] conf: add net device prefix capability

2016-02-03 Thread Joao Martins
st/2016-January/msg00886.html Joao Martins (5): conf: add net device prefix to capabilities conf: add prefix in virDomainNetDefParseXML conf: add caps to virDomainDefFormat* conf: add caps to virDomainSaveConfig libxl: set net device prefix src/bhyve/bhyve_driver.c| 11 ++

[libvirt] [PATCH RFC v2 1/5] conf: add net device prefix to capabilities

2016-02-03 Thread Joao Martins
fixes are VIR_NET_GENERATED_PREFIX or the one announced by the driver. Signed-off-by: Joao Martins --- Changes since v1: - free netprefix in virCapabilitiesDispose() --- src/conf/capabilities.c | 22 ++ src/conf/capabilities.h | 4 src/libvirt_private.syms | 1 + 3

[libvirt] [PATCH RFC v2 4/5] conf: add caps to virDomainSaveConfig

2016-02-03 Thread Joao Martins
virCapabilitiesSetNetPrefix(). Signed-off-by: Joao Martins --- src/bhyve/bhyve_driver.c | 2 +- src/conf/domain_conf.c| 5 +++-- src/conf/domain_conf.h| 1 + src/libxl/libxl_driver.c | 15 --- src/lxc/lxc_driver.c | 20 +++- src/qemu/qemu_blockjob.c | 1

[libvirt] [PATCH RFC v2 3/5] conf: add caps to virDomainDefFormat*

2016-02-03 Thread Joao Martins
And use the newly added caps->host.netprefix (if it exists) for interface names that match the autogenerated target names. Signed-off-by: Joao Martins --- src/bhyve/bhyve_driver.c| 9 - src/conf/domain_conf.c | 28 ++-- src/conf/domain_conf.h |

[libvirt] [PATCH RFC v2 2/5] conf: add prefix in virDomainNetDefParseXML

2016-02-03 Thread Joao Martins
And use the newly added caps->host.netprefix for free interface names that match the autogenerated target names. Signed-off-by: Joao Martins --- src/conf/domain_conf.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_con

[libvirt] [PATCH RFC v2 5/5] libxl: set net device prefix

2016-02-03 Thread Joao Martins
Use the newly added virCapabilitiesSetNetPrefix to set the network prefix for the driver. This in return will be use by NetDefFormat() and NetDefParseXML() routines to free any interface name that start with the registered prefix. Acked-by: Daniel P. Berrange Signed-off-by: Joao Martins

Re: [libvirt] [PATCH RFC 1/2] conf: add net device prefix to capabilities

2016-02-03 Thread Joao Martins
On 01/22/2016 03:46 PM, Joao Martins wrote: > > > On 01/22/2016 02:50 PM, Daniel P. Berrange wrote: >> On Wed, Jan 20, 2016 at 11:41:26PM +0000, Joao Martins wrote: >>> In the reverted commit d2e5538b1, the libxl driver was changed to copy >>> interface na

Re: [libvirt] [PATCH] libxl: support feature

2016-02-04 Thread Joao Martins
On 02/04/2016 01:41 AM, Jim Fehlig wrote: > On 02/03/2016 02:20 PM, Joao Martins wrote: >> >> On 02/03/2016 04:12 AM, Jim Fehlig wrote: >>> Even though the libxl driver advertises in capabilities, >>> it is ignored when set in domXML. Enable hap in the >>

Re: [libvirt] [PATCH RFC v2 3/5] conf: add caps to virDomainDefFormat*

2016-02-04 Thread Joao Martins
On 02/04/2016 11:14 AM, Daniel P. Berrange wrote: > On Wed, Feb 03, 2016 at 09:40:35PM +0000, Joao Martins wrote: >> And use the newly added caps->host.netprefix (if it exists) for >> interface names that match the autogenerated target names. >> >> Signed-off-by

Re: [libvirt] [PATCH] conf: add caps to virDomainObjFormat/SaveStatus

2016-02-04 Thread Joao Martins
vm->def->name); > } > @@ -1173,7 +1173,7 @@ qemuProcessHandlePMWakeup(qemuMonitorPtr mon > ATTRIBUTE_UNUSED, > VIR_DOMAIN_EVENT_STARTED, > > VIR_DOMAIN_EVENT_STARTED_WAKEUP); > > -if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0) { > +if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, > driver->caps) < 0) { > VIR_WARN("Unable to save status on vm %s after wakeup event", > vm->def->name); > } > @@ -1211,7 +1211,7 @@ qemuProcessHandlePMSuspend(qemuMonitorPtr mon > ATTRIBUTE_UNUSED, > VIR_DOMAIN_EVENT_PMSUSPENDED, > VIR_DOMAIN_EVENT_PMSUSPENDED_MEMORY); > > -if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0) { > +if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, > driver->caps) < 0) { > VIR_WARN("Unable to save status on vm %s after suspend event", > vm->def->name); > } > @@ -1245,7 +1245,7 @@ qemuProcessHandleBalloonChange(qemuMonitorPtr mon > ATTRIBUTE_UNUSED, >vm->def->mem.cur_balloon, actual); > vm->def->mem.cur_balloon = actual; > > -if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0) > +if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, driver->caps) > < 0) > VIR_WARN("unable to save domain status with balloon change"); > > virObjectUnlock(vm); > @@ -1280,7 +1280,7 @@ qemuProcessHandlePMSuspendDisk(qemuMonitorPtr mon > ATTRIBUTE_UNUSED, > VIR_DOMAIN_EVENT_PMSUSPENDED, > VIR_DOMAIN_EVENT_PMSUSPENDED_DISK); > > -if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0) { > +if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, > driver->caps) < 0) { > VIR_WARN("Unable to save status on vm %s after suspend event", > vm->def->name); > } > @@ -2901,7 +2901,7 @@ qemuProcessUpdateVideoRamSize(virQEMUDriverPtr driver, > return -1; > > cfg = virQEMUDriverGetConfig(driver); > -ret = virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm); > +ret = virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, > driver->caps); > virObjectUnref(cfg); > > return ret; > @@ -3605,7 +3605,7 @@ qemuProcessReconnect(void *opaque) > goto error; > > /* update domain state XML with possibly updated state in virDomainObj */ > -if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, obj) < 0) > +if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, obj, > driver->caps) < 0) > goto error; > > /* Run an hook to allow admins to do some magic */ > @@ -4854,7 +4854,7 @@ qemuProcessLaunch(virConnectPtr conn, > } > > VIR_DEBUG("Writing early domain status to disk"); > -if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0) > +if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, driver->caps) > < 0) > goto cleanup; > > VIR_DEBUG("Waiting for handshake from child"); > @@ -5066,7 +5066,7 @@ qemuProcessFinishStartup(virConnectPtr conn, > } > > VIR_DEBUG("Writing domain status to disk"); > -if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0) > +if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, driver->caps) > < 0) > goto cleanup; > > if (qemuProcessStartHook(driver, vm, > @@ -5699,7 +5699,7 @@ int qemuProcessAttach(virConnectPtr conn > ATTRIBUTE_UNUSED, > } > > VIR_DEBUG("Writing domain status to disk"); > -if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0) > +if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, driver->caps) > < 0) > goto error; > > /* Run an hook to allow admins to do some magic */ > Hm, you only forgot to change qemuxml2xmltest: diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 19e6c1b..d443f3b 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -137,7 +137,7 @@ testCompareStatusXMLToXMLFiles(const void *opaque) } /* format it back */ -if (!(actual = virDomainObjFormat(driver.xmlopt, obj, +if (!(actual = virDomainObjFormat(driver.xmlopt, obj, driver.caps, VIR_DOMAIN_DEF_FORMAT_SECURE))) { VIR_TEST_DEBUG("Failed to format domain status XML"); goto cleanup; Other than that: Reviewed-by: Joao Martins -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] libxl: support feature

2016-02-04 Thread Joao Martins
On 02/04/2016 06:22 PM, Jim Fehlig wrote: > On 02/04/2016 05:54 AM, Joao Martins wrote: >> >> On 02/04/2016 01:41 AM, Jim Fehlig wrote: >>> On 02/03/2016 02:20 PM, Joao Martins wrote: >>>> On 02/03/2016 04:12 AM, Jim Fehlig wrote: >>>>> Even

[libvirt] [PATCH] conf: add caps to virDomainSnapshotDefFormat

2016-02-04 Thread Joao Martins
The virDomainSnapshotDefFormat calls into virDomainDefFormat, so should be providing a non-NULL virCapsPtr instance. On the qemu driver we change qemuDomainSnapshotWriteMetadata to also include caps since it calls virDomainSnapshotDefFormat. Signed-off-by: Joao Martins --- src/conf

[libvirt] [PATCH] remote: set VIR_TYPED_PARAM_STRING_OKAY on migration

2016-02-05 Thread Joao Martins
ml Signed-off-by: Joao Martins --- src/remote/remote_driver.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 58787cd..7cf61cf 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remot

[libvirt] [PATCH v4 2/2] libxl: keepalive messages support

2016-02-05 Thread Joao Martins
few simplifications. Signed-off-by: Joao Martins --- Note: v4 series requires the patch ("remote: set VIR_TYPED_PARAM_STRING_OKAY on migration") to make migration work again, but it's not reviewed yet. [https://www.redhat.com/archives/libvir-list/2016-February/msg00317.html

[libvirt] [PATCH v4 1/2] libxl: add p2p migration

2016-02-05 Thread Joao Martins
ence thus it is possible to migrate from a P2P to non-P2P host. Signed-off-by: Joao Martins --- Note: v4 series requires the patch ("remote: set VIR_TYPED_PARAM_STRING_OKAY on migration") [0] to make migration work again, but it's not reviewed yet. [https://www.redhat.com/archives/libv

Re: [libvirt] [PATCH] remote: set VIR_TYPED_PARAM_STRING_OKAY on migration

2016-02-09 Thread Joao Martins
On 02/08/2016 02:18 PM, Erik Skultety wrote: > On 05/02/16 20:24, Joao Martins wrote: >> Commit 8cd1d54 ("util: Export remoteSerializeTypedParameters >> internally via util") consolidates both daemon and remote >> driver typed param serialization functions. Thou

  1   2   3   >