Bug 1728081

Summary: Unable to utilize /etc/sysconfig/origin-node from SDN pod
Product: OpenShift Container Platform Reporter: Robert Bost <rbost>
Component: NetworkingAssignee: Aniket Bhat <anbhat>
Networking sub component: openshift-sdn QA Contact: huirwang
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: anbhat, aos-bugs, zzhao
Version: 3.11.0   
Target Milestone: ---   
Target Release: 3.11.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-16 11:57:10 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:

Description Robert Bost 2019-07-09 00:11:31 UTC
Description of problem:

The SDN pods hostPath mount /etc/sysconfig/origin-node. But, this file isn't present by default. Kubernetes is nice and creates the file for us since it is mentioned in hostPath but it creates it as a directory during Pod setup. 

Problem is that the origin-node file is bash sourced as part of the SDN startup (after Pod setup) and you can't source a directory. 

Currently, workaround is to rm -rf /etc/sysconfig/origin-node and recreate it as a file on the node directly. Then, pop in the variables you need to set (e.g. DEBUG_LOGLEVEL), and restart the Pod. 

Version-Release number of selected component (if applicable): v3.11.104

How reproducible: Always

Actual results: Unable to set DEBUG_LOGLEVEL without manual intervention at node level.

Expected results: I would expect a simple method of setting DEBUG_LOGLEVEL.

Additional info:
I'm not sure how this would be fixed by simply editing the DaemonSet but here are some alternatives:
 - Properly hostPath mount in /etc/sysconfig/atomic-openshift-node since the SDN bash script reads that on startup. 
 - Drop the bad configs completely and document users to just use environment variable (oc set env ds/sdn DEBUG_LOGLEVEL=4)

Comment 1 Casey Callendrello 2019-07-12 12:54:40 UTC
We actually made the same mistake in 4.1 and fixed it by just mounting /etc/sysconfig.

To Phil - can you duplicate 4.1 in 3.11?

Comment 2 Aniket Bhat 2019-10-07 20:37:36 UTC
Fix was merged via: https://github.com/openshift/openshift-ansible/pull/11913

Comment 6 errata-xmlrpc 2019-12-16 11:57:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:4050