Red Hat Bugzilla – Bug 1477909
Prevent /tmp from filling with openshift-sdn-debug logs. Is there a way to change the openshift-sdn-debug log path to /var/log and not /tmp?
Last modified: 2017-08-31 13:16:03 EDT
By default 'oc adm diagnostics NetworkCheck' logs errors under '/tmp/openshift' and this can be configured with '--network-logdir' flag.
Looking at the filename format under /tmp (openshift-sdn-debug-<XXXXXXXXX>), this seems to be generated by unsupported sdn script 'https://github.com/openshift/openshift-sdn/blob/master/hack/debug.sh' and not 'oc adm diagnostics'. If the user still want to use this script, they can change the logdir to desired path in debug.sh (logdir is initialized to /tmp/openshift-sdn-debug-xxx on line 569).
"oc adm diagnostics NetworkCheck" does not seem to be documented. Maybe it could be added to admin_guide/diagnostics_tool.adoc?
As Ravi said, it looks like the large directories are from https://github.com/openshift/openshift-sdn/blob/master/hack/debug.sh
You can change the directory the temp files are written to by setting TMPDIR in the environment.