[systemd-devel] How to attach a .socket file to all the network namespaces

Lennart Poettering lennart at poettering.net
Mon Feb 6 19:09:24 UTC 2017


On Mon, 30.01.17 20:33, Badrish Adiga H R (badrish.adigahr at gmail.com) wrote:

> Hi,
> 
> I want to use socket activated ssh daemon. However currently this is
> working file only for default namespace.
> 
> I just want to make systemd to listen on a tcp port number(22 for ssh)
> on all the namespaces and to launch sshd at .service on the corresponding
> namespace. Can you help me in this regard, if there is already a
> solution to this?

This is currently not supported. However, adding this would be OK I
figure. This would require two changes however:

a) add NetworkNamespace= or so as a new service unit file setting that
   takes a a path to a namespace handle file.

b) teach .socket units namespace support, honouring JoinsNamespaceOf=
   as well as as supporting NetworkNamespace directly.

It's not trivial to add that, but patches would be welcome.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list