From 9694d64a67dca98ce1d574852e7114daaff4727f Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Wed, 24 Apr 2024 17:21:26 +0100 Subject: [PATCH] systemd-networkd-wait-online waiting for timeout in dokken --- cookbooks/networking/recipes/default.rb | 10 ++++++++++ .../networking/templates/default/dokken.network.erb | 10 ++++++++++ 2 files changed, 20 insertions(+) create mode 100644 cookbooks/networking/templates/default/dokken.network.erb diff --git a/cookbooks/networking/recipes/default.rb b/cookbooks/networking/recipes/default.rb index 103f8823b..ea87c3b7b 100644 --- a/cookbooks/networking/recipes/default.rb +++ b/cookbooks/networking/recipes/default.rb @@ -266,6 +266,16 @@ if node[:networking][:wireguard][:enabled] end end +# Setup dokken network in systemd-networkd to avoid systemd-networkd-wait-online delay +template "/etc/systemd/network/dokken.network" do + source "dokken.network.erb" + owner "root" + group "root" + mode "644" + notifies :run, "execute[networkctl-reload]", :immediately + only_if { kitchen? } +end + notify_group "networkctl-reload" execute "networkctl-reload" do diff --git a/cookbooks/networking/templates/default/dokken.network.erb b/cookbooks/networking/templates/default/dokken.network.erb new file mode 100644 index 000000000..bf46c95ce --- /dev/null +++ b/cookbooks/networking/templates/default/dokken.network.erb @@ -0,0 +1,10 @@ +[Match] +Name=eth0 + +[Link] +RequiredForOnline=routable + +[Network] +DHCP=no +LinkLocalAddressing=no +KeepConfiguration=yes -- 2.45.1