Bug 681074 - systemd won't start openvpn
Summary: systemd won't start openvpn
Status: RESOLVED DUPLICATE of bug 675406
Alias: None
Product: openSUSE 11.4
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Final
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Kay Sievers
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-19 19:53 UTC by Jiri Slaby
Modified: 2011-03-20 14:17 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
strace -ttfo bubak systemctl start openvpn.service (24.14 KB, text/plain)
2011-03-19 19:53 UTC, Jiri Slaby
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Slaby 2011-03-19 19:53:07 UTC
Created attachment 420351 [details]
strace -ttfo bubak systemctl start openvpn.service

# systemctl status openvpn.service 
openvpn.service - LSB: OpenVPN tunnel
          Loaded: loaded (/etc/init.d/openvpn)
          Active: failed since Sat, 19 Mar 2011 20:35:56 +0100; 50s ago
         Process: 3039 ExecStart=/etc/init.d/openvpn start (code=killed, signal=TERM)
          CGroup: name=systemd:/system/openvpn.service

# systemctl start openvpn.service 
Job failed. See system logs and 'systemctl status' for details.

/var/log/messages:
systemd[1]: openvpn.service operation timed out. Terminating.
kernel: [ 4004.054258] systemd[1]: Unit openvpn.service entered failed state.
Comment 1 Kay Sievers 2011-03-19 19:57:40 UTC
It's a known issue being worked on. With systemd all services are started from
pid 1, never from the calling shell. openvpn needs to hook into the
ask-password mechanism of systemd, to be able to retrieve the password from the
shell that calls systemadm start ...

*** This bug has been marked as a duplicate of bug 675406 ***
Comment 2 Jiri Slaby 2011-03-19 20:31:19 UTC
(In reply to comment #1)
> openvpn needs to hook into the
> ask-password mechanism of systemd, to be able to retrieve the password from the
> shell that calls systemadm start ...

Aha, got it. Thanks.

I have one more question. What's the rule which dictates systemd to run ask-password? I changed /etc/init.d/openvpn that openvpn doesn't need any input (and removed x-interactive line from the script). But systemd still waits for input.

I tried systemctl daemon-reexec or daemon-reexec with no effect. Is there any other way how systemd is needed to be restarted?
Comment 3 Kay Sievers 2011-03-20 14:15:10 UTC
Openvpn needs to ask, not systemd.

The simplest, openvpn needs an option to simply call a binary that asks and returns the password, like apache has.

Or someone needs to fiddle with the rather complicated openvpn client api and do the systemd integration there.

I think the Debian guys are currently looking into it.

*** This bug has been marked as a duplicate of bug 659357 ***
Comment 4 Kay Sievers 2011-03-20 14:16:32 UTC
oops, wrong bug
Comment 5 Kay Sievers 2011-03-20 14:17:27 UTC
Merge with 675406

*** This bug has been marked as a duplicate of bug 675406 ***