[libvirt] [PATCH] Yet another /lib -> /usr/lib path fix for systemd
by Cédric Bosdonnat
---
libvirt-sandbox/libvirt-sandbox-config-service-systemd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libvirt-sandbox/libvirt-sandbox-config-service-systemd.c b/libvirt-sandbox/libvirt-sandbox-config-service-systemd.c
index 909b605..8436a25 100644
--- a/libvirt-sandbox/libvirt-sandbox-config-service-systemd.c
+++ b/libvirt-sandbox/libvirt-sandbox-config-service-systemd.c
@@ -219,7 +219,7 @@ static gchar **gvir_sandbox_config_service_systemd_get_command(GVirSandboxConfig
GVirSandboxConfigServiceSystemdPrivate *priv = sconfig->priv;
gchar **command = g_new(gchar *, 7);
- command[0] = g_strdup("/lib/systemd/systemd");
+ command[0] = g_strdup("/usr/lib/systemd/systemd");
command[1] = g_strdup("--unit");
command[2] = g_strdup(priv->bootTarget);
command[3] = g_strdup("--log-target");
--
2.1.2
9 years, 11 months
[libvirt] [PATCH 0/2] Manage SELinux labels on shared/readonly hostdev's
by John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1082521
Patch 1 is innocuous and perhaps could have been pushed as trivial...
For Patch 2 I wasn't sure if I should use the virSecuritySELinuxSetFilecon
or virSecuritySELinuxSetFileconOptional, so I went with the latter since it
follows what virSecuritySELinuxSetSecurityImageLabelInternal does. Beyond
the check for shared/readonly, the other difference would be for the else
condition which uses the Optional now as opposed to the previous code which
would call virSecuritySELinuxSetSecurityHostdevLabelHelper and use the
non optional call to set the label.
John Ferlan (2):
tests: Fix sharable typo
security: Manage SELinux labels on shared/readonly hostdev's
src/security/security_selinux.c | 58 ++++++++++++++++++++++++++++++++++-------
tests/qemuargv2xmltest.c | 2 +-
2 files changed, 50 insertions(+), 10 deletions(-)
--
1.9.3
9 years, 11 months
[libvirt] [PATCH v2 0/2] Rework reference locking; in QEMU, for starters
by Martin Kletzander
v2:
- qemuDomObjEndAPI now resets the parameter to NULL
- Fixes from Peter incorporated
- rebased on current master
v1:
https://www.redhat.com/archives/libvir-list/2014-December/msg00198.html
Martin Kletzander (2):
conf: Rework virDomainObjListFindByUUID to allow more concurrent APIs
qemu: completely rework reference counting
src/conf/domain_conf.c | 27 +-
src/conf/domain_conf.h | 2 +
src/libvirt_private.syms | 1 +
src/qemu/THREADS.txt | 40 ++-
src/qemu/qemu_domain.c | 29 +-
src/qemu/qemu_domain.h | 12 +-
src/qemu/qemu_driver.c | 708 ++++++++++++++++------------------------------
src/qemu/qemu_migration.c | 108 +++----
src/qemu/qemu_migration.h | 10 +-
src/qemu/qemu_process.c | 87 +++---
10 files changed, 386 insertions(+), 638 deletions(-)
--
2.2.0
9 years, 11 months
[libvirt] [PATCH] conf: forbid negative number in address(like controller, bus, slot...)
by Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1171582
When we edit a negative controller address number to a device, some
of them will auto generate a controller with invalid index number. This
will make guest disappear after restart libvirtd. Instead of allow
negative number for controller index, I think we should forbid negative
number in these place (we did this before, but after f18c02ec,
virStrToLong_ui changed to allow negative number). So changed to use
virStrToLong_uip in these place.
Signed-off-by: Luyao Huang <lhuang(a)redhat.com>
---
src/conf/device_conf.c | 4 ++--
src/conf/domain_conf.c | 32 ++++++++++++++++----------------
2 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c
index b3b04e1..a7ec8a6 100644
--- a/src/conf/device_conf.c
+++ b/src/conf/device_conf.c
@@ -71,14 +71,14 @@ virDevicePCIAddressParseXML(xmlNodePtr node,
}
if (bus &&
- virStrToLong_ui(bus, NULL, 0, &addr->bus) < 0) {
+ virStrToLong_uip(bus, NULL, 0, &addr->bus) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Cannot parse <address> 'bus' attribute"));
goto cleanup;
}
if (slot &&
- virStrToLong_ui(slot, NULL, 0, &addr->slot) < 0) {
+ virStrToLong_uip(slot, NULL, 0, &addr->slot) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Cannot parse <address> 'slot' attribute"));
goto cleanup;
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 2d81c37..961ec67 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -3453,28 +3453,28 @@ virDomainDeviceDriveAddressParseXML(xmlNodePtr node,
unit = virXMLPropString(node, "unit");
if (controller &&
- virStrToLong_ui(controller, NULL, 10, &addr->controller) < 0) {
+ virStrToLong_uip(controller, NULL, 10, &addr->controller) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Cannot parse <address> 'controller' attribute"));
goto cleanup;
}
if (bus &&
- virStrToLong_ui(bus, NULL, 10, &addr->bus) < 0) {
+ virStrToLong_uip(bus, NULL, 10, &addr->bus) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Cannot parse <address> 'bus' attribute"));
goto cleanup;
}
if (target &&
- virStrToLong_ui(target, NULL, 10, &addr->target) < 0) {
+ virStrToLong_uip(target, NULL, 10, &addr->target) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Cannot parse <address> 'target' attribute"));
goto cleanup;
}
if (unit &&
- virStrToLong_ui(unit, NULL, 10, &addr->unit) < 0) {
+ virStrToLong_uip(unit, NULL, 10, &addr->unit) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Cannot parse <address> 'unit' attribute"));
goto cleanup;
@@ -3507,21 +3507,21 @@ virDomainDeviceVirtioSerialAddressParseXML(
port = virXMLPropString(node, "port");
if (controller &&
- virStrToLong_ui(controller, NULL, 10, &addr->controller) < 0) {
+ virStrToLong_uip(controller, NULL, 10, &addr->controller) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Cannot parse <address> 'controller' attribute"));
goto cleanup;
}
if (bus &&
- virStrToLong_ui(bus, NULL, 10, &addr->bus) < 0) {
+ virStrToLong_uip(bus, NULL, 10, &addr->bus) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Cannot parse <address> 'bus' attribute"));
goto cleanup;
}
if (port &&
- virStrToLong_ui(port, NULL, 10, &addr->port) < 0) {
+ virStrToLong_uip(port, NULL, 10, &addr->port) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Cannot parse <address> 'port' attribute"));
goto cleanup;
@@ -3553,19 +3553,19 @@ virDomainDeviceCCWAddressParseXML(xmlNodePtr node,
if (cssid && ssid && devno) {
if (cssid &&
- virStrToLong_ui(cssid, NULL, 0, &addr->cssid) < 0) {
+ virStrToLong_uip(cssid, NULL, 0, &addr->cssid) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Cannot parse <address> 'cssid' attribute"));
goto cleanup;
}
if (ssid &&
- virStrToLong_ui(ssid, NULL, 0, &addr->ssid) < 0) {
+ virStrToLong_uip(ssid, NULL, 0, &addr->ssid) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Cannot parse <address> 'ssid' attribute"));
goto cleanup;
}
if (devno &&
- virStrToLong_ui(devno, NULL, 0, &addr->devno) < 0) {
+ virStrToLong_uip(devno, NULL, 0, &addr->devno) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Cannot parse <address> 'devno' attribute"));
goto cleanup;
@@ -3607,14 +3607,14 @@ virDomainDeviceCcidAddressParseXML(xmlNodePtr node,
slot = virXMLPropString(node, "slot");
if (controller &&
- virStrToLong_ui(controller, NULL, 10, &addr->controller) < 0) {
+ virStrToLong_uip(controller, NULL, 10, &addr->controller) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Cannot parse <address> 'controller' attribute"));
goto cleanup;
}
if (slot &&
- virStrToLong_ui(slot, NULL, 10, &addr->slot) < 0) {
+ virStrToLong_uip(slot, NULL, 10, &addr->slot) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Cannot parse <address> 'slot' attribute"));
goto cleanup;
@@ -3642,7 +3642,7 @@ virDomainDeviceUSBAddressParseXML(xmlNodePtr node,
bus = virXMLPropString(node, "bus");
if (port &&
- ((virStrToLong_ui(port, &tmp, 10, &p) < 0 || (*tmp != '\0' && *tmp != '.')) ||
+ ((virStrToLong_uip(port, &tmp, 10, &p) < 0 || (*tmp != '\0' && *tmp != '.')) ||
(*tmp == '.' && (virStrToLong_ui(tmp + 1, &tmp, 10, &p) < 0 || (*tmp != '\0' && *tmp != '.'))) ||
(*tmp == '.' && (virStrToLong_ui(tmp + 1, &tmp, 10, &p) < 0 || (*tmp != '\0' && *tmp != '.'))) ||
(*tmp == '.' && (virStrToLong_ui(tmp + 1, &tmp, 10, &p) < 0 || (*tmp != '\0'))))) {
@@ -3655,7 +3655,7 @@ virDomainDeviceUSBAddressParseXML(xmlNodePtr node,
port = NULL;
if (bus &&
- virStrToLong_ui(bus, NULL, 10, &addr->bus) < 0) {
+ virStrToLong_uip(bus, NULL, 10, &addr->bus) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Cannot parse <address> 'bus' attribute"));
goto cleanup;
@@ -3777,14 +3777,14 @@ virDomainDeviceISAAddressParseXML(xmlNodePtr node,
irq = virXMLPropString(node, "irq");
if (iobase &&
- virStrToLong_ui(iobase, NULL, 16, &addr->iobase) < 0) {
+ virStrToLong_uip(iobase, NULL, 16, &addr->iobase) < 0) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("Cannot parse <address> 'iobase' attribute"));
goto cleanup;
}
if (irq &&
- virStrToLong_ui(irq, NULL, 16, &addr->irq) < 0) {
+ virStrToLong_uip(irq, NULL, 16, &addr->irq) < 0) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("Cannot parse <address> 'irq' attribute"));
goto cleanup;
--
1.8.3.1
9 years, 11 months
[libvirt] [PATCH] libxl: Set path to console on domain startup
by Anthony PERARD
Hi,
I'm trying to fix an issue when using OpenStack with libvirt+xen (libxenlight).
OpenStack cannot access the console output of a Xen PV guest, because the XML
generated by libvirt for a domain is missing the path to the pty. The path
actually appear in the XML once one call virDomainOpenConsole().
The patch intend to get the path to the pty without having to call
virDomainOpenConsole, so I've done the work in libxlDomainStart(). So I have a
few question:
Is libxlDomainStart will be called on restore/migrate/reboot?
I guest the function libxlDomainOpenConsole() would not need to do the same
work if the console path is settup properly.
There is a bug report about this:
https://bugzilla.redhat.com/show_bug.cgi?id=1170743
Regards,
Anthony PERARD (1):
libxl: Set path to console on domain startup.
src/libxl/libxl_domain.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
--
Anthony PERARD
9 years, 11 months
[libvirt] [perl-Sys-Virt][PATCH] Fix memory corruption when calling migrate_to_uri
by Hao Liu
The variable `nparams` didn't change accordingly when adding a new
parameter in commit b2cecf73.
This patch fixes https://bugzilla.redhat.com/show_bug.cgi?id=1171938
Signed-off-by: Hao Liu <hliu(a)redhat.com>
---
Virt.xs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Virt.xs b/Virt.xs
index 763a117..688b0d7 100644
--- a/Virt.xs
+++ b/Virt.xs
@@ -4342,7 +4342,7 @@ _migrate_to_uri(dom, desturi, newparams, flags=0)
virTypedParameter *params;
int nparams;
PPCODE:
- nparams = 5;
+ nparams = 6;
Newx(params, nparams, virTypedParameter);
strncpy(params[0].field, VIR_MIGRATE_PARAM_URI,
--
1.8.3.1
9 years, 11 months
[libvirt] [PATCH] qemu: migration: Unlock vm if ACL check in Perform phase of protocol v2 fails
by Peter Krempa
Avoid leaving the domain locked on a failed ACL check. Introduced in
commit abf75aea247e (Add ACL checks into the QEMU driver).
---
src/qemu/qemu_driver.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index ed8e140..8cec372 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -11393,51 +11393,53 @@ static int
qemuDomainMigratePerform(virDomainPtr dom,
const char *cookie,
int cookielen,
const char *uri,
unsigned long flags,
const char *dname,
unsigned long resource)
{
virQEMUDriverPtr driver = dom->conn->privateData;
virDomainObjPtr vm;
int ret = -1;
const char *dconnuri = NULL;
virCheckFlags(QEMU_MIGRATION_FLAGS, -1);
if (virLockManagerPluginUsesState(driver->lockManager)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Cannot use migrate v2 protocol with lock manager %s"),
virLockManagerPluginGetName(driver->lockManager));
goto cleanup;
}
if (!(vm = qemuDomObjFromDomain(dom)))
goto cleanup;
- if (virDomainMigratePerformEnsureACL(dom->conn, vm->def) < 0)
+ if (virDomainMigratePerformEnsureACL(dom->conn, vm->def) < 0) {
+ virObjectUnlock(vm);
goto cleanup;
+ }
if (flags & VIR_MIGRATE_PEER2PEER) {
dconnuri = uri;
uri = NULL;
}
/* Do not output cookies in v2 protocol, since the cookie
* length was not sufficiently large, causing failures
* migrating between old & new libvirtd.
*
* Consume any cookie we were able to decode though
*/
ret = qemuMigrationPerform(driver, dom->conn, vm,
NULL, dconnuri, uri, NULL, NULL,
cookie, cookielen,
NULL, NULL, /* No output cookies in v2 */
flags, dname, resource, false);
cleanup:
return ret;
}
/* Finish is the third and final step, and it runs on the destination host. */
--
2.1.0
9 years, 11 months
[libvirt] Heads-up about the next release
by Daniel Veillard
The plan exposed last month is to push the new release mid month.
I will be unavailable mostly on 15-16 so pondering pushing next week,
which means entering freeze for example Tuesday morning for a final
release toward Fri 12 or Sat 13. We have close to 300 commits already
since 1.2.10 so that sounds about time :-)
Please raise any issue with going forward with this plan,
thanks,
Daniel
--
Daniel Veillard | Open Source and Standards, Red Hat
veillard(a)redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | virtualization library http://libvirt.org/
9 years, 11 months
[libvirt] [PATCH] docs: Fix simple typo s/ a API/ an API/
by Martin Kletzander
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
Notes:
Pushed as trivial
docs/internals/rpc.html.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/internals/rpc.html.in b/docs/internals/rpc.html.in
index 627d7aa..f2ed64f 100644
--- a/docs/internals/rpc.html.in
+++ b/docs/internals/rpc.html.in
@@ -597,7 +597,7 @@
<h4><a name="apiclientdispatchex1">Example with buck passing</a></h4>
<p>
- In the first example, a second thread issues a API call
+ In the first example, a second thread issues an API call
while the first thread holds the buck. The reply to the
first call arrives first, so the buck is passed to the
second thread.
--
2.2.0
9 years, 11 months
[libvirt] [PATCH] build: Move check for XML::XPath into bootstrap
by Martin Kletzander
The module XML::XPath is needed when building from git only (no need to
have it when building from tarball), so this patch moves the check from
specfile into bootstrap.conf.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
This patch needs a gnulib update with this proposed patch in it:
https://lists.gnu.org/archive/html/bug-gnulib/2014-12/msg00108.html
bootstrap.conf | 3 ++-
libvirt.spec.in | 1 -
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/bootstrap.conf b/bootstrap.conf
index e7ea9c9..c06ee4c 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -1,6 +1,6 @@
# Bootstrap configuration.
-# Copyright (C) 2010-2013 Red Hat, Inc.
+# Copyright (C) 2010-2014 Red Hat, Inc.
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -210,6 +210,7 @@ gzip -
libtool -
patch -
perl 5.5
+perl::XML::XPath -
pkg-config -
python-config -
rpcgen -
diff --git a/libvirt.spec.in b/libvirt.spec.in
index bda28e7..a23aa0a 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -427,7 +427,6 @@ BuildRequires: /usr/bin/pod2man
%endif
BuildRequires: git
BuildRequires: perl
-BuildRequires: perl-XML-XPath
BuildRequires: python
%if %{with_systemd}
BuildRequires: systemd-units
--
2.2.0
9 years, 11 months