Bug 1477909

Summary: 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?
Product: OpenShift Container Platform Reporter: Miheer Salunke <misalunk>
Component: NetworkingAssignee: Ravi Sankar <rpenta>
Status: CLOSED NOTABUG QA Contact: Meng Bo <bmeng>
Severity: medium Docs Contact:
Priority: high    
Version: 3.4.1CC: aos-bugs, bbennett, erich, jokerman, mmccomas, pcameron, rpenta
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1485742 (view as bug list) Environment:
Last Closed: 2017-08-31 17:16:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1485742    

Comment 1 Ravi Sankar 2017-08-07 19:49:59 UTC
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).

Comment 2 Phil Cameron 2017-08-07 20:31:47 UTC
"oc adm diagnostics NetworkCheck" does not seem to be documented. Maybe it could be added to admin_guide/diagnostics_tool.adoc?

Comment 3 Ben Bennett 2017-08-31 17:16:03 UTC
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.