[lxc-devel] Patch: really complain when trying to start already started container
Frederic Crozat
fcrozat at suse.com
Tue May 29 09:04:58 UTC 2012
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 <fcrozat at suse.com>
SUSE
More information about the lxc-devel
mailing list