From eb0530b7a7bf39a235848d290dd6c231e642c731 Mon Sep 17 00:00:00 2001 From: Dan Bungert Date: Tue, 26 Jul 2022 10:05:42 -0600 Subject: [PATCH 1/3] functions: inform cloud-init about network manager LP: #1982855 Co-authored-by: Chad Smith --- live-build/functions | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/live-build/functions b/live-build/functions index a6fa5bf2..1c978a4c 100644 --- a/live-build/functions +++ b/live-build/functions @@ -989,6 +989,16 @@ network: version: 2 renderer: NetworkManager EOF + + # inform cloud-init of the same (LP: #1982855) + mkdir -p chroot/etc/cloud/cloud.cfg.d + cat < chroot/etc/cloud/cloud.cfg.d/99-installer-use-networkmanager.cfg +# Let NetworkManager manage all devices on this system +system_info: + network: + renderers: ['network-manager'] + activators: ['network-manager'] +EOF else echo "==== NetworkManager not installed ====" fi From ef834c2e7db47b5e78af770052e785e6db1bfde3 Mon Sep 17 00:00:00 2001 From: Dan Bungert Date: Mon, 1 Aug 2022 14:54:10 -0600 Subject: [PATCH 2/3] functions: let `cloud-init clean` inform about NM --- live-build/functions | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/live-build/functions b/live-build/functions index 1c978a4c..4b0fbc38 100644 --- a/live-build/functions +++ b/live-build/functions @@ -999,6 +999,17 @@ system_info: renderers: ['network-manager'] activators: ['network-manager'] EOF + + # Allow cloud-init clean to inform of strict network-manager config + mkdir -p chroot/etc/cloud/clean.d + cat < chroot/etc/cloud/clean.d/99-installer-use-networkmanager +# Inform clone image creators about strict network-manager cfg for cloud-init +if [ -f /etc/cloud/cloud.cfg.d/99-installer-use-networkmanager.cfg ]; then + echo "WARNING: cloud-init network config is limited to using network-manager." + echo "If this is undesirable: rm /etc/cloud/cloud.cfg.d/99-installer-use-networkmanager.cfg" +fi +EOF + chmod +x chroot/etc/cloud/clean.d/99-installer-use-networkmanager else echo "==== NetworkManager not installed ====" fi From e93a80bb6e6b3cfabed5ca2f0eadae21dc9f0b0f Mon Sep 17 00:00:00 2001 From: Dan Bungert Date: Mon, 1 Aug 2022 15:00:28 -0600 Subject: [PATCH 3/3] changelog --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index b2ff3a43..befca4da 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +livecd-rootfs (2.774) UNRELEASED; urgency=medium + + * Inform cloud-init when network manager is in use. (LP: #1982855) + + -- Dan Bungert Mon, 01 Aug 2022 14:59:17 -0600 + livecd-rootfs (2.773) kinetic; urgency=medium * When adding the new RISC-V platforms, some of the generic non-SUBARCH code