[lxc-users] Error in 'lxc.host-start' makes infratsructure unusable

webman at manfbraun.de webman at manfbraun.de
Sat Jul 27 19:37:51 UTC 2019


Hello!

I am using Debian (buster, kernel 4.19)
and LXC 3.1 (3.1.0+really3.0.3-8).

In a container' 'host-start' hook, I try to
find out the PID of the container and I am using:
>pid=$(lxc-info -n temp -p -H)<
This hungs.

Easy to assume, this is a locking situation ;-)
Ok, but to make another further use of the
LXC-tools (like 'lxc-ls' etc. - they are all
blocked since the start attempt) you have to
hard kill the corresponding monitor.

Using:
>lxc-monitor -Q -n <name><

shows no error, but it just don't work
and the container start attempt continues ...

Beneth of that, how to get the PID of the
started container? What I want to achive is,
to create a named network namespace for each
container (>ln -sf /proc/${pid}/ns/net /var/run/netns/${1}<).

BTW, passing environment variables into the
container does continue to NOT work ...

Thanks,
Manfred






More information about the lxc-users mailing list