[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] Unable to create cgroup for driver



The patch fixed the lxc problem:

[root rain8 libvirt]# /usr/local/sbin/libvirtd -v
17:11:55.994: warning : qemudStartup:521 : Unable to create cgroup for driver: No such device or address
17:11:56.193: warning : virEventRemoveTimeoutImpl:284 : Ignoring invalid remove timer 0






From: Daniel P. Berrange <berrange redhat com>
To: Shahar Klein <shaharklein yahoo com>; libvir-list redhat com
Sent: Wednesday, August 12, 2009 12:54:37 PM
Subject: Re: [libvirt] Unable to create cgroup for driver

On Tue, Aug 11, 2009 at 02:45:06AM -0700, Shahar Klein wrote:
> Jun
> To avoid just configure --without-lxc
>
> Daniel here is the back-trace
> (Didn't have time to explore)
>
> [root rain8 libvirt-0.7.0]# ./qemud/libvirtd
> 16:11:02.700: warning : qemudStartup:521 : Unable to create cgroup for driver: No such device or address
> Segmentation fault (core dumped)
>
> gdb ./qemud/.libs/libvirtd ../core.19690
>
> (gdb) where
> #0  virDomainEventCallbackListFree (list=0x0) at domain_event.c:41
> #1  0x000000000043ecee in lxcShutdown () at lxc_driver.c:1582
> #2  0x000000000043f122 in lxcStartup (privileged=1) at lxc_driver.c:1523
> #3  0x00007f05103e03c2 in virStateInitialize (privileged=1) at libvirt.c:785
> #4  0x00000000004134cf in main (argc=6776272, argv=<value optimized out>) at qemud.c:2970

Try out the following patch which ought to fix this problem

Regards,
Daniel

diff --git a/src/domain_conf.c b/src/domain_conf.c
index 2301a96..dd2b361 100644
--- a/src/domain_conf.c
+++ b/src/domain_conf.c
@@ -532,6 +532,9 @@ void virDomainObjListFree(virDomainObjListPtr vms)
{
    unsigned int i;

+    if (!vms)
+        return;
+
    for (i = 0 ; i < vms->count ; i++)
        virDomainObjFree(vms->objs[i]);

diff --git a/src/domain_event.c b/src/domain_event.c
index daa6fd5..0fa2822 100644
--- a/src/domain_event.c
+++ b/src/domain_event.c
@@ -38,6 +38,9 @@ void
virDomainEventCallbackListFree(virDomainEventCallbackListPtr list)
{
    int i;
+    if (!list)
+        return;
+
    for (i=0; i<list->count; i++) {
        virFreeCallback freecb = list->callbacks[i]->freecb;
        if (freecb)
diff --git a/src/lxc_driver.c b/src/lxc_driver.c
index a9c4f79..bd0cf0e 100644
--- a/src/lxc_driver.c
+++ b/src/lxc_driver.c
@@ -1439,10 +1439,12 @@ static int lxcStartup(int privileged)
    lxcDriverLock(lxc_driver);

    /* Check that this is a container enabled kernel */
-    if(lxcContainerAvailable(0) < 0)
+    if (lxcContainerAvailable(0) < 0) {
+        VIR_INFO0("LXC support not available in this kernel, disabling driver");
        goto cleanup;
+    }

-    if(VIR_ALLOC(lxc_driver->domainEventCallbacks) < 0)
+    if (VIR_ALLOC(lxc_driver->domainEventCallbacks) < 0)
        goto cleanup;
    if (!(lxc_driver->domainEventQueue = virDomainEventQueueNew()))
        goto cleanup;

--
|: Red Hat, Engineering, London  -o-  http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org      -o-        http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]