Skip to content

Commit

Permalink
Add errorhandling for ulimit (#943)
Browse files Browse the repository at this point in the history
  • Loading branch information
glemsom authored Feb 20, 2024
1 parent 9091d78 commit 5b12027
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion postgres-appliance/runit/patroni/run
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ then
fi

# Enable core dumps
ulimit -c unlimited
if ! ulimit -c unlimited
then
echo "Failed to set unlimited size for coredump"
fi

# Only small subset of environment variables is allowed. We don't want accidentally disclose sensitive information
for E in $(printenv -0 | tr '\n' ' ' | sed 's/\x00/\n/g' | grep -vE '^(KUBERNETES_(SERVICE|PORT|ROLE)[_=]|((POD_(IP|NAMESPACE))|HOSTNAME|PATH|PGHOME|LC_ALL|ENABLE_PG_MON)=)' | sed 's/=.*//g'); do
Expand Down

0 comments on commit 5b12027

Please sign in to comment.