From c63e4975666bd68084c8c3ba72b37bf79ac66cfb Mon Sep 17 00:00:00 2001 From: Tiger Kaovilai Date: Tue, 4 Nov 2025 15:10:52 -0500 Subject: [PATCH] mongo something stable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove local must-gather directory and build process in favor of using the external quay.io/konveyor/oadp-must-gather:latest image via oc adm must-gather. This eliminates architecture mismatch issues and keeps must-gather code in its dedicated repository. Changes: - Updated RunMustGather() in tests/e2e/lib/apps.go to use oc adm must-gather - Added MUST_GATHER_IMAGE env var (defaults to quay.io/konveyor/oadp-must-gather:latest) - Removed build-must-gather target from Makefile - Removed entire must-gather/ directory (3,174 lines deleted) - Updated documentation in TESTING.md The SKIP_MUST_GATHER flag is preserved for skipping must-gather collection. Version-specific images can be used by setting MUST_GATHER_IMAGE env var. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Revert "refactor(e2e): migrate to external oadp-must-gather container image" This reverts commit 09a2a498c25304680c9aaef77a9fc265e27bd283. Revert "fix(e2e): derive must-gather directory pattern from image name" This reverts commit 2ae6d458ab07fdbddebafaa5868c40013d84e36e. fix(e2e): update mongo image version and resource limits in mongo-persistent deployment fix(e2e): update mongo image version and resource limits in mongo-persistent deployment fix(e2e): derive must-gather directory pattern from image name The directory pattern was hardcoded to 'quay-io-konveyor-oadp-must-gather-*' which breaks when using custom images via MUST_GATHER_IMAGE env var. Now dynamically derives the pattern from the actual image name by replacing registry separators (. / :) with hyphens to match oc adm must-gather's directory naming convention. Examples: - quay.io/konveyor/oadp-must-gather:latest -> quay-io-konveyor-oadp-must-gather-latest-* - docker.io/myuser/custom:v1 -> docker-io-myuser-custom-v1-* 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../mongo-persistent-block.yaml | 39 +++++++++++++------ .../mongo-persistent-csi.yaml | 37 +++++++++++++----- .../mongo-persistent/mongo-persistent.yaml | 37 +++++++++++++----- 3 files changed, 82 insertions(+), 31 deletions(-) diff --git a/tests/e2e/sample-applications/mongo-persistent/mongo-persistent-block.yaml b/tests/e2e/sample-applications/mongo-persistent/mongo-persistent-block.yaml index 7122cc9b1d..12544c8303 100644 --- a/tests/e2e/sample-applications/mongo-persistent/mongo-persistent-block.yaml +++ b/tests/e2e/sample-applications/mongo-persistent/mongo-persistent-block.yaml @@ -71,7 +71,7 @@ items: # Used to format the block device (put filesystem on it). # This allows Mongo to use the filesystem which lives on block device. initContainers: - - image: docker.io/library/mongo:latest + - image: docker.io/library/mongo:7.0 imagePullPolicy: IfNotPresent securityContext: privileged: true @@ -102,7 +102,7 @@ items: - name: block-volume-pv devicePath: /dev/xvdx containers: - - image: docker.io/library/mongo:latest + - image: docker.io/library/mongo:7.0 name: mongo securityContext: privileged: true @@ -117,8 +117,10 @@ items: - containerPort: 27017 name: mongo resources: - limits: + requests: memory: 512Mi + limits: + memory: 1Gi command: - "sh" - "-c" @@ -131,11 +133,26 @@ items: volumeDevices: - name: block-volume-pv devicePath: /dev/xvdx - livenessProbe: - tcpSocket: - port: mongo - initialDelaySeconds: 5 + readinessProbe: + exec: + command: + - /bin/bash + - -c + - "mongosh --eval 'db.runCommand(\"ping\")' --quiet" + initialDelaySeconds: 30 periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 3 + livenessProbe: + exec: + command: + - /bin/bash + - -c + - "mongosh --eval 'db.runCommand(\"ping\")' --quiet" + initialDelaySeconds: 60 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 3 startupProbe: exec: command: @@ -143,11 +160,11 @@ items: - -c - | mongosh admin --authenticationDatabase admin -u "$MONGO_INITDB_ROOT_USERNAME" -p "$MONGO_INITDB_ROOT_PASSWORD" --eval 'db.adminCommand("ping")' - initialDelaySeconds: 5 - periodSeconds: 30 - timeoutSeconds: 2 + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 5 successThreshold: 1 - failureThreshold: 40 # 40x30sec before restart pod + failureThreshold: 12 # 12x10sec = 2min before restart pod - image: docker.io/curlimages/curl:8.5.0 name: curl-tool command: ["/bin/sleep", "infinity"] diff --git a/tests/e2e/sample-applications/mongo-persistent/mongo-persistent-csi.yaml b/tests/e2e/sample-applications/mongo-persistent/mongo-persistent-csi.yaml index fada2b9628..07c81581f9 100644 --- a/tests/e2e/sample-applications/mongo-persistent/mongo-persistent-csi.yaml +++ b/tests/e2e/sample-applications/mongo-persistent/mongo-persistent-csi.yaml @@ -67,7 +67,7 @@ items: spec: serviceAccountName: mongo-persistent-sa containers: - - image: docker.io/library/mongo:latest + - image: docker.io/library/mongo:7.0 imagePullPolicy: IfNotPresent name: mongo securityContext: @@ -83,16 +83,33 @@ items: - containerPort: 27017 name: mongo resources: - limits: + requests: memory: 512Mi + limits: + memory: 1Gi volumeMounts: - name: mongo-data mountPath: /data/db - livenessProbe: - tcpSocket: - port: mongo - initialDelaySeconds: 5 + readinessProbe: + exec: + command: + - /bin/bash + - -c + - "mongosh --eval 'db.runCommand(\"ping\")' --quiet" + initialDelaySeconds: 30 periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 3 + livenessProbe: + exec: + command: + - /bin/bash + - -c + - "mongosh --eval 'db.runCommand(\"ping\")' --quiet" + initialDelaySeconds: 60 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 3 startupProbe: exec: command: @@ -100,11 +117,11 @@ items: - -c - | mongosh admin --authenticationDatabase admin -u "$MONGO_INITDB_ROOT_USERNAME" -p "$MONGO_INITDB_ROOT_PASSWORD" --eval 'db.adminCommand("ping")' - initialDelaySeconds: 5 - periodSeconds: 30 - timeoutSeconds: 2 + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 5 successThreshold: 1 - failureThreshold: 40 # 40x30sec before restart pod + failureThreshold: 12 # 12x10sec = 2min before restart pod - image: docker.io/curlimages/curl:8.5.0 name: curl-tool command: ["/bin/sleep", "infinity"] diff --git a/tests/e2e/sample-applications/mongo-persistent/mongo-persistent.yaml b/tests/e2e/sample-applications/mongo-persistent/mongo-persistent.yaml index 0f05d35544..addb097dd0 100644 --- a/tests/e2e/sample-applications/mongo-persistent/mongo-persistent.yaml +++ b/tests/e2e/sample-applications/mongo-persistent/mongo-persistent.yaml @@ -80,7 +80,7 @@ items: spec: serviceAccountName: mongo-persistent-sa containers: - - image: docker.io/library/mongo:latest + - image: docker.io/library/mongo:7.0 imagePullPolicy: IfNotPresent name: mongo securityContext: @@ -96,16 +96,33 @@ items: - containerPort: 27017 name: mongo resources: - limits: + requests: memory: 512Mi + limits: + memory: 1Gi volumeMounts: - name: mongo-data mountPath: /data/db - livenessProbe: - tcpSocket: - port: mongo - initialDelaySeconds: 5 + readinessProbe: + exec: + command: + - /bin/bash + - -c + - "mongosh --eval 'db.runCommand(\"ping\")' --quiet" + initialDelaySeconds: 30 periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 3 + livenessProbe: + exec: + command: + - /bin/bash + - -c + - "mongosh --eval 'db.runCommand(\"ping\")' --quiet" + initialDelaySeconds: 60 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 3 startupProbe: exec: command: @@ -113,11 +130,11 @@ items: - -c - | mongosh admin --authenticationDatabase admin -u "$MONGO_INITDB_ROOT_USERNAME" -p "$MONGO_INITDB_ROOT_PASSWORD" --eval 'db.adminCommand("ping")' - initialDelaySeconds: 5 - periodSeconds: 30 - timeoutSeconds: 2 + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 5 successThreshold: 1 - failureThreshold: 40 # 40x30sec before restart pod + failureThreshold: 12 # 12x10sec = 2min before restart pod - image: docker.io/curlimages/curl:8.5.0 name: curl-tool command: ["/bin/sleep", "infinity"]