Skip to content

Commit c8d9631

Browse files
Barkha Choithanibarkhachoithani
authored andcommitted
fix for the race condition caused by getting pid at the start of hook
1 parent 6e96f80 commit c8d9631

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
@@ -156,11 +156,10 @@ spec:
156156
- |
157157
MARKLOGIC_ADMIN_USERNAME="$(< /run/secrets/ml-secrets/username)"
158158
MARKLOGIC_ADMIN_PASSWORD="$(< /run/secrets/ml-secrets/password)"
159-
160-
pid=$(pgrep start.marklogic)
161159
162160
log () {
163161
local TIMESTAMP=$(date +"%Y-%m-%d %T.%3N")
162+
pid=$(pgrep start.marklogic)
164163
# Check to make sure pod doesn't terminate if PID value is empty for any reason
165164
# If PID value is empty postStart hook logs are not recorded
166165
if [ -n "$pid" ]; then

0 commit comments

Comments
 (0)