Skip to content

[rhoai-2.25] fix(ci): loosen jupyter-minimal/datascience probe timeouts for ppc64le/s390x - #2674

Merged
jiridanek merged 3 commits into
rhoai-2.25from
fix/rhoai-2.25-qemu-notebook-timeouts
Aug 1, 2026
Merged

[rhoai-2.25] fix(ci): loosen jupyter-minimal/datascience probe timeouts for ppc64le/s390x#2674
jiridanek merged 3 commits into
rhoai-2.25from
fix/rhoai-2.25-qemu-notebook-timeouts

Conversation

@jiridanek

@jiridanek jiridanek commented Aug 1, 2026

Copy link
Copy Markdown
Member

Description

Backports a fix for pre-existing, branch-wide CI breakage on rhoai-2.25: jupyter-minimal-ubi9-python-3.12 (ppc64le, s390x) and jupyter-datascience-ubi9-python-3.12 (ppc64le) fail on essentially every push/PR (confirmed on the last 14+ unrelated runs, e.g. PR #2641 run 30664191953).

Root cause: under QEMU emulation (ppc64le/s390x, since GHA runners are amd64), jupyter lab takes far longer to bind port 8888 than the hardcoded CI timeouts/probes assume:

  • ppc64le goes through scripts/test_jupyter_with_papermill.sh → the jupyter/{minimal,datascience}/ubi9-python-3.12/kustomize/base/statefulset.yaml StatefulSet. Its livenessProbe (5s delay, 5s period, 3 failures ≈ 20s grace) kills the container via SIGTERM before jupyter finishes starting, producing a permanent CrashLoopBackOff (exitCode 143, observed restartCount: 9) until the outer 600s kubectl wait --for=condition=ready gives up.
  • s390x goes through tests/containers/kubernetes_utils.py's ImageDeployment.deploy() instead (no k8s probes at all there), whose own hardcoded app-level check — Wait.until("Connecting to pod succeeds", 1, 30, ...) — only allows 30s, too short for the same reason (WaitError: Timeout after 30 s ... Remote end closed connection).

This exact problem was already diagnosed and fixed on main, but never backported here. This PR is a partial cherry-pick of the relevant hunks from 3 upstream commits (each bundles the fix with unrelated work — a hermetic build, a prefetch-input refactor, a code-server nginx security fix — that conflicts heavily with rhoai-2.25's diverged state, so a literal cherry-pick -x of any of them fails outright):

  • 70bf81778f3b7cc3a76ffe155d983c57e444ba86 — introduced the initial probe loosening for both jupyter-minimal and jupyter-datascience.
  • b76e061c47c0d1b822b9da5e60169eb83f6b5ffa — raised jupyter-datascience's liveness further (30→120s) and bumped its memory limit 2Gi→4Gi (comment: "Jupyter + papermill share the pod cgroup; keep headroom for datascience tests on ppc64le CI").
  • f784977a25 / 86608705582326196e7b078fea6648b9f156295d — raised the kubernetes_utils.py connect-wait timeout 30s → 60s → 120s over time for the same non-native-architecture slowness, plus made the check itself more robust (127.0.0.1, explicit /api path, per-request timeout=10).

Each commit in this PR documents its exact upstream source(s) in the commit message trailer.

Not changed: the other 6 jupyter images with kustomize StatefulSets (trustyai, pytorch, tensorflow, rocm/pytorch, rocm/tensorflow, pytorch+llmcompressor) still have tight/moderate probes on main too — they haven't needed loosening because they aren't observed failing, so no changes proposed for those here.

Per the merge-criteria note below about odh/notebooksrhds/notebooks sync: this PR intentionally goes the other direction (mainrhoai-2.25) because rhoai-2.25 diverged from main before these fixes landed upstream, and the normal sync doesn't run against release branches.

How Has This Been Tested?

  • Verified each hunk against main's current committed state directly (git show main:<path>) rather than reconstructing values from memory — the two statefulset.yaml files are now byte-identical to main except for one pre-existing, unrelated line (--ServerApp.tornado_settings, removed by a separate, unrelated commit on main).
  • Validated YAML syntax (python3 -c "import yaml; yaml.safe_load(...)") on both statefulset.yaml files.
  • Validated Python syntax (ast.parse) on kubernetes_utils.py; confirmed the pre-existing pyright diagnostics in that file are all in unrelated code, not touched by this change.
  • Could not reproduce actual ppc64le/s390x QEMU-emulated jupyter startup timing locally in reasonable time — the real verification is this PR's own CI: the jupyter-minimal-ubi9-python-3.12 (ppc64le, s390x) and jupyter-datascience-ubi9-python-3.12 (ppc64le) jobs should go green here where they've been failing on every recent push/PR to rhoai-2.25.

Self checklist (all need to be checked):

  • Ensure that you have run make test (gmake on macOS) before asking for review
  • Changes to everything except Dockerfile.konflux files should be done in odh/notebooks and automatically synced to rhds/notebooks. For Konflux-specific changes, modify Dockerfile.konflux files directly in rhds/notebooks as these require special attention in the downstream repository and flow to the upcoming RHOAI release. — N/A here, see note above: this intentionally backports from main to rhoai-2.25 directly since the branch diverged before these fixes landed.

Merge criteria:

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work — pending this PR's own ppc64le/s390x CI run, see "How Has This Been Tested?" above.

Summary by CodeRabbit

  • Bug Fixes
    • Improved Jupyter startup reliability on slow or resource-constrained nodes by allowing health checks more time to complete.
    • Increased memory capacity for the Data Science environment from 2 GiB to 4 GiB.
    • Improved notebook deployment connectivity by using a more reliable local connection and clearer request timeouts.

livenessProbe (5s delay, 5s period, 3 failures = ~20s grace) kills the
container via SIGTERM before jupyter lab finishes binding port 8888
under QEMU emulation on ppc64le, producing a permanent
CrashLoopBackOff and failing the 600s `kubectl wait
--for=condition=ready` in scripts/test_jupyter_with_papermill.sh.
This is pre-existing on rhoai-2.25 and affects every push/PR, not
just this repo's changes (see #2641
CI run 30664191953).

Loosen livenessProbe to 30/10/6 (~90s grace) and readinessProbe to
45/10/6, matching main's already-proven fix.

This is a partial cherry-pick: the full upstream commit
(70bf817) bundles this fix with an
unrelated hermetic build for jupyter/pytorch+llmcompressor that
conflicts heavily with rhoai-2.25's diverged Dockerfile/Tekton state,
so only the statefulset.yaml hunk is applied here.

(cherry picked from commit 70bf817)
…4le CI

Same CrashLoopBackOff root cause as jupyter-minimal: the livenessProbe
(5s delay, 5s period, 3 failures) kills the container via SIGTERM
before jupyter lab + datascience deps finish binding port 8888 under
QEMU emulation on ppc64le. Datascience needs even more headroom than
minimal (heavier deps, and jupyter + papermill share the pod cgroup
during ppc64le CI tests), so it also needs a memory bump.

Loosen livenessProbe to 120/10/6 and readinessProbe to 90/10/6, and
raise resources.limits/requests.memory from 2Gi to 4Gi, matching
main's already-proven fix.

This is a partial cherry-pick assembled from two upstream commits,
since each bundles this fix with unrelated work that conflicts
heavily with rhoai-2.25's diverged state:
- 70bf817 introduced the initial
  30/10/6 liveness + 90/10/6 readiness loosening (bundled with an
  unrelated hermetic build for jupyter/pytorch+llmcompressor).
- b76e061 raised liveness further to
  120/10/6 and bumped memory to 4Gi (bundled with an unrelated
  prefetch-input centralization refactor).

(cherry picked from commit 70bf817)
(cherry picked from commit b76e061)
… pods

ImageDeployment.deploy() is used by tests/containers/workbenches/*.py
(the "OpenShift container tests" pytest suite) across every image and
architecture. Its post-readiness HTTP connect check
(Wait.until("Connecting to pod succeeds", 1, 30, ...)) only allowed
30s, which is too short once jupyter is genuinely slow to bind under
QEMU emulation (observed as
tests.containers.kubernetes_utils.WaitError: Timeout after 30 s
waiting for Connecting to pod succeeds on jupyter-minimal s390x,
#2641 CI run 30664191953).
This check has no k8s liveness/readiness probe backing it (the
Deployment this class creates defines none), so it can't restart-loop
the pod like the StatefulSet-based tests do -- it just times out.

Raise the timeout 30s -> 120s, switch localhost -> 127.0.0.1, probe
/api explicitly, and add a 10s per-request timeout, matching main's
already-proven fix (itself the result of incrementally raising this
same constant over time: 30 -> 60 -> 120, each time for the same
non-native-architecture slowness).

This is a partial cherry-pick: main's commits
f784977 (raised 30->60) and
8660870 (raised 60->120, plus the
localhost/api/timeout changes) each bundle this fix with unrelated
work (an s390x arch-detection removal, and a code-server nginx
open-redirect fix respectively) that conflicts with rhoai-2.25's
diverged state, so this applies the resulting hunk directly rather
than picking either commit whole.
@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR increases Jupyter probe delays, intervals, and failure thresholds. It increases datascience container memory to 4Gi. Deployment tests wait longer for pod connectivity and use a bounded request to 127.0.0.1.

Changes

Startup tolerance

Layer / File(s) Summary
StatefulSet startup settings
jupyter/datascience/ubi9-python-3.12/kustomize/base/statefulset.yaml, jupyter/minimal/ubi9-python-3.12/kustomize/base/statefulset.yaml
Both StatefulSets use longer liveness and readiness probe timings. The datascience StatefulSet increases memory requests and limits from 2Gi to 4Gi.
Deployment connectivity check
tests/containers/kubernetes_utils.py
ImageDeployment.deploy waits up to 120 seconds, connects to 127.0.0.1, and applies a 10-second HTTP request timeout.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: atheo89

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the CI probe timeout changes for jupyter-minimal and jupyter-datascience on ppc64le and s390x.
Description check ✅ Passed The description explains the root cause, scope, testing performed, pending CI validation, and checklist status in the required sections.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/rhoai-2.25-qemu-notebook-timeouts

Comment @coderabbitai help to get the list of available commands.

@jiridanek

Copy link
Copy Markdown
Member Author

@coderabbitai

  1. 2642238 — jupyter-minimal statefulset.yaml: liveness 5/5/3 → 30/10/6, readiness 10/5/3 → 45/10/6 (cherry-picked from 70bf817)
  2. 2d5655f — jupyter-datascience statefulset.yaml: liveness → 120/10/6, readiness → 90/10/6, memory 2Gi → 4Gi (assembled from 70bf817 + b76e061)
  3. 7487358 — tests/containers/kubernetes_utils.py: connect-wait timeout 30s → 120s, plus the 127.0.0.1//api/timeout=10 hardening (assembled from f784977 + 8660870)

Each commit message documents which upstream commit(s) it's drawn from and why a literal -x cherry-pick wasn't possible (each upstream commit bundles the fix with unrelated, conflicting work). This is new
work on a fresh branch off rhoai-2.25 (PR #2641 is merged), not a continuation of that PR.

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

@jiridanek Understood. This PR is an independent, selective backport to rhoai-2.25.

The three commits preserve the required upstream CI fixes without importing unrelated changes that conflict with the release branch. PR #2641 is not part of this PR’s change history.


✏️ Learnings added
Learnt from: jiridanek
URL: https://github.com/red-hat-data-services/notebooks/pull/2674

Timestamp: 2026-08-01T08:02:29.976Z
Learning: For the `rhoai-2.25` branch in `red-hat-data-services/notebooks`, PR `#2674` is an independent selective backport from `main`, not a continuation of PR `#2641`. Its commits selectively apply Jupyter StatefulSet probe and memory changes plus `tests/containers/kubernetes_utils.py` connection-wait hardening because literal upstream cherry-picks include unrelated changes that conflict with the diverged release branch.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

You are interacting with an AI system.

@jiridanek jiridanek changed the title fix(ci): loosen jupyter-minimal/datascience probe timeouts for ppc64le/s390x [rhoai-2.25] fix(ci): loosen jupyter-minimal/datascience probe timeouts for ppc64le/s390x Aug 1, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
jupyter/datascience/ubi9-python-3.12/kustomize/base/statefulset.yaml (1)

36-53: 🩺 Stability & Availability | 🔵 Trivial | 🏗️ Heavy lift

Use startupProbe for slow startup.

Both StatefulSets encode the startup budget in liveness and readiness settings. This delays healthy pods from becoming ready and delays recovery or traffic removal after post-start failures. A startupProbe gates the other probes only during initialization, which matches the PR objective. (v1-32.docs.kubernetes.io)

  • jupyter/datascience/ubi9-python-3.12/kustomize/base/statefulset.yaml#L36-L53: add a startup probe for the measured emulated startup budget, then reduce the readiness delay and failure window.
  • jupyter/minimal/ubi9-python-3.12/kustomize/base/statefulset.yaml#L36-L52: add the same startup protection with the minimal-image budget, then restore prompt post-start health detection.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@jupyter/datascience/ubi9-python-3.12/kustomize/base/statefulset.yaml` around
lines 36 - 53, The liveness and readiness probes currently carry the
slow-startup budget; add a startupProbe to both
jupyter/datascience/ubi9-python-3.12/kustomize/base/statefulset.yaml lines 36-53
and jupyter/minimal/ubi9-python-3.12/kustomize/base/statefulset.yaml lines
36-52, using each image’s measured startup budget. Then reduce readiness initial
delays and failure windows in both StatefulSets so post-start failures are
detected promptly, while retaining the existing probe endpoints and liveness
behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@jupyter/datascience/ubi9-python-3.12/kustomize/base/statefulset.yaml`:
- Around line 36-53: The liveness and readiness probes currently carry the
slow-startup budget; add a startupProbe to both
jupyter/datascience/ubi9-python-3.12/kustomize/base/statefulset.yaml lines 36-53
and jupyter/minimal/ubi9-python-3.12/kustomize/base/statefulset.yaml lines
36-52, using each image’s measured startup budget. Then reduce readiness initial
delays and failure windows in both StatefulSets so post-start failures are
detected promptly, while retaining the existing probe endpoints and liveness
behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 93aad417-0f1d-4347-baf4-2e3c0cb89f04

📥 Commits

Reviewing files that changed from the base of the PR and between 46232cd and 7487358.

📒 Files selected for processing (3)
  • jupyter/datascience/ubi9-python-3.12/kustomize/base/statefulset.yaml
  • jupyter/minimal/ubi9-python-3.12/kustomize/base/statefulset.yaml
  • tests/containers/kubernetes_utils.py

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

CI status [antigravity]

Run: Build Notebooks (pr) #306909167299/9 complete · 8 passed · 1 failed
Last updated: 2026-08-01T08:17:59Z after workflow update completed

Failures so far

Job Failed step Link
jupyter-datascience-ubi9-python-3.12 · linux/ppc64le [rhoai] / build Build: make jupyter-datascience-ubi9-python-3.12 logs

Likely root causes

  • The jupyter-datascience-ubi9-python-3.12 · linux/ppc64le [rhoai] / build job failed during the container image build process while compiling Apache ORC as a third-party dependency via CMake (FetchContent).
  • Specifically, the download failed due to a hash mismatch (Hash mismatch, removing... and Each download failed!), causing CMake to error out during the build step (Build step for orc failed: 2).

Suggested next steps

  • Verify the Apache ORC source URL and expected hash/checksum in cmake_modules/ThirdpartyToolchain.cmake or the relevant CMake configuration files to ensure the correct version or valid checksum is being fetched.
  • Re-run the affected jupyter-datascience-ubi9-python-3.12 build job once any temporary network or mirror caching issues with the external Apache ORC download source are resolved.

@jiridanek

Copy link
Copy Markdown
Member Author

Checked the `jupyter-datascience-ubi9-python-3.12 · linux/ppc64le` failure on this PR's pull_request run — it's not related to this PR's changes. It fails at the `make jupyter-datascience-ubi9-python-3.12` build step itself (before the statefulset.yaml / probe-timeout changes in this PR are even exercised):

+ export ARROW_ORC_URL=https://archive.apache.org/dist/orc/orc-2.0.1/orc-2.0.1.tar.gz
-- ARROW_ORC_BUILD_VERSION: 2.2.1
-- ARROW_ORC_BUILD_SHA256_CHECKSUM: 52fc762332442e8b05d7182f8c035f9e04d945b9a52be22ab69f28b3f37d4500
...
Apache ORC: CMake Error at orc-subbuild/.../download-orc-populate.cmake:163 (message):
Apache ORC: gmake[2]: *** [.../orc-populate-download] Error 1

Root cause: jupyter/datascience/ubi9-python-3.12/Dockerfile.cpu (and Dockerfile.konflux.cpu, plus the runtimes/datascience equivalents) hardcode ARROW_ORC_URL to orc-2.0.1 — a stale override from an older pyarrow pin. pyarrow is now pinned to 25.0.0 (jupyter/datascience/ubi9-python-3.12/pylock.toml), whose bundled Arrow build expects ORC 2.2.1 with SHA256 52fc762332442e8b05d7182f8c035f9e04d945b9a52be22ab69f28b3f37d4500. Verified https://archive.apache.org/dist/orc/orc-2.2.1/orc-2.2.1.tar.gz serves an artifact matching that exact checksum, so the fix is to align the URL (not drop it — downloads.apache.org prunes older releases, and pinning the archive mirror keeps the build hermetic/deterministic).

This is persistent, not a flaky CDN issue — it'll block every ppc64le build of jupyter-datascience/runtimes/datascience regardless of this PR. Planning a separate follow-up PR for it; not bundling into this one.

@ide-developer ide-developer left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@openshift-ci

openshift-ci Bot commented Aug 1, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ide-developer
Once this PR has been reviewed and has the lgtm label, please assign paulovmr for approval. For more information see the 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

@jiridanek
jiridanek merged commit 6f77b48 into rhoai-2.25 Aug 1, 2026
72 of 78 checks passed
@jiridanek
jiridanek deleted the fix/rhoai-2.25-qemu-notebook-timeouts branch August 1, 2026 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants