Bug 814907

Summary: ddclient 3.8.1-1 on Fedora 16 is broken with systemd
Product: [Fedora] Fedora Reporter: Rob <spamrefuse>
Component: ddclientAssignee: Robert Scheck <redhat-bugzilla>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 16CC: jik, redhat-bugzilla, thomas
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-15 15:21:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Rob 2012-04-21 09:05:13 UTC
Description of problem:

The ddclient.service is missing and it is not compliant with the new /run and /var/run file structure, hence, there is an error that /var/run/ddclient/ddclient.pid is not accessible....

Version-Release number of selected component (if applicable):
Up-to-date Fedora 16 and ddclient-3.8.1-1.

How reproducible:
/etc/rc.d/init.d/ddclient start
generates an error message in the /var/log/messages that the /var/run/ddclient/ddclient.pid is not (yet?) accessible. The reason is that the directory /var/run/ddclient is never created.

Steps to Reproduce:
1. /etc/rc.d/init.d/ddclient start
2. watch /var/log/messages
3. see systemd and ddclient messages.
  
Actual results:
Ddclient does not start properly; when the problems are fixed by creating /var/run/ddclient, it is again broken after next reboot....

Expected results:

With following file, I fixed it:

# Save this file (as root) as
#   /lib/systemd/system/ddclient.service
#
# and then activate as
#
# (1) create a directory /var/run/ddclient owned by ddclient:
#        mkdir /var/run/ddclient
#        chown ddclient:ddclient /var/run/ddclient
#
# (2) change contents of /etc/sysconfig/ddclient to
#        DDCLIENT_OPTIONS="-file /etc/ddclient.conf"
#
# (3) add a file in /etc/tmpfiles.d/ddclient.conf with
#        # ddclient needs directory in /var/run
#        d /var/run/ddclient 0775 ddclient ddclient
#
# (4) tell the systemd about ddclient
#   systemctl enable ddclient.service
#   systemctl start ddclient.service
#
[Unit]
Description=A Perl Client Used To Update Dynamic DNS
After=syslog.target network.target

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

[Install]
WantedBy=multi-user.target
################# End of the file ####################



Additional info:

Comment 1 Jonathan Kamens 2012-05-01 11:57:09 UTC
This causes ddclient startup and shutdown by systemctl to hang for a long time, after which systemctl claims that it timed out and wasn't started successfully. This means both that it can't be restarted successfully from the command line and that it slows down boot.

Please increase the severity of this bug.

Comment 2 Jonathan Kamens 2012-05-01 12:07:32 UTC
I should be clear about my last comment. I was referring to F17, with ddclient converted to use systemd. The problem persists -- /var/run/ddclient still doesn't exist -- so it can't be started or restarted with systemctl. So the switch to systemctl does NOT resolve this bug (at least not until the package is fixed).

Comment 3 Jonathan Kamens 2012-05-01 12:21:12 UTC
Hmm. Very, very strange. I just checked, and /var/run/ddclient is in fact included in the ddclient RPM. I removed it and then did "yum reinstall ddclient", and it came back, and "systemctl restart ddclient.service" worked after that. I can't explain why it wasn't present on my system. Very weird.

Comment 4 Jonathan Kamens 2012-05-15 15:21:59 UTC

*** This bug has been marked as a duplicate of bug 656572 ***