Skip to content

Commit 7247927

Browse files
pengzhoumlPeng Zhou
andauthored
MLE-20695 Fix Bug caused by ubi9 missing grep dependency (#304)
* MLE-20695: Fix missing dependency grep for UBI9 * update Jenkinsfile to support UBI9 image type --------- Co-authored-by: Peng Zhou <[email protected]>
1 parent 9dd078a commit 7247927

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ pipeline {
179179
}
180180

181181
parameters {
182-
choice(name: 'dockerImageType', choices: 'ubi-rootless\nubi', description: 'Platform type for Docker image')
182+
choice(name: 'dockerImageType', choices: 'ubi-rootless\nubi\nubi9-rootless\nubi9', description: 'Platform type for Docker image')
183183
string(name: 'dockerVersion', defaultValue: 'latest-11', description: 'Docker tag to use for tests. (e.g. 11.2.nightly-ubi-rootless-1.1.2) Has to correspond with dockerImageType.', trim: true)
184184
string(name: 'prevDockerVersion', defaultValue: 'latest-10', description: 'Previous Docker version for MarkLogic upgrade tests. (e.g. 10.0-10.2-centos-1.1.2) Has to correspond with dockerImageType.', trim: true)
185185
choice(name: 'K8_VERSION', choices: 'v1.31.7\nv1.32.3\nv1.30.11\nv1.29.15\nv1.28.15\nv1.27.16\nv1.26.15\nv1.25.16', description: 'Test Kubernetes version.')

charts/templates/configmap-scripts.yaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ metadata:
1010
data:
1111
liveness-probe.sh: |
1212
#!/bin/bash
13-
pid=$(pgrep start.marklogic)
13+
pid=$(ps aux | grep "/bin/bash /usr/local/bin/start-marklogic.sh" | grep -v grep | awk '{print $2}')
1414
log () {
1515
local TIMESTAMP=$(date +"%Y-%m-%d %T.%3N")
1616
# Check to make sure pod doesn't terminate if PID value is empty for any reason
@@ -20,8 +20,12 @@ data:
2020
}
2121
2222
# Check if ML service is running. Exit with 1 if it is other than running
23-
ml_status=$(/etc/init.d/MarkLogic status)
24-
23+
if [ -e /etc/init.d/MarkLogic ]; then
24+
ml_status=$(/etc/init.d/MarkLogic status)
25+
else
26+
ml_status=$(/etc/MarkLogic/MarkLogic-service.sh status)
27+
fi
28+
2529
if [[ "$ml_status" =~ "running" ]]; then
2630
http_code=$(curl -o /tmp/probe_response.txt -s -w "%{http_code}" "http://${HOSTNAME}:8001/admin/v1/timestamp")
2731
curl_code=$?
@@ -114,7 +118,7 @@ data:
114118
MARKLOGIC_ADMIN_USERNAME="$(< /run/secrets/ml-secrets/username)"
115119
MARKLOGIC_ADMIN_PASSWORD="$(< /run/secrets/ml-secrets/password)"
116120
117-
pid=$(pgrep start.marklogic)
121+
pid=$(ps aux | grep "/bin/bash /usr/local/bin/start-marklogic.sh" | grep -v grep | awk '{print $2}')
118122
119123
log () {
120124
local TIMESTAMP=$(date +"%Y-%m-%d %T.%3N")
@@ -191,7 +195,7 @@ data:
191195
echo "IS_BOOTSTRAP_HOST false"
192196
fi
193197
194-
pid=$(pgrep start.marklogic)
198+
pid=$(ps aux | grep "/bin/bash /usr/local/bin/start-marklogic.sh" | grep -v grep | awk '{print $2}')
195199
196200
###############################################################
197201
# Logging utility
@@ -891,7 +895,7 @@ data:
891895
fi
892896
}
893897
894-
pid=$(pgrep start.marklogic)
898+
pid=$(ps aux | grep "/bin/bash /usr/local/bin/start-marklogic.sh" | grep -v grep | awk '{print $2}')
895899
896900
log "Info: [root-rootless-upgrade] Execution Start"
897901

0 commit comments

Comments
 (0)