3

I'm running Ubuntu 18.04.1 LTS

I have created a cni0.netdev and cni0.network file in /etc/systemd/network to create a virtual bridge to use for a local Kubernetes cluster/node.

I have enabled systemd-networkd-wait-online.service

I have the following in docker.service [Unit]:

After=network-online.target docker.socket firewalld.service
Wants=network-online.target
Requires=docker.socket

However, when I start up, dockerd complains that cni0 isn't yet up, yet when I log in, the bridge is there. If I restart dockerd it picks up the bridge and uses it.

I can't add a After= for cni0.netdev because netdev files are configuration files for systemd-networkd and not "units" on their own.

It seems like systemd-networkd-wait-online.service just waits for "any" interface to be online, which would be the regular eth0 interface.

How can I wait for this bridge to be up and configured before dockerd is started?

0

You can maybe try to add a After/Wants=sys-devices-virtual-net-cni0.device

You can check the exact name of the device using systemctl

  • OK, I should try that. – Jon Watte Jan 25 at 23:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.