[libvirt] [PATCHv2] spec: add missing dep of libvirt-daemon-config-network
by Eric Blake
From: Thierry Parmentelat <thierry.parmentelat(a)inria.fr>
When building modules, libvirt-daemon-config-network requires
libvirt-daemon-driver-network to ensure the 'default' network
is setup properly
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
v2: make dep dependent on whether subpackage is created
libvirt.spec.in | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 4d804e6..d3e6048 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -720,6 +720,9 @@ Summary: Default configuration files for the libvirtd daemon
Group: Development/Libraries
Requires: libvirt-daemon = %{version}-%{release}
+ %if %{with_driver_modules}
+Requires: libvirt-daemon-driver-network = %{version}-%{release}
+ %endif
%description daemon-config-network
Default configuration files for setting up NAT based networking
--
1.8.5.3
10 years, 9 months
[libvirt] libvirt default network
by Thierry Parmentelat
Hi
This is in echo to a message originally sent on libvirt-users, but having not received any answer yet so we figured we would try this list instead
So, we use libvirt on various flavours of fedora; with fedora18 we were using libvirt-1.0.4, that we rebuilt using a slightly modified version of mainstream specfile
Under fedora20 we’ve first tried using the libvirt version that comes with vanilla fedora - 1.1.3 - but are seeing glitches that apparently are fixed in 1.2.1, so we’re giving this a shot
The problem we have is, right after installation of our libvirt rpm, the ‘default’ network is not known to the system:
[root@vnode07 ~]# virsh -c lxc:// net-dumpxml default
error: failed to get network 'default'
error: Network not found: no network with matching name ‘default'
While the ‘source’ file for this default network did ship with the rpm
[root@vnode07 ~]# rpm -qf /usr/share/libvirt/networks/default.xml
libvirt-daemon-driver-network-1.2.1-0.x86_64
------------
What we used to have with 1.0.4 and 1.1.3 at that same point (right after yum install) is
[root@vnode05 ~]# virsh -c lxc:// net-dumpxml default
<network connections='1510’>
..
</network>
—
So, I’m confident we can tweak our specfile to get this to work by adding something like net-define / net-autostart / net-start somewhere near the post install script of the daemon package or something
However we would appreciate some insight as to how this would happen in the first place; is this an intentional change on your end ?
or did we screw that up somehow ? if so, I could not find out precisely how this network definition is supposed to take place when the package gets installed, any hint / insight on that would be much appreciated
Thanks in advance
10 years, 9 months
Re: [libvirt] [libvirt-users] Help? Running into problems with migrateToURI2() and virDomainDefCheckABIStability()
by Cole Robinson
On 02/12/2014 01:03 PM, Chris Friesen wrote:
> On 02/11/2014 04:45 PM, Cole Robinson wrote:
>> On 02/10/2014 06:46 PM, Chris Friesen wrote:
>>> Hi,
>>>
>>> We've run into a problem with libvirt 1.1.2 and are looking for some comments
>>> on whether this is a bug or design intent.
>>>
>>> We're trying to use migrateToURI() but we're using a few things (numatune,
>>> vcpu mask, etc.) that may need adjustment during the migration. We found that
>>> migrateToURI2() mostly works if we use XML created by copying the domain XML
>>> from the running instance and modifying the appropriate sections.
>>>
>>> The problem that we're seeing is that the serial console checking in
>>> libvirt/src/conf/domain_conf.c::virDomainDefCheckABIStability() is failing
>>> even though we haven't touched the serial console XML:
>
>> I think we will have to see the XML your passing before and after edit to
>> figure out what's going wrong. Also, showing all the arguments you are
>> invoking the migration APIs with.
>
>
> Okay, this is going to be a long message. :)
>
> We're calling it as:
>
> dom.migrateToURI2(duri, muri, xml_str, logical_sum, None, CONF.live_migration_bandwidth)
>
> Here are the supplied arguments:
> duri = u'qemu+tcp://compute-0/system'
> muri = u'tcp://compute-0'
> flaglist = ['VIR_MIGRATE_UNDEFINE_SOURCE', 'VIR_MIGRATE_PEER2PEER', 'VIR_MIGRATE_LIVE']
> logical_sum = 19, (logical OR of flaglist)
> CONF.live_migration_bandwidth = 0
>
> Grabbing original XML prior to migration:
>
> dom_xml = etree.fromstring(dom.XMLDesc(0))
> xml_str = etree.tostring(dom_xml)
>
> xml_str (BEFORE) =
> <domain type="qemu" id="2">
> <name>instance-00000006</name>
> <uuid>2e13869b-edc0-40dc-92e3-1f2ffde60cce</uuid>
> <dpdk>
> <process type="secondary"/>
> <file prefix="vs"/>
> <cpu list="0"/>
> <memory channels="4"/>
> </dpdk>
> <memory unit="KiB">262144</memory>
> <currentMemory unit="KiB">262144</currentMemory>
> <memoryBacking>
> <hugepages/>
> </memoryBacking>
> <vcpu placement="static" cpuset="1-2">2</vcpu>
> <cputune>
> <vcpupin vcpu="0" cpuset="1"/>
> <vcpupin vcpu="1" cpuset="2"/>
> <emulatorpin cpuset="1-2"/>
> </cputune>
> <numatune>
> <memory mode="preferred" nodeset="0"/>
> </numatune>
> <sysinfo type="smbios">
> <system>
> <entry name="manufacturer">OpenStack Foundation</entry>
> <entry name="product">OpenStack Nova</entry>
> <entry name="version">2013.2.2</entry>
> <entry name="serial">771a1b10-d2f7-4ebb-b21e-4040560732f5</entry>
> <entry name="uuid">2e13869b-edc0-40dc-92e3-1f2ffde60cce</entry>
> </system>
> </sysinfo>
> <os>
> <type arch="x86_64" machine="pc-i440fx-1.4">hvm</type>
> <boot dev="hd"/>
> <smbios mode="sysinfo"/>
> </os>
> <features>
> <acpi/>
> <apic/>
> </features>
> <clock offset="utc"/>
> <on_poweroff>destroy</on_poweroff>
> <on_reboot>restart</on_reboot>
> <on_crash>destroy</on_crash>
> <devices>
> <emulator>/usr/bin/qemu-system-x86_64</emulator>
> <disk type="file" device="disk">
> <driver name="qemu" type="qcow2" cache="none"/>
> <source file="/etc/nova/instances/2e13869b-edc0-40dc-92e3-1f2ffde60cce/disk"/>
> <target dev="vda" bus="virtio"/>
> <alias name="virtio-disk0"/>
> <address type="pci" domain="0x0000" bus="0x00" slot="0x05" function="0x0"/>
> </disk>
> <controller type="usb" index="0">
> <alias name="usb0"/>
> <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x2"/>
> </controller>
> <controller type="pci" index="0" model="pci-root">
> <alias name="pci.0"/>
> </controller>
> <interface type="vswitch">
> <mac address="fa:16:3e:fb:34:6b"/>
> <source network="4db95d31-64f1-4f10-9138-5fe68c0d77ac"/>
> <target dev="7bc76b0e-b12a-4153-8ce8-d3d145c51e6f"/>
> <model type="e1000"/>
> <alias name="net0"/>
> <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x0"/>
> </interface>
> <interface type="vswitch">
> <mac address="fa:16:3e:d5:b9:50"/>
> <source network="8512742c-af3e-4787-b2d8-b0b9ab160297"/>
> <target dev="33ab1061-7fa4-4250-99a4-dd7eb4029aa1"/>
> <model type="e1000"/>
> <alias name="net1"/>
> <address type="pci" domain="0x0000" bus="0x00" slot="0x04" function="0x0"/>
> </interface>
> <serial type="file">
> <source path="/etc/nova/instances/2e13869b-edc0-40dc-92e3-1f2ffde60cce/console.log"/>
> <target port="0"/>
> <alias name="serial0"/>
> </serial>
> <serial type="pty">
> <source path="/dev/pts/1"/>
> <target port="1"/>
> <alias name="serial1"/>
> </serial>
> <console type="file">
> <source path="/etc/nova/instances/2e13869b-edc0-40dc-92e3-1f2ffde60cce/console.log"/>
> <target type="serial" port="0"/>
> <alias name="serial0"/>
> </console>
> <input type="tablet" bus="usb">
> <alias name="input0"/>
> </input>
> <input type="mouse" bus="ps2"/>
> <graphics type="vnc" port="5900" autoport="yes" listen="0.0.0.0" keymap="en-us">
> <listen type="address" address="0.0.0.0"/>
> </graphics>
> <video>
> <model type="cirrus" vram="9216" heads="1"/>
> <alias name="video0"/>
> <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0"/>
> </video>
> <memballoon model="virtio">
> <alias name="balloon0"/>
> <address type="pci" domain="0x0000" bus="0x00" slot="0x06" function="0x0"/>
> </memballoon>
> </devices>
> <seclabel type="none"/>
> </domain>
>
>
>
> This is the modified XML, specifically updating vcpu, cputune, numatune.
> In this case they actually have the same values as above but there are
> whitespace differences:
>
>
> xml_str (MODIFIED) =
> <domain type="qemu" id="2">
> <name>instance-00000006</name>
> <uuid>2e13869b-edc0-40dc-92e3-1f2ffde60cce</uuid>
> <dpdk>
> <process type="secondary"/>
> <file prefix="vs"/>
> <cpu list="0"/>
> <memory channels="4"/>
> </dpdk>
> <memory unit="KiB">262144</memory>
> <currentMemory unit="KiB">262144</currentMemory>
> <memoryBacking>
> <hugepages/>
> </memoryBacking>
> <vcpu placement="static" cpuset="1,2">2</vcpu>
> <cputune>
> <vcpupin vcpu="0" cpuset="1"/><vcpupin vcpu="1" cpuset="2"/><emulatorpin cpuset="1,2"/></cputune>
> <numatune>
> <memory mode="preferred" nodeset="0"/></numatune>
> <sysinfo type="smbios">
> <system>
> <entry name="manufacturer">OpenStack Foundation</entry>
> <entry name="product">OpenStack Nova</entry>
> <entry name="version">2013.2.2</entry>
> <entry name="serial">771a1b10-d2f7-4ebb-b21e-4040560732f5</entry>
> <entry name="uuid">2e13869b-edc0-40dc-92e3-1f2ffde60cce</entry>
> </system>
> </sysinfo>
> <os>
> <type arch="x86_64" machine="pc-i440fx-1.4">hvm</type>
> <boot dev="hd"/>
> <smbios mode="sysinfo"/>
> </os>
> <features>
> <acpi/>
> <apic/>
> </features>
> <clock offset="utc"/>
> <on_poweroff>destroy</on_poweroff>
> <on_reboot>restart</on_reboot>
> <on_crash>destroy</on_crash>
> <devices>
> <emulator>/usr/bin/qemu-system-x86_64</emulator>
> <disk type="file" device="disk">
> <driver name="qemu" type="qcow2" cache="none"/>
> <source file="/etc/nova/instances/2e13869b-edc0-40dc-92e3-1f2ffde60cce/disk"/>
> <target dev="vda" bus="virtio"/>
> <alias name="virtio-disk0"/>
> <address type="pci" domain="0x0000" bus="0x00" slot="0x05" function="0x0"/>
> </disk>
> <controller type="usb" index="0">
> <alias name="usb0"/>
> <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x2"/>
> </controller>
> <controller type="pci" index="0" model="pci-root">
> <alias name="pci.0"/>
> </controller>
> <interface type="vswitch">
> <mac address="fa:16:3e:fb:34:6b"/>
> <source network="4db95d31-64f1-4f10-9138-5fe68c0d77ac"/>
> <target dev="7bc76b0e-b12a-4153-8ce8-d3d145c51e6f"/>
> <model type="e1000"/>
> <alias name="net0"/>
> <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x0"/>
> </interface>
> <interface type="vswitch">
> <mac address="fa:16:3e:d5:b9:50"/>
> <source network="8512742c-af3e-4787-b2d8-b0b9ab160297"/>
> <target dev="33ab1061-7fa4-4250-99a4-dd7eb4029aa1"/>
> <model type="e1000"/>
> <alias name="net1"/>
> <address type="pci" domain="0x0000" bus="0x00" slot="0x04" function="0x0"/>
> </interface>
> <serial type="file">
> <source path="/etc/nova/instances/2e13869b-edc0-40dc-92e3-1f2ffde60cce/console.log"/>
> <target port="0"/>
> <alias name="serial0"/>
> </serial>
> <serial type="pty">
> <source path="/dev/pts/1"/>
> <target port="1"/>
> <alias name="serial1"/>
> </serial>
> <console type="file">
> <source path="/etc/nova/instances/2e13869b-edc0-40dc-92e3-1f2ffde60cce/console.log"/>
> <target type="serial" port="0"/>
> <alias name="serial0"/>
> </console>
> <input type="tablet" bus="usb">
> <alias name="input0"/>
> </input>
> <input type="mouse" bus="ps2"/>
> <graphics type="vnc" port="5900" autoport="yes" listen="0.0.0.0" keymap="en-us">
> <listen type="address" address="0.0.0.0"/>
> </graphics>
> <video>
> <model type="cirrus" vram="9216" heads="1"/>
> <alias name="video0"/>
> <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0"/>
> </video>
> <memballoon model="virtio">
> <alias name="balloon0"/>
> <address type="pci" domain="0x0000" bus="0x00" slot="0x06" function="0x0"/>
> </memballoon>
> </devices>
> <seclabel type="none"/>
> </domain>
>
>
>
> Calling migrateToURI2 then gives the following error :
> 2014-02-12 03:37:17.738 1251 ERROR nova.virt.libvirt.driver [-] [instance: 2e13869b-edc0-40dc-92e3-1f2ffde60cce] Live Migration failure: unsupported configuration: Target domain console count 1 does not match source 0
>
>
> If we remove the this section :
> <serial type="pty">
> <source path="/dev/pts/1"/>
> <target port="1"/>
> <alias name="serial1"/>
> </serial>
>
> Then we get the following error :
> 2014-02-12 04:19:12.689 1278 ERROR nova.virt.libvirt.driver [-] [instance: 90335c32-a7ae-4c99-8e5a-cd177f6b3c22] Live Migration failure: unsupported configuration: Target domain serial port count 1 does not match source 2
>
> If we remove just the following line:
> <source path="/dev/pts/1"/>
>
> so the modified portion looks like this,
> <serial type="file">
> <source path="/etc/nova/instances/00b99f94-436e-406b-8459-83e77758f154/console.log"/>
> <target port="0"/>
> <alias name="serial0"/>
> </serial>
> <serial type="pty">
> <target port="1"/>
> <alias name="serial1"/>
> </serial>
> <console type="file">
> <source path="/etc/nova/instances/00b99f94-436e-406b-8459-83e77758f154/console.log"/>
> <target type="serial" port="0"/>
> <alias name="serial0"/>
> </console>
> <input type="tablet" bus="usb">
>
> Then we get this error :
>
> 2014-02-12 04:29:06.402 5175 ERROR nova.virt.libvirt.driver [-] [instance: 00b99f94-436e-406b-8459-83e77758f154] Live Migration failure: unsupported configuration: Target domain console count 1 does not match source 0
>
> If we modify it with empty <serial type='pty'> element like this:
>
> <serial type="file">
> <source path="/etc/nova/instances/b1103349-8c9f-4315-9144-03fc22f09be1/console.log"/>
> <target port="0"/>
> <alias name="serial0"/>
> </serial>
> <serial type="pty">
> </serial>
> <console type="file">
> <source path="/etc/nova/instances/b1103349-8c9f-4315-9144-03fc22f09be1/console.log"/>
> <target type="serial" port="0"/>
> <alias name="serial0"/>
> </console>
>
> Then we get this error:
>
> 2014-02-12 04:36:45.686 5358 ERROR nova.virt.libvirt.driver [-] [instance: b1103349-8c9f-4315-9144-03fc22f09be1] Live Migration failure: unsupported configuration: Target domain console count 1 does not match source 0
>
> If we modify it with empty <serial type='pty'> element and also remove
> <console type='file'> section completely like this :
>
> <serial type="file">
> <source path="/etc/nova/instances/8cccb4ad-2abc-4513-b8fd-bfb811301677/console.log"/>
> <target port="0"/>
> <alias name="serial0"/>
> </serial>
> <serial type="pty">
> </serial>
>
> Then this successfully migrates!
>
> However, it then fails on subsequent migration back to the original host. Prior to migrating
> back the domain XML serial/console section looks like:
>
> <serial type="file">
> <source path="/etc/nova/instances/8cccb4ad-2abc-4513-b8fd-bfb811301677/console.log"/>
> <target port="0"/>
> <alias name="serial0"/>
> </serial>
> <serial type="pty">
> <source path="/dev/pts/1"/>
> <target port="1"/>
> <alias name="serial1"/>
> </serial>
> <console type="file">
> <source path="/etc/nova/instances/8cccb4ad-2abc-4513-b8fd-bfb811301677/console.log"/>
> <target type="serial" port="0"/>
> <alias name="serial0"/>
> </console>
>
> After modifying empty <serial type='pty'> element and removing the <console type='file'> section
> it looks like this :
>
> <serial type="file">
> <source path="/etc/nova/instances/8cccb4ad-2abc-4513-b8fd-bfb811301677/console.log"/>
> <target port="0"/>
> <alias name="serial0"/>
> </serial>
> <serial type="pty">
> </serial>
>
> But this give the following error when migrating back:
>
> 2014-02-12 06:00:19.831 7125 ERROR nova.virt.libvirt.driver [-] [instance: 8cccb4ad-2abc-4513-b8fd-bfb811301677] Live Migration failure: unsupported configuration: Target domain console count 0 does not match source 1
>
Thanks for the detailed info. Can you put that into an upstream libvirt bug
report? http://libvirt.org/bugs.html
Does this sound familiar to any other libvirt devs?
- Cole
10 years, 9 months
[libvirt] [PATCHv2 0/6] server-side domain event filtering
by Eric Blake
v1 was here: https://www.redhat.com/archives/libvir-list/2014-January/msg00689.html
Since then, I've rebased it on top of this patch which still
needs review: https://www.redhat.com/archives/libvir-list/2014-January/msg01406.html
as well as added patch 6 so that we don't have to repeat the
exercise of adding a new RPC down the road.
Eric Blake (6):
event: dynamically manage server-side RPC domain events
event: server RPC protocol tweaks for domain lifecycle events
event: prepare client to track domain callbackID
event: client RPC protocol tweaks for domain lifecycle events
event: convert remaining domain events to new style
event: pass reason for PM events
daemon/libvirtd.h | 3 +-
daemon/remote.c | 665 ++++++++++++++++++++++++++-------
src/conf/domain_event.c | 184 ++++++++--
src/conf/domain_event.h | 28 +-
src/conf/network_event.c | 6 +-
src/conf/object_event.c | 35 +-
src/conf/object_event_private.h | 6 +-
src/libvirt_internal.h | 7 +-
src/remote/remote_driver.c | 796 ++++++++++++++++++++++++++++++++--------
src/remote/remote_protocol.x | 195 +++++++++-
src/remote_protocol-structs | 95 +++++
11 files changed, 1679 insertions(+), 341 deletions(-)
--
1.8.5.3
10 years, 9 months
[libvirt] [PATCH] Fixed build with clang.
by Cédric Bosdonnat
Two unused global variables, and DBUS_TYPE_INVALID used as a const
char*.
---
src/phyp/phyp_driver.c | 1 -
src/storage/storage_backend_scsi.c | 24 ------------------------
src/util/virdbus.c | 2 +-
3 files changed, 1 insertion(+), 26 deletions(-)
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
index 20b5bd4..9adb6b0 100644
--- a/src/phyp/phyp_driver.c
+++ b/src/phyp/phyp_driver.c
@@ -66,7 +66,6 @@
* */
static unsigned const int HMC = 0;
-static unsigned const int IVM = 127;
static unsigned const int PHYP_IFACENAME_SIZE = 24;
static unsigned const int PHYP_MAC_SIZE = 12;
diff --git a/src/storage/storage_backend_scsi.c b/src/storage/storage_backend_scsi.c
index b38e530..44f17c9 100644
--- a/src/storage/storage_backend_scsi.c
+++ b/src/storage/storage_backend_scsi.c
@@ -107,30 +107,6 @@ struct diskType {
unsigned long long magic;
};
-static struct diskType const disk_types[] = {
- { VIR_STORAGE_POOL_DISK_LVM2, 0x218, 8, 0x31303020324D564CULL },
- { VIR_STORAGE_POOL_DISK_GPT, 0x200, 8, 0x5452415020494645ULL },
- { VIR_STORAGE_POOL_DISK_DVH, 0x0, 4, 0x41A9E50BULL },
- { VIR_STORAGE_POOL_DISK_MAC, 0x0, 2, 0x5245ULL },
- { VIR_STORAGE_POOL_DISK_BSD, 0x40, 4, 0x82564557ULL },
- { VIR_STORAGE_POOL_DISK_SUN, 0x1fc, 2, 0xBEDAULL },
- /*
- * NOTE: pc98 is funky; the actual signature is 0x55AA (just like dos), so
- * we can't use that. At the moment I'm relying on the "dummy" IPL
- * bootloader data that comes from parted. Luckily, the chances of running
- * into a pc98 machine running libvirt are approximately nil.
- */
- /*{ 0x1fe, 2, 0xAA55UL },*/
- { VIR_STORAGE_POOL_DISK_PC98, 0x0, 8, 0x314C5049000000CBULL },
- /*
- * NOTE: the order is important here; some other disk types (like GPT and
- * and PC98) also have 0x55AA at this offset. For that reason, the DOS
- * one must be the last one.
- */
- { VIR_STORAGE_POOL_DISK_DOS, 0x1fe, 2, 0xAA55ULL },
- { -1, 0x0, 0, 0x0ULL },
-};
-
static int
virStorageBackendSCSIUpdateVolTargetInfo(virStorageVolTargetPtr target,
unsigned long long *allocation,
diff --git a/src/util/virdbus.c b/src/util/virdbus.c
index a0cbbfe..a6232b7 100644
--- a/src/util/virdbus.c
+++ b/src/util/virdbus.c
@@ -1281,7 +1281,7 @@ int virDBusIsServiceEnabled(const char *name)
"/org/freedesktop/DBus",
"org.freedesktop.DBus",
"ListActivatableNames",
- DBUS_TYPE_INVALID) < 0)
+ NULL) < 0)
return ret;
if (!dbus_message_iter_init(reply, &iter) ||
--
1.8.5.2
10 years, 9 months
[libvirt] [PATCH] storage: handle NULL return from virGetStorageVol
by Michael Chapman
virGetStorageVol can return NULL on out-of-memory. If it does, cleanly
abort the volume clone operation.
Signed-off-by: Michael Chapman <mike(a)very.puzzling.org>
---
src/storage/storage_driver.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
index c83aa8a..2f7b2e5 100644
--- a/src/storage/storage_driver.c
+++ b/src/storage/storage_driver.c
@@ -1828,6 +1828,10 @@ storageVolCreateXMLFrom(virStoragePoolPtr obj,
pool->volumes.objs[pool->volumes.count++] = newvol;
volobj = virGetStorageVol(obj->conn, pool->def->name, newvol->name,
newvol->key, NULL, NULL);
+ if (!volobj) {
+ pool->volumes.count--;
+ goto cleanup;
+ }
/* Drop the pool lock during volume allocation */
pool->asyncjobs++;
--
1.8.3.1
10 years, 9 months
[libvirt] [PATCH 0/2] Partially revert separation of volume creating and building
by Ján Tomko
The storage driver expects 'createVol' to fill out the volume key.
For disk and logical backends, we generate the key only after the volume
has been built. Revert the separation commits for these backends.
Ján Tomko (2):
Revert "storage: lvm: Separate creating of the volume from building"
Revert "storage: disk: Separate creating of the volume from building"
src/storage/storage_backend_disk.c | 44 ++++++++-----------------
src/storage/storage_backend_logical.c | 60 ++++++++++++++---------------------
2 files changed, 37 insertions(+), 67 deletions(-)
--
1.8.3.2
10 years, 9 months
[libvirt] [PATCH] Fix leaks in vircapstest
by Ján Tomko
Coverity complains about cell_cpus being leaked on error
and valgrind shows 'caps' is leaked on success.
Introduced in eb64e87.
---
tests/vircapstest.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tests/vircapstest.c b/tests/vircapstest.c
index a40771d..4264e9e 100644
--- a/tests/vircapstest.c
+++ b/tests/vircapstest.c
@@ -40,7 +40,7 @@ static virCapsPtr
buildNUMATopology(int seq)
{
virCapsPtr caps;
- virCapsHostNUMACellCPUPtr cell_cpus;
+ virCapsHostNUMACellCPUPtr cell_cpus = NULL;
int core_id, cell_id;
int id;
@@ -75,6 +75,8 @@ buildNUMATopology(int seq)
return caps;
error:
+ virCapabilitiesClearHostNUMACellCPUTopology(cell_cpus, MAX_CPUS_IN_CELL);
+ VIR_FREE(cell_cpus);
virObjectUnref(caps);
return NULL;
@@ -87,7 +89,7 @@ test_virCapabilitiesGetCpusForNodemask(const void *data ATTRIBUTE_UNUSED)
const char *nodestr = "3,4,5,6";
virBitmapPtr nodemask = NULL;
virBitmapPtr cpumap = NULL;
- virCapsPtr caps;
+ virCapsPtr caps = NULL;
int mask_size = 8;
int ret = -1;
@@ -107,6 +109,7 @@ test_virCapabilitiesGetCpusForNodemask(const void *data ATTRIBUTE_UNUSED)
ret = 0;
error:
+ virObjectUnref(caps);
virBitmapFree(nodemask);
virBitmapFree(cpumap);
return ret;
--
1.8.3.2
10 years, 9 months
[libvirt] [PATCH] AppArmor: Fix the place where the template should be installed
by Cédric Bosdonnat
The security driver expects /etc/apparmor.d/libvirt/TEMPLATE but we
installed it to /etc/apparmor.d/libvirtd/TEMPLATE. Move the template to
the expected place since that code was here long before.
---
examples/apparmor/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/apparmor/Makefile.am b/examples/apparmor/Makefile.am
index 6e69440..2630fef 100644
--- a/examples/apparmor/Makefile.am
+++ b/examples/apparmor/Makefile.am
@@ -32,7 +32,7 @@ abstractions_DATA = \
libvirt-qemu \
$(NULL)
-templatesdir = $(apparmordir)/libvirtd
+templatesdir = $(apparmordir)/libvirt
templates_DATA = \
TEMPLATE \
$(NULL)
--
1.8.5.2
10 years, 9 months
[libvirt] [PATCH v2 0/2] Handle non-sequential NUMA node numbers
by Pradipta Kr. Banerjee
v2
*Add test case as suggested by Daniel
*Minor change in comments
Pradipta Kr. Banerjee (2):
Handle non-sequential NUMA node numbers
vircapstest: Introduce virCapabilitiesGetCpusForNodemask test
src/conf/capabilities.c | 12 ++++-
src/qemu/qemu_driver.c | 5 +-
src/qemu/qemu_process.c | 2 +-
tests/Makefile.am | 5 ++
tests/vircapstest.c | 129 ++++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 148 insertions(+), 5 deletions(-)
create mode 100644 tests/vircapstest.c
--
1.8.5.3
10 years, 9 months