Quoting Christoph Mitasch (cmita...@thomas-krenn.com):
> Hello,
> 
> I've built a LXC HA Cluster with Pacemaker and DRBD with Ubuntu 12.04.
> 
> >From time to time I get the following error when a container is startet.
>       lxc-start 1345755927.759 ERROR    lxc_cgroup - File exists - failed to 
> create '/sys/fs/cgroup/perf_event//lxc' directory
>       lxc-start 1345755927.759 ERROR    lxc_start - failed to spawn 'test2'
>       lxc-start 1345755928.023 ERROR    lxc_cgroup - No such file or 
> directory - failed to remove cgroup '/sys/fs/cgroup/perf_event//lxc/test2'
> 
> Any ideas what the problem could be here?

Sounds like a race in src/lxc/cgroup.c.  I'm guessing that:

        /* if cgparent does not exist, create it */
        if (access(cgparent, F_OK) && mkdir(cgparent, 0755)) {
                SYSERROR("failed to create '%s' directory", cgparent);
                return -1;
        }

the first two containers created after boot are racing here, and this
should be changed to

        /* if cgparent does not exist, create it */
        if (access(cgparent, F_OK) && mkdir(cgparent, 0755)) {
                if (errno != EEXIST) {
                        SYSERROR("failed to create '%s' directory", cgparent);
                        return -1;
                }
        }

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users

Reply via email to