[systemd-devel] systemd-nspawn isolation potentially causing issues with distccmon-text
Uoti Urpala
uoti.urpala at pp1.inet.fi
Wed Nov 13 23:54:36 UTC 2019
On Wed, 2019-11-13 at 10:24 -0500, John wrote:
> I am using systemd-nspawn to compile in a clean environment. My
> distcc cluster happily accepts requests from the container's build,
> but the monitoring utility, distccmon-text, shows no output. I invoked
> it defining the DISTCC_DIR variable to the correct directory in the
> container.
> Link to strace from the container:
> https://gist.github.com/graysky2/0886025b60335de4c0b19ddf11f7aafb
Your description is somewhat unclear. I'm assuming that this is
actually a strace from OUTSIDE the container (as in, you are not
running the distcc-mon program inside the container, but running it on
the host system and only giving it a path to a filesystem location used
by the in-container compilation process), and that this is the case you
are trying to get working.
I believe the problem is that the program reads PID values from the
filesystem, but PIDs are not the same inside the container and outside.
Thus recording a PID value inside the container and then trying to use
that PID to find the same process from the host system will not work.
If your container runs as a full enough machine with its own systemd
and dbus, then the simplest solution is likely to run the monitoring
utility in the container, for example with:
machinectl shell <machine-name> <command>
More information about the systemd-devel
mailing list