From fcab352e50626096768a18b7d05124d10a2fc2d6 Mon Sep 17 00:00:00 2001 From: nkvetsinski <115103774+nkvetsinski@users.noreply.github.com> Date: Tue, 10 Sep 2024 10:30:25 -0700 Subject: [PATCH] Wait for networking before loading nvidia modules (#1962) Co-authored-by: Nikolay Kvetsinski --- templates/al2023/runtime/gpu/nvidia-kmod-load.service | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/al2023/runtime/gpu/nvidia-kmod-load.service b/templates/al2023/runtime/gpu/nvidia-kmod-load.service index 6659620a0..d67806b6b 100755 --- a/templates/al2023/runtime/gpu/nvidia-kmod-load.service +++ b/templates/al2023/runtime/gpu/nvidia-kmod-load.service @@ -1,9 +1,9 @@ [Unit] Description=Loading NVIDIA kernel modules -# load modules after cloud-init -After=cloud-final.service -Requires=cloud-final.service -Before=nvidia-persistenced.service +# the script needs to use IMDS, so wait for the network to be up to avoid any flakiness +After=network-online.target +Wants=network-online.target +Before=nvidia-fabricmanager.service nvidia-persistenced.service [Service] Type=oneshot