forked from scylladb/scylladb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dist: add workaround to capture coredump during system reboot or shut…
…down We found that systemd-coredump does not correctly capturing coredump during system reboot or shutdown. As a workaround of this issue, set coredump file path to kernel.core_pattern during system reboot or shutdown. It will save core to /var/lib/scylla/shutdown-coredump/. Fixes scylladb/scylla-machine-image#436
- Loading branch information
Showing
6 changed files
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
# When shutdown is being called, stop using systemd-coredump handler | ||
# since it does not work correctly | ||
st_jobs=$(systemctl list-jobs --no-pager shutdown.target) | ||
if [[ ! $st_jobs =~ (^No jobs .*\.$) ]]; then | ||
sysctl -w kernel.core_pattern=/var/lib/scylla/coredump-shutdown/core.%e.%P.%u.%g.%s.%t.%c.%h | ||
fi | ||
# Shutdown Scylla | ||
pkill scylla |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters