On Tue, Sep 30, 2014 at 02:18:54AM +0200, Michael Biebl wrote: > # systemctl reload openvpn.service > Failed to reload openvpn.service: Job type reload is not applicable for > unit openvpn.service. > > The problem here is, that ExecReload= needs to be set explicitly for > services which support that. > > [Service] > Type=oneshot > RemainAfterExit=yes > ExecStart=/bin/true > ExecReload=/bin/true > > With that change, I can run systemctl reload openvpn.service and my > instanced services are reloaded.
Hi Michael, Thanks for the report. I have changed the service file as you suggested. > But here I've stumbled into another issue: A systemctl reload > openvpn@<foo>.service kills the service: > > # systemctl status [email protected] > ● [email protected] - OpenVPN connection to mypi > Loaded: loaded (/lib/systemd/system/[email protected]; disabled) > Active: active (running) since Di 2014-09-30 02:16:53 CEST; 5s ago > Process: 31269 ExecReload=/bin/kill -HUP $MAINPID (code=exited, > status=0/SUCCESS) > Process: 31544 ExecStart=/usr/sbin/openvpn --daemon ovpn-%i --status > /run/openvpn/%i.status 10 --cd /etc/openvpn --config /etc/openvpn/%i.conf > (code=exited, status=0/SUCCESS) > Main PID: 31545 (openvpn) > CGroup: /system.slice/system-openvpn.slice/[email protected] > └─31545 /usr/sbin/openvpn --daemon ovpn-mypi --status > /run/openvpn/mypi.status 10 --cd /etc/openvpn --config /etc/openvpn/mypi.conf > > # systemctl reload [email protected] > # systemctl status [email protected] > ● [email protected] - OpenVPN connection to mypi > Loaded: loaded (/lib/systemd/system/[email protected]; disabled) > Active: failed (Result: exit-code) since Di 2014-09-30 02:17:30 CEST; 2s > ago > Process: 31652 ExecReload=/bin/kill -HUP $MAINPID (code=exited, > status=0/SUCCESS) > Process: 31544 ExecStart=/usr/sbin/openvpn --daemon ovpn-%i --status > /run/openvpn/%i.status 10 --cd /etc/openvpn --config /etc/openvpn/%i.conf > (code=exited, status=0/SUCCESS) > Main PID: 31545 (code=exited, status=1/FAILURE) > > Sep 30 02:17:30 pluto systemd[1]: [email protected]: main process exited, > code=exited, status=1/FAILURE > Sep 30 02:17:30 pluto systemd[1]: Unit [email protected] entered failed > state. > > So maybe [email protected] doesn't actually support reload and should be > removed there? If not, this failure on reload should probably be tracked > as a separate issue. It's working for me now. Maybe you are using --user without --persistent-foo and the reload fails? I tested with some of my configs (not using --user) and it works fine. Regards, Alberto -- Alberto Gonzalez Iniesta | Formación, consultoría y soporte técnico mailto/sip: [email protected] | en GNU/Linux y software libre Encrypted mail preferred | http://inittab.com Key fingerprint = 5347 CBD8 3E30 A9EB 4D7D 4BF2 009B 3375 6B9A AA55 -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

