On Feb 28, Michael Biebl wrote:
> You can still use "ifdown br0" and "ifup br0" if this an auto interface.
> But I get your point, that then the resulting processes are no longer
> part of networking.service or a specific cgroup which can be used to
> reliably kill all process started by ifup.

Yes, they end up in current user's session CGroup. If 'systemd' is configured
to kill user processes after logout, this would result in even more broken
configuration.

> I think, one solution for this would be, if ifupdown would use
> [email protected] for auto interfaces as well, and networking.service would
> simply become a wrapper/dummy service/target which simply triggers the
> start of all auto interfaces as instances of [email protected].

That would be fantastic, my wrapper wouldn't be needed in this case.

> This is something for stretch+1 though.

Yes, I know, and I'm fine with it. Debian Stable is the main targed of my
project, so I will still need to have a solution for this issue for some time.

> specifically After=sys-subsystem-net-devices-%i.device which means the
> [email protected] instance needs to be started after the device has been
> created.
> 
> You already found that out yourself and Guus also confirmed it, that if
> you use allow-hotplug, you need to make sure that the device is created
> by something else

I'm trying to avoid modification of the files included in Debian package to
be able to get upgrades, so I don't want to mess with '[email protected]'
directly. What to do, what to do...

Can 'systemd' instance units pass the "instance name" to other units that
register themselves as dependencies of them? To explain a bit better, I'm
thinking about '[email protected]' unit which would get the
instance id from '[email protected]', check if it's a bridge in
'/etc/network/interfaces' and create it if it doesn't exist. That way usage of
'systemctl <start|stop> [email protected]' would be preserved, and the wrapper
could be extended to other interface types if necessary.

Another solution that comes to mind would be to create a separate
'[email protected]' that creates the bridge and runs the 'ifup' command the
same as '[email protected]'. But that would leave the 'systemctl <start|stop>
[email protected]' in a broken state, so I would want to avoid it.

I suppose that there's also an option of overloading the '[email protected]'
ExecStart= parameter using '/etc/systemd/system/[email protected]/' directory
but I'm not sure if this works for instanced units, and if 'systemd' will let
me overload ExecStart.

Well, I'll explore some possibilites for this soon, this issue breaks a few
things in my project so it should be handled quickly.

Thanks for your help,
Maciej

Attachment: pgpxZiU86IOJm.pgp
Description: PGP signature

_______________________________________________
Pkg-systemd-maintainers mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-systemd-maintainers

Reply via email to