From 6df7921cb7c741a197e0574f20b38086149ca4e3 Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Wed, 1 Nov 2023 08:39:40 -0700 Subject: [PATCH] Remove cloud-init when using simple-init When using simple-init, we are making an explicit choice along the lines of "I want the simple tool to do the simple needful" which works well, except when cloud-init tries to run because it is already baked into the source image diskimage-builder started with. So what would happen is Glean would execute from simple-init, and then cloud-init would get launched by default, and cloud-init in some cases everything is DHCP, so suddenly any static configuration, such as what might be in an attached configuration drive, is stomped upon resulting in an unreachable instance if DHCP is just not available. If DHCP is available, generally this is not an issue and goes un-noticed, yet can add a substantial amount of time to the boot sequence "waiting" for meta-data endpoints which may not exist. Change-Id: I380b9638cd28f5771530089c558ef5ab638c0173 --- diskimage_builder/elements/simple-init/README.rst | 5 +++++ diskimage_builder/elements/simple-init/package-installs.yaml | 2 ++ .../simple-init-remove-cloud-init-929b271310e0f774.yaml | 5 +++++ 3 files changed, 12 insertions(+) create mode 100644 releasenotes/notes/simple-init-remove-cloud-init-929b271310e0f774.yaml diff --git a/diskimage_builder/elements/simple-init/README.rst b/diskimage_builder/elements/simple-init/README.rst index 2716dd29b..286844eee 100644 --- a/diskimage_builder/elements/simple-init/README.rst +++ b/diskimage_builder/elements/simple-init/README.rst @@ -9,6 +9,11 @@ present in the host cloud. Additionally, in environments where cloud-init is not used, there are a couple of small things, like mounting config-drive and pulling ssh keys from it, that need to be done at boot time. +.. note:: + This element removes cloud-init as it can stomp on the configuration + applied by glean, resulting in additional problems for operators, + and a more difficult path troubleshooting. + Autodetect network interfaces during boot and configure them ------------------------------------------------------------ diff --git a/diskimage_builder/elements/simple-init/package-installs.yaml b/diskimage_builder/elements/simple-init/package-installs.yaml index 123403475..5c6910a30 100644 --- a/diskimage_builder/elements/simple-init/package-installs.yaml +++ b/diskimage_builder/elements/simple-init/package-installs.yaml @@ -7,3 +7,5 @@ NetworkManager: when: DIB_SIMPLE_INIT_NETWORKMANAGER != 0 NetworkManager-initscripts-ifcfg-rh: when: DIB_SIMPLE_INIT_NETWORKMANAGER != 0 +cloud-init: + uninstall: True diff --git a/releasenotes/notes/simple-init-remove-cloud-init-929b271310e0f774.yaml b/releasenotes/notes/simple-init-remove-cloud-init-929b271310e0f774.yaml new file mode 100644 index 000000000..2aba63cb6 --- /dev/null +++ b/releasenotes/notes/simple-init-remove-cloud-init-929b271310e0f774.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Use of the ``simple-init`` element now removes ``cloud-init``, in order + to prevent the two tools from clashing when booting a workload.