[libvirt] [PATCH] Debug: Record the VM PID in per-VM logs.
by Prerna Saxena
For certain situations such as Out-of-memory scenarios, it is helpful to
record the QEMU PID in the per-VM logs, so that correlation with kernel-reported
events is easier.
While this is already recorded in libvirt daemon logs as a DEBUG message,
I believe it merits more attention :-)
Hence introducing it in per-VM log.
Signed-off-by: Prerna Saxena <saxenap.ltc(a)gmail.com>
---
src/qemu/qemu_process.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 4adb14e..2d3b0f5 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -4983,6 +4983,7 @@ qemuProcessLaunch(virConnectPtr conn,
int ret = -1;
int rv;
int logfile = -1;
+ char *msg_buffer = NULL;
qemuDomainLogContextPtr logCtxt = NULL;
qemuDomainObjPrivatePtr priv = vm->privateData;
virCommandPtr cmd = NULL;
@@ -5095,8 +5096,14 @@ qemuProcessLaunch(virConnectPtr conn,
_("Domain %s didn't show up"), vm->def->name);
rv = -1;
}
+
VIR_DEBUG("QEMU vm=%p name=%s running with pid=%llu",
vm, vm->def->name, (unsigned long long)vm->pid);
+ ignore_value(virAsprintf(&msg_buffer,
+ "QEMU vm=%p name=%s running with pid=%llu",
+ vm, vm->def->name, (unsigned long long)vm->pid));
+ qemuLogOperation(vm, msg_buffer, NULL, logCtxt);
+ virFree(msg_buffer);
} else {
VIR_DEBUG("QEMU vm=%p name=%s failed to spawn",
vm, vm->def->name);
--
1.8.1.2
8 years, 5 months
[libvirt] [PATCH] virt-admin: Output srv-threadpool-info data as unsigned int rather than signed
by Erik Skultety
Internally, all the data are represented as unsigned int, it is also documented
in the header file that users should use our exported constants that also
indicate that the data should be unsigned int. However, when polling for the
current server threadpool's configuration, virt-admin uses an incorrect
formatting parameter '%d' for printf. Instead, virt-admin should use formatting
parameter '%u'.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1356769
Signed-off-by: Erik Skultety <eskultet(a)redhat.com>
---
tools/virt-admin.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/virt-admin.c b/tools/virt-admin.c
index c4ee8f5..a59c4c7 100644
--- a/tools/virt-admin.c
+++ b/tools/virt-admin.c
@@ -458,7 +458,7 @@ cmdSrvThreadpoolInfo(vshControl *ctl, const vshCmd *cmd)
}
for (i = 0; i < nparams; i++)
- vshPrint(ctl, "%-15s: %d\n", params[i].field, params[i].value.ui);
+ vshPrint(ctl, "%-15s: %u\n", params[i].field, params[i].value.ui);
ret = true;
--
2.5.5
8 years, 5 months
[libvirt] [PATCH 0/7] Error path cleanup for hotplug and one function move/rename
by John Ferlan
During review of the LUKS series:
http://www.redhat.com/archives/libvir-list/2016-July/msg00488.html
it was noted that the error paths should use bools rather than goto failxxx
type labels. So this series does that for a few of the affect APIs. There's
also changes to qemuDomainAttachMemory since it seems it wasn't properly
handling 'props' at least w/r/t how qemuDomainAttachRNGDevice would clean
things up.
Finally - another part of the review noted that the qemu command line
comma escaping could be made more available since the storage driver
would potentially need it to build the qemuimg command line. So I moved
to virqemu and renamed.
John Ferlan (7):
qemu: Alter error path cleanup for qemuDomainAttachHostSCSIDevice
qemu: Alter error path cleanup for qemuDomainAttachVirtioDiskDevice
qemu: Alter error path cleanup for qemuDomainAttachSCSIDisk
qemu: Alter error path cleanup for qemuDomainAttachChrDevice
qemu: Alter error path cleanup for qemuDomainAttachRNGDevice
qemu: Alter error path cleanup for qemuDomainAttachMemory
qemu: Move and rename qemuBufferEscapeComma
src/libvirt_private.syms | 1 +
src/qemu/qemu_command.c | 33 +++-------
src/qemu/qemu_hotplug.c | 163 +++++++++++++++++++++++++++--------------------
src/util/virqemu.c | 15 +++++
src/util/virqemu.h | 2 +
5 files changed, 122 insertions(+), 92 deletions(-)
--
2.5.5
8 years, 5 months
[libvirt] [PATCH 0/9] Various patches as a result of Coverity
by John Ferlan
Been piling up a few Coverity changes, the later patches aren't anything
critical, but the first few are newer and it seems more likely to be hit
in common paths. In particular, the first 2 are from recent virconf changes.
John Ferlan (9):
util: Fix incorrect VIR_FREE in virConfGetValueStringList
tools: Fix comparison in virLoginShellGetShellArgv
tests: Need to check return of virGetLastError
conf: Need to check for glisten before accessing
vsh: Properly initialize res
esx: Replace strtok_r usage with virStringSplitCount
conf: Add ignore_value to virDomainDeviceInfoIterate calls for Clear
helpers
openvz: Remove need for strtok_r in openvzGenerateContainerVethName
openvz: Remove strtok_r calls from openvzReadNetworkConf
src/conf/domain_conf.c | 12 ++++++---
src/esx/esx_vi.c | 61 ++++++++++++++++++++--------------------------
src/openvz/openvz_conf.c | 33 +++++++++++++++----------
src/openvz/openvz_driver.c | 16 ++++++++----
src/util/virconf.c | 2 +-
tests/qemuhelptest.c | 4 ++-
tools/virt-login-shell.c | 6 +++--
tools/vsh.c | 4 +--
8 files changed, 76 insertions(+), 62 deletions(-)
--
2.5.5
8 years, 5 months
[libvirt] Adding ips and routes to type="ethernet" devices
by Ruben Kerkhof
Hi all,
I've been playing with the recently added support for adding ips and
routes to a type"ethernet" kind of device.
My goal is to get rid of bridging and use host routes (/32) combined
with Bird for a pure layer3 setup.
Something similar to what https://www.projectcalico.org/ is doing
Instead of p2p addresses with peers they use device routes (ip route
add 192.168.0.1/32 dev vnet0) combined with static arp entries.
I am a bit stuck though. I've created the vm with a tap device:
<interface type='ethernet'>
<mac address='00:1a:4a:1b:d9:cc'/>
<model type='virtio'/>
<rom bar="off"/>
<source>
<ip address='192.168.42.41' family='ipv4'
peer='192.168.42.42' prefix='32'/>
<route family='ipv4' address='192.168.100.0'
prefix='24' gateway='192.168.42.42'/>
</source>
</interface>
After starting, the link stays down and no ips or routes are being created:
root@test1: ~# ip link show dev vnet0
15: vnet0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode
DEFAULT qlen 1000
link/ether fe:1a:4a:1b:d9:cc brd ff:ff:ff:ff:ff:ff
root@test1: ~# ip route show
default via 10.10.5.1 dev br1010
10.10.5.0/24 dev br1010 proto kernel scope link src 10.10.5.2
I feel like I'm missing a step. Who is responsible for setting the
link up, it this libvirtd, qemu, or do I need to write a qemu-ifup
script?
Any help is greatly appreciated.
Kind regards,
Ruben Kerkhof
8 years, 5 months
[libvirt] [PATCH] Changes to support Veritas HyperScale (VxHS) block device protocol with qemu-kvm.
by Ashish Mittal
>From 9036f749f12d3bf4bf08e7e55b6d98109dd5e5c0 Mon Sep 17 00:00:00 2001
From: Ashish Mittal <ashish.mittal(a)veritas.com>
Date: Mon, 18 Jul 2016 16:21:37 -0700
Subject: [PATCH] Changes to support Veritas HyperScale (VxHS) block device protocol with qemu-kvm.
Changes to support Veritas HyperScale (VxHS) block device protocol with qemu-kvm.
Sample XML for a vxhs vdisk is as follows:
<disk type='network' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<source protocol='vxhs' name='{f7dea4ad-b3b1-4a54-ad78-468b248ebdd8}'>
<host name='172.172.17.2' port='9999'/>
<host name='172.172.17.5' port='9999'/>
</source>
<backingStore/>
<target dev='vda' bus='virtio'/>
<serial>f7dea4ad-b3b1-4a54-ad78-468b248ebdd8</serial>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</disk>
---
docs/formatdomain.html.in | 12 +++--
docs/schemas/domaincommon.rng | 1 +
src/qemu/qemu_command.c | 51 ++++++++++++++++++++++
src/qemu/qemu_driver.c | 3 ++
src/qemu/qemu_parse_command.c | 21 +++++++++
src/util/virstoragefile.c | 4 +-
src/util/virstoragefile.h | 1 +
.../qemuxml2argv-disk-drive-network-vxhs.args | 24 ++++++++++
.../qemuxml2argv-disk-drive-network-vxhs.xml | 35 +++++++++++++++
tests/qemuxml2argvtest.c | 1 +
10 files changed, 149 insertions(+), 4 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-vxhs.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-vxhs.xml
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 59a8bb9..13705fb 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -2171,9 +2171,9 @@
<dd>
The <code>protocol</code> attribute specifies the protocol to
access to the requested image. Possible values are "nbd",
- "iscsi", "rbd", "sheepdog" or "gluster". If the
- <code>protocol</code> attribute is "rbd", "sheepdog" or
- "gluster", an additional attribute <code>name</code> is
+ "iscsi", "rbd", "sheepdog", "gluster" or "vxhs". If the
+ <code>protocol</code> attribute is "rbd", "sheepdog", "gluster"
+ or "vxhs", an additional attribute <code>name</code> is
mandatory to specify which volume/image will be used. For "nbd",
the <code>name</code> attribute is optional. For "iscsi"
(<span class="since">since 1.0.4</span>), the <code>name</code>
@@ -2283,6 +2283,12 @@
<td> only one </td>
<td> 24007 </td>
</tr>
+ <tr>
+ <td> vxhs </td>
+ <td> a server running Veritas HyperScale daemon </td>
+ <td> one or more </td>
+ <td> 9999 </td>
+ </tr>
</table>
<p>
gluster supports "tcp", "rdma", "unix" as valid values for the
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 348dbfe..f279bf2 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -1416,6 +1416,7 @@
<value>ftp</value>
<value>ftps</value>
<value>tftp</value>
+ <value>vxhs</value>
</choice>
</attribute>
<optional>
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index fe4bb88..a52b78c 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -497,6 +497,7 @@ qemuNetworkDriveGetPort(int protocol,
return 0;
case VIR_STORAGE_NET_PROTOCOL_RBD:
+ case VIR_STORAGE_NET_PROTOCOL_VXHS:
case VIR_STORAGE_NET_PROTOCOL_LAST:
case VIR_STORAGE_NET_PROTOCOL_NONE:
/* not applicable */
@@ -889,6 +890,56 @@ qemuBuildNetworkDriveURI(virStorageSourcePtr src,
ret = virBufferContentAndReset(&buf);
break;
+ case VIR_STORAGE_NET_PROTOCOL_VXHS:
+ if (VIR_ALLOC(uri) < 0)
+ goto cleanup;
+
+ if (src->hosts->transport == VIR_STORAGE_NET_HOST_TRANS_TCP) {
+ if (VIR_STRDUP(uri->scheme,
+ virStorageNetProtocolTypeToString(src->protocol)) < 0)
+ goto cleanup;
+ } else {
+ if (virAsprintf(&uri->scheme, "%s+%s",
+ virStorageNetProtocolTypeToString(src->protocol),
+ virStorageNetHostTransportTypeToString(src->hosts->transport)) < 0)
+ goto cleanup;
+ }
+
+ if (src->path) {
+ if (src->volume) {
+ if (virAsprintf(&uri->path, "/%s%s",
+ src->volume, src->path) < 0)
+ goto cleanup;
+ } else {
+ if (virAsprintf(&uri->path, "%s%s",
+ src->path[0] == '/' ? "" : "/",
+ src->path) < 0)
+ goto cleanup;
+ }
+ }
+
+ if (src->hosts->socket &&
+ virAsprintf(&uri->query, "socket=%s", src->hosts->socket) < 0)
+ goto cleanup;
+
+ if (qemuBuildGeneralSecinfoURI(uri, secinfo) < 0)
+ goto cleanup;
+
+ for (i = 0; i < src->nhosts; i++) {
+ if ((uri->port = qemuNetworkDriveGetPort(src->protocol, src->hosts[i].port)) < 0)
+ goto cleanup;
+
+ if (VIR_STRDUP(uri->server, src->hosts[i].name) < 0)
+ goto cleanup;
+
+ ret = virURIFormat(uri);
+ virBufferEscape(&buf, ',', ",", "%s", ret);
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("qemuBuildVxHSString builturi '%s'"), ret);
+ }
+
+ ret = virBufferContentAndReset(&buf);
+ break;
case VIR_STORAGE_NET_PROTOCOL_LAST:
case VIR_STORAGE_NET_PROTOCOL_NONE:
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index cda85f6..1fdc8b0 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -13359,6 +13359,7 @@ qemuDomainSnapshotPrepareDiskExternalBackingInactive(virDomainDiskDefPtr disk)
case VIR_STORAGE_NET_PROTOCOL_FTP:
case VIR_STORAGE_NET_PROTOCOL_FTPS:
case VIR_STORAGE_NET_PROTOCOL_TFTP:
+ case VIR_STORAGE_NET_PROTOCOL_VXHS:
case VIR_STORAGE_NET_PROTOCOL_LAST:
virReportError(VIR_ERR_INTERNAL_ERROR,
_("external inactive snapshots are not supported on "
@@ -13421,6 +13422,7 @@ qemuDomainSnapshotPrepareDiskExternalOverlayActive(virDomainSnapshotDiskDefPtr d
case VIR_STORAGE_NET_PROTOCOL_FTP:
case VIR_STORAGE_NET_PROTOCOL_FTPS:
case VIR_STORAGE_NET_PROTOCOL_TFTP:
+ case VIR_STORAGE_NET_PROTOCOL_VXHS:
case VIR_STORAGE_NET_PROTOCOL_LAST:
virReportError(VIR_ERR_INTERNAL_ERROR,
_("external active snapshots are not supported on "
@@ -13565,6 +13567,7 @@ qemuDomainSnapshotPrepareDiskInternal(virConnectPtr conn,
case VIR_STORAGE_NET_PROTOCOL_FTP:
case VIR_STORAGE_NET_PROTOCOL_FTPS:
case VIR_STORAGE_NET_PROTOCOL_TFTP:
+ case VIR_STORAGE_NET_PROTOCOL_VXHS:
case VIR_STORAGE_NET_PROTOCOL_LAST:
virReportError(VIR_ERR_INTERNAL_ERROR,
_("internal inactive snapshots are not supported on "
diff --git a/src/qemu/qemu_parse_command.c b/src/qemu/qemu_parse_command.c
index 3f7e445..65d9983 100644
--- a/src/qemu/qemu_parse_command.c
+++ b/src/qemu/qemu_parse_command.c
@@ -263,6 +263,16 @@ qemuParseNBDString(virDomainDiskDefPtr disk)
return -1;
}
+static int
+qemuParseVxHSString(virDomainDiskDefPtr def)
+{
+ virURIPtr uri = NULL;
+
+ if (!(uri = virURIParse(def->src->path)))
+ return -1;
+
+ return qemuParseDriveURIString(def, uri, "vxhs");
+}
/*
* This method takes a string representing a QEMU command line ARGV set
@@ -737,6 +747,12 @@ qemuParseCommandLineDisk(virDomainXMLOptionPtr xmlopt,
if (VIR_STRDUP(def->src->path, vdi) < 0)
goto error;
}
+ } else if (STRPREFIX(def->src->path, "vxhs:")) {
+ def->src->type = VIR_STORAGE_TYPE_NETWORK;
+ def->src->protocol = VIR_STORAGE_NET_PROTOCOL_VXHS;
+
+ if (qemuParseVxHSString(def) < 0)
+ goto error;
} else {
def->src->type = VIR_STORAGE_TYPE_FILE;
}
@@ -2009,6 +2025,11 @@ qemuParseCommandLine(virCapsPtr caps,
goto error;
break;
+ case VIR_STORAGE_NET_PROTOCOL_VXHS:
+ if (qemuParseVxHSString(disk) < 0)
+ goto error;
+
+ break;
case VIR_STORAGE_NET_PROTOCOL_HTTP:
case VIR_STORAGE_NET_PROTOCOL_HTTPS:
case VIR_STORAGE_NET_PROTOCOL_FTP:
diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
index 16de603..11f9b2c 100644
--- a/src/util/virstoragefile.c
+++ b/src/util/virstoragefile.c
@@ -83,7 +83,8 @@ VIR_ENUM_IMPL(virStorageNetProtocol, VIR_STORAGE_NET_PROTOCOL_LAST,
"https",
"ftp",
"ftps",
- "tftp")
+ "tftp",
+ "vxhs")
VIR_ENUM_IMPL(virStorageNetHostTransport, VIR_STORAGE_NET_HOST_TRANS_LAST,
"tcp",
@@ -2500,6 +2501,7 @@ virStorageSourceParseBackingColon(virStorageSourcePtr src,
case VIR_STORAGE_NET_PROTOCOL_TFTP:
case VIR_STORAGE_NET_PROTOCOL_ISCSI:
case VIR_STORAGE_NET_PROTOCOL_GLUSTER:
+ case VIR_STORAGE_NET_PROTOCOL_VXHS:
virReportError(VIR_ERR_INTERNAL_ERROR,
_("malformed backing store path for protocol %s"),
protocol);
diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h
index 78beaf4..586d843 100644
--- a/src/util/virstoragefile.h
+++ b/src/util/virstoragefile.h
@@ -132,6 +132,7 @@ typedef enum {
VIR_STORAGE_NET_PROTOCOL_FTP,
VIR_STORAGE_NET_PROTOCOL_FTPS,
VIR_STORAGE_NET_PROTOCOL_TFTP,
+ VIR_STORAGE_NET_PROTOCOL_VXHS,
VIR_STORAGE_NET_PROTOCOL_LAST
} virStorageNetProtocol;
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-vxhs.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-vxhs.args
new file mode 100644
index 0000000..3553bad
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-vxhs.args
@@ -0,0 +1,24 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/libexec/qemu-kvm \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-cpu qemu32 \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-nodefaults \
+-monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=vxhs://192.168.0.1:9999/%7Beb90327c-8302-4725-9e1b-4e85ed4dc251%7D\
+vxhs://172.172.17.56:9999/%7Beb90327c-8302-4725-9e1b-4e85ed4dc251%7D,\
+format=raw,if=none,id=drive-virtio-disk0,cache=none \
+-device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-vxhs.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-vxhs.xml
new file mode 100644
index 0000000..6ef2d98
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-vxhs.xml
@@ -0,0 +1,35 @@
+<domain type='qemu'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <memory unit='KiB'>219136</memory>
+ <currentMemory unit='KiB'>219136</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='i686' machine='pc'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/libexec/qemu-kvm</emulator>
+ <disk type='network' device='disk'>
+ <driver name='qemu' type='raw' cache='none'/>
+ <source protocol='vxhs' name='{eb90327c-8302-4725-9e1b-4e85ed4dc251}'>
+ <host name='192.168.0.1' port='9999'/>
+ <host name='172.172.17.56' port='9999'/>
+ </source>
+ <backingStore/>
+ <target dev='vda' bus='virtio'/>
+ <serial>eb90327c-8302-4725-9e1b-4e85ed4dc251</serial>
+ <alias name='virtio-disk0'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+ </disk>
+ <controller type='usb' index='0'/>
+ <controller type='pci' index='0' model='pci-root'/>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <memballoon model='none'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index e0d07e8..13ef4e4 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -801,6 +801,7 @@ mymain(void)
# endif
DO_TEST("disk-drive-network-rbd-ipv6", NONE);
DO_TEST_FAILURE("disk-drive-network-rbd-no-colon", NONE);
+ DO_TEST("disk-drive-network-vxhs", NONE);
DO_TEST("disk-drive-no-boot",
QEMU_CAPS_BOOTINDEX);
DO_TEST_PARSE_ERROR("disk-device-lun-type-invalid",
--
2.5.4 (Apple Git-61)
8 years, 5 months
[libvirt] [PATCH] fs: Fix '<' comparison of value produced by logical not '!'
by Erik Skultety
Commit da665fbd introduced the following condition to virLXCProcessEnsureRootFS
and openvzReadFSConf:
if (!(<some_var> = virDomainFSDefNew()) < 0)
which broke the build on fedora with GCC 5.3.1: "logical not is only applied to
the left hand side of comparison".
Signed-off-by: Erik Skultety <eskultet(a)redhat.com>
---
Pushed under the build breaker rule.
src/lxc/lxc_process.c | 2 +-
src/openvz/openvz_conf.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c
index 6761394..7703fe1 100644
--- a/src/lxc/lxc_process.c
+++ b/src/lxc/lxc_process.c
@@ -1153,7 +1153,7 @@ virLXCProcessEnsureRootFS(virDomainObjPtr vm)
if (root)
return 0;
- if (!(root = virDomainFSDefNew()) < 0)
+ if (!(root = virDomainFSDefNew()))
goto error;
root->type = VIR_DOMAIN_FS_TYPE_MOUNT;
diff --git a/src/openvz/openvz_conf.c b/src/openvz/openvz_conf.c
index cb30b32..9b820a9 100644
--- a/src/openvz/openvz_conf.c
+++ b/src/openvz/openvz_conf.c
@@ -351,7 +351,7 @@ openvzReadFSConf(virDomainDefPtr def,
veid);
goto error;
} else if (ret > 0) {
- if (!(fs = virDomainFSDefNew()) < 0)
+ if (!(fs = virDomainFSDefNew()))
goto error;
fs->type = VIR_DOMAIN_FS_TYPE_TEMPLATE;
--
2.5.5
8 years, 5 months
[libvirt] [PATCH] security: compilation error due to wrong parameter for vah_add_path().
by Julio Faracco
The commit da665fbd introduced virStorageSourcePtr inside the structure
_virDomainFSDef. This is causing an error when libvirt is being compiled.
make[3]: Entering directory `/media/julio/8d65c59c-6ade-4740-9cdc-38016a4cb8ae
/home/julio/Desktop/virt/libvirt/src'
CC security/virt_aa_helper-virt-aa-helper.o
security/virt-aa-helper.c: In function 'get_files':
security/virt-aa-helper.c:1087:13: error: passing argument 2 of 'vah_add_path'
from incompatible pointer type [-Werror]
if (vah_add_path(&buf, fs->src, "rw", true) != 0)
^
security/virt-aa-helper.c:732:1: note: expected 'const char *' but argument is
of type 'virStorageSourcePtr'
vah_add_path(virBufferPtr buf, const char *path, const char *perms, bool
recursive)
^
cc1: all warnings being treated as errors
Adding the attribute "path" from virStorageSourcePtr fixes this issue.
Signed-off-by: Julio Faracco <jcfaracco(a)gmail.com>
---
src/security/virt-aa-helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c
index 9eafaee..805d7d7 100644
--- a/src/security/virt-aa-helper.c
+++ b/src/security/virt-aa-helper.c
@@ -1084,7 +1084,7 @@ get_files(vahControl * ctl)
/* We don't need to add deny rw rules for readonly mounts,
* this can only lead to troubles when mounting / readonly.
*/
- if (vah_add_path(&buf, fs->src, "rw", true) != 0)
+ if (vah_add_path(&buf, fs->src->path, "rw", true) != 0)
goto cleanup;
}
}
--
1.9.1
8 years, 5 months
[libvirt] [PATCH 00/10] Remove caching of address sets
by Tomasz Flendrich
These patches delete the caching of pci, virtioSerial and ccw address sets.
I am deleting them, because they can be recalculated from the domain definition,
and there's no point in keeping redundant data, especially because handling
a persistent cache of addresses required using functions that released addresses.
These functions aren't useful anymore, so they are dropped too.
Tomasz Flendrich (10):
add virDomainVirtioSerialAddrSetCreateFromDomain
qemu_hotplug: generate vioserial address list on demand
qemu: remove vioserialaddrs caching
Add qemuDomainCCWAddrSetCreateFromDomain
qemu_hotplug: generate ccw address list on demand
qemu: remove ccwaddrs caching
add qemuDomainPCIAddrSetCreateFromDomain
qemu_hotplug: generate pci address list on demand
qemu: remove pciaddrs caching
Remove unused functions that release addresses
src/conf/domain_addr.c | 123 ++++++++-----------------------
src/conf/domain_addr.h | 15 +---
src/libvirt_private.syms | 4 +-
src/qemu/qemu_domain.c | 3 -
src/qemu/qemu_domain.h | 4 --
src/qemu/qemu_domain_address.c | 160 ++++++++++++++++++-----------------------
src/qemu/qemu_domain_address.h | 11 ++-
src/qemu/qemu_hotplug.c | 153 ++++++++++++++++++++++-----------------
8 files changed, 200 insertions(+), 273 deletions(-)
--
2.7.4 (Apple Git-66)
8 years, 5 months
[libvirt] [PATCH 0/2] vz: add tcp and udp serial device support
by Nikolay Shirokovskiy
Nikolay Shirokovskiy (2):
vz: add mode of unix socket serial device to xml dump
vz: add tcp and udp serial device support
src/vz/vz_sdk.c | 111 ++++++++++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 96 insertions(+), 15 deletions(-)
--
1.8.3.1
8 years, 5 months