Re: [libvirt] [PATCH v5 4/5] storage: Support chap authentication for iscsi pool

2013-07-25 Thread Ján Tomko
On 07/24/2013 10:06 PM, John Ferlan wrote: On 07/24/2013 05:57 AM, Daniel P. Berrange wrote: On Wed, Jul 24, 2013 at 10:25:06AM +0200, Ján Tomko wrote: ...snip... Both secret and qemu drivers are registered after the storage driver on libvirtd startup, so autostarting these pools will only

Re: [libvirt] [PATCH] virdbustest: Don't pass number of arguments as long long

2013-07-25 Thread Daniel Veillard
On Wed, Jul 24, 2013 at 03:41:17PM -0600, Eric Blake wrote: On 07/24/2013 03:29 PM, Guido Günther wrote: since sizeof(size_t) != sizeof(long long) on 32bit archs. This unbreaks virdbustest which otherwise fails like: +++ b/tests/virdbustest.c @@ -195,7 +195,7 @@ static int

Re: [libvirt] [PATCH] virdbustest: Don't pass number of arguments as long long

2013-07-25 Thread Guido Günther
Hi Eric, On Wed, Jul 24, 2013 at 03:41:17PM -0600, Eric Blake wrote: On 07/24/2013 03:29 PM, Guido Günther wrote: since sizeof(size_t) != sizeof(long long) on 32bit archs. This unbreaks virdbustest which otherwise fails like: +++ b/tests/virdbustest.c @@ -195,7 +195,7 @@ static

[libvirt] Use flock() instead of fcntl()

2013-07-25 Thread David Weber
Hi, we are interested in using virtlockd on an OCFS2 shared filesystem. We are now facing the problem that virtlockd uses fcntl() locks which aren't supported by OCFS2 with the o2cb cluster stack and we want to avoid using indirect leases. OCFS2 instead supports flock() which is quite similar

Re: [libvirt] [Qemu-devel] [PATCH 4/7] qemu: Add monitor APIs to fetch CPUID data from QEMU

2013-07-25 Thread Andreas Färber
Am 24.07.2013 20:25, schrieb Eduardo Habkost: In addition to the -cpu host KVM initialization problem, this is an additional problem with the current interfaces provided by QEMU: 1) libvirt needs to query data that depend on chosen machine-type and CPU model 2) Some machine-type behavior

[libvirt] RFC: Introduce API to return configuration/state paths of the network driver

2013-07-25 Thread Nehal J. Wani
Currently, there is no API which returns configuration/state paths of the network driver. Although it is a private implementation of the network driver, I don't see any harm in making the locations public because although the locations might change, there will always be a location for these files.

Re: [libvirt] [PATCH] tests: PCI controller checks

2013-07-25 Thread Daniel P. Berrange
On Wed, Jul 24, 2013 at 03:29:03PM -0600, Eric Blake wrote: On 07/22/2013 08:48 AM, Ján Tomko wrote: Check if PCI bridges with duplicate indexes are rejected. PCI root controllers with non-zero indexes or addresses should also be rejected. ---

Re: [libvirt] [PATCH v5 4/5] storage: Support chap authentication for iscsi pool

2013-07-25 Thread Daniel P. Berrange
On Thu, Jul 25, 2013 at 08:10:46AM +0200, Ján Tomko wrote: On 07/24/2013 10:06 PM, John Ferlan wrote: On 07/24/2013 05:57 AM, Daniel P. Berrange wrote: On Wed, Jul 24, 2013 at 10:25:06AM +0200, Ján Tomko wrote: ...snip... Both secret and qemu drivers are registered after the storage

Re: [libvirt] [PATCH] virdbustest: Don't pass number of arguments as long long

2013-07-25 Thread Daniel P. Berrange
On Wed, Jul 24, 2013 at 03:41:17PM -0600, Eric Blake wrote: On 07/24/2013 03:29 PM, Guido Günther wrote: since sizeof(size_t) != sizeof(long long) on 32bit archs. This unbreaks virdbustest which otherwise fails like: +++ b/tests/virdbustest.c @@ -195,7 +195,7 @@ static int

Re: [libvirt] [PATCH 00/13] Support use of systemd-machined for cgroups

2013-07-25 Thread Gao feng
On 07/23/2013 11:21 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com This is a patch series which adds support for using systemd-machined for creating cgroups. The first 12 patches are all really just cleanups and refactoring. The actual systemd code is the last

Re: [libvirt] Use flock() instead of fcntl()

2013-07-25 Thread Daniel P. Berrange
On Thu, Jul 25, 2013 at 08:23:24AM +, David Weber wrote: Hi, we are interested in using virtlockd on an OCFS2 shared filesystem. We are now facing the problem that virtlockd uses fcntl() locks which aren't supported by OCFS2 with the o2cb cluster stack and we want to avoid using

Re: [libvirt] RFC: Introduce API to return configuration/state paths of the network driver

2013-07-25 Thread Daniel P. Berrange
On Thu, Jul 25, 2013 at 02:02:36PM +0530, Nehal J. Wani wrote: Currently, there is no API which returns configuration/state paths of the network driver. Although it is a private implementation of the network driver, I don't see any harm in making the locations public because although the

Re: [libvirt] [PATCH 00/13] Support use of systemd-machined for cgroups

2013-07-25 Thread Daniel P. Berrange
On Thu, Jul 25, 2013 at 05:30:20PM +0800, Gao feng wrote: On 07/23/2013 11:21 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com This is a patch series which adds support for using systemd-machined for creating cgroups. The first 12 patches are all really just

Re: [libvirt] [PATCH 4/7] qemu: Add monitor APIs to fetch CPUID data from QEMU

2013-07-25 Thread Daniel P. Berrange
On Wed, Jul 24, 2013 at 03:25:19PM -0300, Eduardo Habkost wrote: On Tue, Jul 23, 2013 at 07:32:46PM +0200, Jiri Denemark wrote: On Tue, Jul 23, 2013 at 19:28:38 +0200, Jiri Denemark wrote: On Tue, Jul 23, 2013 at 17:32:42 +0100, Daniel Berrange wrote: On Tue, Jul 23, 2013 at 06:11:33PM

Re: [libvirt] [PATCH 00/13] Support use of systemd-machined for cgroups

2013-07-25 Thread Daniel P. Berrange
On Thu, Jul 25, 2013 at 05:48:54PM +0800, Gao feng wrote: On 07/25/2013 05:36 PM, Daniel P. Berrange wrote: On Thu, Jul 25, 2013 at 05:30:20PM +0800, Gao feng wrote: On 07/23/2013 11:21 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com This is a patch series

Re: [libvirt] [PATCH 00/13] Support use of systemd-machined for cgroups

2013-07-25 Thread Gao feng
On 07/25/2013 05:36 PM, Daniel P. Berrange wrote: On Thu, Jul 25, 2013 at 05:30:20PM +0800, Gao feng wrote: On 07/23/2013 11:21 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com This is a patch series which adds support for using systemd-machined for creating

Re: [libvirt] Use flock() instead of fcntl()

2013-07-25 Thread David Weber
Thank you for your quick response! Am Donnerstag, 25. Juli 2013, 10:31:40 schrieb Daniel P. Berrange: On Thu, Jul 25, 2013 at 08:23:24AM +, David Weber wrote: Hi, we are interested in using virtlockd on an OCFS2 shared filesystem. We are now facing the problem that virtlockd uses

Re: [libvirt] Use flock() instead of fcntl()

2013-07-25 Thread Daniel P. Berrange
On Thu, Jul 25, 2013 at 12:07:44PM +0200, David Weber wrote: Thank you for your quick response! Am Donnerstag, 25. Juli 2013, 10:31:40 schrieb Daniel P. Berrange: On Thu, Jul 25, 2013 at 08:23:24AM +, David Weber wrote: Hi, we are interested in using virtlockd on an OCFS2

Re: [libvirt] RFC: Introduce API to return configuration/state paths of the network driver

2013-07-25 Thread Osier Yang
On 25/07/13 17:35, Daniel P. Berrange wrote: On Thu, Jul 25, 2013 at 02:02:36PM +0530, Nehal J. Wani wrote: Currently, there is no API which returns configuration/state paths of the network driver. Although it is a private implementation of the network driver, I don't see any harm in making the

Re: [libvirt] RFC: Introduce API to return configuration/state paths of the network driver

2013-07-25 Thread Daniel P. Berrange
On Thu, Jul 25, 2013 at 06:43:00PM +0800, Osier Yang wrote: On 25/07/13 17:35, Daniel P. Berrange wrote: On Thu, Jul 25, 2013 at 02:02:36PM +0530, Nehal J. Wani wrote: Currently, there is no API which returns configuration/state paths of the network driver. Although it is a private

Re: [libvirt] RFC: Introduce API to return configuration/state paths of the network driver

2013-07-25 Thread Osier Yang
On 25/07/13 18:53, Daniel P. Berrange wrote: On Thu, Jul 25, 2013 at 06:43:00PM +0800, Osier Yang wrote: On 25/07/13 17:35, Daniel P. Berrange wrote: On Thu, Jul 25, 2013 at 02:02:36PM +0530, Nehal J. Wani wrote: Currently, there is no API which returns configuration/state paths of the

Re: [libvirt] RFC: Introduce API to return configuration/state paths of the network driver

2013-07-25 Thread Daniel P. Berrange
On Thu, Jul 25, 2013 at 07:01:05PM +0800, Osier Yang wrote: On 25/07/13 18:53, Daniel P. Berrange wrote: On Thu, Jul 25, 2013 at 06:43:00PM +0800, Osier Yang wrote: On 25/07/13 17:35, Daniel P. Berrange wrote: On Thu, Jul 25, 2013 at 02:02:36PM +0530, Nehal J. Wani wrote: Currently, there is

Re: [libvirt] RFC: Introduce API to return configuration/state paths of the network driver

2013-07-25 Thread Osier Yang
On 25/07/13 19:13, Daniel P. Berrange wrote: On Thu, Jul 25, 2013 at 07:01:05PM +0800, Osier Yang wrote: On 25/07/13 18:53, Daniel P. Berrange wrote: On Thu, Jul 25, 2013 at 06:43:00PM +0800, Osier Yang wrote: On 25/07/13 17:35, Daniel P. Berrange wrote: On Thu, Jul 25, 2013 at 02:02:36PM

[libvirt] [PATCH v2] virdbustest: Don't pass number of arguments as long long

2013-07-25 Thread Guido Günther
since sizeof(int) != sizeof(long long) on 32bit archs. This unbreaks virdbustest which otherwise fails like: (gdb) bt #0 __strlen_sse2_bsf () at ../sysdeps/i386/i686/multiarch/strlen-sse2-bsf.S:50 #1 0x405907d2 in ?? () from /lib/i386-linux-gnu/libdbus-1.so.3 #2 0x4057c140 in ?? () from

Re: [libvirt] [PATCH v2] virdbustest: Don't pass number of arguments as long long

2013-07-25 Thread Daniel P. Berrange
On Thu, Jul 25, 2013 at 01:25:32PM +0200, Guido Günther wrote: since sizeof(int) != sizeof(long long) on 32bit archs. This unbreaks virdbustest which otherwise fails like: (gdb) bt #0 __strlen_sse2_bsf () at ../sysdeps/i386/i686/multiarch/strlen-sse2-bsf.S:50 #1 0x405907d2 in ?? ()

Re: [libvirt] RFC: Introduce API to return configuration/state paths of the network driver

2013-07-25 Thread Osier Yang
On 25/07/13 19:21, Osier Yang wrote: On 25/07/13 19:13, Daniel P. Berrange wrote: On Thu, Jul 25, 2013 at 07:01:05PM +0800, Osier Yang wrote: On 25/07/13 18:53, Daniel P. Berrange wrote: On Thu, Jul 25, 2013 at 06:43:00PM +0800, Osier Yang wrote: On 25/07/13 17:35, Daniel P. Berrange wrote:

Re: [libvirt] RFC: Introduce API to return configuration/state paths of the network driver

2013-07-25 Thread Daniel P. Berrange
On Thu, Jul 25, 2013 at 07:37:22PM +0800, Osier Yang wrote: On 25/07/13 19:21, Osier Yang wrote: On 25/07/13 19:13, Daniel P. Berrange wrote: On Thu, Jul 25, 2013 at 07:01:05PM +0800, Osier Yang wrote: On 25/07/13 18:53, Daniel P. Berrange wrote: On Thu, Jul 25, 2013 at 06:43:00PM +0800,

Re: [libvirt] [PATCH v2] Don't overwrite errors in qemuTranslateDiskSourcePool

2013-07-25 Thread Ján Tomko
On 07/24/2013 10:44 PM, Eric Blake wrote: On 07/24/2013 03:47 AM, Ján Tomko wrote: src/qemu/qemu_conf.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) ACK. Thanks, pushed. Jan -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH 1/4] Use separate macros for failure/success in vol-to-argv test

2013-07-25 Thread Ján Tomko
On 07/25/2013 12:29 AM, Eric Blake wrote: On 07/22/2013 08:52 AM, Ján Tomko wrote: Reindent them to put the input volume on a separate line. --- tests/storagevolxml2argvtest.c | 64 +- 1 file changed, 44 insertions(+), 20 deletions(-) diff --git

Re: [libvirt] [PATCH] tests: PCI controller checks

2013-07-25 Thread Ján Tomko
On 07/24/2013 11:29 PM, Eric Blake wrote: On 07/22/2013 08:48 AM, Ján Tomko wrote: Check if PCI bridges with duplicate indexes are rejected. PCI root controllers with non-zero indexes or addresses should also be rejected. --- .../qemuxml2argv-pci-bridge-duplicate-index.xml | 16

[libvirt] [PATCH 4/5] Add 'controllers' arg to virCgroupNewDetect

2013-07-25 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com When detecting cgroups we must honour any controllers whitelist the driver may have. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/lxc/lxc_process.c | 4 ++-- src/qemu/qemu_cgroup.c | 1 + src/util/vircgroup.c | 9 ++---

[libvirt] [PATCH 2/5] Make virCgroupIsValidMachine static

2013-07-25 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The virCgroupIsValidMachine does not need to be called from outside the cgroups file now, so make it static. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/libvirt_private.syms | 1 - src/util/vircgroup.c | 7 ---

[libvirt] [PATCH 1/5] Introduce a more convenient virCgroupNewDetectMachine

2013-07-25 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Instead of requiring drivers to use a combination of calls to virCgroupNewDetect and virCgroupIsValidMachine, combine the two into virCgroupNewDetectMachine Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/libvirt_private.syms | 1 +

[libvirt] [PATCH 0/5] Fix detecting cgroups at libvirtd restart with QEMU

2013-07-25 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The recent refactoring of cgroups broke the ability to detect cgroups for running guests in the QEMU driver during libvirtd startup. This was due to it not considering the existance of the 'emulator' child group, as well as not honouring the

[libvirt] [PATCH 5/5] Skip detecting placement if controller is disabled

2013-07-25 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com If the app has provided a whitelist of controllers to be used, we skip detecting its mount point. We still, however, fill in the placement info which later confuses the machine name validation code. Skip detecting placement if the controller mount

[libvirt] [PATCH 3/5] Fix detection of 'emulator' cgroup

2013-07-25 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com When a VM has an 'emulator' child cgroup present, we must strip off that suffix when detecting the cgroup for a machine Rename the virCgroupIsValidMachineGroup method to virCgroupValidateMachineGroup to make a bit clearer that this isn't simply a

Re: [libvirt] [PATCH 4/7] qemu: Add monitor APIs to fetch CPUID data from QEMU

2013-07-25 Thread Eduardo Habkost
On Thu, Jul 25, 2013 at 10:45:10AM +0100, Daniel P. Berrange wrote: On Wed, Jul 24, 2013 at 03:25:19PM -0300, Eduardo Habkost wrote: On Tue, Jul 23, 2013 at 07:32:46PM +0200, Jiri Denemark wrote: On Tue, Jul 23, 2013 at 19:28:38 +0200, Jiri Denemark wrote: On Tue, Jul 23, 2013 at

[libvirt] [PATCH 1/2] qemu: Add capability flag for usb-storage

2013-07-25 Thread Fred A. Kemp
From: Fred A. Kemp ano...@lavabit.com Allow use of the usb-storage device only if the new capability flag QEMU_CAPS_DEVICE_USB_STORAGE is set, which it is for qemu(-kvm) versions = 0.12.1.2-rhel62-beta. --- src/qemu/qemu_capabilities.c |2 ++ src/qemu/qemu_capabilities.h |1 +

[libvirt] [PATCH 0/2] Support settings the 'removable' flag for USB disks

2013-07-25 Thread Fred A. Kemp
From: Fred A. Kemp ano...@lavabit.com The commit message of patch #2 explains the purpose of this patch set. A review would be greatly appreciated! Note that I've only added the new capability for usb-storage.removable to the qemu help tests of qemu(-kvm) version 1.2.0, since that's what I had

Re: [libvirt] [PATCH] virdbustest: Don't pass number of arguments as long long

2013-07-25 Thread Eric Blake
On 07/25/2013 03:27 AM, Daniel P. Berrange wrote: This fix looks correct, but it's annoying that we have to cast the 'a' length argument in every caller. I'm wondering if a better fix would be to virDBusMessageEncode to take an 'int' instead of a 'size_t' arg for a length; even though that

[libvirt] [PATCH 2/2] qemu: Support setting the 'removable' flag for USB disks

2013-07-25 Thread Fred A. Kemp
From: Fred A. Kemp ano...@lavabit.com Add an attribute named 'removable' to the 'target' element of disks, which controls the removable flag. For instance, on a Linux guest it controls the value of /sys/block/$dev/removable. This option is only valid for USB disks (i.e. bus='usb'), and its

Re: [libvirt] [Qemu-devel] [PATCH 4/7] qemu: Add monitor APIs to fetch CPUID data from QEMU

2013-07-25 Thread Eduardo Habkost
On Thu, Jul 25, 2013 at 11:14:16AM +0200, Andreas Färber wrote: Am 24.07.2013 20:25, schrieb Eduardo Habkost: In addition to the -cpu host KVM initialization problem, this is an additional problem with the current interfaces provided by QEMU: 1) libvirt needs to query data that depend on

Re: [libvirt] [Qemu-devel] [PATCH 4/7] qemu: Add monitor APIs to fetch CPUID data from QEMU

2013-07-25 Thread Andreas Färber
Am 25.07.2013 16:00, schrieb Eduardo Habkost: libvirt needs a way to find out how exactly -machine foo-1.0 -cpu bar looks different from -machine foo-1.1 -cpu bar, Why? (What's the actual use case?) Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn,

Re: [libvirt] [Qemu-devel] [PATCH 4/7] qemu: Add monitor APIs to fetch CPUID data from QEMU

2013-07-25 Thread Daniel P. Berrange
On Thu, Jul 25, 2013 at 04:09:18PM +0200, Andreas Färber wrote: Am 25.07.2013 16:00, schrieb Eduardo Habkost: libvirt needs a way to find out how exactly -machine foo-1.0 -cpu bar looks different from -machine foo-1.1 -cpu bar, Why? (What's the actual use case?) It already takes a long

Re: [libvirt] [PATCH 1/4] qemu: refactor qemuDomainCheckDiskPresence for only disk presence check

2013-07-25 Thread Martin Kletzander
On 07/18/2013 01:32 PM, Guannan Ren wrote: Refactor this function to make it focus on disk presence checking, including diskchain checking, and not only for CDROM and Floppy. This change is good for the following patches. --- src/qemu/qemu_domain.c | 99

Re: [libvirt] [PATCH 2/4] qemu: report error if disk backing files doesn't exist

2013-07-25 Thread Martin Kletzander
On 07/18/2013 01:32 PM, Guannan Ren wrote: s/doesn't/don't/ in $SUBJ Adding virFileAccessibleAs() to check if the backing file described in disk meta exist in real path. If not, report error. The uid and gid arguments don't take effect on F_OK mode for access, so use gid and gid of current

Re: [libvirt] [PATCH 3/4] qemu: check presence of each disk in chain

2013-07-25 Thread Martin Kletzander
On 07/18/2013 01:32 PM, Guannan Ren wrote: For disk with startupPolicy support, such as cdrom and floppy when its chain is broken, the startup policy will apply, otherwise, report error on chain issue. Force to collect diskchain metadata when qemu process start everytime. ---

Re: [libvirt] [PATCH 4/7] qemu: Add monitor APIs to fetch CPUID data from QEMU

2013-07-25 Thread Daniel P. Berrange
On Thu, Jul 25, 2013 at 10:15:56AM -0300, Eduardo Habkost wrote: On Thu, Jul 25, 2013 at 10:45:10AM +0100, Daniel P. Berrange wrote: On Wed, Jul 24, 2013 at 03:25:19PM -0300, Eduardo Habkost wrote: In addition to the -cpu host KVM initialization problem, this is an additional problem with

[libvirt] [PATCH 0/2] Rework client connection handling

2013-07-25 Thread Michal Privoznik
There are few cases where users don't want to raise 'max_client', but are doing many concurrent connection and don't want them to fail too. However, we are currently accept()-ing the incoming request even though we have reached the limit. If that's the case, error is reported and connection is

[libvirt] [PATCH 2/2] Introduce max_queued_clients

2013-07-25 Thread Michal Privoznik
This configuration knob lets user to set the length of queue of connection requests waiting to be accept()-ed by the daemon. IOW, it just controls the @backlog passed to listen: int listen(int sockfd, int backlog); --- daemon/libvirtd-config.c | 1 + daemon/libvirtd-config.h | 1 +

Re: [libvirt] [PATCH] virdbustest: Don't pass number of arguments as long long

2013-07-25 Thread Guido Günther
On Thu, Jul 25, 2013 at 07:37:48AM -0600, Eric Blake wrote: On 07/25/2013 03:27 AM, Daniel P. Berrange wrote: This fix looks correct, but it's annoying that we have to cast the 'a' length argument in every caller. I'm wondering if a better fix would be to virDBusMessageEncode to take an

Re: [libvirt] [PATCH 2/2] Introduce max_queued_clients

2013-07-25 Thread Daniel P. Berrange
On Thu, Jul 25, 2013 at 04:23:33PM +0200, Michal Privoznik wrote: This configuration knob lets user to set the length of queue of connection requests waiting to be accept()-ed by the daemon. IOW, it just controls the @backlog passed to listen: int listen(int sockfd, int backlog); ---

[libvirt] [PATCH 1/2] RPC: Don't accept client if it would overcommit max_clients

2013-07-25 Thread Michal Privoznik
Currently, even if max_client limit is hit, we accept() incoming connection request, but close it immediately. This has disadvantage of not using listen() queue. We should accept() only those clients we know we can serve and let all other wait in the (limited) queue. --- src/rpc/virnetserver.c

Re: [libvirt] [PATCH 1/2] RPC: Don't accept client if it would overcommit max_clients

2013-07-25 Thread Daniel P. Berrange
On Thu, Jul 25, 2013 at 04:23:32PM +0200, Michal Privoznik wrote: Currently, even if max_client limit is hit, we accept() incoming connection request, but close it immediately. This has disadvantage of not using listen() queue. We should accept() only those clients we know we can serve and let

Re: [libvirt] [PATCH 1/2] RPC: Don't accept client if it would overcommit max_clients

2013-07-25 Thread Michal Privoznik
On 25.07.2013 16:37, Daniel P. Berrange wrote: On Thu, Jul 25, 2013 at 04:23:32PM +0200, Michal Privoznik wrote: Currently, even if max_client limit is hit, we accept() incoming connection request, but close it immediately. This has disadvantage of not using listen() queue. We should accept()

Re: [libvirt] [PATCH 2/2] Introduce max_queued_clients

2013-07-25 Thread Michal Privoznik
On 25.07.2013 16:34, Daniel P. Berrange wrote: On Thu, Jul 25, 2013 at 04:23:33PM +0200, Michal Privoznik wrote: This configuration knob lets user to set the length of queue of connection requests waiting to be accept()-ed by the daemon. IOW, it just controls the @backlog passed to listen:

Re: [libvirt] [PATCH 2/2] Introduce max_queued_clients

2013-07-25 Thread Daniel P. Berrange
On Thu, Jul 25, 2013 at 04:44:57PM +0200, Michal Privoznik wrote: On 25.07.2013 16:34, Daniel P. Berrange wrote: On Thu, Jul 25, 2013 at 04:23:33PM +0200, Michal Privoznik wrote: This configuration knob lets user to set the length of queue of connection requests waiting to be accept()-ed by

Re: [libvirt] [PATCH 1/2] RPC: Don't accept client if it would overcommit max_clients

2013-07-25 Thread Daniel P. Berrange
On Thu, Jul 25, 2013 at 04:43:52PM +0200, Michal Privoznik wrote: On 25.07.2013 16:37, Daniel P. Berrange wrote: On Thu, Jul 25, 2013 at 04:23:32PM +0200, Michal Privoznik wrote: Currently, even if max_client limit is hit, we accept() incoming connection request, but close it immediately.

Re: [libvirt] Entering freeze for libvirt-1.1.1

2013-07-25 Thread Jason Helfman
On Tue, Jul 23, 2013 at 9:11 PM, Daniel Veillard veill...@redhat.comwrote: As planned I tagged the release candidate 1 for libvirt 1.1.1 in git, I also made tarball and rpms available on the ftp: ftp://libvirt.org/libvirt/ There is still some patches not completely ready after initial

Re: [libvirt] Cannot compile libvirt

2013-07-25 Thread Abhishek Sharma
Thanks Jan, Yes it worked when I removed --without-remote. Thanks for your help. Cheers, Abhishek On Thu, Jul 25, 2013 at 12:37 AM, Ján Tomko jto...@redhat.com wrote: On 07/24/2013 11:24 PM, Abhishek Sharma wrote: Hi, I am new to libvirt and I am trying to compile libvirt from the git

Re: [libvirt] Cannot compile libvirt

2013-07-25 Thread Daniel P. Berrange
On Thu, Jul 25, 2013 at 09:38:57AM -0700, Abhishek Sharma wrote: Since I am new to this mailing list, I am not sure what is the procedure of tracking bugs/enhancements like this. Should I go ahead and file a bug at https://bugzilla.redhat.com/ ? Take a look at this page

Re: [libvirt] Cannot compile libvirt

2013-07-25 Thread Eric Blake
On 07/25/2013 10:38 AM, Abhishek Sharma wrote: Since I am new to this mailing list, I am not sure what is the procedure of [you top-posted again] tracking bugs/enhancements like this. Should I go ahead and file a bug at https://bugzilla.redhat.com/ ? Only if you think it isn't getting

Re: [libvirt] Cannot compile libvirt

2013-07-25 Thread Abhishek Sharma
Since I am new to this mailing list, I am not sure what is the procedure of tracking bugs/enhancements like this. Should I go ahead and file a bug at https://bugzilla.redhat.com/ ? On Thu, Jul 25, 2013 at 9:22 AM, Eric Blake ebl...@redhat.com wrote: On 07/25/2013 10:17 AM, Abhishek Sharma

Re: [libvirt] Entering freeze for libvirt-1.1.1

2013-07-25 Thread Roman Bogorodskiy
Jason Helfman wrote: Configure failure on BSD when detecting libssh2. This is the first time I have run into this. Has anything changed? configure: error: You must install the libssh2 = 1.3pkg-config module to compile libvirt === Script configure failed unexpectedly. Please report the

Re: [libvirt] Cannot compile libvirt

2013-07-25 Thread Eric Blake
On 07/25/2013 10:17 AM, Abhishek Sharma wrote: Thanks Jan, [please don't top-post on technical lists] Yes it worked when I removed --without-remote. Good to know. That said, we should still fix things before 1.1.1 is released to fix this bug, so that future users don't have to figure out

Re: [libvirt] [PATCH] virt-login-shell joins users into lxc container.

2013-07-25 Thread Daniel P. Berrange
On Sat, Jul 20, 2013 at 07:46:33AM -0400, dwa...@redhat.com wrote: From: Dan Walsh dwa...@redhat.com Openshift wants to have their gears stuck into a container when they login to the system. virt-login-shell will join a running gear with the username of the person running it, or attempt to

Re: [libvirt] [PATCH] virt-login-shell joins users into lxc container.

2013-07-25 Thread Eric Blake
On 07/25/2013 11:06 AM, Daniel P. Berrange wrote: On Sat, Jul 20, 2013 at 07:46:33AM -0400, dwa...@redhat.com wrote: From: Dan Walsh dwa...@redhat.com Openshift wants to have their gears stuck into a container when they login to the system. virt-login-shell will join a running gear with the

Re: [libvirt] [PATCH] virt-login-shell joins users into lxc container.

2013-07-25 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/25/2013 01:23 PM, Eric Blake wrote: On 07/25/2013 11:09 AM, Eric Blake wrote: ACK to this patch. Technically since we're post freeze we shouldn't commit this until 1.1.2, but since this is an entirely new program perhaps we could make

Re: [libvirt] [PATCH] virt-login-shell joins users into lxc container.

2013-07-25 Thread Eric Blake
On 07/25/2013 11:09 AM, Eric Blake wrote: ACK to this patch. Technically since we're post freeze we shouldn't commit this until 1.1.2, but since this is an entirely new program perhaps we could make an exception here ? Thoughts ? It was posted pre-freeze; the only reason it didn't make

Re: [libvirt] [PATCH 1/5] Introduce a more convenient virCgroupNewDetectMachine

2013-07-25 Thread Eric Blake
On 07/25/2013 06:20 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Instead of requiring drivers to use a combination of calls to virCgroupNewDetect and virCgroupIsValidMachine, combine the two into virCgroupNewDetectMachine Signed-off-by: Daniel P. Berrange

Re: [libvirt] [PATCH 2/5] Make virCgroupIsValidMachine static

2013-07-25 Thread Eric Blake
On 07/25/2013 06:20 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The virCgroupIsValidMachine does not need to be called from outside the cgroups file now, so make it static. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/libvirt_private.syms

Re: [libvirt] [PATCH 3/5] Fix detection of 'emulator' cgroup

2013-07-25 Thread Eric Blake
On 07/25/2013 06:20 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com When a VM has an 'emulator' child cgroup present, we must strip off that suffix when detecting the cgroup for a machine Rename the virCgroupIsValidMachineGroup method to

Re: [libvirt] [PATCH 4/5] Add 'controllers' arg to virCgroupNewDetect

2013-07-25 Thread Eric Blake
On 07/25/2013 06:20 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com When detecting cgroups we must honour any controllers whitelist the driver may have. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/lxc/lxc_process.c | 4 ++--

Re: [libvirt] [PATCH 5/5] Skip detecting placement if controller is disabled

2013-07-25 Thread Eric Blake
On 07/25/2013 06:20 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com If the app has provided a whitelist of controllers to be used, we skip detecting its mount point. We still, however, fill in the placement info which later confuses the machine name validation

Re: [libvirt] [Qemu-devel] [PATCH 4/7] qemu: Add monitor APIs to fetch CPUID data from QEMU

2013-07-25 Thread Eduardo Habkost
On Thu, Jul 25, 2013 at 04:09:18PM +0200, Andreas Färber wrote: Am 25.07.2013 16:00, schrieb Eduardo Habkost: libvirt needs a way to find out how exactly -machine foo-1.0 -cpu bar looks different from -machine foo-1.1 -cpu bar, Why? (What's the actual use case?) libvirt API allows

Re: [libvirt] [PATCH 1/5] Introduce a more convenient virCgroupNewDetectMachine

2013-07-25 Thread Daniel P. Berrange
On Thu, Jul 25, 2013 at 11:37:12AM -0600, Eric Blake wrote: On 07/25/2013 06:20 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Instead of requiring drivers to use a combination of calls to virCgroupNewDetect and virCgroupIsValidMachine, combine the two into

[libvirt] [PATCH 1/2] Separate out StateAutoStart from StateInitialize

2013-07-25 Thread John Ferlan
Separation allows for dependent drivers to be make a connection during the AutoStart phase of state initialization. --- src/driver.h | 4 src/libvirt.c | 23 ++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/driver.h b/src/driver.h index

[libvirt] [PATCH 0/2] Split driver StateAutoStart from StateInitialization

2013-07-25 Thread John Ferlan
The post push review/comments for the chap authentication determined that trying to connect to qemu driver from within the storage auto start would not be successful, see the following and followups https://www.redhat.com/archives/libvir-list/2013-July/msg01409.html These patches will split the

[libvirt] [PATCH 2/2] virStateDriver - Separate AutoStart from Initialize

2013-07-25 Thread John Ferlan
Adjust these drivers to handle their Autostart functionality after each of the drivers has gone through their Initialization functions merge --- src/libxl/libxl_driver.c | 18 +++--- src/lxc/lxc_driver.c | 18 -- src/network/bridge_driver.c | 20

Re: [libvirt] [PATCH 0/2] Split driver StateAutoStart from StateInitialization

2013-07-25 Thread Daniel P. Berrange
On Thu, Jul 25, 2013 at 02:32:55PM -0400, John Ferlan wrote: The post push review/comments for the chap authentication determined that trying to connect to qemu driver from within the storage auto start would not be successful, see the following and followups

Re: [libvirt] [PATCH 1/2] Separate out StateAutoStart from StateInitialize

2013-07-25 Thread Daniel P. Berrange
On Thu, Jul 25, 2013 at 02:32:56PM -0400, John Ferlan wrote: Separation allows for dependent drivers to be make a connection during the AutoStart phase of state initialization. --- src/driver.h | 4 src/libvirt.c | 23 ++- 2 files changed, 26 insertions(+), 1

Re: [libvirt] [PATCH 1/2] Separate out StateAutoStart from StateInitialize

2013-07-25 Thread Daniel P. Berrange
On Thu, Jul 25, 2013 at 07:39:35PM +0100, Daniel P. Berrange wrote: On Thu, Jul 25, 2013 at 02:32:56PM -0400, John Ferlan wrote: Separation allows for dependent drivers to be make a connection during the AutoStart phase of state initialization. --- src/driver.h | 4

Re: [libvirt] [PATCH 2/2] virStateDriver - Separate AutoStart from Initialize

2013-07-25 Thread Daniel P. Berrange
On Thu, Jul 25, 2013 at 02:32:57PM -0400, John Ferlan wrote: Adjust these drivers to handle their Autostart functionality after each of the drivers has gone through their Initialization functions merge --- src/libxl/libxl_driver.c | 18 +++--- src/lxc/lxc_driver.c

Re: [libvirt] [PATCH 1/5] Introduce a more convenient virCgroupNewDetectMachine

2013-07-25 Thread Eric Blake
On 07/25/2013 12:11 PM, Daniel P. Berrange wrote: +/* + * Returns 0 on success, -1 on fatal error, -2 on no valid cgroup + */ +int virCgroupNewDetectMachine(const char *name, + +if (!virCgroupIsValidMachineGroup(*group, name, drivername)) { +virCgroupFree(group); +

Re: [libvirt] Entering freeze for libvirt-1.1.1

2013-07-25 Thread Jason Helfman
On Thu, Jul 25, 2013 at 9:50 AM, Roman Bogorodskiy bogorods...@gmail.comwrote: Jason Helfman wrote: Configure failure on BSD when detecting libssh2. This is the first time I have run into this. Has anything changed? configure: error: You must install the libssh2 = 1.3pkg-config module

Re: [libvirt] [PATCH 2/2] virStateDriver - Separate AutoStart from Initialize

2013-07-25 Thread John Ferlan
On 07/25/2013 02:41 PM, Daniel P. Berrange wrote: On Thu, Jul 25, 2013 at 02:32:57PM -0400, John Ferlan wrote: Adjust these drivers to handle their Autostart functionality after each of the drivers has gone through their Initialization functions merge --- src/libxl/libxl_driver.c | 18

Re: [libvirt] [PATCH] virt-login-shell joins users into lxc container.

2013-07-25 Thread Eric Blake
On 07/20/2013 05:46 AM, dwa...@redhat.com wrote: From: Dan Walsh dwa...@redhat.com Openshift wants to have their gears stuck into a container when they login to the system. virt-login-shell will join a running gear with the username of the person running it, or attempt to start the

[libvirt] [PATCH] Fix virsh snapshot-list error reporting

2013-07-25 Thread Jim Fehlig
Noticed that the expected not supported error is dropped when invoking 'virsh snapshot-list dom' on a Xen installation running the libxl driver virsh snapshot-list test error: Invalid snapshot: virDomainSnapshotFree The error is overwritten by a call to virDomainSnapshotFree in cleanup code

Re: [libvirt] [PATCH] Fix virsh snapshot-list error reporting

2013-07-25 Thread Eric Blake
On 07/25/2013 02:38 PM, Jim Fehlig wrote: Noticed that the expected not supported error is dropped when invoking 'virsh snapshot-list dom' on a Xen installation running the libxl driver virsh snapshot-list test error: Invalid snapshot: virDomainSnapshotFree The error is overwritten by

[libvirt] [PATCH] build: avoid -lgcrypt with newer gnutls

2013-07-25 Thread Eric Blake
https://bugzilla.redhat.com/show_bug.cgi?id=951637 Newer gnutls uses nettle, rather than gcrypt, which is a lot nicer regarding initialization. Yet we were unconditionally initializing gcrypt even when gnutls wouldn't be using it, and having two crypto libraries linked into libvirt.so is

Re: [libvirt] [PATCH 1/7] util: improve user lookup helper

2013-07-25 Thread Cole Robinson
On 07/23/2013 11:03 AM, Eric Blake wrote: https://bugzilla.redhat.com/show_bug.cgi?id=964358 A future patch needs to look up pw_gid; but it is wasteful to crawl through getpwuid_r twice for two separate pieces of information, and annoying to copy that much boilerplate code for doing the

Re: [libvirt] [PATCH 2/7] util: add virGetGroupList

2013-07-25 Thread Cole Robinson
On 07/23/2013 11:03 AM, Eric Blake wrote: https://bugzilla.redhat.com/show_bug.cgi?id=964358 Since neither getpwuid_r() nor initgroups() are safe to call in between fork and exec (they obtain a mutex, but if some other thread in the parent also held the mutex at the time of the fork, the

Re: [libvirt] [PATCH 3/7] util: make virSetUIDGID async-signal-safe

2013-07-25 Thread Cole Robinson
On 07/23/2013 11:03 AM, Eric Blake wrote: https://bugzilla.redhat.com/show_bug.cgi?id=964358 POSIX states that multi-threaded apps should not use functions that are not async-signal-safe between fork and exec, yet we were using getpwuid_r and initgroups. Although rare, it is possible to

Re: [libvirt] [PATCH 4/7] Fix potential deadlock across fork() in QEMU driver

2013-07-25 Thread Cole Robinson
On 07/23/2013 11:03 AM, Eric Blake wrote: From: Daniel P. Berrange berra...@redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=964358 The hook scripts used by virCommand must be careful wrt accessing any mutexes that may have been held by other threads in the parent process. With the

Re: [libvirt] [PATCH 6/7] security_dac: compute supplemental groups before fork

2013-07-25 Thread Cole Robinson
On 07/23/2013 11:03 AM, Eric Blake wrote: https://bugzilla.redhat.com/show_bug.cgi?id=964358 Commit 75c1256 states that virGetGroupList must not be called between fork and exec, then commit ee777e99 promptly violated that for lxc's use of virSecurityManagerSetProcessLabel. Hoist the

Re: [libvirt] [PATCH 7/7] security: fix deadlock with prefork

2013-07-25 Thread Cole Robinson
On 07/23/2013 11:04 AM, Eric Blake wrote: https://bugzilla.redhat.com/show_bug.cgi?id=964358 Attempts to start a domain with both SELinux and DAC security modules loaded will deadlock; latent problem introduced in commit fdb3bde and exposed in commit 29fe5d7. Basically, when recursing into

Re: [libvirt] [PATCH 0/7] backport of getGroupList to v0.10.2-maint

2013-07-25 Thread Cole Robinson
On 07/23/2013 11:03 AM, Eric Blake wrote: https://bugzilla.redhat.com/show_bug.cgi?id=964358 Since it was on Fedora 18 that I first noticed the deadlock possible when a child process calls getpwuid_r while the parent owned the lock in a different thread, I'm interested in backporting my

Re: [libvirt] [PATCH 5/7] security: framework for driver PreFork handler

2013-07-25 Thread Cole Robinson
On 07/23/2013 11:03 AM, Eric Blake wrote: https://bugzilla.redhat.com/show_bug.cgi?id=964358 A future patch wants the DAC security manager to be able to safely get the supplemental group list for a given uid, but at the time of a fork rather than during initialization so as to pick up on

Re: [libvirt] [PATCH 0/7] backport of getGroupList to v0.10.2-maint

2013-07-25 Thread Eric Blake
On 07/25/2013 04:36 PM, Cole Robinson wrote: On 07/23/2013 11:03 AM, Eric Blake wrote: https://bugzilla.redhat.com/show_bug.cgi?id=964358 Since it was on Fedora 18 that I first noticed the deadlock possible when a child process calls getpwuid_r while the parent owned the lock in a different

Re: [libvirt] [PATCH] Fix virsh snapshot-list error reporting

2013-07-25 Thread Jim Fehlig
Eric Blake wrote: On 07/25/2013 02:38 PM, Jim Fehlig wrote: Noticed that the expected not supported error is dropped when invoking 'virsh snapshot-list dom' on a Xen installation running the libxl driver virsh snapshot-list test error: Invalid snapshot: virDomainSnapshotFree The

  1   2   >