Bug 1420204
| Summary: | Fluentd should overwrite the default value of openshift_logging_fluentd_use_journal by detecting whether or not Docker is using the journald log driver | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Xia Zhao <xiazhao> |
| Component: | Logging | Assignee: | Jeff Cantrill <jcantril> |
| Status: | CLOSED ERRATA | QA Contact: | Xia Zhao <xiazhao> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.5.0 | CC: | aos-bugs, rmeggins, tdawson |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | No Doc Update | |
| Doc Text: |
undefined
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-04-12 18:50:05 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
Xia Zhao
2017-02-08 06:20:32 UTC
Hmm - If there is a bug here, it is that USE_JOURNAL always has a value, and the default value is false. The way the logic in fluentd run.sh works is that it will autodetect what docker is using _if USE_JOURNAL is not set at all_. However, the fluentd.yaml template has this:
env:
- name: "USE_JOURNAL"
value: ${USE_JOURNAL}
...
parameters:
-
description: "Use the journal as input for system logs"
name: USE_JOURNAL
value: "false"
And we run the deployer like this:
use_journal=${input_vars[use-journal]:-}
...
create_template_optional_nodeselector "${input_vars[fluentd-nodeselector]}" fluentd \
--param USE_JOURNAL=${use_journal} \
I'm not sure how this works if use_journal is unset in the env or configmap. Will this pass an empty value to the template, which will will cause env. USE_JOURNAL to be an empty value in the fluentd pod? If so, then the answer is this:
If you want fluentd to autodetect if docker is using journal, make sure use_journal/USE_JOURNAL is unset.
Fixed to default to empty spaces so it is consistent with the deployer and forces fluentd to evaluate the log driver: https://github.com/openshift/openshift-ansible/pull/3293 Commits pushed to master at https://github.com/openshift/openshift-ansible https://github.com/openshift/openshift-ansible/commit/ff02c984c4a0dcc809ec65fe5db530a3ceb81a84 fix bug 1420204. Default openshift_logging_use_journal to empty so fluentd detects and is consistent with deployer https://github.com/openshift/openshift-ansible/commit/bef3e1dc951699d769b7776129a5bd73fce2ff7c Merge pull request #3293 from jcantrill/bz_1420204_use_journal_fix fix bug 1420204. Default openshift_logging_use_journal to empty so fl… Verified with openshift-ansible-3.5.15-1.git.0.8d2a456.el7.noarch, deployed logging on both json-file and journald log driver systems without specifying the value to openshift_logging_fluentd_use_journal, the fluentd autodetect log driver function worked fine. In the both cases can see log entries present in kiaban UI. Please feel free to transfer back to ON_QA for closure, also thanks Rich and Jeff for the explanations. Set to verified based on comment #4. 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-2017:0903 |