Skip to content

[spark-rapids] Fix Debian 12 MIG setup and update RAPIDS 26.10 fallback - #1413

Merged
cjac merged 7 commits into
GoogleCloudDataproc:mainfrom
nvliyuan:fix-mig-debian12-driver-dkms
Nov 19, 2026
Merged

cjac merged 7 commits into
GoogleCloudDataproc:mainfrom
nvliyuan:fix-mig-debian12-driver-dkms

Conversation

@nvliyuan

@nvliyuan nvliyuan commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Switch the Debian 12 path in spark-rapids/mig.sh from the CUDA 12.4 local repository's NVIDIA 550 driver to the NVIDIA online repository's pinned 580 driver branch.
  • Install the headless nvidia-kernel-open-dkms and nvidia-driver-cuda packages while keeping the CUDA toolkit at 12.4.
  • Run MIG setup and its required reboot only on worker nodes so Dataproc master initialization is not interrupted.
  • Update the hardcoded RAPIDS fallback from 26.08.1 to the released 26.10.0 artifacts.
  • Preserve the existing Debian 10/11, Ubuntu, and Rocky installation paths.

Root cause

mig-on-dataproc-2.3-debian12 build #13 failed during node initialization. The retained make.log from the reproduction shows NVIDIA driver 550.54.15 calling the three-argument pci_resize_resource() API, while Debian 12 kernel headers 6.1.0-53 require four arguments. As a result, the NVIDIA DKMS module does not compile.

The regular Spark RAPIDS init action already avoids this incompatibility after #1400, but the copied driver installation logic in spark-rapids/mig.sh still used the old local installer.

The MIG script also rebooted GPU-equipped master nodes before Dataproc initialization completed. On the second boot, Dataproc repeated master-only initialization and failed. Restricting MIG setup and reboot to workers avoids this failure.

Validation

  • bash -n spark-rapids/mig.sh spark-rapids/spark-rapids.sh
  • git diff --check
  • Confirmed the Debian 12 NVIDIA repository contains nvidia-driver-pinning-580, nvidia-kernel-open-dkms, nvidia-driver-cuda, and cuda-toolkit-12-4.
  • Confirmed the Debian 12 CUDA keyring URL returns HTTP 200.
  • Confirmed RAPIDS 26.10.0 artifacts are published for both Scala 2.12 and 2.13.
  • Created a Dataproc 2.3.37-debian12 A100 cluster with Conscrypt disabled and MIG setup limited to workers; the cluster reached RUNNING.
  • Verified both workers on kernel 6.1.0-53-cloud-amd64: NVIDIA DKMS/driver 580.196.07, CUDA 12.4, MIG enabled, and two 3g.20gb instances per worker.
  • Verified the master skipped MIG setup/reboot and remained in MIG mode disabled.
  • Submitted a SparkPi smoke job; it completed successfully.

Signed-off-by: liyuan <yuali@nvidia.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a workaround for Debian 12 security kernels by overriding the NVIDIA driver version to 580.95.05 and implementing a repository-based installation path when USE_REPO_INSTALL is enabled. The feedback identifies a missing call to enable the contrib repository component in the new installation path, a redundant apt-get update execution, and an existing redirection bug in the clear_dkms_key function that creates an unwanted file named '2'.

Comment thread spark-rapids/mig.sh Resolved
Comment thread spark-rapids/mig.sh Resolved
Comment thread spark-rapids/mig.sh Resolved
@nvliyuan
nvliyuan marked this pull request as ready for review October 27, 2026 07:26
@nvliyuan

Copy link
Copy Markdown
Contributor Author

verified in local

nvliyuan and others added 4 commits October 27, 2026 15:27
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: liyuan <yuali@nvidia.com>
Signed-off-by: liyuan <yuali@nvidia.com>
Signed-off-by: liyuan <yuali@nvidia.com>
@nvliyuan nvliyuan changed the title [spark-rapids] Fix MIG driver installation on Debian 12 [spark-rapids] Fix Debian 12 MIG setup and update RAPIDS 26.10 fallback Nov 10, 2026
@nvliyuan

Copy link
Copy Markdown
Contributor Author

Hi @cjac could you help review this pr? thx , related ticket: https://console.cloud.google.com/support/cases/detail/v2/76929913?project=rapids-spark
CC @sameerz @viadea

@cjac

cjac commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

I'll be happy to. I'm on vacation until Monday, but will take a look then!

@nvliyuan

Copy link
Copy Markdown
Contributor Author

Hi @cjac could you help review when you have time, thx

@cjac

cjac commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Thanks for the reminder!

@cjac

cjac commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Hi @nvliyuan,

Thanks for addressing this and for your patience while I was out on vacation.

The root cause diagnosis regarding the pci_resize_resource() API signature change in Debian 12 kernel 6.1.0-53 is spot on, and moving Debian 12 to the online pinned 580 driver open-dkms repo while keeping CUDA 12.4 toolkit aligns with the fix in the main driver installation path. Limiting the MIG reconfiguration reboot exclusively to worker nodes also prevents the master node re-initialization failure on cluster startup.

A few items and next steps:

  1. Debian 12 contrib repository component: Please ensure add_contrib_components is called before apt-get update when configuring the Debian 12 repository installation path so that nvidia-kernel-open-dkms and its dependencies resolve without issue.
  2. Debian 13 (Trixie) & Dataproc 3.0 readiness: In check_os_and_secure_boot(), mig.sh currently restricts Debian versions via:
    if ! is_debian10 && ! is_debian11 && ! is_debian12 ; then
    Dataproc 3.0 image certification is upcoming on Debian 13 (and Ubuntu 24.04). We should add is_debian13 support (and Ubuntu 24) to check_os_and_secure_boot() and the repo installer path here as well so mig.sh stays aligned with Dataproc 3.0 support in spark-rapids.sh.
  3. Stderr redirection in clear_dkms_key: In clear_dkms_key, lines redirecting to >2 instead of >&2 produce a literal file named 2 in the working directory. While inherited from earlier logic, let's fix them to >&2.
  4. Single-node clusters (--single-node / 0 workers): Because MIG configuration and reboot are guarded strictly for ROLE == "Worker", single-node clusters where the master node hosts GPUs will skip MIG configuration. We should ensure this limitation is documented in comments.

If you like, I can push these follow-up tweaks directly to the PR branch so we can get this merged and unblock your testing. Let me know if that works for you!

@nvliyuan

Copy link
Copy Markdown
Contributor Author

Hi @cjac , thanks for the detailed review. Item 1 and 3 are already addressed in the current PR head (8c5c5c3): add_contrib_components runs before apt-get update, and the stderr redirects use >&2. Please go ahead and push the Debian 13/Ubuntu 24 support and the single-node limitation documentation directly to this pr, thx

Add Debian 13 (Trixie) and Ubuntu 24.04 support to `spark-rapids/mig.sh`
to prepare for Dataproc 3.0 image certification and maintain feature
parity with `spark-rapids.sh`:

- Define `is_debian13()` and `is_ubuntu24()` helper functions.
- Extend `add_contrib_components()` to configure deb822 sources
  (`/etc/apt/sources.list.d/debian.sources`) for Debian 13 as well as
  Debian 12 so `nvidia-kernel-open-dkms` dependencies resolve properly.
- Include Debian 13 in the repository installation and driver pinning
  exception block to avoid kernel/module API incompatibilities.
- Update `check_os_and_secure_boot()` to accept Debian 13 and Ubuntu 24.
- Document in `main()` that single-node clusters (`ROLE=Master` with zero
  workers) bypass MIG configuration and reboot by design.

Signed-off-by: C.J. Collier <cjac@google.com>
@cjac

cjac commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

/gcbrun

@cjac

cjac commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Pushed commit c2d164f to fix-mig-debian12-driver-dkms.

It adds Debian 13 (Trixie) and Ubuntu 24.04 support to spark-rapids/mig.sh and documents the single-node cluster limitation where MIG setup is bypassed on ROLE=Master.

I also ran a live multi-node validation cluster (cjac-mig-test-1794972779 on Dataproc 2.2-debian12 in us-central1-b) with 2x a2-highgpu-1g A100 workers using this branch's spark-rapids/mig.sh startup script and spark-rapids.sh init action. Both workers compiled NVIDIA driver 580.196.07 cleanly via DKMS, rebooted, configured the 2x 3g.20gb MIG instances, and the cluster reached RUNNING. A Spark smoke job completed successfully.

Please check my commit on your CI pipeline. If everything's green, we can merge.

@cjac cjac left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are ready to be submitted. I'm running the /gcbrun tests and I've asked NV to make sure I didn't break anything with my alterations.

Signed-off-by: liyuan <yuali@nvidia.com>
@nvliyuan

Copy link
Copy Markdown
Contributor Author

Hi @cjac , I tested them and pushed follow-up commit to fix a few Dataproc 3.0 issues:
Debian 13’s NVIDIA repository does not provide the 580 pinning package; it starts with driver 590 and CUDA 13.
Ubuntu 24.04’s previous local-installer URL returns 404, so mig.sh now uses the online repository with the 580 open driver and CUDA Toolkit 12.6. Package availability was verified. could you help gcbrun? thx

@cjac

cjac commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

/gcbrun

@cjac

cjac commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

This is ready for merge, @nvliyuan ; feel free to do so or ask me to do it.

@nvliyuan

Copy link
Copy Markdown
Contributor Author

please help merge thx @cjac

@cjac

cjac commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Clear to merge aye

@cjac
cjac merged commit f616e8c into GoogleCloudDataproc:main Nov 19, 2026
7 checks passed
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.

2 participants