Skip to content
Snippets Groups Projects
Commit 5f0e4e07 authored by Julien Leduc's avatar Julien Leduc
Browse files

moving core dumps to /var/log/tmp/%h-%t-%e-%p-%s.core so that they are...

moving core dumps to /var/log/tmp/%h-%t-%e-%p-%s.core so that they are available as artifacts for all pods AND in the log PV that has supposedly more space.
parent 453b656e
No related branches found
No related tags found
No related merge requests found
......@@ -40,8 +40,7 @@ echo -n "Waiting for /etc/cta/cta-frontend.krb5.keytab."
for ((;;)); do test -e /etc/cta/cta-frontend.krb5.keytab && break; sleep 1; echo -n .; done
echo OK
echo "Generating core file in /var/log/cta directory so that those are available as artifacts"
echo '/var/log/cta/core_%e.%p' > /proc/sys/kernel/core_pattern
echo "Core files are available as $(cat /proc/sys/kernel/core_pattern) so that those are available as artifacts"
if [ "-${CI_CONTEXT}-" == '-nosystemd-' ]; then
# systemd is not available
......
#!/bin/bash
COREFILE=$(ls /var/log/cta/core* | head -n 1)
COREFILE=$(ls /var/log/tmp/ctafrontend-*.core | head -n 1)
test -z ${COREFILE} && (echo "NO COREFILE FOUND, EXITING"; exit 1)
......
......@@ -19,6 +19,11 @@ tar -c . | tar -C ${PV_PATH} -xv
echo "Mounting logs volume ${PV_PATH} in /var/log"
mount --bind ${PV_PATH} /var/log
# all core dumps will go there as all the pods AND kubelet are sharing the same kernel.core_pattern
mkdir /var/log/tmp
chmod 1777 /var/log/tmp
echo '/var/log/tmp/%h-%t-%e-%p-%s.core' > /proc/sys/kernel/core_pattern
echo -n "Fixing reverse DNS for $(hostname): "
sed -i -c "s/^\($(hostname -i)\)\s\+.*$/\1 $(hostname -s).$(grep search /etc/resolv.conf | cut -d\ -f2) $(hostname -s)/" /etc/hosts
echo "DONE"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment