Bug 814907 - ddclient 3.8.1-1 on Fedora 16 is broken with systemd
ddclient 3.8.1-1 on Fedora 16 is broken with systemd
Status: CLOSED DUPLICATE of bug 656572
Product: Fedora
Classification: Fedora
Component: ddclient (Show other bugs)
16
All Linux
unspecified Severity low
: ---
: ---
Assigned To: Robert Scheck
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-21 05:05 EDT by Rob
Modified: 2012-05-15 11:21 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-15 11:21:59 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Rob 2012-04-21 05:05:13 EDT
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 07:57:09 EDT
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 08:07:32 EDT
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 08:21:12 EDT
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 11:21:59 EDT

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

Note You need to log in before you can comment on or make changes to this bug.