Re: [libvirt] [PATCHv2 2/3] qemu: simplify list cleanup

2013-09-04 Thread Michal Privoznik
On 28.08.2013 23:01, Eric Blake wrote: No need to open code now that we have a nice function. Interestingly, our virStringFreeList function is typed correctly (a malloc'd list of malloc'd strings is NOT const, whether at the point where it is created, or at the point where it is cleand up),

Re: [libvirt] [PATCH 1/3] qemu: only parse basename when determining emulator properties

2013-09-04 Thread Michal Privoznik
On 28.08.2013 06:00, Eric Blake wrote: 'virsh domxml-from-native' and 'virsh qemu-attach' could misbehave for an emulator installed in (a somewhat unlikely) location such as /usr/local/qemu-1.6/qemu-system-x86_64 or (an even less likely) /opt/notxen/qemu-system-x86_64. Limit the strstr seach

Re: [libvirt] [PATCH 2/n] build: only run fdstreamtest when libvirtd is built

2013-09-04 Thread Michal Privoznik
On 04.09.2013 00:48, Eric Blake wrote: An rpm build with client_only set to 1 (for example, RHEL 5 on s390, or by modifying libvirt.spec.in) failed with TEST: fdstreamtest 1) Stream read blocking ... OK 2) Stream read non-blocking

Re: [libvirt] [PATCH 1/n] spec: fix rpm build when lxc disabled

2013-09-04 Thread Michal Privoznik
On 03.09.2013 23:27, Eric Blake wrote: 'make rpm' failed if ~/.rpmmacros contains '%_without_lxc 1', which simulates the case of not having lxc available. RPM build errors: File not found: /home/eblake/rpmbuild/BUILDROOT/libvirt-1.1.1-1.fc19.x86_64/etc/libvirt/virt-login-shell.conf

Re: [libvirt] [PATCH 4/n] spec: default vbox according to libvirtd build

2013-09-04 Thread Michal Privoznik
On 04.09.2013 04:56, Eric Blake wrote: Commit ba5f3c7 moved virtualBox support into libvirtd, but the spec file was still unconditionally requesting it even when not building the server side. This leads to the weird result of building libvirt-client and libvirt-daemon-lxc rpms when

Re: [libvirt] [PATCH 5/n RFC] build: avoid stranded file when polkit is not used

2013-09-04 Thread Michal Privoznik
On 04.09.2013 05:07, Eric Blake wrote: Untested for now (it's late for me), but seems right... daemon/Makefile.am installs a .policy file if WITH_POLKIT is set (which is supposedly the union between WITH_POLKIT0 and WITH_POLKIT1). src/Makefile.am, on the other hand, installs a .policy file

Re: [libvirt] [PATCH 3a/n] build: only install nwfilter examples when building nwfilter

2013-09-04 Thread Michal Privoznik
On 04.09.2013 04:52, Eric Blake wrote: 'make rpm' with client_local set to 1 (by manual modification, or with RHEL 5 on s390) warns: RPM build errors: Installed (but unpackaged) file(s) found: /etc/libvirt/nwfilter/allow-arp.xml /etc/libvirt/nwfilter/allow-dhcp-server.xml

Re: [libvirt] [PATCH] libxl: Check for regcomp failure

2013-09-05 Thread Michal Privoznik
On 04.09.2013 22:18, Eric Blake wrote: On 09/04/2013 02:03 PM, Jim Fehlig wrote: Yeah, good question. I found a few occurrences of regcomp() and friends throughout the sources and most seem to do regfree() even when regcomp() fails. The man page is not very clear, but the notes on regfree()

Re: [libvirt] [PATCH 6/n] spec: make client-only testing easier

2013-09-05 Thread Michal Privoznik
On 04.09.2013 23:08, Eric Blake wrote: Several recent patches cleaned up 'make rpm' for the situation when client_only is true; these were done by manual spec file editing (since it's relatively hard to come by a RHEL 5 s390 box). Make it easier to do in the future via a simpler command line

Re: [libvirt] [PATCH 2/2] libxl: Compile regular expression where it is used

2013-09-05 Thread Michal Privoznik
On 05.09.2013 00:40, Jim Fehlig wrote: Jim Fehlig wrote: The regular expression used to determine guest capabilities was compiled in libxlCapsInitHost() but used in libxlCapsInitGuests(). Move compilation to libxlCapsInitGuests() where it is used, and free the compiled regex after use.

Re: [libvirt] [PATCH 0/3] Keep original file label

2013-09-05 Thread Michal Privoznik
On 28.08.2013 12:27, Michal Privoznik wrote: This is just a resurrection of my previous patchset. As of atomicity problem, I just realized there is none. The qemuProcessHook (which is responsible for locking the files) is called prior virSecurityManagerSetAllLabel (responsible for chown()-ing

Re: [libvirt] [PATCH] domain_conf: Delete the USB controller check from the USB Device checklist on virDomainDeviceIsUSB

2013-09-05 Thread Michal Privoznik
On 05.09.2013 04:40, Liuji (Jeremy) wrote: When using virsh attach-device to attach a device, the virDomainDefCompatibleDevice function will check the compatibility. If the device is a USB device, but the VM don't have any USB controller, the execution of virsh attach-device will fails. It

Re: [libvirt] [PATCH] Add 'nat' element to 'forward' network schemas

2013-09-05 Thread Michal Privoznik
On 05.09.2013 11:24, Ján Tomko wrote: Commits 905629f4 and 1716e7a6 have added support for specifying an IPv4 range and a port range to be used by NAT: forward mode='nat' nat address start='10.20.30.40' end='10.20.30.44'/ port start='6' end='65432'/ /nat /forward

Re: [libvirt] [PATCH 3/3] security_dac: Favour ACLs over chown()

2013-09-06 Thread Michal Privoznik
On 05.09.2013 16:14, Daniel P. Berrange wrote: On Wed, Aug 28, 2013 at 12:27:40PM +0200, Michal Privoznik wrote: On filesystems supporting ACLs we don't need to do a chown but we can just set ACLs to gain access for qemu. However, since we are setting these on too low level, where we don't

Re: [libvirt] [PATCH 1/4] build: avoid $(srcdir) in *_SOURCES

2013-09-10 Thread Michal Privoznik
On 09.09.2013 17:51, Eric Blake wrote: Trying to enable automake's subdir-objects option resulted in the creation of literal directories such as src/$(srcdir)/remote/. I traced this to the fact that we had used a literal $(srcdir) in a location that later fed an automake *_SOURCES variable.

Re: [libvirt] [PATCH 0/4] build: use subdir-objects

2013-09-10 Thread Michal Privoznik
On 09.09.2013 17:51, Eric Blake wrote: Automake 1.14 is annoyingly loud about warning that the future automake 2.0 will turn on subdir-objects by default. Since automake 1.9 also supports subdir-objects, the best course of action is to enable the feature. But we have to fix some problems

Re: [libvirt] [PATCHv2] netcf driver: use a single netcf handle for all connections

2013-09-11 Thread Michal Privoznik
On 11.09.2013 17:37, Doug Goldstein wrote: On Wed, Sep 11, 2013 at 10:06 AM, Laine Stump la...@laine.org wrote: This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=983026 The netcf interface driver previously had no state driver associated with it - as a connection was opened, it would

[libvirt] [PATCH 1/4] qemu: Expose file opening functions

2013-09-12 Thread Michal Privoznik
The qemuOpenFileAs and qemuOpenFile functions are gonna be needed in later patches. However, they are static now. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/qemu/qemu_domain.c | 146 ++ src/qemu/qemu_domain.h | 10 src/qemu

[libvirt] [PATCH RESEND 1/4] qemu: Expose file opening functions

2013-09-13 Thread Michal Privoznik
The qemuOpenFileAs and qemuOpenFile functions are gonna be needed in later patches. However, they are static now. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/qemu/qemu_domain.c | 146 ++ src/qemu/qemu_domain.h | 10 src/qemu

[libvirt] [PATCH RESEND 0/4] Pre-create storage on live migration

2013-09-13 Thread Michal Privoznik
will pre-create storage by hand. https://bugzilla.redhat.com/show_bug.cgi?id=927252 Michal Privoznik (4): qemu: Expose file opening functions qemu_domain: Introduce qemuDomainGetDiskBlockInfo qemu_migration: Check size prerequisites qemu_migration: Unlink pre-created storage on error src/qemu

[libvirt] [PATCH 0/4] Pre-create storage on live migration

2013-09-13 Thread Michal Privoznik
://bugzilla.redhat.com/show_bug.cgi?id=927252 Michal Privoznik (4): qemu: Expose file opening functions qemu_domain: Introduce qemuDomainGetDiskBlockInfo qemu_migration: Check size prerequisites qemu_migration: Unlink pre-created storage on error src/qemu/qemu_domain.c| 299

[libvirt] [PATCH 3/4] qemu_migration: Check size prerequisites

2013-09-13 Thread Michal Privoznik
on destination that this requirement is met and/or take actions to meet it. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/qemu/qemu_migration.c | 286 +- 1 file changed, 281 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_migration.c

[libvirt] [PATCH 4/4] qemu_migration: Unlink pre-created storage on error

2013-09-13 Thread Michal Privoznik
If migratioin fails because of whatever reason and we've pre-created any disks, we should remove them instead of letting them lying around. Moreover, we need to save the disks sources into domain status file in case libvirtd gets restarted. Signed-off-by: Michal Privoznik mpriv...@redhat.com

[libvirt] [PATCH 2/4] qemu_domain: Introduce qemuDomainGetDiskBlockInfo

2013-09-13 Thread Michal Privoznik
This is just digging out important implementation from qemu driver's qemuDomainGetDiskBlockInfo() API as this functionality is going to be required in the next patch. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/qemu/qemu_domain.c | 124

[libvirt] [PATCH RESEND 2/4] qemu_domain: Introduce qemuDomainGetDiskBlockInfo

2013-09-13 Thread Michal Privoznik
This is just digging out important implementation from qemu driver's qemuDomainGetDiskBlockInfo() API as this functionality is going to be required in the next patch. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/qemu/qemu_domain.c | 124

[libvirt] [PATCH RESEND 3/4] qemu_migration: Check size prerequisites

2013-09-13 Thread Michal Privoznik
on destination that this requirement is met and/or take actions to meet it. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/qemu/qemu_migration.c | 286 +- 1 file changed, 281 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_migration.c

[libvirt] [PATCH RESEND 4/4] qemu_migration: Unlink pre-created storage on error

2013-09-13 Thread Michal Privoznik
If migratioin fails because of whatever reason and we've pre-created any disks, we should remove them instead of letting them lying around. Moreover, we need to save the disks sources into domain status file in case libvirtd gets restarted. Signed-off-by: Michal Privoznik mpriv...@redhat.com

Re: [libvirt] [RFC PATCH] qemu: new API for tracking arbitrary monitor events

2013-12-20 Thread Michal Privoznik
On 19.12.2013 21:36, Eric Blake wrote: On 12/19/2013 09:01 AM, Daniel P. Berrange wrote: +typedef void (*virConnectDomainQemuMonitorEventCallback)(virConnectPtr conn, + virDomainPtr dom, +

Re: [libvirt] error in compiling event-test.c

2014-01-06 Thread Michal Privoznik
On 06.01.2014 06:03, rash g wrote: Hello, I am trying to run event-test.c provided in libvirt package.I am using ubuntu 13.04. However,after compiling I am getting an error saying -undefined reference to... I think this is because compiler is not able to find the functions and

Re: [libvirt] Add GVirConfigDomainDiskDriver

2014-01-06 Thread Michal Privoznik
On 06.12.2013 12:13, Christophe Fergeau wrote: Hey, I wanted to add support in libvirt-gconfig for the 'discard' attribute of the disk driver node. If I follow the way the API is currently done, it would be an additional method to GVirConfigDomainDisk. However, there are quite a few

Re: [libvirt] device removal

2014-01-06 Thread Michal Privoznik
On 03.01.2014 05:38, Serge Hallyn wrote: Hi, one of our tests was complaining that after an attach-device followed by detach-device, the device was still in the vm's apparmor whitelist. It turns out the device actually also still in the device's xml. qemuDomainDetachVirtioDiskDevice() is

Re: [libvirt] [PATCH] lxcDomainShutdownFlags: Cleanup @flags usage

2014-01-06 Thread Michal Privoznik
On 27.12.2013 21:35, Eric Blake wrote: On 12/19/2013 09:15 AM, Daniel P. Berrange wrote: On Wed, Dec 18, 2013 at 07:19:31PM +0100, Michal Privoznik wrote: Currently, the @flags usage is a bit unclear at first sight to say the least. There's no need for such unclear code especially when we can

Re: [libvirt] [PATCH] qemuStateInitialize: Create qemu log directory

2014-01-07 Thread Michal Privoznik
On 02.01.2014 13:28, Wangyufei (James) wrote: From 51782a44eecf5801e5100920e5965d8dfc46e4cc Mon Sep 17 00:00:00 2001 From: Zhou Yimin zhouyi...@huawei.com Date: Thu, 2 Jan 2014 16:32:46 +0800 Subject: [PATCH] qemuStateInitialize: Create qemu log directory When an error occurred in

[libvirt] [PATCH] qemuProcessStop: Don't overwrite any errors

2014-01-07 Thread Michal Privoznik
overwritten (the useful one, e.g. PCI device : could not be found). Hence, user sees something like: error: failed to create logfile /var/log/libvirt/qemu/ovirt_usb.log: No such file or directory instead of: error: internal error: Did not find USB device 8644:8003 Signed-off-by: Michal

Re: [libvirt] [PATCH] LXC: don't set socket create selinux context in virLXCProcessConnectMonitor

2014-01-07 Thread Michal Privoznik
On 25.12.2013 08:02, Gao feng wrote: the unix socket /var/run/libvirt/lxc/domain.sock is not created under the selinux context which configured by seclabel. If we try to connect the domain.sock under the selinux context of domain in virtLXCProcessConnectMonitor,selinux will deny this

[libvirt] [PATCH] lxc_controller: Don't leak @name

2014-01-07 Thread Michal Privoznik
The @name variable is VIR_STRDUP()-ed into, but never freed. In fact, there's no need to duplicate a command line argument since all places where @name is used expect const char. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/lxc/lxc_controller.c | 5 ++--- 1 file changed, 2

[libvirt] [PATCH] lxc_controller: Fix error message on missing --handshakefd

2014-01-07 Thread Michal Privoznik
The argument is --handshakefd not --handshake. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/lxc/lxc_controller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index 1b43bd2..a2ae599 100644 --- a/src/lxc

[libvirt] [PATCH v2] lxcDomainShutdownFlags and lxcDomainReboot: Cleanup @flags usage

2014-01-07 Thread Michal Privoznik
Currently, the @flags usage is a bit unclear at first sight to say the least. There's no need for such unclear code especially when we can borrow the working code from qemuDomainShutdownFlags(). Signed-off-by: Michal Privoznik mpriv...@redhat.com --- diff to v1: -lxcDomainReboot adjusted too

Re: [libvirt] [PATCH] Read PCI class from sysfs class file instead of config space.

2014-01-07 Thread Michal Privoznik
On 24.12.2013 19:07, Thadeu Lima de Souza Cascardo wrote: When determining if a device is behind a PCI bridge, the PCI device class is checked by reading the config space. However, there are some devices which have the wrong class on the config space, but the class is initialized by Linux

Re: [libvirt] [PATCH 0/2] Introduce max_anonymous_clients

2014-01-07 Thread Michal Privoznik
On 09.12.2013 15:35, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=981729 So far we can limit how many clients are connected, how many are waiting in accept() line but we could not control the count of accepted but not authenticated yet. Michal Privoznik (2

[libvirt] [PATCH] virConnectUnregisterCloseCallback: Unlock @conn prior to error dispatch

2014-01-07 Thread Michal Privoznik
=0x7f60e710, cmd=0x7fb50152ca80) at virsh.c:1755 #8 0x7fb500f5861b in main (argc=optimized out, argv=optimized out) at virsh.c:3393 And since the conn's mutex is not recursive, the virDispatchError will never ever lock it successfully. Signed-off-by: Michal Privoznik mpriv...@redhat.com

Re: [libvirt] [PATCH] Fix bridge configuration when OUTPUT policy is DROP on the host

2014-01-07 Thread Michal Privoznik
On 17.12.2013 18:56, Lénaïc Huard wrote: When the host is configured with very restrictive firewall (default policy is DROP for all chains, including OUTPUT), the bridge driver for Linux adds netfilter entries to allow DHCP and DNS requests to go from the VM to the dnsmasq of the host. The

Re: [libvirt] [PATCH] virConnectUnregisterCloseCallback: Unlock @conn prior to error dispatch

2014-01-08 Thread Michal Privoznik
On 07.01.2014 18:42, Eric Blake wrote: On 01/07/2014 10:25 AM, Michal Privoznik wrote: The function checks for @conn to be valid and locks its mutex. Then, it checks if callee is unregistering the same callback that he registered previously. If this fails an error is reported and the control

Re: [libvirt] [PATCH] docs: add LXC multi console command docs and a example

2014-01-08 Thread Michal Privoznik
On 08.01.2014 08:58, Gao feng wrote: On 01/08/2014 11:17 AM, Chen Hanxiao wrote: From: Chen Hanxiao chenhanx...@cn.fujitsu.com Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- docs/drvlxc.html.in | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) ACK

Re: [libvirt] [PATCH] LXC: create monitor socket under selinux context of domain

2014-01-08 Thread Michal Privoznik
On 08.01.2014 04:03, Gao feng wrote: the unix socket /var/run/libvirt/lxc/domain.sock is not created under the selinux context which configured by seclabel. If we try to connect the domain.sock under the selinux context of domain in virtLXCProcessConnectMonitor,selinux will deny this

[libvirt] [PATCH RESEND] qemuBuildNicDevStr: Set vectors= on Multiqueue

2014-01-08 Thread Michal Privoznik
Yet another advice appeared on the Multiqueue wiki page: http://www.linux-kvm.org/page/Multiqueue#Enable_MQ_feature We should add vectors=N onto the qemu command line, where N = 2 * (number of queues) + 1. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/qemu/qemu_command.c | 13

Re: [libvirt] [PATCH] event: clean up client side RPC code

2014-01-08 Thread Michal Privoznik
On 08.01.2014 18:23, Eric Blake wrote: Commit cfd62c1 was incomplete; I found more cases where error messages were being overwritten, and where the code between the three registration/deregistration APIs was not consistent. Since it is fairly easy to trigger an attempt to register an

Re: [libvirt] traffic control on hypervisor

2014-01-10 Thread Michal Privoznik
On 10.01.2014 09:37, yue wrote: hi,all if we can control the bandwidth of vm at hypervisor level? i know linux tc command can control traffic, but it is at ISO level 3, vm;s network is on bridge at level 2. how libvirt implement traffic control over vm? thanks I'm not sure the

Re: [libvirt] Compile time error in event-test.c

2014-01-10 Thread Michal Privoznik
On 10.01.2014 11:15, Avanti Ajay wrote: Hi... I am trying to compile the event-test.c code of the libvirt package. I am getting this error : I know it is a loader problem. Do I need to install any binaries?

Re: [libvirt] [PATCH 0/2] Try to get rid of most monitor timeout errors

2014-01-10 Thread Michal Privoznik
On 09.01.2014 09:22, Martin Kletzander wrote: This is basically v3 of the patch Pavel Fux sent [1] with the addition of changing the default as discussed in the same thread [2]. Martin [1] https://www.redhat.com/archives/libvir-list/2014-January/msg00060.html [2]

Re: [libvirt] traffic control on hypervisor

2014-01-12 Thread Michal Privoznik
On 11.01.2014 04:06, yue wrote: hi, Michal Privoznik i am a bit confusion about type of vm's interface . interface type='network' and interface type='bridge' do the Qos in libvirt can apply to both case? thanks Yes, the bandwidth/ works on both. Michal -- libvir-list mailing

Re: [libvirt] [PATCH 1/2] spice: detect if qemu can disable file transfer

2014-01-13 Thread Michal Privoznik
On 10.01.2014 18:21, Francesco Romani wrote: spice-server offers an API to disable file transfer messages on the agent channel between the client and the guest. This is supported in qemu through the disable-agent-file-xfer option. This detects if QEMU supports this option, and add a

Re: [libvirt] [PATCH] add nocow feature option to vol-create

2014-01-15 Thread Michal Privoznik
On 24.12.2013 09:56, Chunyan Liu wrote: Btrfs has terrible performance when hosting VM images, even more when the guest in those VM are also using btrfs as file system. One way to mitigate this bad performance is to turn off COW attributes on VM files (since having copy on write for this

Re: [libvirt] [PATCH] docs: mention maintenance branches

2014-01-15 Thread Michal Privoznik
On 14.01.2014 17:53, Eric Blake wrote: Mitre tried to assign us two separate CVEs for the fix for https://bugzilla.redhat.com/show_bug.cgi?id=1047577, on the grounds that the fixes were separated by more than an hour and thus triggered different hourly snapshots. But we explicitly do NOT

Re: [libvirt] [PATCH 2/2] qemu: Avoid operations on NULL monitor if VM fails early

2014-01-15 Thread Michal Privoznik
On 14.01.2014 19:31, Peter Krempa wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1047659 If a VM dies very early during an attempted connect to the guest agent while the locks are down the domain monitor object will be freed. The object is then accessed later as any failure during guest

Re: [libvirt] [PATCH RESEND v4 1/2] Introduce Libvirt Wireshark dissector

2014-01-16 Thread Michal Privoznik
On 15.01.2014 18:06, Yuto KAWAMURA(kawamuray) wrote: From: Yuto KAWAMURA(kawamuray) kawamuray.dad...@gmail.com Introduce Wireshark dissector plugin which adds support to Wireshark for dissecting libvirt RPC protocol. Added following files to build Wireshark dissector from libvirt source

Re: [libvirt] [PATCH RESEND v4 2/2] Add sample output of Wireshark dissector

2014-01-16 Thread Michal Privoznik
On 15.01.2014 18:06, Yuto KAWAMURA(kawamuray) wrote: From: Yuto KAWAMURA(kawamuray) kawamuray.dad...@gmail.com Add directory tools/wireshark/samples/ and libvirt-sample.pdml which is sample output of dissector. --- tools/wireshark/samples/libvirt-sample.pdml | 206

Re: [libvirt] [PATCH v2] lxcDomainShutdownFlags and lxcDomainReboot: Cleanup @flags usage

2014-01-16 Thread Michal Privoznik
On 10.01.2014 01:20, Eric Blake wrote: On 01/09/2014 05:12 PM, Eric Blake wrote: On 01/07/2014 08:20 AM, Michal Privoznik wrote: Currently, the @flags usage is a bit unclear at first sight to say the least. There's no need for such unclear code especially when we can borrow the working code

[libvirt] [PATCH] virSecuritySELinuxSetFileconHelper: Don't fail on read-only NFS

2014-01-17 Thread Michal Privoznik
optional (not explicitly requested in the XML) there's no need to make the labeling error fatal. In other words, read-only file on read-only NFS can fail to be labeled, but be readable at the same time. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/security/security_selinux.c | 13

Re: [libvirt] [PATCH 3/9] qemu: Don't detach devices if passthrough doesn't work

2014-01-17 Thread Michal Privoznik
On 17.01.2014 11:39, Jiri Denemark wrote: From: Jincheng Miao jm...@redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1046919 If none (KVM, VFIO) of the supported PCI passthrough methods is known to work on a host, it's better to fail right away with a nice error message rather than

Re: [libvirt] [PATCH 7/9] virpcitest: More tests for device detach and reattach

2014-01-17 Thread Michal Privoznik
On 17.01.2014 11:39, Jiri Denemark wrote: Especially for devices that are not bound to any driver. Signed-off-by: Jiri Denemark jdene...@redhat.com --- tests/virpcimock.c | 3 + tests/virpcitest.c | 157 - 2 files changed, 159

Re: [libvirt] [PATCH 2/9] pci: Fix failure paths in detach

2014-01-17 Thread Michal Privoznik
On 17.01.2014 11:39, Jiri Denemark wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1046919 Since commit v0.9.0-47-g4e8969e (released in 0.9.1) some failures during device detach were reported to callers of virPCIDeviceBindToStub as success. For example, even though a device seemed to be

Re: [libvirt] [PATCH 6/9] virpcimock: Mock /sys/bus/pci/drivers_probe

2014-01-17 Thread Michal Privoznik
On 17.01.2014 11:39, Jiri Denemark wrote: This file is used by PCI detach and reattach APIs to probe for a driver that handles a specific device. Signed-off-by: Jiri Denemark jdene...@redhat.com --- tests/virpcimock.c | 40 +--- 1 file changed, 29

Re: [libvirt] [PATCH 9/9] virpcitest: Test virPCIDeviceDetach failure

2014-01-17 Thread Michal Privoznik
On 17.01.2014 11:39, Jiri Denemark wrote: Signed-off-by: Jiri Denemark jdene...@redhat.com --- tests/virpcitest.c | 33 + 1 file changed, 33 insertions(+) diff --git a/tests/virpcitest.c b/tests/virpcitest.c index 848014d..6a2291d 100644 ---

Re: [libvirt] [PATCH 1/9] pci: Make reattach work for unbound devices

2014-01-17 Thread Michal Privoznik
On 17.01.2014 11:39, Jiri Denemark wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1046919 When a PCI device is not bound to any driver, reattach should just trigger driver probe rather than failing with Invalid device :00:19.0 driver file

Re: [libvirt] [PATCH 5/9] pci: Publish some internal code for virpcitest

2014-01-17 Thread Michal Privoznik
On 17.01.2014 11:39, Jiri Denemark wrote: Signed-off-by: Jiri Denemark jdene...@redhat.com --- src/libvirt_private.syms | 2 ++ src/util/virpci.c| 71 src/util/virpci.h| 5 3 files changed, 49 insertions(+), 29

Re: [libvirt] [PATCH 8/9] virpcimock: Add PCI driver which always fails

2014-01-17 Thread Michal Privoznik
On 17.01.2014 11:39, Jiri Denemark wrote: Such driver can be used to make sure PCI APIs fail properly. Signed-off-by: Jiri Denemark jdene...@redhat.com --- tests/virpcimock.c | 33 + 1 file changed, 21 insertions(+), 12 deletions(-) diff --git

Re: [libvirt] [PATCH 4/9] virpcitest: Show PCI device tested by each test

2014-01-17 Thread Michal Privoznik
On 17.01.2014 11:39, Jiri Denemark wrote: For example: ... 5) testVirPCIDeviceIsAssignable(0005:90:01.0) ... OK 6) testVirPCIDeviceIsAssignable(0001:01:00.0) ... OK Signed-off-by: Jiri Denemark jdene...@redhat.com --- tests/virpcitest.c | 9 - 1 file changed, 8

[libvirt] [libvirt-security-notice PATCH] templates: Include charset info in head/

2014-01-17 Thread Michal Privoznik
Signed-off-by: Michal Privoznik mpriv...@redhat.com --- templates/lsn2html.xsl | 3 ++- templates/lsn2indexhtml.xsl | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/lsn2html.xsl b/templates/lsn2html.xsl index aaac6e8..46501ab 100644 --- a/templates

Re: [libvirt] [PATCH 1/9] pci: Make reattach work for unbound devices

2014-01-17 Thread Michal Privoznik
On 17.01.2014 16:34, Jiri Denemark wrote: On Fri, Jan 17, 2014 at 15:29:27 +0100, Michal Privoznik wrote: On 17.01.2014 11:39, Jiri Denemark wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1046919 When a PCI device is not bound to any driver, reattach should just trigger driver probe

Re: [libvirt] [libvirt-security-notice PATCH] templates: Include charset info in head/

2014-01-17 Thread Michal Privoznik
On 17.01.2014 16:48, Daniel P. Berrange wrote: On Fri, Jan 17, 2014 at 04:42:02PM +0100, Michal Privoznik wrote: Signed-off-by: Michal Privoznik mpriv...@redhat.com --- templates/lsn2html.xsl | 3 ++- templates/lsn2indexhtml.xsl | 3 ++- 2 files changed, 4 insertions(+), 2 deletions

Re: [libvirt] Help out

2014-01-20 Thread Michal Privoznik
On 18.01.2014 18:37, Giorgio Zoppi wrote: Hi all, how could I help out? Is there a bug list or a todo list? Are u able to pin a virtualization sandbox to a given processor? Libvirt uses the redhat's bugzilla to track upstream issues:

Re: [libvirt] [PATCH RESEND v4 1/2] Introduce Libvirt Wireshark dissector

2014-01-20 Thread Michal Privoznik
On 20.01.2014 15:04, Yuto KAWAMURA wrote: 2014/1/16 Michal Privoznik mpriv...@redhat.com: On 15.01.2014 18:06, Yuto KAWAMURA(kawamuray) wrote: From: Yuto KAWAMURA(kawamuray) kawamuray.dad...@gmail.com Introduce Wireshark dissector plugin which adds support to Wireshark for dissecting libvirt

Re: [libvirt] [PATCH 0/2] Introduce max_anonymous_clients

2014-01-21 Thread Michal Privoznik
On 09.12.2013 15:35, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=981729 So far we can limit how many clients are connected, how many are waiting in accept() line but we could not control the count of accepted but not authenticated yet. Michal Privoznik (2

Re: [libvirt] [PATCH 0/2] v6: spice: expose the disable file transfer option

2014-01-21 Thread Michal Privoznik
On 16.01.2014 17:11, Francesco Romani wrote: Changes v6: amended commit message for patch #2 as suggested by Doug. Francesco Romani (2): spice: detect if qemu can disable file transfer spice: expose the QEMU disable file transfer option docs/formatdomain.html.in

Re: [libvirt] RFC: Move tests into same directory as the sources

2014-01-21 Thread Michal Privoznik
On 21.01.2014 12:26, Daniel P. Berrange wrote: Currently we have a split with all the source code under various subdirectories of src/, while the test cases are (mostly) all under the tests/ directory. I think there could be some benefits to moving the test files to be alongside the source

Re: [libvirt] [[PATCH v2]] virsh nodecpustats returns incorrect stats of cpu on Linux when the number of online cpu exceed 9.

2014-01-21 Thread Michal Privoznik
On 16.01.2014 09:18, m...@linux.vnet.ibm.com wrote: From: Bing Bu Cao m...@linux.vnet.ibm.com To retrieve node cpu statistics on Linux system, the linuxNodeGetCPUstats function simply uses STRPREFIX() to match the cpuid with the cpuid read from /proc/stat, it will cause obvious error.

Re: [libvirt] [PATCH v2] virtlockd: make re-exec more robust

2014-01-22 Thread Michal Privoznik
On 11.12.2013 09:07, Michael Chapman wrote: - Use $XDG_RUNTIME_DIR for re-exec state file when running unprivileged. - argv[0] may not contain a full path to the binary, however it should contain something that can be looked up in the PATH. Use execvp() to do path lookup on re-exec. -

Re: [libvirt] [PATCHv2 1/2] Add test for linuxNodeGetCPUStats

2014-01-22 Thread Michal Privoznik
94f82053590795a67bd5fb38026c86fb5329e7b7 Author: Bing Bu Cao m...@linux.vnet.ibm.com AuthorDate: Thu Jan 16 16:18:09 2014 +0800 Commit: Michal Privoznik mpriv...@redhat.com CommitDate: Tue Jan 21 17:24:03 2014 +0100 linuxNodeGetCPUStats: Correctly handle cpu prefix To retrieve node cpu statistics on Linux

Re: [libvirt] [PATCHv2 2/2] Simplify linuxNodeGetCPUStats

2014-01-22 Thread Michal Privoznik
On 22.01.2014 10:53, Ján Tomko wrote: Split out the repetitive code. --- src/nodeinfo.c | 77 +++--- 1 file changed, 30 insertions(+), 47 deletions(-) diff --git a/src/nodeinfo.c b/src/nodeinfo.c index 9c236cd..585da49 100644 ---

[libvirt] [PATCH 0/4] Improve QoS and unit-test it

2014-01-23 Thread Michal Privoznik
*** BLURB HERE *** Michal Privoznik (4): networkAllocateActualDevice: Set QoS for bridgeless networks too tests: Introduce virnetdevbandwidthtest virnetdevbandwidthtest: Introduce mocking virnetdevbandwidthtest: Introduce testVirNetDevBandwidthSet src/libvirt_private.syms | 1

[libvirt] [PATCH 3/4] virnetdevbandwidthtest: Introduce mocking

2014-01-23 Thread Michal Privoznik
The mocking will be used in later commits to mock all calls to the virCommandRun(). This is easier to do than cutting off the command creation and run into two separate pieces. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/Makefile.am | 9 tests

[libvirt] [PATCH 4/4] virnetdevbandwidthtest: Introduce testVirNetDevBandwidthSet

2014-01-23 Thread Michal Privoznik
The test tries to set some QoS limits and check if the commands that are actually executed are the expected ones. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/virnetdevbandwidthtest.c | 70 ++ 1 file changed, 70 insertions(+) diff --git

[libvirt] [PATCH 2/4] tests: Introduce virnetdevbandwidthtest

2014-01-23 Thread Michal Privoznik
The only API tested so far would be virNetDevBandwidthMinimal. But there's more to come! Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/Makefile.am | 5 ++ tests/virnetdevbandwidthtest.c | 155 + 2 files changed, 160

Re: [libvirt] [PATCH 4/4] virnetdevbandwidthtest: Introduce testVirNetDevBandwidthSet

2014-01-27 Thread Michal Privoznik
On 24.01.2014 23:12, Eric Blake wrote: On 01/23/2014 06:44 AM, Michal Privoznik wrote: The test tries to set some QoS limits and check if the commands that are actually executed are the expected ones. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/virnetdevbandwidthtest.c

Re: [libvirt] [PATCH 3/4] virnetdevbandwidthtest: Introduce mocking

2014-01-27 Thread Michal Privoznik
On 24.01.2014 23:02, Eric Blake wrote: On 01/23/2014 06:44 AM, Michal Privoznik wrote: The mocking will be used in later commits to mock all calls to the virCommandRun(). This is easier to do than cutting off the command creation and run into two separate pieces. Signed-off-by: Michal

[libvirt] [PATCH 0/3] Enhance virnetdevbandwidthtest

2014-01-27 Thread Michal Privoznik
As discussed with Eric, we may need slightly different approach. Michal Privoznik (3): virfile: Introduce virFileAppendStr virCommand: Introduce virCommandSetDryRun virnetdevbandwidthtest: Introduce testVirNetDevBandwidthSet src/libvirt_private.syms | 2 + src/util/vircommand.c

[libvirt] [PATCH 1/3] virfile: Introduce virFileAppendStr

2014-01-27 Thread Michal Privoznik
So far we only have an API that truncates the file prior to writing it. However, experience show need for new API that just appends a string to file. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/libvirt_private.syms | 1 + src/util/virfile.c | 48

[libvirt] [PATCH 2/3] virCommand: Introduce virCommandSetDryRun

2014-01-27 Thread Michal Privoznik
is: it uses virComamnd API heavily. Therefore we need a mechanism to not really run a command, but rather see its string representation after which we can decide if the unit construct the correct sequence of commands or not. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/libvirt_private.syms

[libvirt] [PATCH 3/3] virnetdevbandwidthtest: Introduce testVirNetDevBandwidthSet

2014-01-27 Thread Michal Privoznik
The test tries to set some QoS limits and check if the commands that are actually executed are the expected ones. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/virnetdevbandwidthtest.c | 98 ++ 1 file changed, 98 insertions(+) diff --git

Re: [libvirt] [PATCHv3 4/4] Reword error message for oversized cpu time fields

2014-01-27 Thread Michal Privoznik
On 22.01.2014 14:37, Ján Tomko wrote: --- src/nodeinfo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nodeinfo.c b/src/nodeinfo.c index 9f82330..ed7accc 100644 --- a/src/nodeinfo.c +++ b/src/nodeinfo.c @@ -681,7 +681,8 @@ virNodeCPUStatsAssign(virNodeCPUStatsPtr

Re: [libvirt] [PATCHv3 3/4] Simplify linuxNodeGetCPUStats

2014-01-27 Thread Michal Privoznik
On 22.01.2014 14:37, Ján Tomko wrote: Split out the repetitive code. --- src/nodeinfo.c | 77 +++--- 1 file changed, 30 insertions(+), 47 deletions(-) ACK Michal -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH] network: disallow bandwidth/mac for bridged/macvtap networks

2014-01-27 Thread Michal Privoznik
2996e6be19a13199ded7c2aa21039cca97318e01 Author: Michal Privoznik mpriv...@redhat.com AuthorDate: Wed Jan 22 18:58:33 2014 +0100 Commit: Michal Privoznik mpriv...@redhat.com CommitDate: Mon Jan 27 12:11:27 2014 +0100 networkAllocateActualDevice: Set QoS for bridgeless networks too https

[libvirt] [PATCH v2 0/3] Enhance virnetdevbandwidthtest

2014-01-28 Thread Michal Privoznik
Round two. Michal Privoznik (3): virfile: Introduce virFileAppendStr virCommand: Introduce virCommandSetDryRun virnetdevbandwidthtest: Introduce testVirNetDevBandwidthSet src/libvirt_private.syms | 2 + src/util/vircommand.c | 58 - src/util

[libvirt] [PATCH v2 1/3] virfile: Introduce virFileAppendStr

2014-01-28 Thread Michal Privoznik
So far we only have an API that truncates the file prior to writing it. However, experience show need for new API that just appends a string to file. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/libvirt_private.syms | 1 + src/util/virfile.c | 57

[libvirt] [PATCH v2 3/3] virnetdevbandwidthtest: Introduce testVirNetDevBandwidthSet

2014-01-28 Thread Michal Privoznik
The test tries to set some QoS limits and check if the commands that are actually executed are the expected ones. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/virnetdevbandwidthtest.c | 98 ++ 1 file changed, 98 insertions(+) diff --git

[libvirt] [PATCH v2 2/3] virCommand: Introduce virCommandSetDryRun

2014-01-28 Thread Michal Privoznik
is: it uses virComamnd API heavily. Therefore we need a mechanism to not really run a command, but rather see its string representation after which we can decide if the unit construct the correct sequence of commands or not. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/libvirt_private.syms

[libvirt] [libvirt-designer][PATCH] virtxml: Adapt to latest libvirt-glib

2014-01-28 Thread Michal Privoznik
-gconfig/libvirt-gconfig-domain-disk.h:145): Use 'gvir_config_domain_disk_set_driver_format' instead [-Werror=deprecated-declarations] gvir_config_domain_disk_set_driver_type(disk, format); ^ cc1: all warnings being treated as errors Signed-off-by: Michal Privoznik mpriv...@redhat.com

Re: [libvirt] ANNOUNCE: virt-xml: Edit libvirt XML with command line options

2014-01-28 Thread Michal Privoznik
On 26.01.2014 19:24, Cole Robinson wrote: I've just pushed a new tool to virt-manager.git called virt-xml. virt-xml uses virt-install's command line options to allow building and editing domain XML. Best way to describe what it can do is with a bunch of examples: See a list of all suboptions

[libvirt] [PATCH v3 0/2] Enhance virnetdevbandwidthtest

2014-01-28 Thread Michal Privoznik
yet another version - this time with virBuffer approach. Michal Privoznik (2): virCommand: Introduce virCommandSetDryRun virnetdevbandwidthtest: Introduce testVirNetDevBandwidthSet src/libvirt_private.syms | 1 + src/util/vircommand.c | 57

<    5   6   7   8   9   10   11   12   13   14   >