Getting core dump in ECS using Bottlerocket OS #4140
Replies: 3 comments 7 replies
-
Also need core dumps for EKS and ECS. I'm using a similar pattern to @josh-kim-resolver where the OS packages the dump into a tarball and my core dump handler container ships that to S3 via watching |
Beta Was this translation helpful? Give feedback.
-
Hey @josh-kim-resolver and @cloudwitch, You should be able to update this value as apart of the Bottlerocket Settings, specifically here: You can either run the command directly:
Which would then require a reboot. Or you could set this value in the
|
Beta Was this translation helpful? Give feedback.
-
Currently working on this and hitting an issue... I can't take a dump. I'm using a bootstrap container to create a directory. I was going for I use Is there a trick to creating a dump? Edit: Edit2: Needs the full path. #!/bin/sh
set -e
echo "Creating /core_dumps on Host"
mkdir -p /.bottlerocket/rootfs/var/lib/core_dumps || {
echo "Failed to create directory"
exit 1
}
chmod 777 /.bottlerocket/rootfs/var/lib/core_dumps || {
echo "Failed to set permissions"
exit 1
}
echo "Successfully created and configured /core_dumps directory" Here is the userdata TOML I'm using in case anyone is struggling. Edit2: Updated the pattern to be correct. [settings.bootstrap-containers.core-dump-init]
source = "someaccountnumber.dkr.ecr.some-region-3.amazonaws.com/my/fancy/path/bottlerocket-core-dump-init:sometag"
mode = "always"
[settings.kernel.sysctl]
"kernel.core_pattern" = "/.bottlerocket/rootfs/var/lib/core_dumps/core-%e-%t-%p-%s" |
Beta Was this translation helpful? Give feedback.
-
I'm trying to configure Bottlerocket OS to generate core dumps when containers crash in ECS. My goal is to create a bind mount between the host and the container so that the core dumps are preserved after a crash. To do this, I need the core dumps to be saved in a specific directory where the bind mount is created. However, I'm facing an issue configuring
/proc/sys/kernel/core_pattern
on the host, which is used to specify the core dump location, because it's read-only and I can't find a way to work around this limitation.I read about bootstrap containers in the documentation and am wondering if they could be used to modify the
core_pattern
file. Any help or guidance on how to get core dumps in ECS using Bottlerocket OS would be greatly appreciated. Thanks!Beta Was this translation helpful? Give feedback.
All reactions