Bug 1608688 - fluentd fails to start on node when node-config.yaml contains "kubeletArguments: null"
Summary: fluentd fails to start on node when node-config.yaml contains "kubeletArgumen...
Keywords:
Status: CLOSED DUPLICATE of bug 1616448
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Logging
Version: 3.9.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 3.9.z
Assignee: Jeff Cantrill
QA Contact: Anping Li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-26 07:22 UTC by Nicolas Nosenzo
Modified: 2021-09-09 15:11 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-08-17 18:59:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Nicolas Nosenzo 2018-07-26 07:22:35 UTC
Description of problem:
When kubeletArguments is set to "null" within the node-config.yaml file (which is the case for cluster upgraded from previous versions to 3.9), fluentd pod cannot start throwing the following message:

"""
-e:2:in `<main>': undefined method `[]' for nil:NilClass (NoMethodError)
"""

Version-Release number of selected component (if applicable):
OCP 3.9
image logging-fluentd-v3.9*

How reproducible:
100%

Steps to Reproduce:
1. Set "kubeletArguments: null" in node-config.yaml
2. Try to start fluentd pod

Actual results:
Pod fails to start

Expected results:
Pod should start without issues

Additional info:

The error comes from the run.sh script, from this portion of the code (not present in previous fluentd images):

------ run.sh extract -----
#NOTE: USE_CRIO variable used in generate_throttle_configs.rb as well
export USE_CRIO=false
node_config=/etc/origin/node/node-config.yaml
if [[ -f "$node_config" ]]; then
    cre=$(ruby -e "require 'yaml'; y=YAML.load_file('${node_config}')
        puts y['kubeletArguments']['container-runtime-endpoint']")
    if [[ "$cre" =~ crio ]]; then
        USE_CRIO=true
    fi
else
    echo "WARNING: Unable to check for cri-o"
fi
------ run.sh extract -----

Comment 1 Rich Megginson 2018-08-17 18:59:43 UTC

*** This bug has been marked as a duplicate of bug 1616448 ***


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