Bug 737725

Summary: Provide native systemd services
Product: [Fedora] Fedora Reporter: Jóhann B. Guðmundsson <johannbg>
Component: telnetAssignee: Michal Sekletar <msekleta>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: ovasik, phomes, tcallawa, zbyszek
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: 2013-10-29 08:31:01 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 713562    
Attachments:
Description Flags
telnet socket
none
telnet service
none
Updated telnet.socket
none
Updated telnet@.service none

Description Jóhann B. Guðmundsson 2011-09-12 19:29:47 EDT
Description of problem:

Let's get the ball rolling on this one...

http://fedoraproject.org/wiki/Features/SysVtoSystemd

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Jóhann B. Guðmundsson 2011-09-12 19:30:28 EDT
Created attachment 522831 [details]
telnet socket
Comment 2 Jóhann B. Guðmundsson 2011-09-12 19:31:52 EDT
Created attachment 522832 [details]
telnet service
Comment 3 Jóhann B. Guðmundsson 2011-09-12 19:32:42 EDT
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
Comment 4 Tom "spot" Callaway 2011-09-23 14:37:25 EDT
Johann, I couldn't get this working in my tests. Can you try?
Comment 5 Jóhann B. Guðmundsson 2011-09-25 06:42:48 EDT
Hum what release are you on as in there is a bug in systemd .35 that might be causing this
Comment 6 Jóhann B. Guðmundsson 2011-09-25 07:08:50 EDT
[root@localhost system]# systemctl start telnet.socket
[root@localhost system]# systemctl status telnet.socket
telnet.socket - Telnet Server Activation Socket
	  Loaded: loaded (/lib/systemd/system/telnet.socket; disabled)
	  Active: active (listening) since Sun, 25 Sep 2011 11:05:49 +0000; 1min 56s ago
	Accepted: 1; Connected: 0
	  CGroup: name=systemd:/system/telnet.socket
[root@localhost system]# netstat -pant | grep 23 | grep LISTEN
tcp        0      0 :::23                       :::*                        LISTEN      1/systemd           
[root@localhost system]# telnet localhost 23
Trying ::1...
Connected to localhost.
Escape character is '^]'.
Fedora release 16 (Verne)
Kernel 3.1.0-0.rc6.git0.0.fc16.x86_64 on an x86_64 (1)
login: johann
Password: 
Last login: Sun Sep  4 20:35:13 on tty4
[johann@localhost ~]$ rpm -q systemd
systemd-36-2.fc16.x86_64
Comment 7 Tom "spot" Callaway 2011-09-25 22:14:33 EDT
systemd-35-1.fc16.x86_64 ... so yeah, looks like I'm on the buggy one. Will retest after upgrading.
Comment 8 Tom "spot" Callaway 2011-09-26 10:06:53 EDT
When I try this, with systemd-36-3.fc16.x86_64, the socket starts, but as soon as I telnet to it, it dies:

[root@pterodactyl ~]# systemctl start telnet.socket
[root@pterodactyl ~]# telnet localhost
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.
[root@pterodactyl ~]#

Looking in syslog, I see:

Sep 26 10:04:27 pterodactyl systemd[1]: telnet.socket failed to queue socket startup job: Invalid argument
Sep 26 10:04:27 pterodactyl systemd[1]: Unit telnet.socket entered failed state.
Comment 9 Jóhann B. Guðmundsson 2011-09-26 17:45:54 EDT
This did work just fine with pre .35 and works fine with .36-2 so something that got changed in 36-3 broke it ( Downgrade to 36-2 to confirm and whatever got changed probably is breaking some other  units as well ) so file a bug against systemd. 

And note I'm going on a natural hot spring/pool hunting here on top of the world for the whole week which means I will be on limited internet connectivity during that time.
Comment 10 Thomas H.P. Andersen 2012-11-19 14:52:27 EST
I suppose this should be telnetd, right? Anyway, an important thing that is not obvious from the patches are the naming of the files. As this is an instantiated service it should be telnetd.socket and telnetd@.service

Also the ExecStart should probably start with a '-' so information is not kept around for connection-specific failures.

With this the patches works fine on f18 with systemd 195
Comment 11 Lennart Poettering 2012-11-19 18:06:38 EST
Yeah, Thomas is right, this is apparently an instantiated service, hence this really needs to be a templated service.
Comment 12 Fedora Admin XMLRPC Client 2013-04-02 09:26:19 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 13 Fedora End Of Life 2013-04-03 12:25:41 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19
Comment 14 Zbigniew Jędrzejewski-Szmek 2013-04-26 12:13:55 EDT
I tested Jóhann's .socket and .service file, and it works fine with current systemd. I'm attaching an updated version with Documentation= and a minus in ExecStart as per comment #10. Please apply!
Comment 15 Zbigniew Jędrzejewski-Szmek 2013-04-26 12:15:22 EDT
Created attachment 740491 [details]
Updated telnet.socket
Comment 16 Zbigniew Jędrzejewski-Szmek 2013-04-26 12:16:13 EDT
Created attachment 740492 [details]
Updated telnet@.service

Note the at symbol.
Comment 17 Zbigniew Jędrzejewski-Szmek 2013-10-29 08:31:01 EDT
telnet-server-1:0.17-56.fc19.x86_64 has:
/usr/lib/systemd/system/telnet.socket
/usr/lib/systemd/system/telnet@.service