conntrackd started before networking fully brought up

Bug #1867410 reported by Haw Loeung
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
conntrack-tools (Ubuntu)
New
Undecided
Unassigned
Xenial
New
Undecided
Unassigned
Focal
New
Undecided
Unassigned

Bug Description

Hi,

We have conntrackd configured to start on an interface bond0.800 (so VLAN 800). Unfortunately, it fails on startup / boot time but succeeds post-boot. Looking at the logs, we're seeing this:

| Mar 13 11:18:20 myhost sh[1753]: Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
| Mar 13 11:18:20 myhost sh[1753]: Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
| Mar 13 11:18:20 myhost sh[2496]: Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
| Mar 13 11:18:20 myhost ifup[1793]: /sbin/ifup: waiting for lock on /run/network/ifstate.bond0
| Mar 13 11:18:20 myhost sh[2496]: Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
| Mar 13 11:18:20 myhost conntrack-tools[1725]: disabling external cache
| Mar 13 11:18:20 myhost conntrack-tools[1725]: can't open channel socket
| Mar 13 11:18:20 myhost conntrack-tools[1725]: initialization failed
| Mar 13 11:18:20 myhost conntrackd[1725]: ERROR: conntrackd cannot start, please check the logfile for more info
| Mar 13 11:18:20 myhost systemd[1]: conntrackd.service: Main process exited, code=exited, status=1/FAILURE
| Mar 13 11:18:20 myhost systemd[1]: Failed to start Conntrack Daemon.
| Mar 13 11:18:20 myhost systemd[1]: conntrackd.service: Unit entered failed state.
| Mar 13 11:18:20 myhost systemd[1]: conntrackd.service: Failed with result 'exit-code'.
| Mar 13 11:18:21 myhost systemd[1]: Started LSB: hpe System Health Monitor and Command line Utility Package..
| Mar 13 11:18:22 myhost sh[2496]: Waiting for DAD... Done
| Mar 13 11:18:22 myhost sh[2483]: Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
| Mar 13 11:18:22 myhost sh[2483]: message repeated 2 times: [ Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config]
| Mar 13 11:18:24 myhost sh[2483]: Waiting for DAD... Done
| Mar 13 11:18:28 myhost sh[1781]: Waiting for DAD... Done
| Mar 13 11:18:33 myhost systemd[1]: Started Raise network interfaces.

Perhaps it's a race with networking being fully brought up?

The systemd service file also has the following:

| $ cat /lib/systemd/system/conntrackd.service
| [Unit]
| Description=Conntrack Daemon
|
| [Service]
| Type=notify
| EnvironmentFile=-/usr/share/conntrackd/environmentfile
| EnvironmentFile=-/etc/default/conntrackd
| ExecStart=/usr/sbin/conntrackd -C "$CONFIG" $OPTIONS
| ProtectSystem=full
| ProtectHome=true
| #WatchdogSec=60
|
| [Install]
| WantedBy=multi-user.target

I think under '[Unit]', it needs the following to wait for networking to fully be brought up:

| Wants=network-online.target
| After=network-online.target
| After=time-sync.target

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.