Skip to content

chore(test): add Open MPI 4 e2e for the MPI runtime - #4282

Open
matbun wants to merge 3 commits into
kubeflow:masterfrom
matbun:test/e2e-openmpi4
Open

matbun wants to merge 3 commits into
kubeflow:masterfrom
matbun:test/e2e-openmpi4

Conversation

@matbun

@matbun matbun commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Since #4029 the DeepSpeed and MLX images ship Open MPI 5, so the OpenMPI e2e only exercises the PRTE_MCA_* env vars. This turns that test into a DescribeTable with two entries running the same mpirun hostname check from #4166: the DeepSpeed image as before, and mpioperator/mpi-pi:v0.6.0-openmpi (Open MPI 4.1.4, pinned by digest), so the OMPI_MCA_orte_* path stays tested.

For the Open MPI 4 entry the test copies the deployed deepspeed-distributed runtime into a namespaced TrainingRuntime and sets the image on both replicatedJobs, since spec.trainer.image only reaches the launcher (#4030). If the launcher hits the DNS race described in #4241, its container restarts in place, because JobSet defaults restartPolicy to OnFailure, and the Job still succeeds. Most of the diff is re-indentation of the existing test, with whitespace hidden it is 33 lines added and 4 removed.

go vet passes and a Ginkgo dry run lists both entries. The same runtime and check completed on a cluster with Trainer v2.1.0, as reported in #4241.

Which issue(s) this PR fixes:
Fixes #4241

Checklist:

  • Docs included if any changes are user facing

Cc @andreyvelich as discussed in the last meeting

The DeepSpeed and MLX images ship Open MPI 5, so no e2e covered the OMPI_MCA_orte_* env vars anymore. Run the deepspeed-distributed layout with the Open MPI 4 mpi-pi image from kubeflow/mpi-operator and check that mpirun reaches both hosts.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Matteo Bunino <48362942+matbun@users.noreply.github.com>
@google-oss-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign tenzen-y for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Share one test body between the DeepSpeed image and the Open MPI 4 image instead of duplicating it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Matteo Bunino <48362942+matbun@users.noreply.github.com>
@google-oss-prow google-oss-prow Bot added size/L and removed size/M labels Oct 20, 2026
Signed-off-by: Matteo Bunino <48362942+matbun@users.noreply.github.com>
@matbun
matbun marked this pull request as ready for review October 20, 2026 15:12

@andreyvelich andreyvelich left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for this @matbun!

/ok-to-test

Comment thread test/e2e/e2e_test.go
Comment on lines +160 to +162
ginkgo.By("Create a copy of the deepspeed-distributed runtime with the given image", func() {
gomega.Expect(k8sClient.Create(ctx, mpiRuntime)).Should(gomega.Succeed())
})

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

After this PR is merged: #4050 (comment), we can directly set the image via TrainJob spec rather than updating the runtime.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

True. Let's wait for that and I'll rebase

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

E2E: test the MPI runtimes with Open MPI 4

2 participants