Bug 737178
Summary: | Provide native systemd service file | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jóhann B. Guðmundsson <johannbg> | ||||||||||
Component: | finger | Assignee: | Tomáš Hozza <thozza> | ||||||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||||
Severity: | unspecified | Docs Contact: | |||||||||||
Priority: | unspecified | ||||||||||||
Version: | rawhide | CC: | plautrba | ||||||||||
Target Milestone: | --- | ||||||||||||
Target Release: | --- | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Whiteboard: | |||||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||||
Doc Text: | Story Points: | --- | |||||||||||
Clone Of: | Environment: | ||||||||||||
Last Closed: | 2012-12-10 07:13:17 UTC | Type: | --- | ||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||
Documentation: | --- | CRM: | |||||||||||
Verified Versions: | Category: | --- | |||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||||
Embargoed: | |||||||||||||
Attachments: |
|
Description
Jóhann B. Guðmundsson
2011-09-09 19:34:34 UTC
Created attachment 522391 [details]
finger socket
Created attachment 522393 [details]
finger service
Passes simple finger test and note there is still a (tight) window to have this in F16 [root@valhalla system]# systemctl start finger.socket [root@valhalla system]# systemctl status finger.socket finger.socket - Finger Activation Socket Loaded: loaded (/lib/systemd/system/finger.socket) Active: active (listening) since Fri, 09 Sep 2011 19:32:22 +0000; 3min 52s ago Accepted: 2; Connected: 0 CGroup: name=systemd:/system/finger.socket [root@valhalla system]# finger johannbg@localhost Login: johannbg Name: Jóhann B. Guðmundsson Directory: /home/johannbg Shell: /bin/bash On since Tue Aug 30 18:44 (GMT) on tty1 from :0 10 days idle On since Tue Aug 30 18:44 (GMT) on pts/0 from :0 4 days idle On since Wed Aug 31 09:03 (GMT) on pts/1 from :0 4 hours 25 minutes idle On since Wed Aug 31 09:05 (GMT) on pts/2 from :0 3 hours 54 minutes idle On since Wed Aug 31 10:10 (GMT) on pts/3 from :0 2 days 9 hours idle On since Wed Aug 31 11:16 (GMT) on pts/4 from :0 8 days 6 hours idle On since Wed Aug 31 11:25 (GMT) on pts/5 from :0 3 days 6 hours idle On since Wed Aug 31 12:06 (GMT) on pts/6 from :0 3 days 6 hours idle On since Mon Sep 5 15:23 (GMT) on pts/7 from :0 3 days 12 hours idle On since Thu Sep 1 12:50 (GMT) on pts/8 from :0 4 days 7 hours idle On since Thu Sep 1 13:28 (GMT) on pts/9 from :0 1 day 1 hour idle On since Fri Sep 2 07:57 (GMT) on pts/10 from :0 3 days idle On since Thu Sep 1 17:37 (GMT) on pts/11 from :0 4 days 9 hours idle On since Tue Sep 6 12:01 (GMT) on pts/12 from :0 15 minutes 54 seconds idle On since Mon Sep 5 14:09 (GMT) on pts/13 from :0 1 day idle On since Fri Sep 2 10:59 (GMT) on pts/14 from :0 3 days idle On since Tue Sep 6 06:32 (GMT) on pts/15 from :0 2 days 8 hours idle On since Tue Sep 6 08:17 (GMT) on pts/16 from :0 1 day 1 hour idle On since Tue Sep 6 08:54 (GMT) on pts/17 from :0 4 hours 3 minutes idle On since Tue Sep 6 12:01 (GMT) on pts/18 from :0 23 hours 29 minutes idle On since Wed Sep 7 13:22 (GMT) on pts/19 from :0 4 hours 56 minutes idle On since Tue Sep 6 15:28 (GMT) on pts/20 from :0 23 hours 47 minutes idle On since Wed Sep 7 09:18 (GMT) on pts/21 from :0 2 days 9 hours idle On since Wed Sep 7 10:07 (GMT) on pts/23 from :0 2 days 4 hours idle On since Wed Sep 7 11:24 (GMT) on pts/24 from :0 2 days 8 hours idle On since Wed Sep 7 13:30 (GMT) on pts/25 from :0 2 days 4 hours idle On since Wed Sep 7 14:48 (GMT) on pts/26 from :0 2 days 1 hour idle On since Wed Sep 7 15:19 (GMT) on pts/27 from :0 8 minutes 33 seconds idle On since Thu Sep 8 09:27 (GMT) on pts/31 from :0 1 hour 14 minutes idle On since Thu Sep 8 13:56 (GMT) on pts/32 from :0 On since Thu Sep 8 15:00 (GMT) on pts/33 from :0 5 minutes 31 seconds idle Last login Thu Sep 8 21:54 (GMT) on pts/22 from vpnx007.starfsm.hi.is No mail. No Plan. Once package and shipped your package should no longer have to depend on xinetd https://fedoraproject.org/wiki/Packaging:Guidelines:Systemd https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd > http://fedoraproject.org/wiki/Features/SysVtoSystemd
finger-server is not based on SysV initscript so this feature is not applicable to this.
I can add unit files into doc directory so that users can enable them manually if they want.
But units provided by you don't work for me:
[root@f16 ~]# finger root@localhost
Login: root Name: root
Directory: /root Shell: /bin/bash
On since Tue Sep 13 10:18 (CEST) on ttyS0 2 minutes 18 seconds idle
On since Tue Sep 13 10:19 (CEST) on pts/0 from 192.168.122.1
No mail.
No Plan.
[root@f16 ~]# systemctl stop xinetd.service
[root@f16 ~]# cp -v finger* /etc/systemd/system
`finger@.service' -> `/etc/systemd/system/finger@.service'
`finger.socket' -> `/etc/systemd/system/finger.socket'
[root@f16 ~]# systemctl --system daemon-reload
[root@f16 ~]# systemctl start finger.socket
[root@f16 ~]# finger root@localhost
[root@f16 ~]# systemctl status finger.socket
finger.socket - Finger Activation Socket
Loaded: loaded (/etc/systemd/system/finger.socket; disabled)
Active: active (listening) since Tue, 13 Sep 2011 11:49:16 +0200; 50s ago
Accepted: 1; Connected: 0
CGroup: name=systemd:/system/finger.socket
Well technically systemd obsoletes xinetd ( for the most part anyway ) and from the looks of it satisfies all we have depending on it in the distribution ( I completed converted all of components depending on xinetd yester and converted xinetd a while back ). This works for me however I'm using /lib/systemd/system not /etc/systemd/system not sure if that covers sockets... [root@valhalla system]# systemctl stop xinetd.service [root@valhalla system]# systemctl start finger.socket [root@valhalla system]# netstat -pant | grep LISTEN | grep 79 tcp 0 0 :::79 :::* LISTEN 1/systemd [root@valhalla system]# finger root@localhost johannbg@localhost Login: root Name: root Directory: /root Shell: /bin/bash Last login Wed Aug 17 04:29 (GMT) on tty2 New mail received Mon Apr 11 03:17 2011 (GMT) Unread since Fri Apr 1 03:43 2011 (GMT) No Plan. Login: johannbg Name: Jóhann B. Guðmundsson Directory: /home/johannbg Shell: /bin/bash On since Tue Aug 30 18:44 (GMT) on tty1 from :0 13 days 15 hours idle On since Tue Aug 30 18:44 (GMT) on pts/0 from :0 7 days 15 hours idle On since Wed Aug 31 09:03 (GMT) on pts/1 from :0 1 day 1 hour idle On since Wed Aug 31 09:05 (GMT) on pts/2 from :0 3 days 18 hours idle On since Wed Aug 31 10:10 (GMT) on pts/3 from :0 5 days 23 hours idle On since Wed Aug 31 11:16 (GMT) on pts/4 from :0 11 days 20 hours idle On since Wed Aug 31 11:25 (GMT) on pts/5 from :0 6 days 20 hours idle On since Wed Aug 31 12:06 (GMT) on pts/6 from :0 6 days 20 hours idle On since Mon Sep 5 15:23 (GMT) on pts/7 from :0 20 hours 14 minutes idle On since Thu Sep 1 12:50 (GMT) on pts/8 from :0 7 days 22 hours idle On since Thu Sep 1 13:28 (GMT) on pts/9 from :0 4 days 16 hours idle On since Fri Sep 2 07:57 (GMT) on pts/10 from :0 20 hours 14 minutes idle On since Thu Sep 1 17:37 (GMT) on pts/11 from :0 8 days idle On since Tue Sep 6 12:01 (GMT) on pts/12 from :0 17 hours 53 minutes idle On since Mon Sep 5 14:09 (GMT) on pts/13 from :0 17 hours 53 minutes idle On since Fri Sep 2 10:59 (GMT) on pts/14 from :0 6 days 15 hours idle On since Tue Sep 6 06:32 (GMT) on pts/15 from :0 20 hours 50 minutes idle On since Tue Sep 6 08:17 (GMT) on pts/16 from :0 4 days 16 hours idle On since Tue Sep 6 08:54 (GMT) on pts/17 from :0 22 hours 27 minutes idle On since Tue Sep 6 12:01 (GMT) on pts/18 from :0 4 days 14 hours idle On since Wed Sep 7 13:22 (GMT) on pts/19 from :0 3 days 19 hours idle On since Tue Sep 6 15:28 (GMT) on pts/20 from :0 4 days 14 hours idle On since Wed Sep 7 09:18 (GMT) on pts/21 from :0 6 days idle On since Mon Sep 12 10:16 (GMT) on pts/22 from :0 20 hours 56 minutes idle On since Wed Sep 7 10:07 (GMT) on pts/23 from :0 5 days 18 hours idle On since Wed Sep 7 11:24 (GMT) on pts/24 from :0 5 days 22 hours idle On since Wed Sep 7 13:30 (GMT) on pts/25 from :0 5 days 19 hours idle On since Wed Sep 7 14:48 (GMT) on pts/26 from :0 5 days 16 hours idle On since Wed Sep 7 15:19 (GMT) on pts/27 from :0 20 hours 13 minutes idle On since Mon Sep 12 10:16 (GMT) on pts/28 from :0 19 hours 42 minutes idle On since Mon Sep 12 10:35 (GMT) on pts/29 from :0 20 hours 27 minutes idle On since Mon Sep 12 12:38 (GMT) on pts/30 from :0 1 hour 27 minutes idle On since Thu Sep 8 09:27 (GMT) on pts/31 from :0 40 minutes 12 seconds idle On since Thu Sep 8 13:56 (GMT) on pts/32 from :0 17 hours 52 minutes idle On since Thu Sep 8 15:00 (GMT) on pts/33 from :0 1 day idle On since Mon Sep 12 13:31 (GMT) on pts/34 from :0 20 hours 38 minutes idle On since Tue Sep 13 08:57 (GMT) on pts/35 from :0 On since Tue Sep 13 09:47 (GMT) on pts/36 from :0 23 minutes 51 seconds idle No mail. No Plan. Created attachment 522890 [details]
finger service
Removing network.target from After=. this is a socket thus not needed...
(In reply to comment #6) > Well technically systemd obsoletes xinetd ( for the most part anyway ) and from > the looks of it satisfies all we have depending on it in the distribution ( I > completed converted all of components depending on xinetd yester and converted > xinetd a while back ). s/yester/yesterday [root@f16 ~]# systemctl start finger.socket [root@f16 ~]# netstat -pant | grep LISTEN | grep 79 tcp 0 0 :::79 :::* LISTEN 1/init [root@f16 ~]# systemctl status finger.socket finger.socket - Finger Activation Socket Loaded: loaded (/etc/systemd/system/finger.socket; enabled) Active: active (listening) since Tue, 13 Sep 2011 12:53:53 +0200; 1min 22s ago Accepted: 0; Connected: 0 CGroup: name=systemd:/system/finger.socket [root@f16 ~]# finger root@localhost [root@f16 ~]# rpm -q systemd systemd-35-1.fc16.x86_64 [root@f16 ~]# strace finger root@localhost ... write(4, "root", 4) = 4 write(4, "\r\n", 2) = 2 fcntl(4, F_GETFL) = 0x2 (flags O_RDWR) fstat(4, {st_mode=S_IFSOCK|0777, st_size=0, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f687c3f4000 lseek(4, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek) read(4, "", 4096) = 0 close(4) = 0 munmap(0x7f687c3f4000, 4096) = 0 exit_group(0) = ? [ 200.967743] systemd[1]: Incoming traffic on finger.socket [ 200.969183] systemd[1]: Trying to enqueue job finger@::1:79-::1:33848.service/start/replace [ 200.969415] systemd[1]: Installed new job finger@::1:79-::1:33848.service/start as 345 [ 200.969432] systemd[1]: Enqueued job finger@::1:79-::1:33848.service/start as 345 [ 200.969512] systemd[1]: About to execute: /usr/sbin/in.fingerd [ 200.991696] systemd[1]: Forked /usr/sbin/in.fingerd as 886 [ 200.996249] systemd[1]: finger@::1:79-::1:33848.service changed dead -> running [ 200.996292] systemd[1]: Job finger@::1:79-::1:33848.service/start finished, result=done [ 200.996746] systemd[1]: Running GC... [ 201.006962] systemd[1]: Received SIGCHLD from PID 886 (finger). [ 201.007270] systemd[1]: Got SIGCHLD for process 886 (finger) [ 201.008089] systemd[1]: Child 886 died (code=exited, status=0/SUCCESS) [ 201.008106] systemd[1]: Child 886 belongs to finger@::1:79-::1:33848.service [ 201.008125] systemd[1]: finger@::1:79-::1:33848.service: main process exited, code=exited, status=0 [ 201.012845] systemd[1]: finger.socket: One connection closed, 0 left. [ 201.012862] systemd[1]: finger@::1:79-::1:33848.service changed running -> dead [ 201.026248] systemd[1]: Accepted connection on private bus. [ 201.028128] systemd[1]: Accepted connection on private bus. [ 201.028360] systemd[1]: Got D-Bus request: org.freedesktop.systemd1.Agent.Released() on /org/freedesktop/systemd1/agent [ 201.028509] systemd[1]: finger@::1:79-::1:33848.service: cgroup is empty [ 201.029053] systemd[1]: Got D-Bus request: org.freedesktop.DBus.Local.Disconnected() on /org/freedesktop/DBus/Local [ 201.031264] systemd[1]: Got D-Bus request: org.freedesktop.systemd1.Agent.Released() on /org/freedesktop/systemd1/agent [ 201.031602] systemd[1]: Got D-Bus request: org.freedesktop.DBus.Local.Disconnected() on /org/freedesktop/DBus/Local as opposite to xinetd.service: [root@f16 ~]# systemctl stop finger.socket [root@f16 ~]# systemctl start xinetd.service [root@f16 ~]# strace finger root@localhost ... write(4, "root", 4) = 4 write(4, "\r\n", 2) = 2 fcntl(4, F_GETFL) = 0x2 (flags O_RDWR) fstat(4, {st_mode=S_IFSOCK|0777, st_size=0, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc7b56dd000 lseek(4, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek) read(4, "Login: root \t\t\tName: r"..., 4096) = 170 ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc7b56dc000 write(1, "Login: root \t\t\tName: r"..., 36Login: root Name: root ) = 36 write(1, "Directory: /root "..., 54Directory: /root Shell: /bin/bash ) = 54 write(1, "On since Tue Sep 13 13:06 (CEST)"..., 61On since Tue Sep 13 13:06 (CEST) on pts/0 from 192.168.122.1 ) = 61 write(1, "No mail.\n", 9No mail. ) = 9 write(1, "No Plan.\n", 9No Plan. ) = 9 read(4, "", 4096) = 0 close(4) = 0 munmap(0x7fc7b56dd000, 4096) = 0 exit_group(0) = ? There is no localfs.target in my system: [root@f16 ~]# systemctl status localfs.target localfs.target Loaded: error (Reason: No such file or directory) Active: inactive (dead) [root@f16 ~]# systemctl status local-fs.target local-fs.target - Local File Systems Loaded: loaded (/lib/systemd/system/local-fs.target; static) Active: active since Tue, 13 Sep 2011 13:06:37 +0200; 13min ago [root@f16 ~]# rpm -qf /lib/systemd/system/local-fs.target systemd-units-35-1.fc16.x86_64 Oh frell then I probably need to change that in a lot of files <sigh> I'm actually running this on F15 since I converted this one @work [root@valhalla system]# rpm -qa | grep systemd systemd-26-9.fc15.x86_64 systemd-units-26-9.fc15.x86_64 systemd-sysv-26-9.fc15.x86_64 Which leads me to think that something is broken with .35 If you have an F15 host handy could you test it on that? Created attachment 522905 [details]
Fixing localfs
Thankfully this seems to be only applicable to this unit file ;)
Btw do you have selinux enabled? root@f16 ~]# systemctl start finger.socket [root@f16 ~]# netstat -pant | grep LISTEN | grep 79 tcp 0 0 :::79 :::* LISTEN 1/init <--- This is a bit weird not as in it should say systemd Sure you made sure you did not leave xinetd instance running? [root@valhalla system]# systemctl start finger.socket [root@valhalla system]# netstat -pant | grep LISTEN | grep 79 tcp 0 0 :::79 :::* LISTEN 1/systemd <--- systemd not init This is fresh Fedora 16 Beta installed from Fedora 16 Beta TC1/Fedora-16-Beta-x86_64-DVD.iso # readlink /proc/1/exe /bin/systemd # netstat -pan | grep init tcp 0 0 :::79 :::* LISTEN 1/init unix 2 [ ACC ] STREAM LISTENING 8483 1/init /run/systemd/stdout-syslog-bridge unix 2 [ ACC ] SEQPACKET LISTENING 8682 1/init @/org/kernel/udev/udevd unix 2 [ ] DGRAM 8578 1/init /run/systemd/shutdownd unix 10 [ ] DGRAM 8587 1/init /dev/log unix 2 [ ACC ] STREAM LISTENING 11416 1/init /var/run/dbus/system_bus_socket unix 2 [ ] DGRAM 8436 1/init /run/systemd/notify unix 2 [ ACC ] STREAM LISTENING 8438 1/init /run/systemd/private unix 3 [ ] STREAM CONNECTED 12433 1/init # sestatus SELinux status: enabled SELinuxfs mount: /sys/fs/selinux Current mode: permissive ^^^^^^^^^^ Mode from config file: enforcing Policy version: 26 Policy from config file: targeted Hum there is definitely something amiss here I get on F15 host [root@valhalla system]# readlink /proc/1/exe /bin/systemd [root@valhalla ~]# netstat -pan | grep init [root@valhalla ~]# netstat -pan | grep systemd tcp 0 0 :::9418 :::* LISTEN 1/systemd tcp 0 0 :::79 :::* LISTEN 1/systemd unix 33 [ ] DGRAM 6656 1/systemd /dev/log unix 2 [ ] DGRAM 6667 1/systemd /run/systemd/shutdownd unix 2 [ ACC ] STREAM LISTENING 6730 1/systemd /run/systemd/logger unix 2 [ ] DGRAM 36908653 1/systemd /run/systemd/notify unix 2 [ ACC ] STREAM LISTENING 36908655 1/systemd /run/systemd/private unix 2 [ ] DGRAM 6723 1/systemd @/org/kernel/udev/udevd unix 2 [ ACC ] STREAM LISTENING 10994 1/systemd /var/run/dbus/system_bus_socket unix 2 [ ] DGRAM 51472683 1/systemd unix 3 [ ] STREAM CONNECTED 36907466 1/systemd unix 3 [ ] STREAM CONNECTED 33738724 418/systemd-logger /run/systemd/logger unix 3 [ ] STREAM CONNECTED 22669 418/systemd-logger /run/systemd/logger unix 3 [ ] STREAM CONNECTED 16577 418/systemd-logger /run/systemd/logger unix 3 [ ] STREAM CONNECTED 16512 418/systemd-logger /run/systemd/logger unix 2 [ ] DGRAM 8767 418/systemd-logger unix 2 [ ] DGRAM 8766 418/systemd-logger Does it still say init after you run systemctl daemon-reexec? I'll need to test this when I get home from work I have an fully updated F16 instance running on my laptop @home. There definitely seems to be something amiss here however I wont be able to ping Lennart about this until he finishes his tour ( Harald, Kay and him are currently scheduled to be in Red Hat, Westford, MA, today and tomorrow ) I'm pretty sure it's supposed to say systemd not init there. Confirmed on F16 host filed bug 738103 This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component. (In reply to comment #13) > Created attachment 522905 [details] > Fixing localfs > > Thankfully this seems to be only applicable to this unit file ;) This is not needed since local-fs.target is started before sockets.target. See http://www.freedesktop.org/software/systemd/man/bootup.html Also there was a mistake in finger.socket: There was "Accept=true" and should be "Accept=yes" Rest looks OK. I tested it on my F17 and everything worked good! (In reply to comment #20) > Also there was a mistake in finger.socket: > There was "Accept=true" and should be "Accept=yes" Sorry, I checked with systemd guys and it looks both are correct. finger-0.17-47.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/finger-0.17-47.fc18 Package finger-0.17-47.fc18: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing finger-0.17-47.fc18' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-18911/finger-0.17-47.fc18 then log in and leave karma (feedback). finger-0.17-47.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report. |