Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions controllers/object_controls.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ var RepoConfigPathMap = map[string]string{
"rhcos": "/etc/yum.repos.d",
"rhel": "/etc/yum.repos.d",
"rocky": "/etc/yum.repos.d",
"ol": "/etc/yum.repos.d",
"sles": "/etc/zypp/repos.d",
"sl-micro": "/etc/zypp/repos.d",
}
Expand All @@ -236,6 +237,7 @@ var CertConfigPathMap = map[string]string{
"rhcos": "/etc/pki/ca-trust/extracted/pem",
"rhel": "/etc/pki/ca-trust/extracted/pem",
"rocky": "/etc/pki/ca-trust/extracted/pem",
"ol": "/etc/pki/ca-trust/extracted/pem",
"sles": "/etc/pki/trust/anchors",
"sl-micro": "/etc/pki/trust/anchors",
}
Expand Down
4 changes: 2 additions & 2 deletions controllers/state_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -664,9 +664,9 @@ func (n *ClusterPolicyController) getGPUNodeOSInfo() (string, string, error) {
}
osMajorVersion := strings.Split(osVersion, ".")[0]

// If the OS is RockyLinux or RHEL 10 & above, we will omit the minor version when constructing the os image tag
// If the OS is RockyLinux, Oracle Linux, or RHEL 10 & above, we will omit the minor version when constructing the os image tag
switch osName {
case "rocky":
case "rocky", "ol":
osVersion = osMajorVersion
case "rhel":
osMajorNumber, err := parseOSMajorVersion(osVersion)
Expand Down
6 changes: 6 additions & 0 deletions controllers/state_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ func TestGetGPUNodeOSInfo(t *testing.T) {
osVersion: "9.5",
expected: "rocky9",
},
{
name: "ol omits minor version",
osName: "ol",
osVersion: "9.5",
expected: "ol9",
},
{
name: "ubuntu preserves full version",
osName: "ubuntu",
Expand Down
8 changes: 8 additions & 0 deletions internal/state/driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,14 @@ func TestGetDriverAppName(t *testing.T) {
actual = getDriverAppName(cr, pool)
assert.Equal(t, "nvidia-gpu-driver-rocky9-59b779bcc5", actual)

// Oracle Linux
pool.osRelease = "ol"
pool.osVersion = "9.7"
pool.osTag, err = getOSTag(pool.osRelease, pool.osVersion)
assert.NoError(t, err)
actual = getDriverAppName(cr, pool)
assert.Equal(t, "nvidia-gpu-driver-ol9-59b779bcc5", actual)

// RHEL10
pool.osRelease = "rhel"
pool.osVersion = "10.1"
Expand Down
2 changes: 2 additions & 0 deletions internal/state/driver_volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ var RepoConfigPathMap = map[string]string{
"rhcos": "/etc/yum.repos.d",
"rhel": "/etc/yum.repos.d",
"rocky": "/etc/yum.repos.d",
"ol": "/etc/yum.repos.d",
"sles": "/etc/zypp/repos.d",
"sl-micro": "/etc/zypp/repos.d",
}
Expand All @@ -53,6 +54,7 @@ var CertConfigPathMap = map[string]string{
"rhcos": "/etc/pki/ca-trust/extracted/pem",
"rhel": "/etc/pki/ca-trust/extracted/pem",
"rocky": "/etc/pki/ca-trust/extracted/pem",
"ol": "/etc/pki/ca-trust/extracted/pem",
"sles": "/etc/pki/trust/anchors",
"sl-micro": "/etc/pki/trust/anchors",
}
Expand Down
4 changes: 2 additions & 2 deletions internal/state/nodepool.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ func getOSTag(osRelease, osVersion string) (string, error) {
osMajorVersion := strings.Split(osVersion, ".")[0]

var osTagSuffix string
// If the OS is RockyLinux or RHEL 10 & above, we will omit the minor version when constructing the os image tag
// If the OS is RockyLinux, Oracle Linux, or RHEL 10 & above, we will omit the minor version when constructing the os image tag
switch osRelease {
case "rocky":
case "rocky", "ol":
osTagSuffix = osMajorVersion
case "rhel":
osMajorNumber, err := parseOSMajorVersion(osVersion)
Expand Down
7 changes: 7 additions & 0 deletions internal/state/nodepool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ func TestGetOSTag(t *testing.T) {
expected: "rocky9",
expectError: false,
},
{
description: "oracle linux",
osRelease: "ol",
osVersion: "9.4",
expected: "ol9",
expectError: false,
},
{
description: "RHEL 10",
osRelease: "rhel",
Expand Down