dhcpcd-discuss

Re: Evolution request for managing namespaces

Stéphane Veyret

Tue Apr 07 12:41:13 2020

Thank you for your answer, Roy.

> > ...
> > nsenter -t 1234 -n dhcpcd container-eth0
> > ...
> So, if I understand the problem correctly the container 1234 sees the same root
> as the host? ie /var/run/dhcpcd on both point to the same location?

Yes, using “nsenter -n” is almost the same as using “ip netns exec”,
i.e. the process is executed in the given network namespace (so in the
same file system root as the host, separation is made for network
only).

> If the root is the same for both, what's your expectation with managing
> conflicts if say they receieve different DNS data for /etc/resolv.conf?

I have the same DNS data for both, so I did not think of it, but
you're right, this could be a problem. This would require to specify
the “--nohook” and so have separated configuration files. This is not
a big problem.

> This might be as simple as not running the dhcpcd instance on the host in master
> mode - limit it to a single interface and do the same in your containers.

You're right, but I think it is a workaround. I mean that at the
moment, almost everything is done automatically. If I only use dhcpcd
with a single named interface and I need to change my hardware and
this makes the interface name change, I will have to think that I also
need to change the way dhcpcd service is starting.

Do you think a “--nomaster” option (which would simply ignore the
socket) would be complicated to implement?

> > What do you think? Does this make sense or am I mistaken?
>
> I don't know anything about docker or namespaces or cgroups.
> But I'll try and help.

Thank you very much! :)

-- 
Bien cordialement, / Plej kore,

Stéphane Veyret

Follow-Ups:
Re: Evolution request for managing namespacesRoy Marples
References:
Evolution request for managing namespacesStéphane Veyret
Re: Evolution request for managing namespacesRoy Marples
Archive administrator: postmaster@marples.name