[Pkg-systemd-maintainers] Bug#700888: Can't start OpenVPN using ifupdown when running systemd

Alberto Gonzalez Iniesta agi at inittab.org
Mon Mar 17 17:51:36 GMT 2014


On Mon, Mar 17, 2014 at 06:46:01PM +0100, Michael Biebl wrote:
> Am 17.03.2014 17:55, schrieb Alberto Gonzalez Iniesta:
> > On Sun, Mar 16, 2014 at 02:23:47AM +0100, Michael Biebl wrote:
> >> On Fri, Mar 14, 2014 at 12:29:49PM +0100, Alberto Gonzalez Iniesta wrote:
> >>> On Fri, Mar 14, 2014 at 12:26:40PM +0100, Sylvestre Ledru wrote:
> >>>> Hello
> >>>>
> >>>> Any eta on this bug ? Since systemd will be the default for Debian
> >>>> Jessie, it would be nice to see it fixed.
> >>>
> >>> Hi Sylvestre,
> >>>
> >>> The bug page is open on my browser since yesterday and I'm working on it
> >>> now. I have to test my changes won't break sysV installs. Hope to have
> >>> it really soon (tm).
> > 
> > Hi there,
> > 
> >> Afaics there a few issues:
> >> - The existence of /bin/systemctl doesn't mean that systemd is active /
> >>   PID 1. If you want to check if systemd is running, use something like
> >>   [ -d /run/systemd/system ]
> > 
> > Done, changed the test. Thanks for the pointer.
> > 
> >> - The native .systemd service file and the LSB/SysV init script name do
> >>   not match openvpn vs. openvpn at .service.
> >>   This means, during boot systemd will start the old LSB/SysV init
> >>   script.
> > 
> > This is intentional. The functionality the old initscript provides
> > (start a daemon for each VPN configuration file) cannot be reproduced
> > with a .service file AFAIK.
> 
> The generator I mentioned and maybe a openvpn.target, would be one idea.
> 
>  The openvpn at .service is used to replace the
> > ability of the old init script to start a single VPN (as it allowed
> > additional params after start/stop), also used by the openvpn option for
> > network/interfaces declarations.
> 
> Well, what happens if you start a tunnel via an if-up.d hook and you use
> AUTOSTART=all? Is that configuration forbidden?
> 
> Because if not, the if-up.d hook will start a systemd instance service,
> and /etc/init.d/openvpn stop will kill that tunnel afaics *not* using
> systemctl. I.e. the openvpn at foo.service will be in a failed state.

I see. I've got no idea how to solve that without a huge chunk of new
code in the init script. I guess I'll need some help with all this.

Having AUTOSTART=all *and* a openvpn option in network/interfaces does
not look very clever. It someone uses openvpn options in their
network/interfaces they shouldn't be using all (as in it makes no
sense).



-- 
Alberto Gonzalez Iniesta    | Formación, consultoría y soporte técnico
mailto/sip: agi at inittab.org | en GNU/Linux y software libre
Encrypted mail preferred    | http://inittab.com

Key fingerprint = 5347 CBD8 3E30 A9EB 4D7D  4BF2 009B 3375 6B9A AA55




More information about the Pkg-systemd-maintainers mailing list