[libvirt] [libvirt PATCH] qemu: Support discard for disk
by Osier Yang
QEMU introduced "discard" option for drive since commit a9384aff53,
<...>
@var{discard} is one of "ignore" (or "off") or "unmap" (or "on") and
controls whether @dfn{discard} (also known as @dfn{trim} or @dfn{unmap})
requests are ignored or passed to the filesystem. Some machine types
may not support discard requests.
</...>
This patch exposes the support in libvirt.
QEMU supported "discard" for "-drive" since v1.5.0-rc0:
% git tag --contains a9384aff53
contains
v1.5.0-rc0
v1.5.0-rc1
So this only detects the capability bit using virQEMUCapsProbeQMPCommandLine.
---
This is on top of https://www.redhat.com/archives/libvir-list/2013-May/msg00979.html
---
docs/formatdomain.html.in | 8 +++++
docs/schemas/domaincommon.rng | 11 +++++++
src/conf/domain_conf.c | 18 +++++++++++
src/conf/domain_conf.h | 10 ++++++
src/libvirt_private.syms | 1 +
src/qemu/qemu_capabilities.c | 2 ++
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 11 +++++++
.../qemuxml2argv-disk-drive-discard.args | 8 +++++
.../qemuxml2argv-disk-drive-discard.xml | 37 ++++++++++++++++++++++
tests/qemuxml2argvtest.c | 3 ++
tests/qemuxml2xmltest.c | 2 ++
12 files changed, 112 insertions(+)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-discard.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-discard.xml
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 9ade507..a73d72e 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -1681,6 +1681,14 @@
network. By default copy-on-read is off.
<span class='since'>Since 0.9.10 (QEMU and KVM only)</span>
</li>
+ <li>
+ The optional <code>discard</code> attribute controls whether
+ to discard (also known as "trim" or "unmap") requests are
+ ignored or passed to the filesystem. The value can be either
+ "on" (allow the discard request to be passed) or "off" (ingore
+ the discard request).
+ <span class='since'>Since 1.0.6 (QEMU and KVM only)</span>
+ </li>
</ul>
</dd>
<dt><code>boot</code></dt>
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 8004428..2083e95 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -1304,6 +1304,9 @@
<optional>
<ref name="copy_on_read"/>
</optional>
+ <optional>
+ <ref name="discard"/>
+ </optional>
<empty/>
</element>
</define>
@@ -1399,6 +1402,14 @@
<value>off</value>
</choice>
</attribute>
+ </define>
+ <define name="discard">
+ <attribute name='discard'>
+ <choice>
+ <value>on</value>
+ <value>off</value>
+ </choice>
+ </attribute>
</define>
<define name="controller">
<element name="controller">
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 862b997..f632c02 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -743,6 +743,10 @@ VIR_ENUM_IMPL(virDomainTPMModel, VIR_DOMAIN_TPM_MODEL_LAST,
VIR_ENUM_IMPL(virDomainTPMBackend, VIR_DOMAIN_TPM_TYPE_LAST,
"passthrough")
+VIR_ENUM_IMPL(virDomainDiskDiscard, VIR_DOMAIN_DISK_DISCARD_LAST,
+ "default",
+ "on",
+ "off")
#define VIR_DOMAIN_XML_WRITE_FLAGS VIR_DOMAIN_XML_SECURE
#define VIR_DOMAIN_XML_READ_FLAGS VIR_DOMAIN_XML_INACTIVE
@@ -4534,6 +4538,7 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
char *wwn = NULL;
char *vendor = NULL;
char *product = NULL;
+ char *discard = NULL;
int expected_secret_usage = -1;
int auth_secret_usage = -1;
@@ -4761,6 +4766,7 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
ioeventfd = virXMLPropString(cur, "ioeventfd");
event_idx = virXMLPropString(cur, "event_idx");
copy_on_read = virXMLPropString(cur, "copy_on_read");
+ discard = virXMLPropString(cur, "discard");
} else if (!mirror && xmlStrEqual(cur->name, BAD_CAST "mirror") &&
!(flags & VIR_DOMAIN_XML_INACTIVE)) {
char *ready;
@@ -5207,6 +5213,14 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
def->copy_on_read = cor;
}
+ if (discard) {
+ if ((def->discard = virDomainDiskDiscardTypeFromString(discard)) <= 0) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("unknown disk discard mode '%s'"), discard);
+ goto error;
+ }
+ }
+
if (devaddr) {
if (virDomainParseLegacyDeviceAddress(devaddr,
&def->info.addr.pci) < 0) {
@@ -5326,6 +5340,7 @@ cleanup:
VIR_FREE(ioeventfd);
VIR_FREE(event_idx);
VIR_FREE(copy_on_read);
+ VIR_FREE(discard);
VIR_FREE(devaddr);
VIR_FREE(serial);
virStorageEncryptionFree(encryption);
@@ -13642,6 +13657,7 @@ virDomainDiskDefFormat(virBufferPtr buf,
const char *event_idx = virDomainVirtioEventIdxTypeToString(def->event_idx);
const char *copy_on_read = virDomainVirtioEventIdxTypeToString(def->copy_on_read);
const char *sgio = virDomainDiskSGIOTypeToString(def->sgio);
+ const char *discard = virDomainDiskDiscardTypeToString(def->discard);
char uuidstr[VIR_UUID_STRING_BUFLEN];
@@ -13718,6 +13734,8 @@ virDomainDiskDefFormat(virBufferPtr buf,
virBufferAsprintf(buf, " event_idx='%s'", event_idx);
if (def->copy_on_read)
virBufferAsprintf(buf, " copy_on_read='%s'", copy_on_read);
+ if (def->discard)
+ virBufferAsprintf(buf, " discard='%s'", discard);
virBufferAddLit(buf, "/>\n");
}
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index a9d3410..67ea91e 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -625,6 +625,14 @@ enum virDomainDiskSGIO {
VIR_DOMAIN_DISK_SGIO_LAST
};
+enum virDomainDiskDiscard {
+ VIR_DOMAIN_DISK_DISCARD_DEFAULT = 0,
+ VIR_DOMAIN_DISK_DISCARD_ON,
+ VIR_DOMAIN_DISK_DISCARD_OFF,
+
+ VIR_DOMAIN_DISK_DISCARD_LAST
+};
+
typedef struct _virDomainBlockIoTuneInfo virDomainBlockIoTuneInfo;
struct _virDomainBlockIoTuneInfo {
unsigned long long total_bytes_sec;
@@ -707,6 +715,7 @@ struct _virDomainDiskDef {
bool rawio_specified;
int rawio; /* no = 0, yes = 1 */
int sgio; /* enum virDomainDiskSGIO */
+ int discard; /* enum virDomainDiskDiscard */
size_t nseclabels;
virSecurityDeviceLabelDefPtr *seclabels;
@@ -2462,6 +2471,7 @@ VIR_ENUM_DECL(virDomainDiskIo)
VIR_ENUM_DECL(virDomainDiskSecretType)
VIR_ENUM_DECL(virDomainDiskSGIO)
VIR_ENUM_DECL(virDomainDiskTray)
+VIR_ENUM_DECL(virDomainDiskDiscard)
VIR_ENUM_DECL(virDomainIoEventFd)
VIR_ENUM_DECL(virDomainVirtioEventIdx)
VIR_ENUM_DECL(virDomainDiskCopyOnRead)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index cdd0b41..cc734da 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -142,6 +142,7 @@ virDomainDiskDefFree;
virDomainDiskDefGenSecurityLabelDef;
virDomainDiskDefGetSecurityLabelDef;
virDomainDiskDeviceTypeToString;
+virDomainDiskDiscardTypeToString;
virDomainDiskErrorPolicyTypeFromString;
virDomainDiskErrorPolicyTypeToString;
virDomainDiskFindByBusAndDst;
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index c711e92..e6cb091 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -228,6 +228,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
"scsi-generic.bootindex", /* 145 */
"mem-merge",
+ "drive-discard",
);
struct _virQEMUCaps {
@@ -2243,6 +2244,7 @@ struct virQEMUCapsCommandLineProps {
static struct virQEMUCapsCommandLineProps virQEMUCapsCommandLine[] = {
{ "machine", "mem-merge", QEMU_CAPS_MEM_MERGE },
+ { "drive", "discard", QEMU_CAPS_DRIVE_DISCARD },
};
static int
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 477e526..e30a550 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -185,6 +185,7 @@ enum virQEMUCapsFlags {
QEMU_CAPS_DEVICE_SCSI_GENERIC = 144, /* -device scsi-generic */
QEMU_CAPS_DEVICE_SCSI_GENERIC_BOOTINDEX = 145, /* -device scsi-generic.bootindex */
QEMU_CAPS_MEM_MERGE = 146, /* -machine mem-merge */
+ QEMU_CAPS_DRIVE_DISCARD = 147, /* -drive discard=off(ignore)|on(unmap) */
QEMU_CAPS_LAST, /* this must always be the last item */
};
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index eddc263..053f553 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -3267,6 +3267,17 @@ qemuBuildDriveStr(virConnectPtr conn ATTRIBUTE_UNUSED,
}
}
+ if (disk->discard) {
+ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_DISCARD)) {
+ virBufferAsprintf(&opt, ",discard=%s",
+ virDomainDiskDiscardTypeToString(disk->discard));
+ } else {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("discard is not supported by this QEMU binary"));
+ goto error;
+ }
+ }
+
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_MONITOR_JSON)) {
const char *wpolicy = NULL, *rpolicy = NULL;
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-discard.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-discard.args
new file mode 100644
index 0000000..02e2ddb
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-discard.args
@@ -0,0 +1,8 @@
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \
+/usr/bin/qemu -S -M pc-0.13 -m 1024 -smp 1 -nographic -nodefaults \
+-monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot dc -usb \
+-drive file=/var/lib/libvirt/images/f14.img,if=none,id=drive-virtio-disk0,discard=on \
+-device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0 \
+-drive file=/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso,if=none,media=cdrom,id=drive-ide0-1-0,discard=off \
+-device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-discard.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-discard.xml
new file mode 100644
index 0000000..a6a8135
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-discard.xml
@@ -0,0 +1,37 @@
+<domain type='qemu'>
+ <name>test</name>
+ <uuid>92d7a226-cfae-425b-a6d3-00bbf9ec5c9e</uuid>
+ <memory unit='KiB'>1048576</memory>
+ <currentMemory unit='KiB'>1048576</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='x86_64' machine='pc-0.13'>hvm</type>
+ <boot dev='cdrom'/>
+ <boot dev='hd'/>
+ <bootmenu enable='yes'/>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>restart</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu</emulator>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='qcow2' discard='on'/>
+ <source file='/var/lib/libvirt/images/f14.img'/>
+ <target dev='vda' bus='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+ </disk>
+ <disk type='file' device='cdrom'>
+ <driver name='qemu' type='raw' discard='off'/>
+ <source file='/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso'/>
+ <target dev='hdc' bus='ide'/>
+ <readonly/>
+ <address type='drive' controller='0' bus='1' target='0' unit='0'/>
+ </disk>
+ <controller type='usb' index='0'/>
+ <controller type='ide' index='0'/>
+ <controller type='pci' index='0' model='pci-root'/>
+ <memballoon model='virtio'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 98ceb83..46dd7de 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -579,6 +579,9 @@ mymain(void)
QEMU_CAPS_DRIVE, QEMU_CAPS_DRIVE_COPY_ON_READ,
QEMU_CAPS_VIRTIO_TX_ALG, QEMU_CAPS_DEVICE,
QEMU_CAPS_VIRTIO_BLK_SCSI, QEMU_CAPS_VIRTIO_BLK_SG_IO);
+ DO_TEST("disk-drive-discard",
+ QEMU_CAPS_DRIVE, QEMU_CAPS_DRIVE_DISCARD,
+ QEMU_CAPS_DEVICE);
DO_TEST("disk-snapshot",
QEMU_CAPS_DRIVE, QEMU_CAPS_DRIVE_CACHE_V2, QEMU_CAPS_DRIVE_FORMAT);
DO_TEST("event_idx",
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 492ac60..ffb0e87 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -259,6 +259,8 @@ mymain(void)
DO_TEST("disk-scsi-disk-vpd");
DO_TEST("disk-source-pool");
+ DO_TEST("disk-drive-discard");
+
DO_TEST("virtio-rng-random");
DO_TEST("virtio-rng-egd");
--
1.8.1.4
11 years, 8 months
[libvirt] [PATCH 0/4] Misc cleanups & fixes to LXC driver
by Daniel P. Berrange
From: "Daniel P. Berrange" <berrange(a)redhat.com>
This series starts with a few cleanup patches removing code
that is no longer required. The final patch fixes an important
bug preventing LXC startup on certain distros which unwisely
chose to make /var/run an absolute symlink instead of a relative
symlink
Daniel P. Berrange (4):
Remove obsolete pivotRoot flag in LXC driver
Stop passing around old root directory prefix
Remove obsolete skipRoot flag in LXC driver
Fix LXC startup when /var/run is an absolute symlink
src/lxc/lxc_container.c | 139 ++++++++++++++++++++++--------------------------
1 file changed, 65 insertions(+), 74 deletions(-)
--
1.8.2.1
11 years, 8 months
[libvirt] [PATCH 0/4] Fix issues with guest lifecycle event action settings
by John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=916052
Domain lifecycle events "on_reboot" and "on_poweroff" translate into QEMU
command options "no-reboot" and "no-shutdown" at startup time. The existing
code only checked the "on_reboot" setting to determine whether to add the
"no-reboot" option even though "on_poweroff" could have been set to allow
reboot. Changed the logic to only use "no-reboot" if each of the lifecycle
event actions was "destroy". I considered adding "preserve" as well; however,
a future preserve action might be able to cull something from a qemu process
that doesn't just exit immediately. NB, previously it was possible to have
both QEMU command options on the command line, which while not tagged as
an error could be considered "odd".
During the shutdown or reboot domain operations, the calls to qemuAgentShutdown
and qemuDomainSetFakeReboot did not consider the possibility that the event
action for shutdown was reboot or the event action for reboot was destroy.
This patch fixes that. NB, I wasn't sure how I could "convey" that to the
user though. The virsh reboot will still issue the message "Domain is being
rebooted" even though it could be destroyed. Like was virsh shutdown will
still issue the message "Domain is being shutdown" even though it is being
rebooted. The usage of VIR_INFO was an attempt to do that even though one
would have to have the correct debug level set.
Adjusted the documentation in order to describe the possible actions based
on the event lifecycle action settings of the domain.
John Ferlan (4):
Adjust usage of qemu -no-reboot and -no-shutdown options
Adjust comments to describe on_poweroff and on_reboot action
Handle the domain event 'on_reboot' and 'on_poweroff' settings
docs: Update formatdomain for lifecycle events
docs/formatdomain.html.in | 30 ++++++++++++++++++++++--------
src/libvirt.c | 15 +++++++++++----
src/qemu/qemu_command.c | 17 +++++++++++++----
src/qemu/qemu_driver.c | 26 ++++++++++++++++++++++----
4 files changed, 68 insertions(+), 20 deletions(-)
--
1.8.1.4
11 years, 8 months
[libvirt] [PATCH v2] interface: report generic error message of lookup failure
by Guannan Ren
"couldn't find interface named"
"couldn't find interface with MAC address"
use generic message as follows
"couldn't find interface with"
---
src/interface/interface_backend_netcf.c | 16 ++++++++--------
src/interface/interface_backend_udev.c | 8 ++++----
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/interface/interface_backend_netcf.c b/src/interface/interface_backend_netcf.c
index cbba4fd..c6f3f42 100644
--- a/src/interface/interface_backend_netcf.c
+++ b/src/interface/interface_backend_netcf.c
@@ -104,12 +104,12 @@ static struct netcf_if *interfaceDriverGetNetcfIF(struct netcf *ncf, virInterfac
int errcode = ncf_error(ncf, &errmsg, &details);
if (errcode != NETCF_NOERROR) {
virReportError(netcf_to_vir_err(errcode),
- _("couldn't find interface named '%s': %s%s%s"),
+ _("couldn't find interface with '%s': %s%s%s"),
ifinfo->name, errmsg, details ? " - " : "",
details ? details : "");
} else {
virReportError(VIR_ERR_NO_INTERFACE,
- _("couldn't find interface named '%s'"),
+ _("couldn't find interface with '%s'"),
ifinfo->name);
}
}
@@ -334,7 +334,7 @@ netcfConnectListAllInterfaces(virConnectPtr conn,
int errcode = ncf_error(driver->netcf, &errmsg, &details);
if (errcode != NETCF_NOERROR) {
virReportError(netcf_to_vir_err(errcode),
- _("couldn't find interface named '%s': %s%s%s"),
+ _("couldn't find interface with '%s': %s%s%s"),
names[i], errmsg,
details ? " - " : "", details ? details : "");
goto cleanup;
@@ -342,7 +342,7 @@ netcfConnectListAllInterfaces(virConnectPtr conn,
/* Ignore the NETCF_NOERROR, as the interface is very likely
* deleted by other management apps (e.g. virt-manager).
*/
- VIR_WARN("couldn't find interface named '%s', might be "
+ VIR_WARN("couldn't find interface with '%s', might be "
"deleted by other process", names[i]);
continue;
}
@@ -421,12 +421,12 @@ static virInterfacePtr netcfInterfaceLookupByName(virConnectPtr conn,
int errcode = ncf_error(driver->netcf, &errmsg, &details);
if (errcode != NETCF_NOERROR) {
virReportError(netcf_to_vir_err(errcode),
- _("couldn't find interface named '%s': %s%s%s"),
+ _("couldn't find interface with '%s': %s%s%s"),
name, errmsg,
details ? " - " : "", details ? details : "");
} else {
virReportError(VIR_ERR_NO_INTERFACE,
- _("couldn't find interface named '%s'"), name);
+ _("couldn't find interface with '%s'"), name);
}
goto cleanup;
}
@@ -454,14 +454,14 @@ static virInterfacePtr netcfInterfaceLookupByMACString(virConnectPtr conn,
const char *errmsg, *details;
int errcode = ncf_error(driver->netcf, &errmsg, &details);
virReportError(netcf_to_vir_err(errcode),
- _("couldn't find interface with MAC address '%s': %s%s%s"),
+ _("couldn't find interface with '%s': %s%s%s"),
macstr, errmsg, details ? " - " : "",
details ? details : "");
goto cleanup;
}
if (niface == 0) {
virReportError(VIR_ERR_NO_INTERFACE,
- _("couldn't find interface with MAC address '%s'"),
+ _("couldn't find interface with '%s'"),
macstr);
goto cleanup;
}
diff --git a/src/interface/interface_backend_udev.c b/src/interface/interface_backend_udev.c
index 1fd7d46..e61be52 100644
--- a/src/interface/interface_backend_udev.c
+++ b/src/interface/interface_backend_udev.c
@@ -420,7 +420,7 @@ udevInterfaceLookupByName(virConnectPtr conn, const char *name)
dev = udev_device_new_from_subsystem_sysname(udev, "net", name);
if (!dev) {
virReportError(VIR_ERR_NO_INTERFACE,
- _("couldn't find interface named '%s'"),
+ _("couldn't find interface with '%s'"),
name);
goto cleanup;
}
@@ -467,7 +467,7 @@ udevInterfaceLookupByMACString(virConnectPtr conn, const char *macstr)
/* Check that we got something back */
if (!dev_entry) {
virReportError(VIR_ERR_NO_INTERFACE,
- _("couldn't find interface with MAC address '%s'"),
+ _("couldn't find interface with '%s'"),
macstr);
goto cleanup;
}
@@ -940,7 +940,7 @@ udevGetIfaceDef(struct udev *udev, const char *name)
dev = udev_device_new_from_subsystem_sysname(udev, "net", name);
if (!dev) {
virReportError(VIR_ERR_NO_INTERFACE,
- _("couldn't find interface named '%s'"), name);
+ _("couldn't find interface with '%s'"), name);
goto error;
}
@@ -1068,7 +1068,7 @@ udevInterfaceIsActive(virInterfacePtr ifinfo)
ifinfo->name);
if (!dev) {
virReportError(VIR_ERR_NO_INTERFACE,
- _("couldn't find interface named '%s'"),
+ _("couldn't find interface with '%s'"),
ifinfo->name);
status = -1;
goto cleanup;
--
1.8.1.4
11 years, 8 months
[libvirt] Build failed in Jenkins: libvirt-check #1003
by Guido Günther
Hi,
I don't have time to look into these test failurs in detail atm:
but it seems that one of these commits broke qemuxml2argvtest:
qemu: New cap flags for scsi-generic
utils: util functions for scsi hostdev
qemu: Build qemu command line for scsi host device
rng: Interleave hostdev elements
for more detail see below.
Cheers,
-- Guido
See <http://honk.sigxcpu.org:8001/job/libvirt-check/997/>
------------------------------------------
[...truncated 798 lines...]
.. 2 OK
PASS: viratomictest
TEST: utiltest
... 3 OK
PASS: utiltest
TEST: shunloadtest
. 1 OK
PASS: shunloadtest
TEST: virtimetest
............... 15 OK
PASS: virtimetest
TEST: viruritest
.................. 18 OK
PASS: viruritest
TEST: virkeyfiletest
. 1 OK
PASS: virkeyfiletest
TEST: virauthconfigtest
...... 6 OK
PASS: virauthconfigtest
TEST: virbitmaptest
........ 8 OK
PASS: virbitmaptest
TEST: vircgrouptest
........ 8 OK
PASS: vircgrouptest
TEST: virendiantest
.. 2 OK
PASS: virendiantest
TEST: viridentitytest
.. 2 OK
PASS: viridentitytest
TEST: virkeycodetest
.. 2 OK
PASS: virkeycodetest
TEST: virlockspacetest
....... 7 OK
PASS: virlockspacetest
TEST: virstringtest
.............. 14 OK
PASS: virstringtest
TEST: virportallocatortest
.. 2 OK
PASS: virportallocatortest
TEST: sysinfotest
. 1 OK
PASS: sysinfotest
TEST: virstoragetest
........................................ 40
............. 53 OK
PASS: virstoragetest
TEST: fdstreamtest
.... 4 OK
PASS: fdstreamtest
TEST: fchosttest
..... 5 OK
PASS: fchosttest
TEST: virnettlscontexttest
........................................ 40
........ 48 OK
PASS: virnettlscontexttest
TEST: securityselinuxtest
SKIP: securityselinuxtest
TEST: securityselinuxlabeltest
SKIP: securityselinuxlabeltest
TEST: virdrivermoduletest
.......... 10 OK
PASS: virdrivermoduletest
TEST: xml2sexprtest
........................................ 40
............. 53 OK
PASS: xml2sexprtest
TEST: sexpr2xmltest
........................................ 40
........... 51 OK
PASS: sexpr2xmltest
TEST: xmconfigtest
........................................ 40
.......................... 66 OK
PASS: xmconfigtest
TEST: xencapstest
.......... 10 OK
PASS: xencapstest
TEST: statstest
SKIP: statstest
TEST: reconnect
SKIP: reconnect
TEST: qemuxml2argvtest
........................................ 40
........................................ 80
........................................ 120
........................................ 160
........................................ 200
........................................ 240
........................................ 280
.........!!!! 293 FAIL
FAIL: qemuxml2argvtest
TEST: qemuxml2xmltest
........................................ 40
........................................ 80
........................................ 120
................... 139 OK
PASS: qemuxml2xmltest
TEST: qemuxmlnstest
....... 7 OK
PASS: qemuxmlnstest
TEST: qemuargv2xmltest
........................................ 40
........................................ 80
... 83 OK
PASS: qemuargv2xmltest
TEST: qemuhelptest
................. 17 OK
PASS: qemuhelptest
TEST: domainsnapshotxml2xmltest
........ 8 OK
PASS: domainsnapshotxml2xmltest
TEST: qemumonitortest
.. 2 OK
PASS: qemumonitortest
TEST: qemumonitorjsontest
...... 6 OK
PASS: qemumonitorjsontest
TEST: lxcxml2xmltest
... 3 OK
PASS: lxcxml2xmltest
TEST: openvzutilstest
.. 2 OK
PASS: openvzutilstest
TEST: vmx2xmltest
........................................ 40
.......... 50 OK
PASS: vmx2xmltest
TEST: xml2vmxtest
........................................ 40
..... 45 OK
PASS: xml2vmxtest
TEST: jsontest
.... 4 OK
PASS: jsontest
TEST: networkxml2xmltest
.................. 18 OK
PASS: networkxml2xmltest
TEST: networkxml2conftest
............ 12 OK
PASS: networkxml2conftest
TEST: nwfilterxml2xmltest
........................................ 40
. 41 OK
PASS: nwfilterxml2xmltest
TEST: storagevolxml2argvtest
........... 11 OK
PASS: storagevolxml2argvtest
TEST: storagevolxml2xmltest
....... 7 OK
PASS: storagevolxml2xmltest
TEST: storagepoolxml2xmltest
............... 15 OK
PASS: storagepoolxml2xmltest
TEST: nodedevxml2xmltest
............. 13 OK
PASS: nodedevxml2xmltest
TEST: interfacexml2xmltest
................... 19 OK
PASS: interfacexml2xmltest
TEST: cputest
........................................ 40
.......................... 66 OK
PASS: cputest
TEST: eventtest
............... 15 OK
PASS: eventtest
TEST: libvirtdconftest
....................................... 39 OK
PASS: libvirtdconftest
TEST: capabilityschematest
.............. 14 OK
PASS: capabilityschematest
TEST: interfaceschematest
.................. 18 OK
PASS: interfaceschematest
TEST: networkschematest
........................................ 40
. 41 OK
PASS: networkschematest
TEST: storagepoolschematest
................................ 32 OK
PASS: storagepoolschematest
TEST: storagevolschematest
.............. 14 OK
PASS: storagevolschematest
TEST: domainschematest
........................................ 40
........................................ 80
........................................ 120
........................................ 160
........................................ 200
........................................ 240
........................................ 280
........................................ 320
........................................ 360
........................................ 400
........................................ 440
.............................. 470 OK
PASS: domainschematest
TEST: nodedevschematest
............... 15 OK
PASS: nodedevschematest
TEST: nwfilterschematest
........................................ 40
. 41 OK
PASS: nwfilterschematest
TEST: domainsnapshotschematest
............... 15 OK
PASS: domainsnapshotschematest
TEST: test_conf.sh
.. 2 OK
PASS: test_conf.sh
PASS: cpuset
PASS: define-dev-segfault
PASS: int-overflow
PASS: libvirtd-fail
PASS: libvirtd-pool
PASS: read-bufsiz
PASS: read-non-seekable
PASS: start
PASS: vcpupin
TEST: virsh-all
........................................ 40
........................................ 80
........................................ 120
........................................ 160
...................................... 198 OK
PASS: virsh-all
PASS: virsh-optparse
PASS: virsh-schedinfo
PASS: virsh-synopsis
PASS: virsh-undefine
=======================================
1 of 82 tests failed
(4 tests were not run)
Please report to libvir-list(a)redhat.com
=======================================
make[2]: *** [check-TESTS] Error 1
make[2]: Leaving directory `<http://honk.sigxcpu.org:8001/job/libvirt-check/ws/tests'>
make[1]: *** [check-am] Error 2
make[1]: Leaving directory `<http://honk.sigxcpu.org:8001/job/libvirt-check/ws/tests'>
make: *** [check-recursive] Error 1
Build step 'Execute shell' marked build as failure
11 years, 8 months
[libvirt] [PATCH] Update to COPYING.LIB to latest LGPLv2.1 copy
by Christophe Fergeau
The text version
of LGPLv2.1 available at
http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt is slightly
different from COPYING.LIB:
- several paragraphs were rewrapped
- the FSF address has changed, so the license has been changed to
indicate the newer address
I've checked that there are no changes in the license text apart from
the updated address, which is what I want to fix with this commit.
---
COPYING.LIB | 82 ++++++++++++++++++++++++++++---------------------------------
1 file changed, 38 insertions(+), 44 deletions(-)
diff --git a/COPYING.LIB b/COPYING.LIB
index 89d4489..4362b49 100644
--- a/COPYING.LIB
+++ b/COPYING.LIB
@@ -1,9 +1,8 @@
-
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -23,8 +22,7 @@ specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations
-below.
+strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
@@ -57,7 +55,7 @@ modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
-^L
+
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
@@ -89,9 +87,9 @@ libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it
-becomes a de-facto standard. To achieve this, non-free programs must
-be allowed to use the library. A more frequent case is that a free
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
@@ -113,7 +111,7 @@ modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
-^L
+
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
@@ -138,8 +136,8 @@ included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control
-compilation and installation of the library.
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
@@ -218,7 +216,7 @@ instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
-^L
+
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
@@ -269,7 +267,7 @@ Library will still fall under Section 6.)
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
-^L
+
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
@@ -305,10 +303,10 @@ of these things:
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
- c) Accompany the work with a written offer, valid for at least
- three years, to give the same user the materials specified in
- Subsection 6a, above, for a charge no more than the cost of
- performing this distribution.
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
@@ -331,7 +329,7 @@ restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
-^L
+
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
@@ -372,7 +370,7 @@ subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
-^L
+
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
@@ -386,10 +384,9 @@ all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply, and the section as a whole is intended to apply in other
-circumstances.
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
@@ -407,11 +404,11 @@ be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License
-may add an explicit geographical distribution limitation excluding those
-countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
@@ -425,7 +422,7 @@ conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
-^L
+
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
@@ -459,21 +456,19 @@ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
-^L
+
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms
-of the ordinary General Public License).
-
- To apply these terms, attach the following notices to the library.
-It is safest to attach them to the start of each source file to most
-effectively convey the exclusion of warranty; and each file should
-have at least the "copyright" line and a pointer to where the full
-notice is found.
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
@@ -490,17 +485,16 @@ notice is found.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
-You should also get your employer (if you work as a programmer) or
-your school, if any, to sign a "copyright disclaimer" for the library,
-if necessary. Here is a sample; alter the names:
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James
- Random Hacker.
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
--
1.8.1.4
11 years, 8 months
[libvirt] [PATCH v3 0/2] VNC WebSocket support
by Martin Kletzander
I'm re-sending this series even after previous ACK, because I've found
out there was missing virPortAllocatorRelease call when disposing of
domain. There were also many cleanups in the meantime and both John
and Eric found out some nits in the previous series. I also *somehow*
lost the tests (not even git-reflog found them) and had to re-create
them again.
Martin Kletzander (2):
Add VNC WebSocket support
qemu: Add VNC WebSocket support
docs/formatdomain.html.in | 5 ++
docs/schemas/domaincommon.rng | 5 ++
src/conf/domain_conf.c | 16 ++++++
src/conf/domain_conf.h | 1 +
src/qemu/libvirtd_qemu.aug | 2 +
src/qemu/qemu.conf | 6 +++
src/qemu/qemu_capabilities.c | 5 ++
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 60 +++++++++++++++++++++-
src/qemu/qemu_command.h | 3 ++
src/qemu/qemu_conf.c | 32 ++++++++++++
src/qemu/qemu_conf.h | 6 +++
src/qemu/qemu_driver.c | 5 ++
src/qemu/qemu_process.c | 44 ++++++++++++----
src/qemu/test_libvirtd_qemu.aug.in | 2 +
tests/qemuargv2xmltest.c | 1 +
.../qemuxml2argv-graphics-vnc-websocket.args | 4 ++
.../qemuxml2argv-graphics-vnc-websocket.xml | 28 ++++++++++
tests/qemuxml2argvtest.c | 1 +
tests/qemuxml2xmltest.c | 1 +
20 files changed, 216 insertions(+), 12 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-websocket.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-websocket.xml
--
1.8.2.1
11 years, 8 months