Skip to content

Commit 806a2d6

Browse files
Barkha Choithanipengzhouml
Barkha Choithani
authored andcommitted
fix for the race condition caused by getting pid at the start of hook
1 parent 29cd949 commit 806a2d6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

charts/templates/statefulset.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,10 @@ spec:
154154
- |
155155
MARKLOGIC_ADMIN_USERNAME="$(< /run/secrets/ml-secrets/username)"
156156
MARKLOGIC_ADMIN_PASSWORD="$(< /run/secrets/ml-secrets/password)"
157-
158-
pid=$(pgrep start.marklogic)
159157
160158
log () {
161159
local TIMESTAMP=$(date +"%Y-%m-%d %T.%3N")
160+
pid=$(pgrep start.marklogic)
162161
# Check to make sure pod doesn't terminate if PID value is empty for any reason
163162
# If PID value is empty postStart hook logs are not recorded
164163
if [ -n "$pid" ]; then

0 commit comments

Comments
 (0)