Bug 1789076

Summary: Support IPv6 for fluent-plugin-kubernetes_metadata
Product: OpenShift Container Platform Reporter: Jeff Cantrill <jcantril>
Component: LoggingAssignee: Jeff Cantrill <jcantril>
Status: CLOSED ERRATA QA Contact: Anping Li <anli>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 4.4CC: anli, aos-bugs, cstark
Target Milestone: ---   
Target Release: 4.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 1789077 (view as bug list) Environment:
Last Closed: 2020-05-04 11:23:07 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: 1789077    
Attachments:
Description Flags
Sytemd Metadata example
none
Container metadata example none

Description Jeff Cantrill 2020-01-08 16:59:17 UTC
Description of problem:
Support IPv6 for fluent-plugin-kubernetes_metadata

Comment 1 Jeff Cantrill 2020-01-08 17:00:37 UTC
Moving straight to modified as this resolved in https://github.com/openshift/origin-aggregated-logging/pull/1802  and bug is needed for the process to fix it in 4.3

Comment 3 Anping Li 2020-02-13 12:22:11 UTC
Created attachment 1662949 [details]
Sytemd Metadata example

Comment 4 Anping Li 2020-02-13 12:22:53 UTC
Created attachment 1662950 [details]
Container metadata example

Comment 5 Anping Li 2020-02-13 12:25:38 UTC
The ipaddr4 was given a v6 address.

 "pipeline_metadata": {
     "collector": {
         "inputname": "fluent-plugin-systemd",
         "ipaddr4": "2600:1f16:ed9:6f00:bec6:e576:5879:8cdf",
         "name": "fluentd",
         "received_at": "2020-02-13T11:02:04.112383+00:00",
         "version": "1.7.4 1.6.0"
     }
 }

Comment 6 Jeff Cantrill 2020-02-14 16:41:13 UTC
Can you paste the list of the pod's ENV vars?

Comment 7 Jeff Cantrill 2020-02-14 16:43:53 UTC
from inside the pod...

Comment 9 Anping Li 2020-02-18 14:24:57 UTC
[anli@preserve-docker-slave 81220]$ oc rsh fluentd-fxdvx
sh-4.2# env
FLUENTD_PORT=tcp://[fd02::6a88]:24231
MANPATH=/opt/rh/rh-nodejs10/root/usr/share/man:/opt/rh/rh-ruby25/root/usr/local/share/man:/opt/rh/rh-ruby25/root/usr/share/man:
FLUENTD_PORT_24231_TCP=tcp://[fd02::6a88]:24231
USE_REMOTE_SYSLOG=true
FLUENT_CONF_HASH=a02450d1e2fc540bb1156ec5f17f6748
RSYSLOGSERVER_PORT_514_TCP_PROTO=tcp
HOSTNAME=fluentd-fxdvx
KIBANA_PORT_443_TCP_PROTO=tcp
FLUENTD_SERVICE_HOST=fd02::6a88
FLUENTD_MEMORY_LIMIT=771751936
APP_ROOT=/opt/app-root
ELASTICSEARCH_PORT_9200_TCP_PORT=9200
GEM_HOME=/opt/app-root/src
NODE_IPV4=2600:1f1c:dec:5800:e1c6:9623:b94e:a51f
KIBANA_SERVICE_PORT=443
KUBERNETES_PORT=tcp://[fd02::1]:443
KUBERNETES_PORT_443_TCP_PORT=443
TERM=xterm-256color
ELASTICSEARCH_METRICS_SERVICE_PORT=60000
FLUENTD_SERVICE_PORT=24231
KIBANA_SERVICE_HOST=fd02::9f53
RSYSLOGSERVER_PORT_514_UDP=udp://[fd02::925e]:514
ELASTICSEARCH_SERVICE_PORT=9200
OPENSHIFT_BUILD_NAME=logging-fluentd
KUBERNETES_SERVICE_PORT=443
FLUENTD_CPU_LIMIT=4
RSYSLOGSERVER_PORT_514_UDP_PORT=514
KUBERNETES_SERVICE_HOST=fd02::1
X_SCLS=rh-nodejs10 rh-ruby25 
KIBANA_PORT_443_TCP_ADDR=fd02::9f53
ELASTICSEARCH_PORT_9200_TCP_PROTO=tcp
DESCRIPTION=Ruby 2.5 available as container is a base platform for building and running various Ruby 2.5 applications and frameworks. Ruby is the interpreted scripting language for quick and easy object-oriented programming. It has many features to process text files and to do system management tasks (as in Perl). It is simple, straight-forward, and extensible.
NODEJS_SCL=rh-nodejs10
REMOTE_SYSLOG_TAG_KEY=ident,systemd.u.SYSLOG_IDENTIFIER
ELASTICSEARCH_CLUSTER_SERVICE_PORT_ELASTICSEARCH=9300
LOGGING_FILE_AGE=10
RSYSLOGSERVER_PORT_514_TCP_ADDR=fd02::925e
LD_LIBRARY_PATH=/opt/rh/rh-nodejs10/root/usr/lib64:/opt/rh/rh-ruby25/root/usr/local/lib64:/opt/rh/rh-ruby25/root/usr/lib64
BUFFER_SIZE_LIMIT=8m
BUFFER_QUEUE_LIMIT=32
FLUENTD_SERVICE_PORT_METRICS=24231
ELASTICSEARCH_CLUSTER_PORT_9300_TCP=tcp://[fd02::c9c5]:9300
ELASTICSEARCH_METRICS_SERVICE_PORT_ELASTICSEARCH=60000
FLUENTD_VERSION=1.7.4
RSYSLOGSERVER_PORT_514_UDP_PROTO=udp
CDM_KEEP_EMPTY_FIELDS=message
ELASTICSEARCH_CLUSTER_PORT_9300_TCP_PROTO=tcp
RSYSLOGSERVER_PORT_514_TCP_PORT=514
KIBANA_PORT_443_TCP_PORT=443
REMOTE_SYSLOG_HOST=rsyslogserver.openshift-logging.svc.cluster.local
PATH=/opt/rh/rh-nodejs10/root/usr/bin:/opt/rh/rh-ruby25/root/usr/local/bin:/opt/rh/rh-ruby25/root/usr/bin:/opt/app-root/src/bin:/opt/app-root/bin:/opt/app-root/src/bin:/opt/app-root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
DATA_VERSION=1.6.0
OPENSHIFT_BUILD_NAMESPACE=ci-op-fjr0hkzc
ELASTICSEARCH_METRICS_PORT_60000_TCP_ADDR=fd02::c46c
FLUENTD_PORT_24231_TCP_PROTO=tcp
RUBY_MINOR_VERSION=5
ELASTICSEARCH_METRICS_PORT_60000_TCP=tcp://[fd02::c46c]:60000
LOGGING_FILE_SIZE=1024000
RSYSLOGSERVER_SERVICE_HOST=fd02::925e
STI_SCRIPTS_URL=image:///usr/libexec/s2i
PWD=/opt/app-root/src
PRESERVE_JSON_LOG=true
STI_SCRIPTS_PATH=/usr/libexec/s2i
RUBY_MAJOR_VERSION=2
RSYSLOGSERVER_PORT_514_TCP=tcp://[fd02::925e]:514
RUBY_SCL_NAME_VERSION=25
METRICS_KEY=/etc/fluent/metrics/tls.key
ELASTICSEARCH_METRICS_PORT=tcp://[fd02::c46c]:60000
IMAGE_NAME=centos/ruby-25-centos7
METRICS_CERT=/etc/fluent/metrics/tls.crt
foo=bar
SUMMARY=Platform for building and running Ruby 2.5 applications
PLATFORM=el7
ELASTICSEARCH_METRICS_PORT_60000_TCP_PORT=60000
K8S_HOST_URL=https://kubernetes.default.svc
ELASTICSEARCH_CLUSTER_PORT_9300_TCP_ADDR=fd02::c9c5
RSYSLOGSERVER_SERVICE_PORT_RSYSLOGSERVER_TCP=514
FLUENTD_PORT_24231_TCP_ADDR=fd02::6a88
ELASTICSEARCH_PORT=tcp://[fd02::cb26]:9200
HOME=/opt/app-root/src
SHLVL=2
RSYSLOGSERVER_SERVICE_PORT=514
LOGGING_FILE_PATH=/var/log/fluentd/fluentd.log
KUBERNETES_PORT_443_TCP_PROTO=tcp
RUBY_SCL=rh-ruby25
KIBANA_PORT_443_TCP=tcp://[fd02::9f53]:443
KUBERNETES_SERVICE_PORT_HTTPS=443
ELASTICSEARCH_PORT_9200_TCP=tcp://[fd02::cb26]:9200
KIBANA_PORT=tcp://[fd02::9f53]:443
PYTHONPATH=/opt/rh/rh-nodejs10/root/usr/lib/python2.7/site-packages
FILE_BUFFER_LIMIT=256Mi
ELASTICSEARCH_METRICS_PORT_60000_TCP_PROTO=tcp
ELASTICSEARCH_CLUSTER_SERVICE_PORT=9300
XDG_DATA_DIRS=/opt/rh/rh-ruby25/root/usr/local/share:/opt/rh/rh-ruby25/root/usr/share:/usr/local/share:/usr/share
REMOTE_SYSLOG_TYPE=syslog
FLUENTD_PORT_24231_TCP_PORT=24231
RSYSLOGSERVER_PORT_514_UDP_ADDR=fd02::925e
ELASTICSEARCH_SERVICE_PORT_ELASTICSEARCH=9200
REMOTE_SYSLOG_USE_RECORD=true
NODE_NAME=ip-10-0-131-26.us-west-1.compute.internal
ELASTICSEARCH_SERVICE_HOST=fd02::cb26
PKG_CONFIG_PATH=/opt/rh/rh-ruby25/root/usr/local/lib64/pkgconfig:/opt/rh/rh-ruby25/root/usr/lib64/pkgconfig
REMOTE_SYSLOG_SEVERITY=info
KUBERNETES_PORT_443_TCP_ADDR=fd02::1
RSYSLOGSERVER_PORT=tcp://[fd02::925e]:514
RSYSLOGSERVER_SERVICE_PORT_RSYSLOGSERVER_UDP=514
ELASTICSEARCH_CLUSTER_PORT=tcp://[fd02::c9c5]:9300
KUBERNETES_PORT_443_TCP=tcp://[fd02::1]:443
ELASTICSEARCH_METRICS_SERVICE_HOST=fd02::c46c
ELASTICSEARCH_PORT_9200_TCP_ADDR=fd02::cb26
RUBY_VERSION=2.5
MERGE_JSON_LOG=false
ELASTICSEARCH_CLUSTER_PORT_9300_TCP_PORT=9300
ELASTICSEARCH_CLUSTER_SERVICE_HOST=fd02::c9c5
_=/usr/bin/env

Comment 10 Jeff Cantrill 2020-02-18 14:33:00 UTC
This is not an issue specifically with this plugin nor a blocker to its use on ipv6.  

NODE_IPV4=2600:1f1c:dec:5800:e1c6:9623:b94e:a51f

The plugin takes this value as is given by the runtime.  Please open a new issue against the appropriate team

Comment 11 Anping Li 2020-02-18 14:55:29 UTC
Verified

Comment 13 errata-xmlrpc 2020-05-04 11:23:07 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-2020:0581