From faaf484a86d14adb8d0e06d042ed3062d6300095 Mon Sep 17 00:00:00 2001 From: Luca BRUNO Date: Thu, 3 Dec 2020 12:32:59 +0000 Subject: [PATCH] dracut/15coreos-network: enable initramfs networking on Azure This enables networking in initramfs on Azure, via a platform condition. While the Ignition configuration may be self-contained locally on the config-drive, other bits referenced by the provisioning flow (e.g. Afterburn hostname and boot check-in) always require reaching remote endpoints. --- .../15coreos-network/coreos-enable-network.service | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/overlay.d/05core/usr/lib/dracut/modules.d/15coreos-network/coreos-enable-network.service b/overlay.d/05core/usr/lib/dracut/modules.d/15coreos-network/coreos-enable-network.service index 664a15049f..9f9cc92e4b 100644 --- a/overlay.d/05core/usr/lib/dracut/modules.d/15coreos-network/coreos-enable-network.service +++ b/overlay.d/05core/usr/lib/dracut/modules.d/15coreos-network/coreos-enable-network.service @@ -4,9 +4,13 @@ ConditionPathExists=/etc/initrd-release DefaultDependencies=false After=basic.target -# Triggering conditions for cases where we need network +# Triggering conditions for cases where we need network: +# * when Ignition signals that it is required for provisioning. +# * on live systems fetching the remote rootfs in initramfs. +# * on Azure, for hostname fetching (metadata endpoint) and boot check-in (wireserver). ConditionPathExists=|/run/ignition/neednet ConditionKernelCommandLine=|coreos.live.rootfs_url +ConditionKernelCommandLine=|ignition.platform.id=azure # Creates /run/ignition/neednet After=ignition-fetch-offline.service