Bug 718756

Summary: Provide native systemd unit file
Product: [Fedora] Fedora Reporter: Jóhann B. Guðmundsson <johannbg>
Component: ddclientAssignee: Robert Scheck <redhat-bugzilla>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: ADent123, aslanidis, bugzilla, gwync, jorti, jrowens.fedora, ken, redhat-bugzilla, thomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ddclient-3.8.1-1.fc17 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-04-12 03:37:23 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
Native systemd service file for ddclient none

Description Jóhann B. Guðmundsson 2011-07-04 13:57:27 UTC
Description of problem:

https://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 2 Robert Scheck 2011-07-04 14:04:39 UTC
Yes, but I'm not going to write one myself for now. Nevertheless, I'm willing
to accept a working and well done systemd service file for inclusion.

Comment 3 Jóhann B. Guðmundsson 2011-07-04 14:07:35 UTC
What the one I submitted is not good enough?

Comment 4 Robert Scheck 2011-07-04 14:19:14 UTC
Sorry, I overlooked your contribution. Will have a look into it the next days.

Comment 5 J. Randall Owens 2011-07-12 10:53:51 UTC
Looks to me like it should perhaps have a "Requisite" or "BindTo" network.target, in addition to the "After".  Depends on whether we want ddclient to keep doing its thing when the network goes down, which it is designed to do, after all.  I don't see any point to it starting up when there's no network, though.  (As long as this doesn't mean it won't work without NetworkManager running and controlling the interface?)

Other than that, it looks just about like the one I was working up, and should be good.

Comment 6 J. Randall Owens 2011-07-12 11:01:32 UTC
Also, you might want to hold off on packaging it until you rebuild with the new 3.8.1, which I see just produced Bug #720627.  No point in planning to release two versions of the package within a few days of each other.

Comment 7 Jóhann B. Guðmundsson 2011-07-12 11:22:35 UTC
(In reply to comment #5)
> Looks to me like it should perhaps have a "Requisite" or "BindTo"
> network.target, in addition to the "After".  Depends on whether we want
> ddclient to keep doing its thing when the network goes down, which it is
> designed to do, after all.  I don't see any point to it starting up when
> there's no network, though.  (As long as this doesn't mean it won't work
> without NetworkManager running and controlling the interface?)
> 
> Other than that, it looks just about like the one I was working up, and should
> be good.

Requisite= 

Would be what you want ( if any ) unless ofcourse you want to take bring up and take down the network when you start and stop this service which I'm pretty sure you dont want..

Comment 8 J. Randall Owens 2011-07-12 11:33:36 UTC
According to systemd.unit(5), "[BindTo is] very similar in style to Requires=, however in addition to this behaviour it also declares that this unit is stopped when any of the units listed suddenly disappears."  Which sounds to me like it would mean ddclient ("this unit") would be stopped when the network ("units listed") goes away.  But I'm inclined to think that isn't the desired behaviour anyway, and Requisite is the way to go, since ddclient does handle network going away and reappearing, like I said.

Comment 9 Mohammed Arafa 2011-08-06 15:35:21 UTC
i got a box that has a static internal ip and does not use NetworkManager and that is disabled. ddclient is working on that box. 

i hope the fix wont break that.

Comment 10 Juan Orti 2011-09-08 06:48:24 UTC
I tried the service file provided but had to remove the line:

ExecStartPre=/bin/touch /var/cache/ddclient/ddclient.cache

because touch create the ddclient.cache file with root owner and the daemon can't write to it.

Comment 11 Jóhann B. Guðmundsson 2011-09-08 08:17:15 UTC
Hum that's odd the submitted file is executed as ddclient user anyway you should be able to add exec start pre line which chowns the file to the ddclient user in that case try this.

[Unit]
Description=A Perl Client Used To Update Dynamic DNS
After=syslog.target network.target

[Service]
User=ddclient
Group=ddclient
Type=forking
PIDFile=/var/run/ddclient/ddclient.pid
EnvironmentFile=-/etc/sysconfig/ddclient
ExecStartPre=/bin/touch /var/cache/ddclient/ddclient.cache
ExecStartPre=/bin/chown ddclient.ddclient /var/cache/ddclient/ddclient.cache
ExecStart=/usr/sbin/ddclient $DDCLIENT_OPTIONS

[Install]
WantedBy=multi-user.target

Comment 12 Jóhann B. Guðmundsson 2011-09-08 08:19:25 UTC
Oh by the way which version of systemd are you using ( rpm -qa | grep systemd ) I kinda need to know that encase this is an bug.

Comment 13 Juan Orti 2011-09-08 10:30:28 UTC
Let me check it again, because I did some tests and maybe the file was created as root when trying to launch ddclient manually.

Problably I messed things up.

systemd-26-9.fc15.x86_64
systemd-sysv-26-9.fc15.x86_64
systemd-units-26-9.fc15.x86_64

Comment 14 Juan Orti 2011-09-08 10:37:13 UTC
(In reply to comment #11)
> Hum that's odd the submitted file is executed as ddclient user anyway you
> should be able to add exec start pre line which chowns the file to the ddclient
> user in that case try this.

You are right, it's executed as ddclient user, My file already existed with root owner

> ExecStartPre=/bin/chown ddclient.ddclient /var/cache/ddclient/ddclient.cache

This line isn't necessary.
Thank you!

Comment 15 Gwyn Ciesla 2012-02-13 19:54:28 UTC
Robert, any objection to my making this change?

Comment 16 Gwyn Ciesla 2012-03-14 16:24:21 UTC
Ping?

Comment 17 Ioannis Aslanidis 2012-03-29 08:16:44 UTC
Anyone maintaining this package?

Comment 18 Gwyn Ciesla 2012-03-29 11:52:20 UTC
I'll make this change today.

Comment 19 Gwyn Ciesla 2012-03-29 12:19:56 UTC
Done.  I'll push systemd to f17, and 3.8.1 to all branches.

Comment 20 Fedora Update System 2012-03-29 12:21:05 UTC
ddclient-3.8.1-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/ddclient-3.8.1-1.fc17

Comment 21 Fedora Update System 2012-03-30 02:56:57 UTC
Package ddclient-3.8.1-1.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing ddclient-3.8.1-1.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-4858/ddclient-3.8.1-1.fc17
then log in and leave karma (feedback).

Comment 22 Fedora Update System 2012-04-12 03:37:23 UTC
ddclient-3.8.1-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 23 Kenneth Topp 2012-05-14 03:02:04 UTC
you are missing a file...

::::::::::::::
/etc/tmpfiles.d/ddclient.conf
::::::::::::::
d /var/run/ddclient 0755 ddclient ddclient -

Comment 24 Gwyn Ciesla 2012-05-14 15:29:03 UTC
Fixed, update for 17 coming.

Comment 25 Fedora Update System 2012-05-14 15:39:38 UTC
ddclient-3.8.1-2.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/ddclient-3.8.1-2.fc17

Comment 26 Fedora Update System 2012-05-15 15:40:03 UTC
ddclient-3.8.1-3.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/ddclient-3.8.1-3.fc17

Comment 27 Fedora Update System 2012-05-26 07:42:13 UTC
ddclient-3.8.1-3.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.