[lxc-devel] lxc-info incorrect info after crash

Daniel Lezcano daniel.lezcano at free.fr
Mon Jun 29 08:56:42 UTC 2009


Adam Majer wrote:
> After system crash, the lxc-info reports incorrect status,
> 
> mira:~# lxc-info -n debs
> 'debs' is RUNNING
> 
> and of course it is not.
> 
> Should the bootup script clear up any files or is the current status of
> a given container fetched from the kernel? If it is not fetched from the
> kernel, is it possible to fetch it instead of relying on possibly stale
> status files?

The problem is the kernel is not aware of what is a container, it only 
provides a set of features used from user space to build a specific 
component (in our case the container).

I agree having a file to store the state of the container is ugly. Are 
we really interested by the different states of the container STARTING, 
STOPPING, RUNNING, etc ... IMO yes if we want to monitor it, otherwise 
maybe the information running or not running is enough.

We can replace this file by a simple check in the lxc-info to know if 
the container is running, a kill(init_pid, 0) would do the trick and I 
will be happy to remove this "state" file :)

The different states would be kept but only for the monitoring as they 
are transient and we avoid a stale file.

Thanks
   -- Daniel




More information about the lxc-devel mailing list