Re: [libvirt] [Libguestfs] Quantifying libvirt errors in launching the libguestfs appliance

2016-01-14 Thread Cole Robinson
On 01/14/2016 05:12 AM, Daniel P. Berrange wrote: > On Thu, Jan 14, 2016 at 10:51:47AM +0100, Jiri Denemark wrote: >> On Wed, Jan 13, 2016 at 16:25:14 +0100, Martin Kletzander wrote: >>> On Wed, Jan 13, 2016 at 10:18:42AM +, Richard W.M. Jones wrote: As people may know, we frequently

Re: [libvirt] [PATCH v3 7/7] Implement handling of per-domain bandwidth settings

2016-01-14 Thread Dmitry Guryanov
On Thu, 2016-01-14 at 18:08 +0300, Alexander Burluka wrote: > Signed-off-by: Alexander Burluka > --- >  src/qemu/qemu_cgroup.c | 12 +-- >  src/qemu/qemu_driver.c | 97 > -- >  2 files changed, 96 insertions(+), 13

[libvirt] [PATCH v4 5/7] Rename qemuSetupCgroupVcpuBW to qemuSetupBandwidthCgroup

2016-01-14 Thread Alexander Burluka
This rename is required to reuse this function in per-domain bandwidth setup routine Signed-off-by: Alexander Burluka --- src/qemu/qemu_cgroup.c | 14 +++--- src/qemu/qemu_cgroup.h | 6 +++--- src/qemu/qemu_driver.c | 5 ++--- 3 files changed, 12 insertions(+),

[libvirt] [PATCH v4 3/7] Add error checking on global quota and period

2016-01-14 Thread Alexander Burluka
Signed-off-by: Alexander Burluka --- src/qemu/qemu_command.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 5d3ab3a..087e9ad 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c

[libvirt] [PATCH v4 1/7] Add global period definitions

2016-01-14 Thread Alexander Burluka
This parameter represents top level period cgroup that limits whole domain enforcement period for a quota Signed-off-by: Alexander Burluka --- docs/schemas/domaincommon.rng| 5 + include/libvirt/libvirt-domain.h | 16 src/conf/domain_conf.c

[libvirt] [PATCH v4 4/7] Add global_period and global_quota XML validation test

2016-01-14 Thread Alexander Burluka
--- tests/qemuxml2argvdata/qemuxml2argv-cputune.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cputune.xml b/tests/qemuxml2argvdata/qemuxml2argv-cputune.xml index 813d201..a056089 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-cputune.xml +++

[libvirt] [PATCH v4 0/7] Per domain bandwidth settings

2016-01-14 Thread Alexander Burluka
We decide to make a global per domain bandwidth setting as were discussed in mailing list earlier. This patchset implements hierarchy top level cpu.cfs_period_us and cpu.cfs_quota_us control knob. I've named this parameters as global_period and global_quota. Changes in v2: add XML validation test

[libvirt] [PATCH v4 6/7] Implement qemuSetupGlobalCpuCgroup

2016-01-14 Thread Alexander Burluka
This functions setups per-domain cpu bandwidth parameters Signed-off-by: Alexander Burluka --- src/qemu/qemu_cgroup.c | 54 + src/qemu/qemu_cgroup.h | 1 + src/qemu/qemu_process.c | 4 3 files changed, 59

[libvirt] [PATCH v4 2/7] Add global quota parameter necessary definitions

2016-01-14 Thread Alexander Burluka
This parameter controls the maximum bandwidth to be used within a period for whole domain. Signed-off-by: Alexander Burluka --- docs/schemas/domaincommon.rng| 5 + include/libvirt/libvirt-domain.h | 16 src/conf/domain_conf.c | 19

Re: [libvirt] [Libguestfs] Quantifying libvirt errors in launching the libguestfs appliance

2016-01-14 Thread Richard W.M. Jones
FYI I'm testing the attached patch (written by Jiri Denemark). The tests usually take a day to run. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests

Re: [libvirt] [PATCH] ruby-libvirt: Don't crash in leases_wrap() by passing NULLs to rb_str_new2()

2016-01-14 Thread Dan Williams
On Thu, 2016-01-07 at 11:12 -0600, Dan Williams wrote: > Not all lease values are mandatory, and when they aren't supplied > by the libvirt driver they get set to NULL. That makes > rb_str_new2() bail out. Ping? Does this patch look OK or is there anything else I need to do with it? Is the

Re: [libvirt] [REPOST 3/4] Revert "qemu: do not put a task into machine cgroup"

2016-01-14 Thread John Ferlan
On 01/14/2016 06:59 AM, Daniel P. Berrange wrote: > On Wed, Jan 13, 2016 at 07:29:49AM -0500, John Ferlan wrote: >> This reverts commit a41c00b472efaa192d2deae51ab732e65903238f. >> >> The patch was causing erroneous updates to the /proc/$pid/cgroup file. >> This resulted in some unexpected

Re: [libvirt] [PATCH v2 0/4] Adjustment to recent cgroup/cpuset changes (for 1.3.1)

2016-01-14 Thread Daniel P. Berrange
On Thu, Jan 14, 2016 at 06:14:45PM +0100, Henning Schild wrote: > On Thu, 14 Jan 2016 16:42:12 + > "Daniel P. Berrange" wrote: > > > On Thu, Jan 14, 2016 at 11:21:25AM -0500, John Ferlan wrote: > > > v1: > > >

Re: [libvirt] Quantifying libvirt errors in launching the libguestfs appliance

2016-01-14 Thread Yaniv Kaul
On Wed, Jan 13, 2016 at 2:28 PM, Justin Clift wrote: > On 2016-01-13 10:18, Richard W.M. Jones wrote: > > >> I would be good if libvirt could routinely test the case of multiple >> parallel launches of qemu:///session, since it still contains bugs >> even after Cole's

Re: [libvirt] [Libguestfs] Quantifying libvirt errors in launching the libguestfs appliance

2016-01-14 Thread Daniel P. Berrange
On Thu, Jan 14, 2016 at 10:51:47AM +0100, Jiri Denemark wrote: > On Wed, Jan 13, 2016 at 16:25:14 +0100, Martin Kletzander wrote: > > On Wed, Jan 13, 2016 at 10:18:42AM +, Richard W.M. Jones wrote: > > >As people may know, we frequently encounter errors caused by libvirt > > >when running the

[libvirt] [PATCH v2 0/8] Per domain bandwidth settings

2016-01-14 Thread Alexander Burluka
We decide to make a global per domain bandwidth setting as were discussed in mailing list earlier. This patchset implements hierarchy top level cpu.cfs_period_us and cpu.cfs_quota_us control knob. I've named this parameters as global_period and global_quota. Changes in v2: add XML validation test

[libvirt] [PATCH v2 7/8] Implement qemuSetupGlobalCpuCgroup

2016-01-14 Thread Alexander Burluka
This functions setups per-domain cpu bandwidth parameters Signed-off-by: Alexander Burluka --- src/qemu/qemu_cgroup.c | 64 + src/qemu/qemu_cgroup.h | 1 + src/qemu/qemu_process.c | 4 3 files changed, 69

[libvirt] [PATCH 6/7] Implement qemuSetupGlobalCpuCgroup

2016-01-14 Thread Alexander Burluka
This functions setups per-domain cpu bandwidth parameters Signed-off-by: Alexander Burluka --- src/qemu/qemu_cgroup.c | 64 + src/qemu/qemu_cgroup.h | 1 + src/qemu/qemu_process.c | 4 3 files changed, 69

[libvirt] [PATCH v2 1/8] Add global period definitions

2016-01-14 Thread Alexander Burluka
This parameter represents top level period cgroup that limits whole domain enforcement period for a quota Signed-off-by: Alexander Burluka --- docs/schemas/domaincommon.rng| 5 + include/libvirt/libvirt-domain.h | 16 src/conf/domain_conf.c

[libvirt] [PATCH v2 8/8] Implement handling of per-domain bandwidth settings

2016-01-14 Thread Alexander Burluka
Signed-off-by: Alexander Burluka --- src/qemu/qemu_driver.c | 120 - 1 file changed, 118 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 48aeab6..6a0fa9b 100644 ---

[libvirt] [PATCH v2 2/8] Add global quota parameter necessary definitions

2016-01-14 Thread Alexander Burluka
This parameter controls the maximum bandwidth to be used within a period for whole domain. Signed-off-by: Alexander Burluka --- docs/schemas/domaincommon.rng| 5 + include/libvirt/libvirt-domain.h | 16 src/conf/domain_conf.c | 19

[libvirt] [PATCH 7/7] Implement handling of per-domain bandwidth settings

2016-01-14 Thread Alexander Burluka
Signed-off-by: Alexander Burluka --- src/qemu/qemu_driver.c | 120 - 1 file changed, 118 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 48aeab6..6a0fa9b 100644 ---

[libvirt] [PATCH 4/7] Add new cgroup thread type

2016-01-14 Thread Alexander Burluka
Signed-off-by: Alexander Burluka --- src/util/vircgroup.c | 4 src/util/vircgroup.h | 1 + 2 files changed, 5 insertions(+) diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index 78f519c..b829794 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c

[libvirt] [PATCH v2 4/8] Add global_period and global_quota XML validation test

2016-01-14 Thread Alexander Burluka
--- tests/qemuxml2argvdata/qemuxml2argv-cputune.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cputune.xml b/tests/qemuxml2argvdata/qemuxml2argv-cputune.xml index 813d201..a056089 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-cputune.xml +++

[libvirt] [PATCH v2 5/8] Add new cgroup thread type

2016-01-14 Thread Alexander Burluka
Signed-off-by: Alexander Burluka --- src/util/vircgroup.c | 4 src/util/vircgroup.h | 1 + 2 files changed, 5 insertions(+) diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index 78f519c..b829794 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c

[libvirt] [PATCH v2 3/8] Add error checking on global quota and period

2016-01-14 Thread Alexander Burluka
Signed-off-by: Alexander Burluka --- src/qemu/qemu_command.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 5d3ab3a..087e9ad 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c

Re: [libvirt] [REPOST 0/4] Adjustment to recent cgroup/cpuset changes (for 1.3.1)

2016-01-14 Thread Henning Schild
On Wed, 13 Jan 2016 17:53:16 + "Daniel P. Berrange" wrote: > On Wed, Jan 13, 2016 at 05:51:34PM +0100, Martin Kletzander wrote: > > On Wed, Jan 13, 2016 at 07:29:46AM -0500, John Ferlan wrote: > > >Reposting my cgroup fixes series: > > > > >

Re: [libvirt] Quantifying libvirt errors in launching the libguestfs appliance

2016-01-14 Thread Richard W.M. Jones
On Wed, Jan 13, 2016 at 03:50:47PM +, Richard W.M. Jones wrote: > On Wed, Jan 13, 2016 at 04:25:14PM +0100, Martin Kletzander wrote: > > For each of the kernels, libvirt labels them (with both DAC and selinux > > labels), then proceeds to launching qemu. If this is done parallel, the > > race

Re: [libvirt] [RFC] memory settings interface for containers

2016-01-14 Thread Nikolay Shirokovskiy
On 13.11.2015 13:55, Dmitry Guryanov wrote: > On Thu, 2015-11-12 at 11:11 +0300, Nikolay Shirokovskiy wrote: >> Hi, everyone. >> >> I plan to add means to configure vz containers memory setting and have >> trouble >> getting it done thru libvirt interface. Looks like current interface fits >>

Re: [libvirt] Quantifying libvirt errors in launching the libguestfs appliance

2016-01-14 Thread Jiri Denemark
On Wed, Jan 13, 2016 at 16:25:14 +0100, Martin Kletzander wrote: > On Wed, Jan 13, 2016 at 10:18:42AM +, Richard W.M. Jones wrote: > >As people may know, we frequently encounter errors caused by libvirt > >when running the libguestfs appliance. > > > >I wanted to find out exactly how

Re: [libvirt] [PATCH] conf: Initialize 'deflate' for balloon parse XML

2016-01-14 Thread Ján Tomko
On Wed, Jan 13, 2016 at 05:07:04PM -0500, John Ferlan wrote: > Commit id '7bf3198df' neglected to initialize deflate leading to a > possibility if model allocation/checks fail, then the VIR_FREE(deflate) > would be erroneous. Noted by Jan Tomko. > > Signed-off-by: John Ferlan

Re: [libvirt] [PATCH v2 0/8] Per domain bandwidth settings

2016-01-14 Thread Alexander Burluka
I am sorry, the old version was resend with v2, please ignore it. On 01/14/2016 01:27 PM, Alexander Burluka wrote: We decide to make a global per domain bandwidth setting as were discussed in mailing list earlier. This patchset implements hierarchy top level cpu.cfs_period_us and

Re: [libvirt] [Libguestfs] Quantifying libvirt errors in launching the libguestfs appliance

2016-01-14 Thread Daniel P. Berrange
On Thu, Jan 14, 2016 at 10:24:45AM +, Richard W.M. Jones wrote: > On Thu, Jan 14, 2016 at 10:12:30AM +, Daniel P. Berrange wrote: > > The difference comes in the restore step - where we blow away the > > readonly label and put it back to the original. For disks we never > > restore

Re: [libvirt] [Libguestfs] Quantifying libvirt errors in launching the libguestfs appliance

2016-01-14 Thread Richard W.M. Jones
On Thu, Jan 14, 2016 at 10:12:30AM +, Daniel P. Berrange wrote: > The difference comes in the restore step - where we blow away the > readonly label and put it back to the original. For disks we never > restore readonly/shared labels, but for kernels we do. If we just > kill the restore step

[libvirt] [PATCH 5/7] Rename qemuSetupCgroupVcpuBW to qemuSetupBandwidthCgroup

2016-01-14 Thread Alexander Burluka
This rename is required to reuse this function in per-domain bandwidth setup routine Signed-off-by: Alexander Burluka --- src/qemu/qemu_cgroup.c | 14 +++--- src/qemu/qemu_cgroup.h | 6 +++--- src/qemu/qemu_driver.c | 5 ++--- 3 files changed, 12 insertions(+),

[libvirt] [PATCH v2 6/8] Rename qemuSetupCgroupVcpuBW to qemuSetupBandwidthCgroup

2016-01-14 Thread Alexander Burluka
This rename is required to reuse this function in per-domain bandwidth setup routine Signed-off-by: Alexander Burluka --- src/qemu/qemu_cgroup.c | 14 +++--- src/qemu/qemu_cgroup.h | 6 +++--- src/qemu/qemu_driver.c | 5 ++--- 3 files changed, 12 insertions(+),

Re: [libvirt] [PATCH 4/7] Add new cgroup thread type

2016-01-14 Thread Dmitry Guryanov
On Tue, 2016-01-12 at 19:42 +0300, Alexander Burluka wrote: > Signed-off-by: Alexander Burluka > --- >  src/util/vircgroup.c | 4 >  src/util/vircgroup.h | 1 + >  2 files changed, 5 insertions(+) > > diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c > index

Re: [libvirt] [REPOST 3/4] Revert "qemu: do not put a task into machine cgroup"

2016-01-14 Thread Daniel P. Berrange
On Wed, Jan 13, 2016 at 07:29:49AM -0500, John Ferlan wrote: > This reverts commit a41c00b472efaa192d2deae51ab732e65903238f. > > The patch was causing erroneous updates to the /proc/$pid/cgroup file. > This resulted in some unexpected behavoirs. > > Signed-off-by: John Ferlan

Re: [libvirt] [REPOST 0/4] Adjustment to recent cgroup/cpuset changes (for 1.3.1)

2016-01-14 Thread Henning Schild
On Thu, 14 Jan 2016 11:57:44 + "Daniel P. Berrange" wrote: > On Wed, Jan 13, 2016 at 07:29:46AM -0500, John Ferlan wrote: > > Reposting my cgroup fixes series: > > > > http://www.redhat.com/archives/libvir-list/2016-January/msg00236.html > > > > partially because I

Re: [libvirt] [REPOST 4/4] qemu: Put the emulator cgroup pid into the right task file

2016-01-14 Thread Daniel P. Berrange
On Wed, Jan 13, 2016 at 07:29:50AM -0500, John Ferlan wrote: > Recently reverted commit id 'a41c00b4' was designed to move the setting > of the task file into the right place in the cgroup hierarchy. This patch > applies the portion of the reverted patch which writes the pid to the > right task

Re: [libvirt] [RFC] memory settings interface for containers

2016-01-14 Thread Daniel P. Berrange
On Thu, Nov 12, 2015 at 11:11:31AM +0300, Nikolay Shirokovskiy wrote: > Hi, everyone. > > I plan to add means to configure vz containers memory setting and have trouble > getting it done thru libvirt interface. Looks like current interface fits good > for vm memory managment but its not clear how

Re: [libvirt] [PATCH 6/7] Implement qemuSetupGlobalCpuCgroup

2016-01-14 Thread Dmitry Guryanov
On Thu, 2016-01-14 at 14:28 +0300, Dmitry Guryanov wrote: > On Tue, 2016-01-12 at 19:42 +0300, Alexander Burluka wrote: > > This functions setups per-domain cpu bandwidth parameters > > > > Signed-off-by: Alexander Burluka > > --- > >  src/qemu/qemu_cgroup.c  | 64 > >

Re: [libvirt] [REPOST 0/4] Adjustment to recent cgroup/cpuset changes (for 1.3.1)

2016-01-14 Thread Daniel P. Berrange
On Thu, Jan 14, 2016 at 02:09:52PM +0100, Henning Schild wrote: > On Thu, 14 Jan 2016 12:37:18 + > "Daniel P. Berrange" wrote: > > > On Thu, Jan 14, 2016 at 11:57:44AM +, Daniel P. Berrange wrote: > > > Since this has been puzzelling us for a while, let me recap on

Re: [libvirt] [RFC] memory settings interface for containers

2016-01-14 Thread Maxim Nestratov
14.01.2016 16:01, Daniel P. Berrange пишет: [snip] I agree we should be more explicit about this all in the docs. For initial XML config, we should just raise an error if both and are present and have different values, or possibly just clamp to match . Hmm. And what if a user wants a VM to

Re: [libvirt] [RFC] memory settings interface for containers

2016-01-14 Thread Daniel P. Berrange
On Thu, Jan 14, 2016 at 04:14:49PM +0300, Maxim Nestratov wrote: > 14.01.2016 16:01, Daniel P. Berrange пишет: > > [snip] > >I agree we should be more explicit about this all in the docs. For > >initial XML config, we should just raise an error if both > > and are present and have different

Re: [libvirt] [RFC] memory settings interface for containers

2016-01-14 Thread Maxim Nestratov
14.01.2016 16:16, Daniel P. Berrange пишет: On Thu, Jan 14, 2016 at 04:14:49PM +0300, Maxim Nestratov wrote: 14.01.2016 16:01, Daniel P. Berrange пишет: [snip] I agree we should be more explicit about this all in the docs. For initial XML config, we should just raise an error if both and

Re: [libvirt] [PATCH 6/7] Implement qemuSetupGlobalCpuCgroup

2016-01-14 Thread Dmitry Guryanov
On Tue, 2016-01-12 at 19:42 +0300, Alexander Burluka wrote: > This functions setups per-domain cpu bandwidth parameters > > Signed-off-by: Alexander Burluka > --- >  src/qemu/qemu_cgroup.c  | 64 > + >  

Re: [libvirt] [REPOST 2/4] qemu: Add check for NULL cgroup return from virCgroupNewMachine

2016-01-14 Thread Daniel P. Berrange
On Wed, Jan 13, 2016 at 07:29:48AM -0500, John Ferlan wrote: > Commit id '71ce4759' altered the cgroup processing with respect to the > call to virCgroupAddTask being moved out from lower layers into the calling > layers especially for qemu processing of emulator and vcpu threads. > > What was

Re: [libvirt] [REPOST 1/4] cgroup: Fix possible bug as a result of code motion for vcpu cgroup setup

2016-01-14 Thread Daniel P. Berrange
On Wed, Jan 13, 2016 at 07:29:47AM -0500, John Ferlan wrote: > Commit id '90b721e43' moved where the virCgroupAddTask was made until > after the check for the vcpupin checks. However, in doing so it missed > an option where if the cpumap didn't exist, then the code would continue > back to the top

Re: [libvirt] [REPOST 0/4] Adjustment to recent cgroup/cpuset changes (for 1.3.1)

2016-01-14 Thread Daniel P. Berrange
On Thu, Jan 14, 2016 at 11:57:44AM +, Daniel P. Berrange wrote: > Since this has been puzzelling us for a while, let me recap on the > cgroup setup in general. > > First, I'll describe how it used to work *before* Henning's patches > were merged, on a systemd based host. > > - The QEMU

Re: [libvirt] [PATCH 4/7] Add new cgroup thread type

2016-01-14 Thread Daniel P. Berrange
On Thu, Jan 14, 2016 at 01:27:59PM +0300, Alexander Burluka wrote: > Signed-off-by: Alexander Burluka > --- > src/util/vircgroup.c | 4 > src/util/vircgroup.h | 1 + > 2 files changed, 5 insertions(+) > > diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c >

Re: [libvirt] [REPOST 0/4] Adjustment to recent cgroup/cpuset changes (for 1.3.1)

2016-01-14 Thread Henning Schild
On Thu, 14 Jan 2016 12:37:18 + "Daniel P. Berrange" wrote: > On Thu, Jan 14, 2016 at 11:57:44AM +, Daniel P. Berrange wrote: > > Since this has been puzzelling us for a while, let me recap on the > > cgroup setup in general. > > > > First, I'll describe how it used

Re: [libvirt] [REPOST 0/4] Adjustment to recent cgroup/cpuset changes (for 1.3.1)

2016-01-14 Thread Daniel P. Berrange
On Wed, Jan 13, 2016 at 07:29:46AM -0500, John Ferlan wrote: > Reposting my cgroup fixes series: > > http://www.redhat.com/archives/libvir-list/2016-January/msg00236.html > > partially because I originally forgot to CC the author (Henning Schild) > of the original series for which these patch

Re: [libvirt] [RFC] memory settings interface for containers

2016-01-14 Thread Daniel P. Berrange
On Fri, Nov 13, 2015 at 01:55:15PM +0300, Dmitry Guryanov wrote: > On Thu, 2015-11-12 at 11:11 +0300, Nikolay Shirokovskiy wrote: > > Hi, everyone. > > > > I plan to add means to configure vz containers memory setting and have > > trouble > > getting it done thru libvirt interface. Looks like

Re: [libvirt] [RFC] memory settings interface for containers

2016-01-14 Thread Nikolay Shirokovskiy
On 14.01.2016 16:01, Daniel P. Berrange wrote: > On Thu, Nov 12, 2015 at 11:11:31AM +0300, Nikolay Shirokovskiy wrote: >> Hi, everyone. >> >> I plan to add means to configure vz containers memory setting and have >> trouble >> getting it done thru libvirt interface. Looks like current interface

Re: [libvirt] [RFC] memory settings interface for containers

2016-01-14 Thread Daniel P. Berrange
On Thu, Jan 14, 2016 at 04:23:59PM +0300, Nikolay Shirokovskiy wrote: > > > On 14.01.2016 16:01, Daniel P. Berrange wrote: > > On Thu, Nov 12, 2015 at 11:11:31AM +0300, Nikolay Shirokovskiy wrote: > >> Hi, everyone. > >> > >> I plan to add means to configure vz containers memory setting and have

Re: [libvirt] [RFC] memory settings interface for containers

2016-01-14 Thread Nikolay Shirokovskiy
On 14.01.2016 16:31, Daniel P. Berrange wrote: > On Thu, Jan 14, 2016 at 04:23:59PM +0300, Nikolay Shirokovskiy wrote: >> >> >> On 14.01.2016 16:01, Daniel P. Berrange wrote: >>> On Thu, Nov 12, 2015 at 11:11:31AM +0300, Nikolay Shirokovskiy wrote: Hi, everyone. I plan to add

[libvirt] [PATCH] leaseshelper: fix crash when no mac is specified

2016-01-14 Thread Ján Tomko
If dnsmasq specified DNSMASQ_IAID (so we're dealing with an IPv6 lease) but no DNSMASQ_MAC, we skip creation of the new lease object. Also skip adding it to the leases array. https://bugzilla.redhat.com/show_bug.cgi?id=1202350 https://bugzilla.redhat.com/show_bug.cgi?id=1292941 ---

[libvirt] [PATCH v2 1/4] Revert "qemu: do not put a task into machine cgroup"

2016-01-14 Thread John Ferlan
This reverts commit a41c00b472efaa192d2deae51ab732e65903238f. After much testing and upstream discussion this has been deemed to be the incorrect operation since it means we no longer have any guarantee about which resource controllers the QEMU processes in general are in. Signed-off-by: John

[libvirt] [PATCH v2 2/4] Revert "util: cgroups do not implicitly add task to new machine cgroup"

2016-01-14 Thread John Ferlan
This reverts commit 71ce475967b3523882b0e1a0f649fdbea5abf9d5. Since commit id 'a41c00b47' has been reverted, this no longer is necessary Signed-off-by: John Ferlan --- src/lxc/lxc_cgroup.c | 11 --- src/qemu/qemu_cgroup.c | 11 --- src/util/vircgroup.c |

[libvirt] [PATCH v2 0/4] Adjustment to recent cgroup/cpuset changes (for 1.3.1)

2016-01-14 Thread John Ferlan
v1: http://www.redhat.com/archives/libvir-list/2016-January/msg00511.html As discussed during the replies of the v1 - revert Henning's first two patches, plus the one I made as a result of those. Patch 4/4 is already ACK'd John Ferlan (4): Revert "qemu: do not put a task into machine cgroup"

[libvirt] [PATCH v4 7/7] Implement handling of per-domain bandwidth settings

2016-01-14 Thread Alexander Burluka
Signed-off-by: Alexander Burluka --- src/qemu/qemu_driver.c | 97 -- 1 file changed, 95 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 48aeab6..1932d7f 100644 ---

[libvirt] [PATCH 24/34] conf: Extract code that formats

2016-01-14 Thread Peter Krempa
virDomainDefFormatInternal is growing rather large. Extract the cputune formatter into a separate function. --- src/conf/domain_conf.c | 230 +++-- 1 file changed, 125 insertions(+), 105 deletions(-) diff --git a/src/conf/domain_conf.c

[libvirt] [PATCH 10/34] qemu: Don't use priv->ncpus to iterate cgroup setting

2016-01-14 Thread Peter Krempa
Iterate over all cpus skipping inactive ones. --- src/qemu/qemu_driver.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 2300c7e..3102fc2 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@

[libvirt] [PATCH 34/34] qemu: iothread: Reuse qemuProcessSetupIOThread in iothread hotplug

2016-01-14 Thread Peter Krempa
Since majority of the steps is shared, the function can be reused to simplify code. Similarly to previous path doing this same for vCPUs this also fixes the a similar bug (which is not tracked). --- src/qemu/qemu_driver.c | 101 + 1 file changed, 2

[libvirt] [PATCH 21/34] conf: remove unused cpu pinning helpers and data structures

2016-01-14 Thread Peter Krempa
Now that the pinning info is stored elsewhere we can delete all the obsolete code. --- src/conf/domain_conf.c | 136 --- src/conf/domain_conf.h | 27 -- src/libvirt_private.syms | 6 --- 3 files changed, 169 deletions(-) diff --git

[libvirt] [PATCH 26/34] util: bitmap: Introduce bitmap subtraction

2016-01-14 Thread Peter Krempa
Performs binary subtraction of two bitmaps. Stores result in the first operand. --- src/libvirt_private.syms | 1 + src/util/virbitmap.c | 21 ++ src/util/virbitmap.h | 3 +++ tests/virbitmaptest.c| 55 4 files

[libvirt] [PATCH 29/34] conf: Don't store vcpusched orthogonally to other vcpu info

2016-01-14 Thread Peter Krempa
Due to bad design the vcpu sched element is orthogonal to the way how the data belongs to the corresponding objects. Now that vcpus are a struct that allow to store other info too, let's convert the data to the sane structure. The helpers for the conversion are made universal so that they can be

[libvirt] [PATCH 20/34] conf: Store cpu pinning data in def->vcpus

2016-01-14 Thread Peter Krempa
Now with the new struct the data can be stored in a much saner place. --- src/conf/domain_conf.c | 131 ++-- src/conf/domain_conf.h | 3 +- src/libxl/libxl_domain.c | 17 +++--- src/libxl/libxl_driver.c | 39 ++ src/qemu/qemu_cgroup.c

[libvirt] [PATCH 23/34] conf: disallow empty cpuset for emulatorpin

2016-01-14 Thread Peter Krempa
It's disallowed in the API. --- src/conf/domain_conf.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 1036057..e27de96 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -14246,8 +14246,18 @@

[libvirt] [PATCH 15/34] qemu: Reuse qemuDomainDetectVcpuPids in cpu hot(un)plug

2016-01-14 Thread Peter Krempa
Now that qemuDomainDetectVcpuPids is able to refresh the vCPU pid information it can be reused in the hotplug and hotunplug code paths rather than open-coding a very similar algorithm. A slight algoirithm change is necessary for unplug since the vCPU needs to be marked offline prior to calling

[libvirt] [PATCH 18/34] conf: Split out logic to determine whether cpupin was provided

2016-01-14 Thread Peter Krempa
Add a helper function to do the checking. The check is used when determining whether the element should be formatted. --- src/conf/domain_conf.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index

[libvirt] [PATCH 32/34] qemu: vcpu: Reuse qemuProcessSetupVcpu in vcpu hotplug

2016-01-14 Thread Peter Krempa
Since majority of the steps is shared, the function can be reused to simplify code. Additionally this resolves https://bugzilla.redhat.com/show_bug.cgi?id=1244128 since the cpu bandwidth limiting with cgroups would not be set on the hotplug path. --- src/qemu/qemu_driver.c | 35

[libvirt] [PATCH 33/34] qemu: iothread: Aggregate code to set IOTrhead tuning

2016-01-14 Thread Peter Krempa
Rather than iterating 3 times for various settings this function aggregates all the code into single place. One of the other advantages is that it can then be reused for properly setting IOThread info on hotplug. --- src/qemu/qemu_cgroup.c | 93 -

[libvirt] [PATCH 03/34] vz: Fix invalid iteration of def->cputune.vcpupin

2016-01-14 Thread Peter Krempa
The array doesn't necessarily have the same cardinality as the count of vCPUs for a domain. Iterating it can cause access beyond the end of the array. --- src/vz/vz_sdk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index b78c413..d610979

[libvirt] [PATCH 12/34] qemu: cpu hotplug: Set vcpu state directly in the new structure

2016-01-14 Thread Peter Krempa
Avoid using virDomainDefSetVcpus when we can set it directly in the structure. --- src/qemu/qemu_driver.c | 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index f3844d6..3aa49f2 100644 ---

[libvirt] [PATCH 06/34] cgroup: Clean up virCgroupGetPercpuStats

2016-01-14 Thread Peter Krempa
Use 'ret' for return variable name, clarify use of 'param_idx' and avoid unnecessary 'success' label. No functional changes. --- src/util/vircgroup.c | 42 +- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/util/vircgroup.c

[libvirt] [PATCH 05/34] (qemu|lxc)DomainGetCPUStats: Clean up

2016-01-14 Thread Peter Krempa
Remove unnecessary condition and variable. --- src/lxc/lxc_driver.c | 3 +-- src/qemu/qemu_driver.c | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index 24b9622..67088c8 100644 --- a/src/lxc/lxc_driver.c +++

[libvirt] [PATCH 02/34] qemu: process: Disallow VMs with 0 vcpus

2016-01-14 Thread Peter Krempa
Counterintuitively the user would end up with a VM with maximum number of vCPUs available. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1290324 --- src/qemu/qemu_process.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index

[libvirt] [PATCH 07/34] conf: Add helper to retrieve bitmap of active vcpus for a definition

2016-01-14 Thread Peter Krempa
In some cases it may be better to have a bitmap representing state of individual vcpus rather than iterating the definition. The new helper creates a bitmap representing the state from the domain definition. --- src/conf/domain_conf.c | 24 src/conf/domain_conf.h | 1

[libvirt] [PATCH 30/34] conf: Fix how iothread scheduler info is stored

2016-01-14 Thread Peter Krempa
Similarly to previous commit change the way how iothread scheduler info is stored and clean up a lot of unnecessary code. --- src/conf/domain_conf.c | 141 +++-- src/conf/domain_conf.h | 8 +- src/libvirt_private.syms

[libvirt] [PATCH 27/34] conf: Add helper to return a bitmap of active iothread ids

2016-01-14 Thread Peter Krempa
--- src/conf/domain_conf.c | 29 + src/conf/domain_conf.h | 3 +++ src/libvirt_private.syms | 1 + 3 files changed, 33 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index b18ce8d..14b6c80 100644 --- a/src/conf/domain_conf.c +++

[libvirt] [PATCH 22/34] conf: disallow empty cpusets for vcpu pinning when parsing XML

2016-01-14 Thread Peter Krempa
They are disallowed in the pinning API and as default cpuset. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1293241 --- src/conf/domain_conf.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 4b4a36e..1036057 100644 ---

[libvirt] [PATCH 25/34] util: buffer: Sanitize comment for virBufferAddBuffer

2016-01-14 Thread Peter Krempa
Idioms are usually weird and obscure when translated literally. --- src/util/virbuffer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/virbuffer.c b/src/util/virbuffer.c index 55dad37..43cd1a7 100644 --- a/src/util/virbuffer.c +++ b/src/util/virbuffer.c @@ -180,8

[libvirt] [PATCH 19/34] test: Touch up error message when attempting to pin invalid vCPU

2016-01-14 Thread Peter Krempa
Report error: invalid argument: requested vcpu '100' is not present in the domain instead of error: invalid argument: requested vcpu is higher than allocated vcpus --- src/test/test_driver.c | 5 +++-- tests/vcpupin | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git

[libvirt] [PATCH 28/34] conf: Extract code for parsing thread resource scheduler info

2016-01-14 Thread Peter Krempa
As the scheduler info elements are represented orthogonally to how it makes sense to actually store the information, the extracted code will be later used when converting between XML and internal definitions. --- src/conf/domain_conf.c | 69 -- 1

[libvirt] [PATCH 01/34] qemu: process: refactor and rename qemuValidateCpuMax to qemuValidateCpuCount

2016-01-14 Thread Peter Krempa
Next patch will add minimum checking, so use a more generic name. Refactor return values to the commonly used semantics. --- src/qemu/qemu_process.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c

[libvirt] [PATCH 31/34] qemu: vcpu: Aggregate code to set vCPU tuning

2016-01-14 Thread Peter Krempa
Rather than iterating 3 times for various settings this function aggregates all the code into single place. One of the other advantages is that it can then be reused for properly setting vCPU info on hotplug. --- src/qemu/qemu_cgroup.c | 98 --- src/qemu/qemu_cgroup.h | 1

Re: [libvirt] [PATCH v2 0/4] Adjustment to recent cgroup/cpuset changes (for 1.3.1)

2016-01-14 Thread Henning Schild
On Thu, 14 Jan 2016 16:42:12 + "Daniel P. Berrange" wrote: > On Thu, Jan 14, 2016 at 11:21:25AM -0500, John Ferlan wrote: > > v1: > > http://www.redhat.com/archives/libvir-list/2016-January/msg00511.html > > > > As discussed during the replies of the v1 - revert

Re: [libvirt] [PATCH] ruby-libvirt: Don't crash in leases_wrap() by passing NULLs to rb_str_new2()

2016-01-14 Thread Chris Lalancette
On Thu, Jan 14, 2016 at 9:38 PM, Chris Lalancette wrote: > Hi! > > On Thu, Jan 14, 2016 at 2:56 PM, Dan Williams wrote: > >> On Thu, 2016-01-14 at 13:19 -0500, Laine Stump wrote: >> > On 01/14/2016 11:01 AM, Dan Williams wrote: >> > > On Thu, 2016-01-07

[libvirt] Release candidate 2 of libvirt-1.3.1

2016-01-14 Thread Daniel Veillard
Seems we don't have the fix for OSX/BSD in yet but I decided to push the new release candidate out, signed tarball and rpms are at the usual place, and it's tagged in git: ftp://libvirt.org/libvirt/ Seems to work for me but obviously more testing is better, I will also wait for the OSX/BSD

Re: [libvirt] Release candidate 2 of libvirt-1.3.1

2016-01-14 Thread Roman Bogorodskiy
[trim libvirt-announce@] Daniel Veillard wrote: > Seems we don't have the fix for OSX/BSD in yet but I decided to > push the new release candidate out, signed tarball and rpms are at the > usual place, and it's tagged in git: > >ftp://libvirt.org/libvirt/ > > Seems to work for me but

Re: [libvirt] [PATCH] ruby-libvirt: Don't crash in leases_wrap() by passing NULLs to rb_str_new2()

2016-01-14 Thread Chris Lalancette
Hi! On Thu, Jan 14, 2016 at 2:56 PM, Dan Williams wrote: > On Thu, 2016-01-14 at 13:19 -0500, Laine Stump wrote: > > On 01/14/2016 11:01 AM, Dan Williams wrote: > > > On Thu, 2016-01-07 at 11:12 -0600, Dan Williams wrote: > > > > Not all lease values are mandatory, and when

Re: [libvirt] Trying to debug "Received unexpected event 3" from libvirt

2016-01-14 Thread Yaniv Kaul
On Fri, Jan 8, 2016 at 7:00 PM, Michal Privoznik wrote: > On 30.12.2015 11:30, Yaniv Kaul wrote: > > Hi, > > > > Hey, > > sorry for getting to you so late. > > > I'm trying to debug this issue, which may be affecting my inability to > > perform live snapshot. > > 1. I'm not

Re: [libvirt] Trying to debug "Received unexpected event 3" from libvirt

2016-01-14 Thread Michal Privoznik
On 14.01.2016 19:51, Yaniv Kaul wrote: > On Fri, Jan 8, 2016 at 7:00 PM, Michal Privoznik > wrote: > >> > On 30.12.2015 11:30, Yaniv Kaul wrote: >>> > > Hi, >>> > > >> > >> > Hey, >> > >> > sorry for getting to you so late. >> > >>> > > I'm trying to debug this issue, which

Re: [libvirt] [PATCH] ruby-libvirt: Don't crash in leases_wrap() by passing NULLs to rb_str_new2()

2016-01-14 Thread Laine Stump
On 01/14/2016 11:01 AM, Dan Williams wrote: On Thu, 2016-01-07 at 11:12 -0600, Dan Williams wrote: Not all lease values are mandatory, and when they aren't supplied by the libvirt driver they get set to NULL. That makes rb_str_new2() bail out. Ping? Does this patch look OK or is there

Re: [libvirt] [PATCH] ruby-libvirt: Don't crash in leases_wrap() by passing NULLs to rb_str_new2()

2016-01-14 Thread Dan Williams
On Thu, 2016-01-14 at 13:19 -0500, Laine Stump wrote: > On 01/14/2016 11:01 AM, Dan Williams wrote: > > On Thu, 2016-01-07 at 11:12 -0600, Dan Williams wrote: > > > Not all lease values are mandatory, and when they aren't supplied > > > by the libvirt driver they get set to NULL. That makes > > >

Re: [libvirt] [PATCH v2 8/8] Implement handling of per-domain bandwidth settings

2016-01-14 Thread Dmitry Guryanov
On Thu, 2016-01-14 at 13:28 +0300, Alexander Burluka wrote: > Signed-off-by: Alexander Burluka > --- >  src/qemu/qemu_driver.c | 120 > - >  1 file changed, 118 insertions(+), 2 deletions(-) > > diff --git

[libvirt] [PATCH v3 2/7] Add global quota parameter necessary definitions

2016-01-14 Thread Alexander Burluka
This parameter controls the maximum bandwidth to be used within a period for whole domain. Signed-off-by: Alexander Burluka --- docs/schemas/domaincommon.rng| 5 + include/libvirt/libvirt-domain.h | 16 src/conf/domain_conf.c | 19

[libvirt] [PATCH v3 4/7] Add global_period and global_quota XML validation test

2016-01-14 Thread Alexander Burluka
--- tests/qemuxml2argvdata/qemuxml2argv-cputune.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cputune.xml b/tests/qemuxml2argvdata/qemuxml2argv-cputune.xml index 813d201..a056089 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-cputune.xml +++

  1   2   >