Le dimanche 27 mai 2012 à 04:04 +0200, Daniel Lezcano a écrit :
> On 04/27/2012 04:48 PM, Frederic Crozat wrote:
> > Hi,
> >
> > it looks like the current detection of already started container doesn't
> > work properly (cgroups is trying to be moved before socket command is
> > created), making Serge fix (97d3756cbe10) useless.
> >
> > Attached patch adds similar warning when moving / deleting cgroups
> > fails.
> 
> Hi Frederic,
> 
> I don't think it is a good indication for the userspace.
> 
> If the userspace is trying to start two times the same containers at the 
> same time, it is up to the caller to understand what is going wrong and 
> not lxc to interpret the reason of the failure.

Containers can be started by an initscript (or in a screen, etc..) and
user might not realize that when they try to start container themselve.

I got two bug reports in the same week for this exact issue by people,
so I think some hinting is needed, "failing to rename a cgroup" /
"failing to remove a cgroup" is "leaking" LXC implementation details to
users who are expected to know what is going wrong, which won't help
most of them.

> But I admit the error reporting could be better. The 
> 'try_to_move_cgname' can fail in two cases, 'tempnam' fails with ENOMEM 
> or 'rename' fails with the proper errno set.

I don't think it is enough, for reasons stated above.

-- 
Frederic Crozat <[email protected]>
SUSE


------------------------------------------------------------------------------
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-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lxc-devel

Reply via email to