diff --git a/jupyter/datascience/ubi9-python-3.12/kustomize/base/statefulset.yaml b/jupyter/datascience/ubi9-python-3.12/kustomize/base/statefulset.yaml index 506b22093a..0fc2fdcd6c 100644 --- a/jupyter/datascience/ubi9-python-3.12/kustomize/base/statefulset.yaml +++ b/jupyter/datascience/ubi9-python-3.12/kustomize/base/statefulset.yaml @@ -33,26 +33,29 @@ spec: - name: notebook-port protocol: TCP containerPort: 8888 + # Generous delays for slow or constrained nodes (e.g. ppc64le in CI). + # Liveness must allow Jupyter + datascience deps to bind before first check (avoids restart loops). livenessProbe: tcpSocket: port: notebook-port - initialDelaySeconds: 5 - periodSeconds: 5 + initialDelaySeconds: 120 + periodSeconds: 10 successThreshold: 1 - failureThreshold: 3 + failureThreshold: 6 readinessProbe: httpGet: path: /notebook/opendatahub/jovyan/api port: notebook-port scheme: HTTP - initialDelaySeconds: 10 - periodSeconds: 5 + initialDelaySeconds: 90 + periodSeconds: 10 successThreshold: 1 - failureThreshold: 3 + failureThreshold: 6 + # Jupyter + papermill share the pod cgroup; keep headroom for datascience tests on ppc64le CI. resources: limits: cpu: 500m - memory: 2Gi + memory: 4Gi requests: cpu: 500m - memory: 2Gi + memory: 4Gi diff --git a/jupyter/minimal/ubi9-python-3.12/kustomize/base/statefulset.yaml b/jupyter/minimal/ubi9-python-3.12/kustomize/base/statefulset.yaml index 1fcbc02a5e..01a5bee9f9 100644 --- a/jupyter/minimal/ubi9-python-3.12/kustomize/base/statefulset.yaml +++ b/jupyter/minimal/ubi9-python-3.12/kustomize/base/statefulset.yaml @@ -33,22 +33,23 @@ spec: - name: notebook-port protocol: TCP containerPort: 8888 + # Generous delays for slow or constrained nodes (e.g. ppc64le in CI) livenessProbe: tcpSocket: port: notebook-port - initialDelaySeconds: 5 - periodSeconds: 5 + initialDelaySeconds: 30 + periodSeconds: 10 successThreshold: 1 - failureThreshold: 3 + failureThreshold: 6 readinessProbe: httpGet: path: /notebook/opendatahub/jovyan/api port: notebook-port scheme: HTTP - initialDelaySeconds: 10 - periodSeconds: 5 + initialDelaySeconds: 45 + periodSeconds: 10 successThreshold: 1 - failureThreshold: 3 + failureThreshold: 6 resources: limits: cpu: 500m diff --git a/tests/containers/kubernetes_utils.py b/tests/containers/kubernetes_utils.py index 830b0e3b7f..33a0b9a528 100644 --- a/tests/containers/kubernetes_utils.py +++ b/tests/containers/kubernetes_utils.py @@ -267,11 +267,12 @@ def deploy( self.port = p.get_actual_port() LOGGER.debug(f"Listening on port {self.port}") + # Use 120s timeout for slower cold starts (e.g. code-server on arm64). Wait.until( "Connecting to pod succeeds", 1, - 30, - lambda: requests.get(f"http://localhost:{self.port}").status_code == 200, + 120, + lambda: requests.get(f"http://127.0.0.1:{self.port}/api", timeout=10).status_code == 200, ) LOGGER.debug("Done setting up portforward")