From a98f5eacd3c55c96964ead9257100b8e18b2d4ce Mon Sep 17 00:00:00 2001 From: Ori Amizur Date: Tue, 15 Aug 2023 13:26:35 +0300 Subject: [PATCH] MCO-731: Move services machine-config-daemon-pull.service and machine-config-daemon-firstboot.service before ovs-configuration.service The systemd service ovs-configuration.service is skipped if the file /etc/ignition-machine-config-encapsulated.json exists. The service machine-config-daemon-firstboot.service removes the file after processing. When we want to skip reboot, we need to verify that the service is not skipped. Therefore, these two services are moved before ovs-configuration.service. --- .../units/machine-config-daemon-firstboot.service.yaml | 6 +++--- .../_base/units/machine-config-daemon-pull.service.yaml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/common/_base/units/machine-config-daemon-firstboot.service.yaml b/templates/common/_base/units/machine-config-daemon-firstboot.service.yaml index a4d017e5b3..5ad87f16ef 100644 --- a/templates/common/_base/units/machine-config-daemon-firstboot.service.yaml +++ b/templates/common/_base/units/machine-config-daemon-firstboot.service.yaml @@ -8,7 +8,7 @@ contents: | # Removal of this file signals firstboot completion ConditionPathExists=/etc/ignition-machine-config-encapsulated.json After=machine-config-daemon-pull.service - Before=crio.service kubelet.service + Before=network-online.target crio.service kubelet.service ovs-configuration.service [Service] Type=oneshot @@ -23,5 +23,5 @@ contents: | {{end -}} [Install] - WantedBy=multi-user.target - RequiredBy=crio.service kubelet.service + WantedBy=network-online.target + RequiredBy=crio.service kubelet.service ovs-configuration.service diff --git a/templates/common/_base/units/machine-config-daemon-pull.service.yaml b/templates/common/_base/units/machine-config-daemon-pull.service.yaml index 51b834c4df..80611e8192 100644 --- a/templates/common/_base/units/machine-config-daemon-pull.service.yaml +++ b/templates/common/_base/units/machine-config-daemon-pull.service.yaml @@ -9,8 +9,8 @@ contents: | # machine-config-daemon-firstboot.service ConditionPathExists=/etc/ignition-machine-config-encapsulated.json # Run after crio-wipe so the pulled MCD image is protected against a corrupted storage from a forced shutdown - Wants=network-online.target crio-wipe.service - After=network-online.target crio-wipe.service + Wants=crio-wipe.service NetworkManager-wait-online.service + After=crio-wipe.service NetworkManager-wait-online.service network.service nodeip-configuration.service [Service] Type=oneshot