Bug 737212

Summary: Provide native systemd service files
Product: [Fedora] Fedora Reporter: Jóhann B. Guðmundsson <johannbg>
Component: tftpAssignee: Jan Synacek <jsynacek>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: johannbg, jskala, pertusus, tcallawa
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tftp-5.2-4.fc18 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-01 12:16:36 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:
Bug Depends On:    
Bug Blocks: 713562    
Attachments:
Description Flags
tftp socket
none
tftp service
none
new tftp socket
none
new tftp service
none
tftp.socket
none
tftp service
none
tftp.service
none
tftp.socket none

Description Jóhann B. Guðmundsson 2011-09-09 23:17:10 UTC
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-09 23:18:21 UTC
Created attachment 522446 [details]
tftp socket

Comment 2 Jóhann B. Guðmundsson 2011-09-09 23:19:21 UTC
Created attachment 522447 [details]
tftp service

Comment 3 Jóhann B. Guðmundsson 2011-09-09 23:21:57 UTC
Passes simple telnet test and note there is still a (tight) window to have this
in F16

Comment 4 Jóhann B. Guðmundsson 2011-09-10 00:46:30 UTC
Created attachment 522449 [details]
new tftp socket

Comment 5 Jóhann B. Guðmundsson 2011-09-10 00:47:16 UTC
Created attachment 522450 [details]
new tftp service

Comment 6 Jóhann B. Guðmundsson 2011-09-12 23:35:08 UTC
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 7 Jóhann B. Guðmundsson 2011-09-14 23:49:00 UTC
Created attachment 523278 [details]
tftp.socket

Comment 8 Jóhann B. Guðmundsson 2011-09-14 23:49:40 UTC
Created attachment 523279 [details]
tftp service

Comment 9 Jóhann B. Guðmundsson 2011-09-14 23:51:25 UTC
Manage to have time to properly test the unit files 

tftp> verbose
Verbose mode on.
tftp> get my-test-file.txt
getting from 127.0.0.1:my-test-file.txt to my-test-file.txt [netascii]
tftp> quit

Sep 14 23:37:47 localhost in.tftpd[3967]: RRQ from ::ffff:127.0.0.1 filename my-test-file.txt

Unit With debug

[Unit]
Description=Tftp Server
After=local-fs.target

[Service]
ExecStart=/usr/sbin/in.tftpd -v -v -s /var/lib/tftpboot
StandardOutput=socket #needed due to a bug in systemd .35 will be fixed in 36
StandardInput=socket

Comment 10 Jóhann B. Guðmundsson 2011-09-15 09:26:13 UTC
There is report of both the xinetd and systemd version failing in an alias ip setup is that to be expected?

Comment 11 Jiri Skala 2011-09-16 05:45:58 UTC
(In reply to comment #6)
> Once package and shipped your package should no longer have to depend on xinetd
> 

Is there any Fedora's feature that obsoletes inetd?

Comment 12 Jóhann B. Guðmundsson 2011-09-16 19:25:11 UTC
None that I'm aware of should there be? 

The move to systemd obsoletes the need for the components we ship on xinetd as it does obsolete the need for components we ship on port reserve ( which is why Tim is going to deprecate/drop the package) . 

I personally have not look how well systemd replaces xinetd functionality other then to the extent of all the components we ship and it does indeed replace it there. 

Honestly I suspect that systemd does not replace *all* of xinetd functionality and I would not be surprised that there might be 3 party out there depending on it as well so I'm not foreseeing xinetd itself being removed from the distribution any time soon however if or rather when that time comes then it would not be a more of an issue than simply dropping the xinetd package.

This is just part of the migration process as I see it and other distribution seem to be going down this path as well which is why I went ahead did what needed to be done and converted all xinetd dependend components to systemd units we have in Fedora.

When asking FPC if maintainers should package xinetd snippets in an separately subpackage as is being done with the legacy sysv init script I was flagged as being on somekind of crusade against xinetd. 

If the governing body if the distribution want to have thing half migrated to systemd fine.

If governing body of the distribution want to be out of line with what other distributions are doing I'm fine with at also.

Since I got better things to do than wasting my time in doing work which needs to be done for the project which ends up either not being used or being appreciated and I and my work being ridiculed in the process have at it.
 
I personally wont be making such an proposal nor will I stand in your ( or any ones else for that matter ) way from you doing whatever you feel is right.

Comment 13 Fedora Admin XMLRPC Client 2012-03-29 08:30:23 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 14 Jan Synacek 2012-05-22 12:36:38 UTC
I can't get this working.

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

# systemctl status tftp.service
tftp.service - Tftp Server
          Loaded: loaded (/lib/systemd/system/tftp.service; static)
          Active: failed
          CGroup: name=systemd:/system/tftp.service

And /var/log/messages contains:
systemd[1]: tftp.service failed to run 'start' task: Invalid argument

Not sure if there is something that needs to be added or modified. Systemd has probably moved a long way since this bug was filed.

Comment 15 Jóhann B. Guðmundsson 2012-05-22 16:22:39 UTC
(In reply to comment #14)
> I can't get this working.
> 
> # systemctl start tftp.service
> Job failed. See system logs and 'systemctl status' for details.
> 
> # systemctl status tftp.service
> tftp.service - Tftp Server
>           Loaded: loaded (/lib/systemd/system/tftp.service; static)
>           Active: failed
>           CGroup: name=systemd:/system/tftp.service
> 
> And /var/log/messages contains:
> systemd[1]: tftp.service failed to run 'start' task: Invalid argument
> 
> Not sure if there is something that needs to be added or modified. Systemd
> has probably moved a long way since this bug was filed.

Try starting the socket not the service since the service is socket activated systemctl start tftpd.socket =)

Comment 16 Jóhann B. Guðmundsson 2012-05-22 16:27:06 UTC
Created attachment 586076 [details]
tftp.service

Comment 17 Jóhann B. Guðmundsson 2012-05-22 16:31:15 UTC
Created attachment 586077 [details]
tftp.socket

Comment 18 Jóhann B. Guðmundsson 2012-05-22 16:42:25 UTC
I've updated the unit file as in removed stuff I put in there because of that bug and for stuff that is no longer necessary.

[root@localhost system]# systemctl start tftp.socket && systemctl status tftp.socket && tftp localhost -c status
tftp.socket - Tftp Server Activation Socket
	  Loaded: loaded (/etc/systemd/system/tftp.socket; disabled)
	  Active: active (listening) since Tue, 22 May 2012 16:27:16 +0000; 3min 32s ago
	  CGroup: name=systemd:/system/tftp.socket

Connected to localhost.localdomain.
Mode: netascii Verbose: off Tracing: off Literal: off
Rexmt-interval: 5 seconds, Max-timeout: 25 seconds

Comment 19 Jan Synacek 2012-05-23 07:10:44 UTC
> Try starting the socket not the service since the service is socket activated > systemctl start tftpd.socket =)

Hmm, I didn't know this..:)

Anyway, it seems to be working now. I'll give it some more testing.