[libvirt] [libvirt-perl][PATCH] Register VIR_NODE_DEVICE_EVENT_ID_UPDATE constant
by Michal Privoznik
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
I figured that there's no need to update Changelog here as it
already mentions nodedev events implementation.
Virt.xs | 1 +
lib/Sys/Virt/NodeDevice.pm | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/Virt.xs b/Virt.xs
index 5025f2e..ee83431 100644
--- a/Virt.xs
+++ b/Virt.xs
@@ -8635,6 +8635,7 @@ BOOT:
REGISTER_CONSTANT(VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_GENERIC, LIST_CAP_SCSI_GENERIC);
REGISTER_CONSTANT(VIR_NODE_DEVICE_EVENT_ID_LIFECYCLE, EVENT_ID_LIFECYCLE);
+ REGISTER_CONSTANT(VIR_NODE_DEVICE_EVENT_ID_UPDATE, EVENT_ID_UPDATE);
REGISTER_CONSTANT(VIR_NODE_DEVICE_EVENT_CREATED, EVENT_CREATED);
REGISTER_CONSTANT(VIR_NODE_DEVICE_EVENT_DELETED, EVENT_DELETED);
diff --git a/lib/Sys/Virt/NodeDevice.pm b/lib/Sys/Virt/NodeDevice.pm
index 4a8212b..1ebb97f 100644
--- a/lib/Sys/Virt/NodeDevice.pm
+++ b/lib/Sys/Virt/NodeDevice.pm
@@ -175,6 +175,10 @@ Include devices with the SCSI generic capability
Node device lifecycle events
+=item Sys::Virt::NodeDevice::EVENT_ID_UPDATE
+
+Node device update events
+
=back
=head2 LIFECYCLE CHANGE EVENTS
--
2.8.4
8 years, 8 months
[libvirt] [PATCH] qemu: driver: Fix format characters in error message
by Peter Krempa
Error message in qemuDomainSetVcpusFlags uses %d for the two arguments
but both are unsigned. The resulting error message may be weird when
attempting to set a very large vcpu count.
---
src/qemu/qemu_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 5a7733c..a0587e1 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -4826,7 +4826,7 @@ qemuDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
if (!(flags & VIR_DOMAIN_VCPU_MAXIMUM) && nvcpus > maxvcpus) {
virReportError(VIR_ERR_INVALID_ARG,
_("requested vcpus is greater than max allowable"
- " vcpus for the domain: %d > %d"),
+ " vcpus for the domain: %u > %u"),
nvcpus, maxvcpus);
goto endjob;
}
--
2.9.2
8 years, 8 months
[libvirt] [PATCH 0/2] USB address assignment fixes
by Ján Tomko
Ján Tomko (2):
conf: free the ports array of a USB hub
conf: report an error message for non-existing USB hubs
src/conf/domain_addr.c | 9 +++++++++
.../qemuxml2argv-usb-hub-nonexistent.xml | 19 +++++++++++++++++++
tests/qemuxml2argvtest.c | 3 +++
3 files changed, 31 insertions(+)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-usb-hub-nonexistent.xml
--
2.7.3
8 years, 8 months
[libvirt] [PATCH] libxl_driver: Indent LIBXL_VBD_SECTOR_SIZE macro correctly
by Michal Privoznik
Because of change in caaa1bd357a99ad this macro is no under
#ifdef block. That means it needs to be re-intended correctly.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
Pushed under build-breaker rule.
src/libxl/libxl_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 1170062..a573c82 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -5307,7 +5307,7 @@ libxlDiskPathToID(const char *virtpath)
return id;
}
-#define LIBXL_VBD_SECTOR_SIZE 512
+# define LIBXL_VBD_SECTOR_SIZE 512
static int
libxlDiskSectorSize(int domid, int devno)
--
2.8.4
8 years, 8 months
[libvirt] [PATCH] tests: fix domaincapstest linking for libxl
by Roman Bogorodskiy
Commit 11567cf added some libxl tests into domaincapstest and
added libvirt_driver_libxl_impl.la to domaincapstest_LDADD.
This causes link fail on systems without GNU regex implementation:
gmake[2]: Entering directory '/usr/home/novel/code/libvirt/tests'
CCLD domaincapstest
../src/.libs/libvirt_driver_libxl_impl.a(libvirt_driver_libxl_impl_la-libxl_capabilities.o):
In function `libxlMakeCapabilities':
libxl/libxl_capabilities.c:(.text+0x6b2): undefined reference to
`rpl_regcomp'
libxl/libxl_capabilities.c:(.text+0x6d0): undefined reference to
`rpl_regerror'
libxl/libxl_capabilities.c:(.text+0x803): undefined reference to
`rpl_regexec'
libxl/libxl_capabilities.c:(.text+0xa58): undefined reference to
`rpl_regfree'
clang-3.8: error: linker command failed with exit code 1 (use -v to
see invocation)
This happens because on these system it tries to use gnulib's builtin
regex implementation, but doesn't link to gnulib.
Fix by adding $(GNULIB_LIBS) along with libvirt_driver_libxl_impl.la to
domaincapstest_LDADD.
---
tests/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 5714d11..0cd8391 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -953,7 +953,7 @@ endif WITH_QEMU
if WITH_LIBXL
domaincapstest_SOURCES += testutilsxen.c testutilsxen.h
-domaincapstest_LDADD += ../src/libvirt_driver_libxl_impl.la
+domaincapstest_LDADD += ../src/libvirt_driver_libxl_impl.la $(GNULIB_LIBS)
endif WITH_LIBXL
virnetmessagetest_SOURCES = \
--
2.7.4
8 years, 8 months
[libvirt] [PATCH] libxl: fix unused functions
by Roman Bogorodskiy
Commit eee7bd4e introduced two functions: libxlDiskPathToID and
libxlDiskSectorSize.
However, as they're used only by code under #ifdef __linux__,
on non-Linux platforms it results in errors similar to this:
CC libxl/libvirt_driver_libxl_impl_la-libxl_driver.lo
libxl/libxl_driver.c:5263:1: error: unused function 'libxlDiskPathToID' [-Werror,-Wunused-function]
libxlDiskPathToID(const char *virtpath)
^
libxl/libxl_driver.c:5312:1: error: unused function 'libxlDiskSectorSize' [-Werror,-Wunused-function]
libxlDiskSectorSize(int domid, int devno)
^
2 errors generated.
Fix that by moving these functions under the #ifdef __linux__ block.
---
src/libxl/libxl_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 4957072..1170062 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -5259,6 +5259,7 @@ libxlDomainGetJobStats(virDomainPtr dom,
return ret;
}
+#ifdef __linux__
static int
libxlDiskPathToID(const char *virtpath)
{
@@ -5348,7 +5349,6 @@ libxlDiskSectorSize(int domid, int devno)
return ret;
}
-#ifdef __linux__
static int
libxlDomainBlockStatsVBD(virDomainObjPtr vm,
const char *dev,
--
2.7.4
8 years, 8 months
[libvirt] [PATCH 0/3] Node device update lifecycle event as top level event
by Jovanka Gulicoska
Introduce node device update lifecycle as top level event.
Series include API implementation, udev driver implementation,
event-test implementation and virsh nodedev-event changes.
Jovanka Gulicoska (3):
Introduce node device update event as top level event
virsh: nodedev-event update callback support
event-test: add support node device update event API
daemon/remote.c | 29 +++++++++++++++++
examples/object-events/event-test.c | 12 +++++++
include/libvirt/libvirt-nodedev.h | 1 +
src/conf/node_device_event.c | 55 ++++++++++++++++++++++++++++++++
src/conf/node_device_event.h | 3 ++
src/libvirt_private.syms | 1 +
src/node_device/node_device_udev.c | 2 ++
src/remote/remote_driver.c | 30 ++++++++++++++++++
src/remote/remote_protocol.x | 13 +++++++-
src/remote_protocol-structs | 5 +++
tools/virsh-nodedev.c | 62 ++++++++++++++++++++++++++++++++-----
11 files changed, 204 insertions(+), 9 deletions(-)
--
2.7.4
8 years, 8 months
[libvirt] [PATCH] virsh: Fix core for cmdSecretGetValue
by John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1366611
When commit id 'cb2e3e50' reworked the cmdSecretGetValue call to use
VIR_DISPOSE_STRING for base64, it neglected to initialize the base64
value to NULL since the cleanup: label could be reached prior to the
base64 value being set or not. This resulted in a core dump, adding
the initialization will avoid the issue.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
tools/virsh-secret.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/virsh-secret.c b/tools/virsh-secret.c
index 8588f4c..537bdd7 100644
--- a/tools/virsh-secret.c
+++ b/tools/virsh-secret.c
@@ -253,7 +253,7 @@ static bool
cmdSecretGetValue(vshControl *ctl, const vshCmd *cmd)
{
virSecretPtr secret;
- char *base64;
+ char *base64 = NULL;
unsigned char *value;
size_t value_size;
bool ret = false;
--
2.7.4
8 years, 8 months
[libvirt] Drop support for old libvirt versions?
by Andrea Bolognani
A while ago, we agreed to drop support for QEMU versions older
than 0.12.0, with the rationale that we should focus on
operating systems that are still supported by the respective
vendors, eg. RHEL/CentOS 6, Ubuntu 12.04 and SLES 11.
Recently, when discussing how to ensure a certain change will
not break migration with libvirt <= 0.9.4, I started wondering
whether we should apply the same rationale to libvirt versions
as well.
Here's a quick run down of relevant libvirt versions:
SLES 11 → ???
RHEL 6.0 → 0.8.1
Ubuntu 12.04 → 0.9.2
RHEL 6.8 → 0.10.2
Ubuntu 12.04.5 → 0.9.8
SLES 11 SP4 → 1.2.5
One thing I'm not clear about is whether or not SUSE, Red
Hat and Canonical will support old minor releases or just
the latest one. If the latter, we could safely drop support
for anything older than 0.9.8, which incidentally would make
the discussion referenced above entirely moot ;)
In any case, having a well-defined cut-off point has been
very useful when dealing with QEMU, so I think having one
for libvirt itself would be beneficial too.
Looking forward to your thoughts on this :)
--
Andrea Bolognani / Red Hat / Virtualization
8 years, 8 months
[libvirt] [PATCH] qemu_command: don't modify heads for graphics device
by Pavel Hrdina
Setting heads to 0 in case that *max_outputs* is not supported while building
command line doesn't have any real effect. It only removes *heads* attribute
from live XML, but after restarting libvirt the default value is restored.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/qemu/qemu_command.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 55df23d..06f5091 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -4298,8 +4298,6 @@ qemuBuildDeviceVideoStr(const virDomainDef *def,
virQEMUCapsGet(qemuCaps, QEMU_CAPS_QXL_MAX_OUTPUTS))) {
if (video->heads)
virBufferAsprintf(&buf, ",max_outputs=%u", video->heads);
- } else {
- video->heads = 0;
}
} else if (video->vram &&
((video->type == VIR_DOMAIN_VIDEO_TYPE_VGA &&
--
2.9.2
8 years, 8 months