neo4j-helm icon indicating copy to clipboard operation
neo4j-helm copied to clipboard

Consider setting the terminationMessagePath on pods to the neo4j debug.log

Open eastlondoner opened this issue 4 years ago • 1 comments

This should ensure that the last part of the debug log is captured even if it is not set to be persisted on a PVC.

https://kubernetes.io/docs/tasks/debug-application-cluster/determine-reason-pod-failure/

eastlondoner avatar Oct 13 '20 08:10 eastlondoner

This is a great idea, but not sure it's doable in the general case. Consider that the log directory where debug.log resides is configurable; if said configuration can be externally specified in a configmap, which itself can change, this will create situations where it's a priori unknowable where debug.log will reside on the disk (in non-bog-standard situations)

terminationMessagePath must be specified at "YAML application time". For this to work, it'd need to be kept in sync with whatever the log configuration would be.

It would seem simple to do this for the standard situation, but with the proviso that if users configured their logging settings, it probably wouldn't work, or at least there would be various scenarios where it would fail. Having it set in 90% of cases though might be arguably better than never, just that it wouldn't be rely-onnable.

moxious avatar Oct 15 '20 15:10 moxious