[libvirt] infinite loop while restarting libvirt after LXC creation
by Michael R. Hines
Hi,
I'm using OpenStack grizzly on Ubuntu 12.04 to create LXC containers.
After successful container creation and a subsequent reboot of the
hypervisor,
libvirt gets stuck in an infinite loop, spinning at 100%
Here's the backtrace:
(gdb) thread 12
[Switching to thread 12 (Thread 0x7fffee46f700 (LWP 7052))]
#0 0x00007ffff7617de1 in virDomainDefMaybeAddController
(def=0x7fffe8033b30, type=2, idx=73405, model=-1) at
conf/domain_conf.c:10570
warning: Source file is more recent than executable.
10570 for (i = 0; i < def->ncontrollers; i++) {
(gdb) bt
#0 0x00007ffff7617de1 in virDomainDefMaybeAddController
(def=0x7fffe8033b30, type=2, idx=73405, model=-1) at
conf/domain_conf.c:10570
#1 0x00007ffff76180ab in virDomainDefAddDiskControllersForType
(def=0x7fffe8033b30, controllerType=2, diskBus=<optimized out>) at
conf/domain_conf.c:13653
#2 0x00007ffff761a11d in virDomainDefAddImplicitControllers
(def=0x7fffe8033b30) at conf/domain_conf.c:13747
#3 0x00007ffff7623a29 in virDomainDefParseXML (xml=0x7fffe8034500,
root=0x7fffe802fc60, ctxt=<optimized out>, caps=0x7fffe8030f20,
xmlopt=0x7fffe8031a60, expectedVirtTypes=<optimized out>, flags=2) at
conf/domain_conf.c:12375
#4 0x00007ffff76299a0 in virDomainDefParseNode (xml=0x7fffe8034500,
root=0x7fffe802fc60, caps=0x7fffe8030f20, xmlopt=0x7fffe8031a60,
expectedVirtTypes=16, flags=2) at conf/domain_conf.c:12562
#5 0x00007ffff7629b19 in virDomainDefParse (xmlStr=<optimized out>,
filename=<optimized out>, caps=0x7fffe8030f20, xmlopt=0x7fffe8031a60,
expectedVirtTypes=16, flags=2) at conf/domain_conf.c:12504
#6 0x00007ffff762a489 in virDomainObjListLoadConfig (opaque=0x0,
notify=0, expectedVirtTypes=16, name=0x7fffe80fb543 "instance-00000017",
autostartDir=0x7fffe8033280 "/etc/libvirt/lxc/autostart",
configDir=0x7fffe8033b10 "/etc/libvirt/lxc", xmlopt=0x7fffe8031a60,
caps=0x7fffe8030f20, doms=0x7fffe80fac40) at conf/domain_conf.c:17027
#7 virDomainObjListLoadAllConfigs (doms=0x7fffe80fac40,
configDir=<optimized out>, autostartDir=0x7fffe8033280
"/etc/libvirt/lxc/autostart", liveStatus=<optimized out>,
caps=0x7fffe8030f20, xmlopt=0x7fffe8031a60, expectedVirtTypes=16,
notify=0, opaque=0x0) at conf/domain_conf.c:17155
#8 0x00007fffef1def58 in lxcStateInitialize (privileged=<optimized
out>, callback=<optimized out>, opaque=<optimized out>) at
lxc/lxc_driver.c:1449
#9 lxcStateInitialize (privileged=<optimized out>, callback=<optimized
out>, opaque=<optimized out>) at lxc/lxc_driver.c:1361
#10 0x00007ffff766df12 in virStateInitialize (privileged=true,
callback=0x555555568110 <daemonInhibitCallback>, opaque=0x5555557cc8e0)
at libvirt.c:832
#11 0x00005555555681c0 in daemonRunStateInit (opaque=<optimized out>) at
libvirtd.c:902
#12 0x00007ffff75f0ae6 in virThreadHelper (data=<optimized out>) at
util/virthreadpthread.c:161
#13 0x00007ffff733ee9a in start_thread () from
/lib/x86_64-linux-gnu/libpthread.so.0
#14 0x00007ffff706bccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#15 0x0000000000000000 in ?? ()
(gdb) next
11 years, 2 months
[libvirt] Patch set to add virt-sandbox -s inherit and fixes for man pages.
by Daniel J Walsh
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
for some reason my git-sendmail keeps failing.
[sandbox PATCH 1/3] Add virt-sandbox -s inherit, to execute the
[sandbox PATCH 2/3] Add comment about LIBVIRT_DEFAULT_URI to
[sandbox PATCH 3/3] virt-sandbox-service.pod did not mention upgrade
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlH7zjAACgkQrlYvE4MpobPBIQCgvOYtY0ccFTUNBNA4tWWQs02t
tYwAn15nXX9WhTyG0Piw4QVYwide9/RZ
=g+dS
-----END PGP SIGNATURE-----
11 years, 2 months
[libvirt] [PATCHv2] build: fix qemuagenttest build with -O0 in fedora 19.
by Jincheng Miao
Someone may need to build libvirt with -O0.
When building libvirt with -O0 flag in fedora 19, it will fail to
generate qemuagenttest, a link error occurs like:
./.libs/libqemumonitortestutils.a(qemumonitortestutils.o): In function `qemuMonitorTestFree':
libvirt/tests/qemumonitortestutils.c:346: undefined reference to `qemuMonitorClose'
./.libs/libqemumonitortestutils.a(qemumonitortestutils.o): In function `qemuMonitorTestNew':
libvirt/tests/qemumonitortestutils.c:870: undefined reference to `qemuMonitorOpen'
collect2: error: ld returned 1 exit status
So put the libvirt driver impl libraries after libqemumonitortestutils.a,
make lazy link happy.
---
tests/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 9c578fa..b36922e 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -424,7 +424,7 @@ qemuagenttest_SOURCES = \
testutils.c testutils.h \
testutilsqemu.c testutilsqemu.h \
$(NULL)
-qemuagenttest_LDADD = $(qemu_LDADDS) libqemumonitortestutils.la
+qemuagenttest_LDADD = libqemumonitortestutils.la $(qemu_LDADDS)
qemuhotplugtest_SOURCES = \
qemuhotplugtest.c \
--
1.8.3.1
11 years, 2 months
[libvirt] [PATCH] spec: Explicitly claim ownership of channel subdir
by Jiri Denemark
As both /var/lib/libvirt/qemu and /var/lib/libvirt/qemu/channel/target
are owned by us, the intermediate /var/lib/libvirt/qemu/channel should
be owned by us too.
---
libvirt.spec.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index c457fda..79c5a2c 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1800,6 +1800,7 @@ fi
%if %{with_qemu}
%ghost %dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/qemu/
%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/
+%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/channel/
%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/channel/target/
%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/cache/libvirt/qemu/
%endif
--
1.8.3.2
11 years, 2 months
Re: [libvirt] [Qemu-devel] KVM call agenda for 2013-08-06
by Eduardo Habkost
On Tue, Jul 23, 2013 at 06:31:45PM +0200, Juan Quintela wrote:
>
> Hi
>
> Please, send any topic that you are interested in covering.
* libvirt requirements for:
* Checking which CPU features are exposed/required by each CPU model
+ machine-type
* Checking which CPU features are available on a given host
(considering QEMU + kernel + host CPU capabilities)
I hope Jiri and Daniel can join the call.
--
Eduardo
11 years, 2 months
[libvirt] [PATCH] Remove reference to python/tests from RPM %doc
by Daniel P. Berrange
From: "Daniel P. Berrange" <berrange(a)redhat.com>
The python/tests files were recently deleted, but a reference was
left in the RPM %doc entry
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
libvirt.spec.in | 1 -
1 file changed, 1 deletion(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index fce7f91..c457fda 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -2089,7 +2089,6 @@ fi
%{_libdir}/python*/site-packages/libvirt_qemu.py*
%{_libdir}/python*/site-packages/libvirt_lxc.py*
%{_libdir}/python*/site-packages/libvirtmod*
-%doc python/tests/*.py
%doc examples/python
%doc examples/domain-events/events-python
%endif
--
1.8.1.4
11 years, 2 months
[libvirt] [PATCH] Fix crashing upgrading from older libvirts with running guests
by Daniel P. Berrange
From: "Daniel P. Berrange" <berrange(a)redhat.com>
If upgrading from a libvirt that is older than 1.0.5, we can
not assume that vm->def->resource is non-NULL. This bogus
assumption caused libvirtd to crash
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
src/lxc/lxc_process.c | 8 ++++++--
src/qemu/qemu_cgroup.c | 4 +++-
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c
index 0a28305..4835bd5 100644
--- a/src/lxc/lxc_process.c
+++ b/src/lxc/lxc_process.c
@@ -1204,7 +1204,9 @@ int virLXCProcessStart(virConnectPtr conn,
}
if (virCgroupNewDetectMachine(vm->def->name, "lxc", vm->pid,
- vm->def->resource->partition,
+ vm->def->resource ?
+ vm->def->resource->partition :
+ NULL,
-1, &priv->cgroup) < 0)
goto error;
@@ -1413,7 +1415,9 @@ virLXCProcessReconnectDomain(virDomainObjPtr vm,
goto error;
if (virCgroupNewDetectMachine(vm->def->name, "lxc", vm->pid,
- vm->def->resource->partition,
+ vm->def->resource ?
+ vm->def->resource->partition :
+ NULL,
-1, &priv->cgroup) < 0)
goto error;
diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
index 787ddeb..dc949db 100644
--- a/src/qemu/qemu_cgroup.c
+++ b/src/qemu/qemu_cgroup.c
@@ -707,7 +707,9 @@ qemuConnectCgroup(virQEMUDriverPtr driver,
if (virCgroupNewDetectMachine(vm->def->name,
"qemu",
vm->pid,
- vm->def->resource->partition,
+ vm->def->resource ?
+ vm->def->resource->partition :
+ NULL,
cfg->cgroupControllers,
&priv->cgroup) < 0)
goto cleanup;
--
1.8.1.4
11 years, 2 months
[libvirt] [PATCH] Avoid crash if NULL is passed for filename/funcname in logging
by Daniel P. Berrange
From: "Daniel P. Berrange" <berrange(a)redhat.com>
The journald code would crash if a NULL was passed for the
filename / funcname in the logging code. This shouldn't
happen in general, but it is better to be save, since there
have been bugs triggering this.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
src/util/virlog.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/util/virlog.c b/src/util/virlog.c
index d1fb0b3..047a131 100644
--- a/src/util/virlog.c
+++ b/src/util/virlog.c
@@ -1181,9 +1181,11 @@ virLogOutputToJournald(virLogSource source,
journalAddInt(&state, "PRIORITY", priority);
journalAddString(&state, "LIBVIRT_SOURCE",
virLogSourceTypeToString(source));
- journalAddString(&state, "CODE_FILE", filename);
+ if (filename)
+ journalAddString(&state, "CODE_FILE", filename);
journalAddInt(&state, "CODE_LINE", linenr);
- journalAddString(&state, "CODE_FUNC", funcname);
+ if (funcname)
+ journalAddString(&state, "CODE_FUNC", funcname);
memset(&sa, 0, sizeof(sa));
sa.sun_family = AF_UNIX;
--
1.8.1.4
11 years, 2 months
[libvirt] [PATCH] Ensure LXC/QEMU APIs set the filename for errors
by Daniel P. Berrange
From: "Daniel P. Berrange" <berrange(a)redhat.com>
The virLibConnError macros in libvirt-lxc.c and
libvirt-qemu.c were passing NULL for the filename.
This causes a crash if the logging code is configured
to use journald.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
src/libvirt-lxc.c | 6 +++---
src/libvirt-qemu.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/libvirt-lxc.c b/src/libvirt-lxc.c
index da69dce..c8cdcea 100644
--- a/src/libvirt-lxc.c
+++ b/src/libvirt-lxc.c
@@ -35,12 +35,12 @@
#define VIR_FROM_THIS VIR_FROM_NONE
-#define virLibConnError(conn, error, info) \
- virReportErrorHelper(VIR_FROM_NONE, error, NULL, __FUNCTION__, \
+#define virLibConnError(conn, error, info) \
+ virReportErrorHelper(VIR_FROM_NONE, error, __FILE__, __FUNCTION__, \
__LINE__, info)
#define virLibDomainError(domain, error, info) \
- virReportErrorHelper(VIR_FROM_DOM, error, NULL, __FUNCTION__, \
+ virReportErrorHelper(VIR_FROM_DOM, error, __FILE__, __FUNCTION__, \
__LINE__, info)
/**
diff --git a/src/libvirt-qemu.c b/src/libvirt-qemu.c
index 2a1432b..83fb3b3 100644
--- a/src/libvirt-qemu.c
+++ b/src/libvirt-qemu.c
@@ -29,12 +29,12 @@
#define VIR_FROM_THIS VIR_FROM_NONE
-#define virLibConnError(conn, error, info) \
- virReportErrorHelper(VIR_FROM_NONE, error, NULL, __FUNCTION__, \
+#define virLibConnError(conn, error, info) \
+ virReportErrorHelper(VIR_FROM_NONE, error, __FILE__, __FUNCTION__, \
__LINE__, info)
#define virLibDomainError(domain, error, info) \
- virReportErrorHelper(VIR_FROM_DOM, error, NULL, __FUNCTION__, \
+ virReportErrorHelper(VIR_FROM_DOM, error, __FILE__, __FUNCTION__, \
__LINE__, info)
/**
--
1.8.1.4
11 years, 2 months
[libvirt] [PATCH 0/3] Fix coverity issues introduced by qemuagenttest and the refactor
by Peter Krempa
Fix the issues reported by John and also add yet another test subcase.
Peter Krempa (3):
qemuagenttest: Fix checking of shutdown mode
qemuagenttest: Check invalid response in shutdown test
qemumonitortestutils: Don't skip va_end() on error path
tests/qemuagenttest.c | 32 +++++++++++++++++++++++++++++++-
tests/qemumonitortestutils.c | 2 +-
2 files changed, 32 insertions(+), 2 deletions(-)
--
1.8.3.2
11 years, 2 months