Bug 1728081 - Unable to utilize /etc/sysconfig/origin-node from SDN pod
Summary: Unable to utilize /etc/sysconfig/origin-node from SDN pod
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 3.11.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.11.z
Assignee: Aniket Bhat
QA Contact: huirwang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-09 00:11 UTC by Robert Bost
Modified: 2020-01-19 09:09 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-12-16 11:57:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:4050 0 None None None 2019-12-16 11:57:26 UTC

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


Note You need to log in before you can comment on or make changes to this bug.