Bug 718756
Summary: | Provide native systemd unit file | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jóhann B. Guðmundsson <johannbg> | ||||
Component: | ddclient | Assignee: | Robert Scheck <redhat-bugzilla> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | rawhide | CC: | 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
Jóhann B. Guðmundsson
2011-07-04 13:57:27 UTC
Created attachment 511195 [details] Native systemd service file for ddclient https://fedoraproject.org/wiki/Packaging:Guidelines:Systemd https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd http://fedoraproject.org/wiki/Packaging:Tmpfiles.d 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. What the one I submitted is not good enough? Sorry, I overlooked your contribution. Will have a look into it the next days. 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. 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. (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.. 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. 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. 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. 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 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. 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 (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! Robert, any objection to my making this change? Ping? Anyone maintaining this package? I'll make this change today. Done. I'll push systemd to f17, and 3.8.1 to all branches. 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 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). 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. you are missing a file... :::::::::::::: /etc/tmpfiles.d/ddclient.conf :::::::::::::: d /var/run/ddclient 0755 ddclient ddclient - Fixed, update for 17 coming. 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 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 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. |