From 9bacb8b6d04025d8482ce1fd7acce7acfffa4bd6 Mon Sep 17 00:00:00 2001 From: Jea-Eok-Kim Date: Mon, 7 Sep 2026 14:02:15 +0900 Subject: [PATCH] fix(nvidia-mig-manager): select package matching target architecture Both download URLs were pinned to x86_64, so on aarch64 the task either got a 404 or installed a package dpkg/rpm rejects for the wrong architecture, and MIG configuration never came up on ARM nodes. Build the URLs from ansible_architecture. The two asset families spell the architecture differently -- the .deb uses Debian names (amd64/arm64) and the .rpm uses kernel names (x86_64/aarch64) -- so they need separate maps. arm64 is accepted as an input value to match roles/nvidia-dgx/vars/ubuntu-24.04.yml, which already tests for both spellings. An unlisted architecture is passed through unchanged and yields a URL for an asset that does not exist; v0.14.2 publishes only x86_64 and aarch64. The download then fails with a clear 404 rather than installing a package built for another architecture. The version and release number move into their own variables because the two URLs repeated the version four times between them. --- roles/nvidia-mig-manager/defaults/main.yml | 25 ++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/roles/nvidia-mig-manager/defaults/main.yml b/roles/nvidia-mig-manager/defaults/main.yml index fde9e0f02..78e2e4c67 100644 --- a/roles/nvidia-mig-manager/defaults/main.yml +++ b/roles/nvidia-mig-manager/defaults/main.yml @@ -1,3 +1,24 @@ --- -mig_manager_url_deb: https://github.com/NVIDIA/mig-parted/releases/download/v0.14.2/nvidia-mig-manager_0.14.2-1_amd64.deb -mig_manager_url_rpm: https://github.com/NVIDIA/mig-parted/releases/download/v0.14.2/nvidia-mig-manager-0.14.2-1.x86_64.rpm +# Release assets use different architecture spellings: the .deb uses Debian +# names (amd64/arm64) while the .rpm uses kernel names (x86_64/aarch64). +# Keep the two maps separate so a single ansible_architecture value resolves +# to the right token for each package type. +# 'arm64' matches existing practice in roles/nvidia-dgx/vars/ubuntu-24.04.yml. +mig_manager_version: "0.14.2" +mig_manager_release: "1" + +mig_manager_deb_arch_map: + x86_64: amd64 + aarch64: arm64 + arm64: arm64 + +mig_manager_rpm_arch_map: + x86_64: x86_64 + aarch64: aarch64 + arm64: aarch64 + +mig_manager_deb_arch: "{{ mig_manager_deb_arch_map.get(ansible_architecture, ansible_architecture) }}" +mig_manager_rpm_arch: "{{ mig_manager_rpm_arch_map.get(ansible_architecture, ansible_architecture) }}" + +mig_manager_url_deb: https://github.com/NVIDIA/mig-parted/releases/download/v{{ mig_manager_version }}/nvidia-mig-manager_{{ mig_manager_version }}-{{ mig_manager_release }}_{{ mig_manager_deb_arch }}.deb +mig_manager_url_rpm: https://github.com/NVIDIA/mig-parted/releases/download/v{{ mig_manager_version }}/nvidia-mig-manager-{{ mig_manager_version }}-{{ mig_manager_release }}.{{ mig_manager_rpm_arch }}.rpm