Bug 1476999 - ddclient doesn't wait until network is online
ddclient doesn't wait until network is online
Status: NEW
Product: Fedora
Classification: Fedora
Component: ddclient (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Scott Talbert
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2017-07-31 23:59 EDT by Christopher Tubbs
Modified: 2017-08-10 00:58 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Christopher Tubbs 2017-07-31 23:59:49 EDT
Description of problem:

ddclient does not wait until the network is online before starting and retrieving the public IP address. The systemd unit is configured to start after 'network.target' (/usr/lib/systemd/system/ddclient.service):
  After=syslog.target network.target nss-lookup.target

However, after booting, often, the service cannot get online to determine its public IP address. Typing `sudo systemctl status ddclient.service` shows DNS errors looking up the hostname for the public IP service.

I believe this is caused by the service starting up too quickly, and not waiting for the network to come online ('network.target' comes up immediately after 'network-pre.target').

It may be better for it to specify 'Wants=network-online.target'. At the very least, 'After=network-online.target' would be better.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Configure ddclient with lookup service for public IP (for example: `use=web, web=dynamicdns.park-your-domain.com/getip`)
2. Reboot
3. sudo systemctl status ddclient.service

Actual results:
Sometimes see errors resolving hostname, because ddclient started before the network was fully available.

Expected results:
ddclient should wait until the network is online. There should be no issues resolving the DNS name because the host should be online.

Additional info:
I started seeing this problem in F24, but in F26, it's worse, perhaps because F26 seems to boot faster (for me). In F25, the problem would occur after boot about 30% of the time. In F26, it's closer to 100% of the time. I have an SSD, so my boot times are very fast. The workaround is to restart the service: `sudo systemctl restart ddclient.service`
Comment 1 Scott Talbert 2017-08-09 22:55:53 EDT
I presume you don't use NetworkManager?  There's supposed to be a hook that starts ddclient when NetworkManager connects to a network, but that wouldn't help if you don't use it.
Comment 2 Christopher Tubbs 2017-08-10 00:58:41 EDT
No, I definitely am using NetworkManager. I don't know about the hook you speak of. I'm using the systemd unit which comes with the ddclient package in Fedora. The only "hook" I know of is the network-online.target which is set by NetworkManager when the network connects. ddclient isn't waiting for this, though... it's waiting for just network.target

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