From 8a67234edd1d4444b55110faad90662cedf4115d Mon Sep 17 00:00:00 2001 From: Gabriel Adrian Samfira Date: Thu, 7 Mar 2024 10:00:28 +0200 Subject: [PATCH 1/2] Skip coreos-cloudinit if ignition is used This change skips coreos-cloudinit when config drive is used, if the system was configured using ignition. Signed-off-by: Gabriel Adrian Samfira --- units/user-configdrive.service | 1 + 1 file changed, 1 insertion(+) diff --git a/units/user-configdrive.service b/units/user-configdrive.service index 6007fe1..e9a70e1 100644 --- a/units/user-configdrive.service +++ b/units/user-configdrive.service @@ -21,6 +21,7 @@ ConditionKernelCommandLine=!coreos.oem.id=digitalocean [Service] Type=oneshot +ExecCondition=/usr/bin/bash -c "if [ -f '/etc/.ignition-result.json' ] && /usr/bin/jq -e '.userConfigProvided == true' /etc/.ignition-result.json; then exit 1; fi" TimeoutSec=10min RemainAfterExit=yes EnvironmentFile=-/etc/environment From edf9bb8e85ba09fcb04d32b7d5a7fa18225c07d1 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Wed, 13 Mar 2024 13:22:46 +0200 Subject: [PATCH 2/2] Update units/user-configdrive.service MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Kai Lüke --- units/user-configdrive.service | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/units/user-configdrive.service b/units/user-configdrive.service index e9a70e1..99737c0 100644 --- a/units/user-configdrive.service +++ b/units/user-configdrive.service @@ -18,7 +18,8 @@ After=enable-oem-cloudinit.service oem-cloudinit.service # Skip on clouds that are covered by flatcar/init:systemd/system/oem-cloudinit.service ConditionKernelCommandLine=!flatcar.oem.id=digitalocean ConditionKernelCommandLine=!coreos.oem.id=digitalocean - +ConditionKernelCommandLine=!coreos.oem.id=openstack +ConditionKernelCommandLine=!flatcar.oem.id=openstack [Service] Type=oneshot ExecCondition=/usr/bin/bash -c "if [ -f '/etc/.ignition-result.json' ] && /usr/bin/jq -e '.userConfigProvided == true' /etc/.ignition-result.json; then exit 1; fi"