[libvirt] [PATCH v4] network: use firewalld instead of iptables, when available

2012-08-16 Thread Laine Stump
From: Thomas Woerner twoer...@redhat.com (This is Thomas v3 version of 1/2 of the firewalld patches, modified to check for firewall-cmd and firewalld state only once, rather than every time an iptables rule is added or removed. It's not intended to be pushed, because I'm still having issues with

Re: [libvirt] [PATCHv2] build: avoid warnings on older gcc

2012-08-16 Thread Viktor Mihajlovski
On 08/15/2012 09:25 PM, Eric Blake wrote: The previous patch pulled in a newer version of stat-time.h from gnulib, which tries to suppress some stupid gcc warnings (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113) by exploiting a feature of newer gcc. But we still aim to compile on RHEL

Re: [libvirt] [PATCH 1/2] util: properly save/restore original vlan tag for VFs

2012-08-16 Thread Osier Yang
On 2012年08月16日 12:34, Laine Stump wrote: When a network device that is a VF of an SR-IOV card was assigned to a guest usinginterface type='hostdev', only the MAC address was being saved/restored, but the VLAN tag was left untouched. Up to now we haven't actually used vlan tags on SR-IOV devices,

Re: [libvirt] [PATCH 2/2] qemu: support setting vlan tag for interface type='hostdev'

2012-08-16 Thread Osier Yang
On 2012年08月16日 12:34, Laine Stump wrote: The underlying function to set the vlan tag of an SR-IOV network device was already in place (although an extra patch to save/restore the original vlan tag was needed), and recent patches added the ability to configure a vlan tag. This patch just ties

Re: [libvirt] [PATCH] qemu: Ensure the cpuset is formated as expected before passing to cgroup

2012-08-16 Thread Osier Yang
On 2012年08月16日 13:06, Eric Blake wrote: On 08/15/2012 09:35 PM, Osier Yang wrote: The parameter value for cpuset could be in special format like 0-10,^7, which is not recongnized by cgroup. This patch is to s/recongnized/recognized/ ensure the cpuset is formated as expected before passing

[libvirt] [test-API][PATCH 1/2] New get_conn function in utils

2012-08-16 Thread Wayne Sun
The get_conn function return connection object from libvirt module. This function could be used by both framework and testcases. The patch includes: * get_conn in utils/utils.py * sync env_inspect.py using the new function Signed-off-by: Wayne Sun g...@redhat.com --- src/env_inspect.py

[libvirt] [test-API][PATCH 2/2] Update cases with libvirtd restart problem

2012-08-16 Thread Wayne Sun
Restart libvirtd during test will break conn from framework. Update cases with: * Add notes in case description * Using get_conn to reconnect in cases Signed-off-by: Wayne Sun g...@redhat.com --- repos/domain/ownership_test.py |6 -- repos/libvirtd/qemu_hang.py |1 -

[libvirt] libvirtd crash when attach-disk to VM

2012-08-16 Thread Wangpan
Hi all, I got a depressed problem(libvirtd crash with SIGABRT or SIGSEGV sometimes) when attach a nbd disk to a VM by using cmd as follow: virsh attach-disk 228 --source /dev/nbd0 --target vdd --sourcetype block --driver qemu --subdriver raw or just using virsh attach-disk 228 /dev/nbd0 vdd.

Re: [libvirt] QEMU 1.2 Test Day - August 16 2012

2012-08-16 Thread Stefan Hajnoczi
On Tue, Aug 14, 2012 at 2:37 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Thu, Aug 2, 2012 at 1:22 PM, Stefan Hajnoczi stefa...@gmail.com wrote: I have set up the QEMU 1.2 Testing wiki page and suggest August 16 as the Test Day: http://wiki.qemu.org/Planning/1.2/Testing QEMU 1.2 Test

Re: [libvirt] [test-API][PATCH 1/2] New get_conn function in utils

2012-08-16 Thread Osier Yang
On 2012年08月16日 17:00, Wayne Sun wrote: The get_conn function return connection object from libvirt module. This function could be used by both framework and testcases. The patch includes: * get_conn in utils/utils.py * sync env_inspect.py using the new function Signed-off-by:

Re: [libvirt] [test-API][PATCH 1/2] New get_conn function in utils

2012-08-16 Thread Wayne Sun
On 08/16/2012 06:07 PM, Osier Yang wrote: On 2012年08月16日 17:00, Wayne Sun wrote: The get_conn function return connection object from libvirt module. This function could be used by both framework and testcases. The patch includes: * get_conn in utils/utils.py * sync env_inspect.py

[libvirt] [PATCH v2] qemu: Set swap_hard_limit before hard_limit

2012-08-16 Thread Osier Yang
Setting hard_limit larger than previous swap_hard_limit must fail, it's not that good if one wants to change the swap_hard_limit and hard_limit together. E.g. % virsh memtune rhel6 hard_limit : 100 soft_limit : 100 swap_hard_limit: 100 % virsh memtune rhel6 --hard-limit

Re: [libvirt] [PATCH v2] qemu: Set swap_hard_limit before hard_limit

2012-08-16 Thread Martin Kletzander
On 08/16/2012 12:37 PM, Osier Yang wrote: Setting hard_limit larger than previous swap_hard_limit must fail, it's not that good if one wants to change the swap_hard_limit and hard_limit together. E.g. % virsh memtune rhel6 hard_limit : 100 soft_limit : 100 swap_hard_limit:

Re: [libvirt] [PATCH 2/7] add qemuAgentArbitraryCommand() for general qemu agent command.

2012-08-16 Thread Martin Kletzander
On 08/15/2012 03:36 AM, MATSUDA Daiki wrote: add qemuAgentArbitraryCommand() for general qemu agent command. Twice the same line in the message, could be less brief, maybe :) Signed-off-by: MATSUDA Daiki matsuda...@intellilink.co.jp --- src/qemu/qemu_agent.c | 31

Re: [libvirt] [PATCH 1/7] Add @seconds vaiable to qemuAgentSend()

2012-08-16 Thread Martin Kletzander
On 08/15/2012 03:36 AM, MATSUDA Daiki wrote: Add @seconds variable to qemuAgentSend(). When @tiemout is true, @seconds controls how long to wait for a response (if @seconds is VIR_DOMAIN_QEMU_AGENT_COMMAND_DEFAULT, default to QEMU_AGENT_WAIT_TIME). If @timeout is false, @seconds is

Re: [libvirt] [PATCH 3/7] add virAgentCommand()

2012-08-16 Thread Martin Kletzander
On 08/15/2012 03:36 AM, MATSUDA Daiki wrote: diff --git a/include/libvirt/libvirt-qemu.h b/include/libvirt/libvirt-qemu.h index 013ed5a..60b83ef 100644 --- a/include/libvirt/libvirt-qemu.h +++ b/include/libvirt/libvirt-qemu.h @@ -50,6 +50,9 @@ typedef enum {

Re: [libvirt] [PATCH 5/7] add qemuAgentCommand() for .qemuAgentCommand to remote driver

2012-08-16 Thread Martin Kletzander
On 08/15/2012 03:36 AM, MATSUDA Daiki wrote: diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 353a153..3c60709 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -5368,6 +5368,7 @@ static virDriver remote_driver = { .domainSetMetadata =

Re: [libvirt] [PATCH 1/2] util: properly save/restore original vlan tag for VFs

2012-08-16 Thread Eric Blake
On 08/16/2012 02:34 AM, Osier Yang wrote: -if (virMacAddrParse(macstr,oldmac) != 0) { +if ((vlan = strchr(fileData, '\n'))) { +char *endptr; + +*vlan++ = 0; /* NULL terminate the mac address */ s/terminate/terminates/ Actually, 'terminate' is correct - this is a

Re: [libvirt] [User question] Huge buffer size on KVM host

2012-08-16 Thread Avi Kivity
On 08/16/2012 05:54 PM, Martin Wawro wrote: On Aug 15, 2012, at 2:57 PM, Avi Kivity wrote: We are using logical volumes and the cache is set to 'none'. Strange, that should work without any buffering. What the contents of /sys/block/sda/queue/hw_sector_size and

[libvirt] [PATCH 2/7] network: helper function to create interface pool from PF

2012-08-16 Thread Shradha Shah
Existing code that creates a list of forwardIfs from a single PF was moved to the new utility function networkCreateInterfacePool. No functional change. Signed-off-by: Shradha Shah ss...@solarflare.com --- src/network/bridge_driver.c | 82 ++- 1

[libvirt] [PATCH 1/7] conf: move DevicePCIAddress functions to separate file

2012-08-16 Thread Shradha Shah
Move the functions the parse/format, and validate PCI addresses to their own file so they can be conveniently used in other places besides device_conf.c Refactoring existing code without causing any functional changes to prepare for new code. This patch makes the code reusable. Signed-off-by:

Re: [libvirt] [PATCH 0/8] Honour current process label when generating SELinux labels

2012-08-16 Thread Viktor Mihajlovski
On 08/10/2012 03:47 PM, Daniel P. Berrange wrote: This patch series makes a number of changes to the SELinux label generation code. This is intended to make it fully honour the current process label when generating VM labels, so that dynamic label generation works better with custom policies, or

[libvirt] [PATCH 6/7] Forward Mode Hostdev network driver Implementation

2012-08-16 Thread Shradha Shah
This patch updates the network driver to properly utilize the new attributes/elements that are now in virNetworkDef Signed-off-by: Shradha Shah ss...@solarflare.com --- docs/formatnetwork.html.in | 62 ++ src/network/bridge_driver.c | 282 ++-

[libvirt] [PATCH 5/7] Add function virDevicePCIAddressEqual

2012-08-16 Thread Shradha Shah
This function is needed by the network driver in a later commit. This function is useful in functions like networkNotifyActualDevice and networkReleaseActualDevice --- src/conf/device_conf.c | 16 src/conf/device_conf.h |3 +++ src/libvirt_private.syms |1 + 3 files

[libvirt] [PATCH 3/7] RNG updates, new xml parser/formatter code to support forward mode=hostdev

2012-08-16 Thread Shradha Shah
This patch introduces the new forward mode='hostdev' along with attribute managed Includes updates to the network RNG and new xml parser/formatter code. Signed-off-by: Shradha Shah ss...@solarflare.com --- docs/schemas/basictypes.rng| 46 +++ docs/schemas/domaincommon.rng

[libvirt] [PATCH 4/7] Code to return interface name or pci_addr of the VF in actualDevice

2012-08-16 Thread Shradha Shah
The network pool should be able to keep track of both, network device names nad PCI addresses, and return the appropriate one in the actualDevice when networkAllocateActualDevice is called. Signed-off-by: Shradha Shah ss...@solarflare.com --- src/network/bridge_driver.c | 60

[libvirt] [PATCH 7/7] Forward Mode 'Hostdev' qemu driver implementation

2012-08-16 Thread Shradha Shah
For a network with forward mode='hostdev', there is a need to add the newly minted hostdev to the hostdevs array. In this case we also call qemuPrepareHostDevicesas it has already been called by the time we get to here and are building the qemu commandline Signed-off-by: Shradha Shah

[libvirt] [PATCH 0/7] Forward mode='hostdev' patch series

2012-08-16 Thread Shradha Shah
This patch series supports the forward mode='hostdev'. The functionality of this mode is the same as interface type='hostdev' but with the added benefit of using interface pools. The patch series also contains a patch to support use of interface names and PCI device addresses interchangeably in a

Re: [libvirt] [PATCH 2/7] network: helper function to create interface pool from PF

2012-08-16 Thread Laine Stump
On 08/16/2012 11:41 AM, Shradha Shah wrote: Existing code that creates a list of forwardIfs from a single PF was moved to the new utility function networkCreateInterfacePool. No functional change. Signed-off-by: Shradha Shah ss...@solarflare.com ACK. Just one small change to the code

Re: [libvirt] [PATCH 1/7] conf: move DevicePCIAddress functions to separate file

2012-08-16 Thread Laine Stump
On 08/16/2012 11:41 AM, Shradha Shah wrote: Move the functions the parse/format, and validate PCI addresses to their own file so they can be conveniently used in other places besides device_conf.c Refactoring existing code without causing any functional changes to prepare for new code.

Re: [libvirt] [PATCH 3/7] RNG updates, new xml parser/formatter code to support forward mode=hostdev

2012-08-16 Thread Laine Stump
On 08/16/2012 11:41 AM, Shradha Shah wrote: This patch introduces the new forward mode='hostdev' along with attribute managed Includes updates to the network RNG and new xml parser/formatter code. Signed-off-by: Shradha Shah ss...@solarflare.com I'm in tears! ACK. You've taken care of

Re: [libvirt] [PATCH 08/23] Refactor the way new clients are registered with the server

2012-08-16 Thread Eric Blake
On 08/09/2012 09:20 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Currently the virNetServerDispatchNewClient both creates the virNetServerClientPtr instance and registers it with the virNetServerPtr internal state. Split the client registration code out into a

Re: [libvirt] [PATCH 09/23] Refactor impl of the virNetServerClientNew method

2012-08-16 Thread Eric Blake
On 08/09/2012 09:20 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com In preparation for adding further constructors, refactor the virNetServerClientNew method to move most of the code into a common virNetServerClientNewInternal helper API. Signed-off-by: Daniel

Re: [libvirt] [PATCH 5/7] Add function virDevicePCIAddressEqual

2012-08-16 Thread Laine Stump
On 08/16/2012 11:42 AM, Shradha Shah wrote: This function is needed by the network driver in a later commit. This function is useful in functions like networkNotifyActualDevice and networkReleaseActualDevice --- src/conf/device_conf.c | 16 src/conf/device_conf.h |

Re: [libvirt] [PATCH 10/23] Add support for creating sockets RPC servers from a pre-opened fd

2012-08-16 Thread Eric Blake
On 08/09/2012 09:20 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com In order to support systemd socket based activation, it needs to be possible to create virNetSocketPtr and virNetServerServicePtr instance from a pre-opened file descriptor ---

Re: [libvirt] [PATCH 0/8] Honour current process label when generating SELinux labels

2012-08-16 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/16/2012 11:41 AM, Viktor Mihajlovski wrote: On 08/10/2012 03:47 PM, Daniel P. Berrange wrote: This patch series makes a number of changes to the SELinux label generation code. This is intended to make it fully honour the current process

Re: [libvirt] [PATCH 1/7] conf: move DevicePCIAddress functions to separate file

2012-08-16 Thread Laine Stump
On 08/16/2012 12:12 PM, Laine Stump wrote: On 08/16/2012 11:41 AM, Shradha Shah wrote: Move the functions the parse/format, and validate PCI addresses to their own file so they can be conveniently used in other places besides device_conf.c Refactoring existing code without causing any

Re: [libvirt] [PATCH 4/7] Code to return interface name or pci_addr of the VF in actualDevice

2012-08-16 Thread Laine Stump
On 08/16/2012 11:41 AM, Shradha Shah wrote: The network pool should be able to keep track of both, network device names nad PCI addresses, and return the appropriate one in the actualDevice when networkAllocateActualDevice is called. Signed-off-by: Shradha Shah ss...@solarflare.com ACK

[libvirt] [PATCH] build: ship stamp files

2012-08-16 Thread Eric Blake
'make distcheck' fails because the generated ESX and HyperV files are (intentionally) marked read-only, but since the stamp file was missing, make assumes they need to be rebuilt. Shipping the stamp file solves the problem. * src/Makefile.am (EXTRA_DIST): Ship stamp files. --- Pushing under the

Re: [libvirt] [PATCH 5/7] Add function virDevicePCIAddressEqual

2012-08-16 Thread Eric Blake
On 08/16/2012 09:42 AM, Shradha Shah wrote: This function is needed by the network driver in a later commit. This function is useful in functions like networkNotifyActualDevice and networkReleaseActualDevice --- src/conf/device_conf.c | 16 src/conf/device_conf.h |

Re: [libvirt] distcheck issues on maint and master

2012-08-16 Thread Eric Blake
On 08/13/2012 10:19 AM, Eric Blake wrote: On 08/13/2012 08:04 AM, Cole Robinson wrote: On 08/13/2012 09:59 AM, Daniel P. Berrange wrote: On Mon, Aug 13, 2012 at 09:56:49AM -0400, Cole Robinson wrote: I just pushed a bunch of patches to -maint branches, but both are giving me distcheck errors

[libvirt] [PATCH] build: fix syntax check during 'make distcheck'

2012-08-16 Thread Eric Blake
'make distcheck' was failing because a syntax check file, .sc-start-sc_vulnerable_makefile_CVE-2012-3386, got left behind. I traced it to the 'distdir' rule depending on a shortcut syntax-check name rather than the full rule name normally used during 'local-check' from maint.mk. * cfg.mk

Re: [libvirt] [PATCH 11/23] Introduce an internal API for handling file based lockspaces

2012-08-16 Thread Eric Blake
On 08/09/2012 09:20 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The previously introduced virFile{Lock,Unlock} APIs provide a way to acquire/release fcntl() locks on individual files. For unknown reason though, the POSIX spec says that fcntl() locks are

Re: [libvirt] [PATCH 12/23] Add JSON serialization of virLockSpacePtr objects for process re-exec()

2012-08-16 Thread Eric Blake
On 08/09/2012 09:20 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Add two new APIs virLockSpaceNewPostExecRestart and virLockSpacePreExecRestart which allow a virLockSpacePtr object to be created from a JSON object and saved to a JSON object, for the purposes of

Re: [libvirt] [PATCH 13/23] Add JSON serialization of virNetSocketPtr objects for process re-exec()

2012-08-16 Thread Eric Blake
On 08/09/2012 09:20 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Add two new APIs virNetSocketNewPostExecRestart and virNetSocketPreExecRestart which allow a virNetSocketPtr object to be created from a JSON object and saved to a JSON object, for the purpose of

Re: [libvirt] [PATCH 14/23] Add JSON serialization of virNetServerServicePtr objects for process re-exec()

2012-08-16 Thread Eric Blake
On 08/09/2012 09:20 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Add two new APIs virNetServerServiceNewPostExecRestart and virNetServerServicePreExecRestart which allow a virNetServerServicePtr object to be created from a JSON object and saved to a JSON

Re: [libvirt] [PATCH 15/23] Add JSON serialization of virNetServerClientPtr objects for process re-exec()

2012-08-16 Thread Eric Blake
On 08/09/2012 09:20 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Add two new APIs virNetServerClientNewPostExecRestart and virNetServerClientPreExecRestart which allow a virNetServerClientPtr object to be created from a JSON object and saved to a JSON object,

Re: [libvirt] [PATCH 16/23] Add JSON serialization of virNetServerPtr objects for process re-exec()

2012-08-16 Thread Eric Blake
On 08/09/2012 09:20 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Add two new APIs virNetServerNewPostExecRestart and virNetServerPreExecRestart which allow a virNetServerPtr object to be created from a JSON object and saved to a JSON object, for the purpose of

Re: [libvirt] [PATCH 5/7] Add function virDevicePCIAddressEqual

2012-08-16 Thread Laine Stump
On 08/16/2012 04:07 PM, Eric Blake wrote: On 08/16/2012 09:42 AM, Shradha Shah wrote: This function is needed by the network driver in a later commit. This function is useful in functions like networkNotifyActualDevice and networkReleaseActualDevice --- src/conf/device_conf.c | 16

[libvirt] [PATCH] Add support for setting VLANs on Open vSwitch ports

2012-08-16 Thread Kyle Mestery
Add the ability to support VLAN tags for Open vSwitch virtual port types. To accomplish this, modify virNetDevOpenvswitchAddPort and virNetDevTapCreateInBridgePort to take a virNetDevVlanPtr argument. When adding the port to the OVS bridge, setup either a single VLAN or a trunk port based on the

[libvirt] [PATCH 3.5/7] fixes to get 3/7 past make check

2012-08-16 Thread Laine Stump
Patch 3/7 fails make check, so I need to sqaush in the following to fix it. It seemed a bit too much to squash in without getting somebody to review it first: 1) The indentation was off for the new use of virDevicePCIAddressFormat in network_conf.c. Rather than just hacking in even more