Skip to content

Conversation

@Priyankasaggu11929
Copy link

(based on comment #365 (review) from the original PR)

Motivation

This PR aim at adding support for SUSE Linux Enterprise Server (SLES) 15 SP5+ to the AMD GPU operator.

Technical Details

  • 781c5b5 - add support for detecting SLES nodes and automatically selecting appropriate AMD GPU driver versions

  • 0170a9a - add SLES Dockerfile template (DockerfileTemplate.sles) for building AMD GPU drivers on SLES (currently, I've skipped adding the GIM Dockerfile template for SLES, will tackle it once this goes through).

    • also embed the template via go:embed and add SLES case logic
  • c2dce44 - docs: update example/deviceconfig_example.yaml <- dropped

  • 4da60d3 - use "registry.suse.com" as the default base image registry if OS == "sles"

    • although, use-specified BaseImageRegistry still takes precedence
    • also extend tests in internal/kmmodule/kmmodule_test.go to test above changes in resolveDockerfile func

Test Plan

  • b625441 - tests: update internal/utils_test.go for added support for SLES 15 SP*

Test Result

  • truncated output of make unit-test after new added tests in b625441

    > make unit-test
    ...
    ...
    === RUN   TestSLESDefaultDriverVersionsMapper
    === RUN   TestSLESDefaultDriverVersionsMapper/SLES_15_SP6
    === RUN   TestSLESDefaultDriverVersionsMapper/SLES_15_SP7
    === RUN   TestSLESDefaultDriverVersionsMapper/SLES_15_SP5
    === RUN   TestSLESDefaultDriverVersionsMapper/SLES_15_SP4
    === RUN   TestSLESDefaultDriverVersionsMapper/SLES_15_base
    === RUN   TestSLESDefaultDriverVersionsMapper/SLES_15_with_dash_format
    --- PASS: TestSLESDefaultDriverVersionsMapper (0.00s)
        --- PASS: TestSLESDefaultDriverVersionsMapper/SLES_15_SP6 (0.00s)
        --- PASS: TestSLESDefaultDriverVersionsMapper/SLES_15_SP7 (0.00s)
        --- PASS: TestSLESDefaultDriverVersionsMapper/SLES_15_SP5 (0.00s)
        --- PASS: TestSLESDefaultDriverVersionsMapper/SLES_15_SP4 (0.00s)
        --- PASS: TestSLESDefaultDriverVersionsMapper/SLES_15_base (0.00s)
        --- PASS: TestSLESDefaultDriverVersionsMapper/SLES_15_with_dash_format (0.00s)
    PASS
    coverage: 48.6% of statements
    ok  	github.com/ROCm/gpu-operator/internal	0.019s	coverage: 48.6% of statements
    === RUN   TestAPIs
    Running Suite: Controller Suite - /home/psaggu/work-suse/amd-gpu-operator-work/oct-23-pr/gpu-operator/internal/controllers
    ==========================================================================================================================
    Random Seed: 1761223798
    
    Will run 15 of 15 specs
    •••••••••••••••
    
    Ran 15 of 15 Specs in 0.008 seconds
    SUCCESS! -- 15 Passed | 0 Failed | 0 Pending | 0 Skipped
    --- PASS: TestAPIs (0.01s)
    PASS
    coverage: 7.9% of statements
    ok  	github.com/ROCm/gpu-operator/internal/controllers	(cached)	coverage: 7.9% of statements
    === RUN   TestAPIs
    Running Suite: KMMModule Suite - /home/psaggu/work-suse/amd-gpu-operator-work/oct-23-pr/gpu-operator/internal/kmmmodule
    =======================================================================================================================
    Random Seed: 1761223798
    
    Will run 5 of 5 specs
    testing multiple valid homogeneous nodes
    testing multiple valid heterogeneous nodes
    testing multiple valid heterogeneous nodes + one unsupported node
    testing multiple unsupported nodes
    testing empty node list
    •<moduleName>
    <amdgpu>
    •<moduleName>
    <amdgpu>
    •••
    
    Ran 5 of 5 Specs in 0.005 seconds
    SUCCESS! -- 5 Passed | 0 Failed | 0 Pending | 0 Skipped
    --- PASS: TestAPIs (0.01s)
    PASS
    coverage: 32.3% of statements
    ok  	github.com/ROCm/gpu-operator/internal/kmmmodule	(cached)	coverage: 32.3% of statements
    
    •••••••••••••••
    
    Ran 15 of 15 Specs in 0.008 seconds
    SUCCESS! -- 15 Passed | 0 Failed | 0 Pending | 0 Skipped
    

  • output from tests added as part of 4da60d3

    ❯ go test ./internal/kmmmodule/... -v -ginkgo.focus="resolveDockerfile" -ginkgo.v
    === RUN   TestAPIs
    Running Suite: KMMModule Suite - /home/psaggu/work-suse/amd-gpu-operator-work/oct-23-pr/gpu-operator/internal/kmmmodule
    =======================================================================================================================
    Random Seed: 1761548380
    
    Will run 3 of 8 specs
    SSSS
    ------------------------------
    resolveDockerfile should use correct default registry when not specified by user
    /home/psaggu/work-suse/amd-gpu-operator-work/oct-23-pr/gpu-operator/internal/kmmmodule/kmmmodule_test.go:683
    • [0.000 seconds]
    ------------------------------
    resolveDockerfile should respect user-specified BaseImageRegistry for all OS types
    /home/psaggu/work-suse/amd-gpu-operator-work/oct-23-pr/gpu-operator/internal/kmmmodule/kmmmodule_test.go:702
    • [0.000 seconds]
    ------------------------------
    resolveDockerfile should return error for unsupported OS
    /home/psaggu/work-suse/amd-gpu-operator-work/oct-23-pr/gpu-operator/internal/kmmmodule/kmmmodule_test.go:727
    • [0.000 seconds]
    ------------------------------
    S
    
    Ran 3 of 8 Specs in 0.000 seconds
    SUCCESS! -- 3 Passed | 0 Failed | 0 Pending | 5 Skipped
    --- PASS: TestAPIs (0.00s)
    PASS
    ok  	github.com/ROCm/gpu-operator/internal/kmmmodule	0.022s
    

Submission Checklist

Priyankasaggu11929 and others added 4 commits October 23, 2025 18:30
…opriate AMD GPU driver versions

* add new `slesCMNameMapper` to parse SLES version strings like 'SUSE Linux Enterprise Server 15 SP6' to 'sles-15.6'
* add `SLESDefaultDriverVersionsMapper` to select driver versions
  - SLES 15 SP6/SP7 -> driver 7.0.2 (ref: https://repo.radeon.com/amdgpu-install/7.0.2/sle/)
  - SLES 15 SP5 -> driver 6.2.2 (ref: https://repo.radeon.com/amdgpu-install/6.2.2/sle/)
* register both 'sles' and 'suse' identifiers in mappers

Co-authored-by: alex-isv <[email protected]>
… AMD GPU drivers on SLES

* also embed the template via go:embed and add SLES case logic

Co-authored-by: alex-isv <[email protected]>
…sles"

* although, use-specified `BaseImageRegistry` still takes precedence

* also extend tests in `internal/kmmodule/kmmodule_test.go` to test above changes in `resolveDockerfile` func
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant