Bug 808144

Summary: systemd: disable fails to execute
Product: [openSUSE] openSUSE 12.2 Reporter: Jan Engelhardt <jengelh>
Component: BasesystemAssignee: Frederic Crozat <fcrozat>
Status: VERIFIED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Minor    
Priority: P5 - None CC: suse
Version: Final   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Found By: Beta-Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: dmesg

Description Jan Engelhardt 2013-03-07 18:13:06 UTC
systemd-44-10.8.1.x86_64 is installed. Would be nice if it told us what file exactly it did not find.

19:10 nakamura:/etc/systemd/system # ls -l
total 44
drwxr-xr-x 2 root root 4096 Jan  6  2012 basic.target.wants
drwxr-xr-x 2 root root 4096 Mar 12  2011 default.target.wants
drwxr-xr-x 2 root root 4096 Nov  9 08:34 getty.target.wants
drwxr-xr-x 2 root root 4096 Feb 15 13:07 graphical.target.wants
drwxr-xr-x 2 root root 4096 Feb 18 14:23 multi-user.target.wants
drwxr-xr-x 2 root root 4096 Oct 22  2011 runlevel2.target.wants
drwxr-xr-x 2 root root 4096 Sep 21 14:31 runlevel3.target.wants
drwxr-xr-x 2 root root 4096 Sep 21 14:31 runlevel5.target.wants
drwxr-xr-x 2 root root 4096 Mar 12  2011 sysinit.target.wants
lrwxrwxrwx 1 root root   36 Mar 12  2011 default.target -> /lib/systemd/system/runlevel5.target
lrwxrwxrwx 1 root root    9 Mar  6 17:25 klogd.service -> /dev/null
-rw-r--r-- 1 root root  573 Mar  4  2012 systemd-random-seed-load.service
lrwxrwxrwx 1 root root   50 Feb 15 13:07 teamviewerd.service -> /opt/teamviewer8/tv_bin/script/teamviewerd.service
-rw-r--r-- 1 root root  163 Jul  9  2012 vpnc.service
19:10 nakamura:/etc/systemd/system # systemctl disable teamviewerd.service
Failed to issue method call: No such file or directory
Comment 1 Frederic Crozat 2013-03-11 09:56:50 UTC
did you try systemctl daemon-reload before issuing systemctl disable ?

Could you boot with systemd.log_level=debug systemd.log_target=kmsg and attach dmesg log ?

Looking at systemd code, it would be difficult to improve the error message, unfortunately.
Comment 2 Jan Engelhardt 2013-03-12 12:50:49 UTC
# wget http://www.teamviewer.com/download/teamviewer_linux.rpm

# zypper in --no-r teamviewer_linux.rpm
[...]

# systemctl disable teamviewerd.service
Failed to issue method call: No such file or directory

# dmesg
[  124.660761] systemd[1]: Accepted connection on private bus.
[  124.662263] systemd[1]: Got D-Bus request: org.freedesktop.systemd1.Manager.DisableUnitFiles() on /org/freedesktop/systemd1
[  124.662628] systemd[1]: Looking for unit files in:
[  124.662633] systemd[1]:      /etc/systemd/system
[  124.662636] systemd[1]:      /usr/lib/systemd/system
[  124.662663] systemd[1]:      /lib/systemd/system
[  124.662754] systemd[1]: Looking for SysV init scripts in:
[  124.662758] systemd[1]:      /etc/init.d
[  124.662762] systemd[1]: Looking for SysV rcN.d links in:
[  124.662765] systemd[1]:      /etc/init.d
[  124.663459] systemd[1]: Got D-Bus request: org.freedesktop.DBus.Local.Disconnected() on /org/freedesktop/DBus/Local

# ls -l /etc/systemd/system/teamviewerd.service
lrwxrwxrwx 1 root root 50 Mar 12 08:46 /etc/systemd/system/teamviewerd.service -> /opt/teamviewer8/tv_bin/script/teamviewerd.service
Comment 3 Frederic Crozat 2013-03-12 13:21:49 UTC
I need FULL dmesg log.

and please attach the offending service file.
Comment 4 Jan Engelhardt 2013-03-13 14:21:26 UTC
v-sfac:/etc/systemd/system # find | grep teamv
./teamviewerd.service
./graphical.target.wants/teamviewerd.service

v-sfac:/etc/systemd/system # ls -l teamviewerd.service graphical.target.wants/teamviewerd.service 
lrwxrwxrwx 1 root root 50 Mar 12 08:46 graphical.target.wants/teamviewerd.service -> /opt/teamviewer8/tv_bin/script/teamviewerd.service
lrwxrwxrwx 1 root root 50 Mar 12 08:46 teamviewerd.service -> /opt/teamviewer8/tv_bin/script/teamviewerd.service

v-sfac:/etc/systemd/system # cat /opt/teamviewer8/tv_bin/script/teamviewerd.service
[Unit]
Description = TeamViewer remote control daemon
Wants = display-manager.service
After = NetworkManager-wait-online.service network.target

[Service]
Type = forking
PIDFile = /var/run/teamviewerd.pid
ExecStart = /opt/teamviewer8/tv_bin/teamviewerd -d
Restart = on-abort
StartLimitInterval = 60
StartLimitBurst = 10

[Install]
WantedBy = graphical.target
v-sfac:/etc/systemd/system #
Comment 5 Jan Engelhardt 2013-03-13 14:22:15 UTC
Created attachment 529557 [details]
dmesg
Comment 6 Frederic Crozat 2013-03-13 14:37:05 UTC
file teamviewerd.service 
teamviewerd.service: ASCII text, with CRLF line terminators

try running dos2unix on /opt/teamviewer8/tv_bin/script/teamviewerd.service
Comment 7 Jan Engelhardt 2013-03-13 14:40:53 UTC
Problem persists even when CRLF is exchanged into LF.
Comment 8 Frederic Crozat 2013-03-13 15:30:09 UTC
ok, teamviewer is installing .service in an "unusual" way (I didn't knew it was even possible):

systemctl enable /opt/teamviewer8/tv_bin/script/teamviewerd.service

which creates the symlink in /etc/systemd/system, in addition to the one in /etc/systemd/system/graphical.target.wants/

But you need to use "systemctl disable /opt/teamviewer8/tv_bin/script/teamviewerd.service" otherwise the symlink resolution code from systemd will ignore symlink in /etc/systemd/system (which caused the "No such file or directory" error).

I've opened a bug report upstream https://bugs.freedesktop.org/show_bug.cgi?id=62300 , I don't know if it is wanted or not.
Comment 9 Jan Ritzerfeld 2013-04-28 09:19:20 UTC
Furthermore, after disabling it you have to enable it again before you can start it.
Comment 10 Frederic Crozat 2013-06-12 10:55:07 UTC
Patch fixed upstream.

I've backported it for 12.2 ( http://download.opensuse.org/repositories/home:/fcrozat:/branches:/openSUSE:/12.2:/Update/openSUSE_12.2_Update/ ) and 12.3 (http://download.opensuse.org/repositories/home:/fcrozat:/branches:/openSUSE:/12.3:/Update/standard/) and it is already in Factory.

Let's request maintenance bugfix update for both 12.2 and 12.3

mr 178807 for 12.2 and #178808 for 12.3
Comment 11 Benjamin Brunner 2013-06-13 03:35:17 UTC
Update started for openSUSE 12.2 (openSUSE:Maintenance:1775) and 12.3 (openSUSE:Maintenance:1776). Thanks for your submission.
Comment 12 Benjamin Brunner 2013-06-20 07:08:34 UTC
Update released for openSUSE 12.2 and 12.3. Resolved fixed.
Comment 13 Swamp Workflow Management 2013-06-20 08:04:55 UTC
openSUSE-RU-2013:1055-1: An update that has four recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 793411,796171,804575,808144
CVE References: 
Sources used:
openSUSE 12.2 (src):    systemd-44-10.15.1, systemd-gtk-44-10.15.1
Comment 14 Swamp Workflow Management 2013-06-20 08:05:34 UTC
openSUSE-RU-2013:1057-1: An update that has four recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 808144,808319,809420,820454
CVE References: 
Sources used:
openSUSE 12.3 (src):    systemd-195-13.29.1, systemd-mini-195-13.29.1
Comment 15 Jan Engelhardt 2013-06-20 23:25:16 UTC
Excellent.