From 947a7c16751c10262d0d12dd7825f7cfddc66c77 Mon Sep 17 00:00:00 2001 From: Ximeng Zhao <112792872+xmzhao0822@users.noreply.github.com> Date: Tue, 28 Jan 2025 14:48:52 -0800 Subject: [PATCH] Add e2etest ubuntu2204 gpunodriver scriptless (#5671) --- e2e/scenario_test.go | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/e2e/scenario_test.go b/e2e/scenario_test.go index 47895007509..8c480b0547d 100644 --- a/e2e/scenario_test.go +++ b/e2e/scenario_test.go @@ -957,6 +957,36 @@ func Test_Ubuntu2204_GPUNoDriver(t *testing.T) { }) } +func Test_Ubuntu2204_GPUNoDriver_Scriptless(t *testing.T) { + RunScenario(t, &Scenario{ + Description: "Tests that a GPU-enabled node using the Ubuntu 2204 VHD opting for skipping gpu driver installation can be properly bootstrapped", + Tags: Tags{ + GPU: true, + }, + Config: Config{ + Cluster: ClusterKubenet, + VHD: config.VHDUbuntu2204Gen2Containerd, + AKSNodeConfigMutator: func(config *aksnodeconfigv1.Configuration) { + config.VmSize = "Standard_NC6s_v3" + config.GpuConfig.ConfigGpuDriver = true + config.GpuConfig.GpuDevicePlugin = false + config.GpuConfig.EnableNvidia = to.Ptr(true) + }, + VMConfigMutator: func(vmss *armcompute.VirtualMachineScaleSet) { + // this vmss tag is needed since there is a logic in cse_main.sh otherwise the test will fail + vmss.Tags = map[string]*string{ + // deliberately case mismatched to agentbaker logic to check case insensitivity + "SkipGPUDriverInstall": to.Ptr("true"), + } + vmss.SKU.Name = to.Ptr("Standard_NC6s_v3") + }, + Validator: func(ctx context.Context, s *Scenario) { + ValidateNvidiaSMINotInstalled(ctx, s) + }, + }, + }) +} + func Test_Ubuntu2204_PrivateKubePkg(t *testing.T) { RunScenario(t, &Scenario{ Description: "Tests that a node using the Ubuntu 2204 VHD that was built with private kube packages can be properly bootstrapped with the specified kube version",