File tree Expand file tree Collapse file tree 4 files changed +40
-4
lines changed Expand file tree Collapse file tree 4 files changed +40
-4
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,9 @@ USE_HOST_MOFED="${USE_HOST_MOFED:-false}"
1717DNF_RELEASEVER=${DNF_RELEASEVER:- " " }
1818RHEL_VERSION=${RHEL_VERSION:- " " }
1919RHEL_MAJOR_VERSION=8
20- KERNEL_MODULE_TYPE=${KERNEL_MODULE_TYPE:- auto}
20+
21+ OPEN_KERNEL_MODULES_ENABLED=${OPEN_KERNEL_MODULES_ENABLED:- }
22+ KERNEL_MODULE_TYPE=${KERNEL_MODULE_TYPE:- }
2123
2224DRIVER_ARCH=${TARGETARCH/ amd64/ x86_64} && DRIVER_ARCH=${DRIVER_ARCH/ arm64/ aarch64}
2325echo " DRIVER_ARCH is $DRIVER_ARCH "
@@ -541,6 +543,13 @@ _shutdown() {
541543# to install. Valid values for KERNEL_MODULE_TYPE are 'auto' (default), 'open', and 'proprietary'.
542544# When 'auto' is configured, we use the nvidia-installer to recommend the module type to install.
543545_resolve_kernel_type () {
546+ # For backwards compatibility with older GPU Operator versions where KERNEL_MODULE_TYPE is not set,
547+ # honor the deprecated OPEN_KERNEL_MODULES_ENABLED field
548+ if [ -z " ${KERNEL_MODULE_TYPE} " ]; then
549+ [[ " ${OPEN_KERNEL_MODULES_ENABLED} " == " true" ]] && KERNEL_TYPE=kernel-open || KERNEL_TYPE=kernel
550+ return 0
551+ fi
552+
544553 if [ " ${KERNEL_MODULE_TYPE} " == " proprietary" ]; then
545554 KERNEL_TYPE=kernel
546555 elif [ " ${KERNEL_MODULE_TYPE} " == " open" ]; then
Original file line number Diff line number Diff line change @@ -17,7 +17,9 @@ USE_HOST_MOFED="${USE_HOST_MOFED:-false}"
1717DNF_RELEASEVER=${DNF_RELEASEVER:- " " }
1818RHEL_VERSION=${RHEL_VERSION:- " " }
1919RHEL_MAJOR_VERSION=9
20- KERNEL_MODULE_TYPE=${KERNEL_MODULE_TYPE:- auto}
20+
21+ OPEN_KERNEL_MODULES_ENABLED=${OPEN_KERNEL_MODULES_ENABLED:- }
22+ KERNEL_MODULE_TYPE=${KERNEL_MODULE_TYPE:- }
2123
2224DRIVER_ARCH=${TARGETARCH/ amd64/ x86_64} && DRIVER_ARCH=${DRIVER_ARCH/ arm64/ aarch64}
2325echo " DRIVER_ARCH is $DRIVER_ARCH "
@@ -541,6 +543,13 @@ _shutdown() {
541543# to install. Valid values for KERNEL_MODULE_TYPE are 'auto' (default), 'open', and 'proprietary'.
542544# When 'auto' is configured, we use the nvidia-installer to recommend the module type to install.
543545_resolve_kernel_type () {
546+ # For backwards compatibility with older GPU Operator versions where KERNEL_MODULE_TYPE is not set,
547+ # honor the deprecated OPEN_KERNEL_MODULES_ENABLED field
548+ if [ -z " ${KERNEL_MODULE_TYPE} " ]; then
549+ [[ " ${OPEN_KERNEL_MODULES_ENABLED} " == " true" ]] && KERNEL_TYPE=kernel-open || KERNEL_TYPE=kernel
550+ return 0
551+ fi
552+
544553 if [ " ${KERNEL_MODULE_TYPE} " == " proprietary" ]; then
545554 KERNEL_TYPE=kernel
546555 elif [ " ${KERNEL_MODULE_TYPE} " == " open" ]; then
Original file line number Diff line number Diff line change @@ -15,7 +15,9 @@ NVIDIA_UVM_MODULE_PARAMS=()
1515NVIDIA_MODESET_MODULE_PARAMS=()
1616NVIDIA_PEERMEM_MODULE_PARAMS=()
1717TARGETARCH=${TARGETARCH:? " Missing TARGETARCH env" }
18- KERNEL_MODULE_TYPE=${KERNEL_MODULE_TYPE:- auto}
18+
19+ OPEN_KERNEL_MODULES_ENABLED=${OPEN_KERNEL_MODULES_ENABLED:- }
20+ KERNEL_MODULE_TYPE=${KERNEL_MODULE_TYPE:- }
1921
2022export DEBIAN_FRONTEND=noninteractive
2123
@@ -483,6 +485,13 @@ _shutdown() {
483485# to install. Valid values for KERNEL_MODULE_TYPE are 'auto' (default), 'open', and 'proprietary'.
484486# When 'auto' is configured, we use the nvidia-installer to recommend the module type to install.
485487_resolve_kernel_type () {
488+ # For backwards compatibility with older GPU Operator versions where KERNEL_MODULE_TYPE is not set,
489+ # honor the deprecated OPEN_KERNEL_MODULES_ENABLED field
490+ if [ -z " ${KERNEL_MODULE_TYPE} " ]; then
491+ [[ " ${OPEN_KERNEL_MODULES_ENABLED} " == " true" ]] && KERNEL_TYPE=kernel-open || KERNEL_TYPE=kernel
492+ return 0
493+ fi
494+
486495 if [ " ${KERNEL_MODULE_TYPE} " == " proprietary" ]; then
487496 KERNEL_TYPE=kernel
488497 elif [ " ${KERNEL_MODULE_TYPE} " == " open" ]; then
Original file line number Diff line number Diff line change @@ -15,7 +15,9 @@ NVIDIA_UVM_MODULE_PARAMS=()
1515NVIDIA_MODESET_MODULE_PARAMS=()
1616NVIDIA_PEERMEM_MODULE_PARAMS=()
1717TARGETARCH=${TARGETARCH:? " Missing TARGETARCH env" }
18- KERNEL_MODULE_TYPE=${KERNEL_MODULE_TYPE:- auto}
18+
19+ OPEN_KERNEL_MODULES_ENABLED=${OPEN_KERNEL_MODULES_ENABLED:- }
20+ KERNEL_MODULE_TYPE=${KERNEL_MODULE_TYPE:- }
1921
2022export DEBIAN_FRONTEND=noninteractive
2123
@@ -487,6 +489,13 @@ _shutdown() {
487489# to install. Valid values for KERNEL_MODULE_TYPE are 'auto' (default), 'open', and 'proprietary'.
488490# When 'auto' is configured, we use the nvidia-installer to recommend the module type to install.
489491_resolve_kernel_type () {
492+ # For backwards compatibility with older GPU Operator versions where KERNEL_MODULE_TYPE is not set,
493+ # honor the deprecated OPEN_KERNEL_MODULES_ENABLED field
494+ if [ -z " ${KERNEL_MODULE_TYPE} " ]; then
495+ [[ " ${OPEN_KERNEL_MODULES_ENABLED} " == " true" ]] && KERNEL_TYPE=kernel-open || KERNEL_TYPE=kernel
496+ return 0
497+ fi
498+
490499 if [ " ${KERNEL_MODULE_TYPE} " == " proprietary" ]; then
491500 KERNEL_TYPE=kernel
492501 elif [ " ${KERNEL_MODULE_TYPE} " == " open" ]; then
You can’t perform that action at this time.
0 commit comments