How to capture a coredump in OCP of a process which is running inside a container ?
Issue
- Any c++ (or otherwise "native") application needs to have core dump available for proper troubleshooting of crashes. In OCP the default 'core_pattern' points at 'systemd-coredump'. This effectively disables the feature.
- We have outlined few unsatisfying solutions:
1. Have an 'init-container' which changes the 'core_pattern'. This requires privileged security context
and respective SCC.
2. Change the 'core_pattern' cluster wide by using 'MachineConfig' - this is often not acceptable in multi
tenant environment whenever the cluster is managed by another party.
- Does OCP have a standard way to allow for proper core file collection? 'Systemd-coredump' is not viable as 'systemd' usually is not part of the containers for good reasons.
- The impact is high because it either cripples our troubleshooting capabilities or causes friction with our clients who usually own the clusters.
Environment
- OpenShift Container Platform 4.17
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.