Skip to content

Commit

Permalink
fix(entrypoint): dump cores on persistent location (#283)
Browse files Browse the repository at this point in the history
On enabling coredumps, coredumps gets collected onto hostpath "/var/openebs/sparse" which is persistent storage.

Without any directory set in core pattern, core dumps gets collected to the CWD of the shell from which child process got started.

Signed-off-by: Vitta vitta@mayadata.io
  • Loading branch information
vishnuitta authored and pawanpraka1 committed Jan 3, 2020
1 parent ab97397 commit 865063a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docker/entrypoint-poolimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,15 @@ fi

# Disabling coredumps by default in the shell where zrepl runs
if [ -z "$ENABLE_COREDUMP" ]; then
echo "Disabling dumping core"
ulimit -c 0
else
echo "Enabling coredumps"
ulimit -c unlimited
cd /var/openebs/sparse || exit
fi
# Being ulimit shell specific, ulimit -c in container shows as unlimited
# ulimit being shell specific, ulimit -c in container shows as unlimited


echo "sleeping for 2 sec"
sleep 2
Expand Down

0 comments on commit 865063a

Please sign in to comment.