Skip to content

Clarified support for journald per BZ #7191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 23, 2018

Conversation

mburke5678
Copy link
Contributor

@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 16, 2018
@mburke5678
Copy link
Contributor Author

I added the wording from the release notes to the Aggregating Container Logs topic (removing the existing wording from the NOTE).
I removed the Aggregated logging is only supported using the journald driver in Docker. wording from the Host Preparation page, as the section seems focused on json-file and log size, not journald.
Are there concerns with journald log size that we want to add somewhere?
How does a user changes between json-file and journald?

[IMPORTANT]
====
If Docker log-driver is set to journald, there is no log rate throttling with the `journald` driver.
As a result, there is always a risk for denial-of-service attacks from rogue containers.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest add the bug https://bugzilla.redhat.com/show_bug.cgi?id=1526262 and ask customer to check the docker version when use json-file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anpingli Added:
When using the json-file driver, ensure that your Docker version is Docker version docker-1.12.6-55.gitc4618fb.el7_4 now or greater.

Is this correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anpingli PTAL ^^

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest docker is docker-1.12.7. No such issue. I recall my suggestion.


To change between `json-file` and `journald` after installation:

. Set the `log-driver` parameter to appropriate values in the *_/etc/origin/node/node-config.yaml_* file

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docker Logging driver is json-file by default
To change the Logging driver, you can modify either /etc/sysconfig/docker or /etc/docker/daemon.json.
For example:
cat /etc/sysconfig/docker
OPTIONS=' --selinux-enabled --log-driver=json-file --log-opt max-size=1M --log-opt max-file=3 --signature-verification=False'

cat /etc/docker/daemon.json
{
"log-driver": "json-file",
"log-opts": {
"max-size": "1M",
"max-file": "1"
}
}

restart the Docker service.
+
----
dockerConfig:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if we can change the log-driver in node-config.yml especially in docker daemon level.

Example usage:
----
"--log-driver json-file --log-opt max-size=1M --log-opt max-file=3"
"--log-driver journald --log-opt max-size=1M --log-opt max-file=3"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The log options (--log-opt max-size=1M --log-opt max-file=3) are for json-file only.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anpingli If the user wants to change these settings after install, could he use the /etc/docker/daemon.json?
Are these fields needed in the /etc/ansible/hosts?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, They can change the values in /etc/docker/daemon.json directly.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change "--log-driver journald --log-opt max-size=1M --log-opt max-file=3" to "--log-driver journald ". The other part looks good.

By default, aggregated logging uses the `json-file` driver
xref:../install_config/install/advanced_install.adoc#configuring-host-variables[unless `journald` was specified during installation].

Use the `docker info` command to determine which driver Docker is using:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fluentd determine the driver Docker by checking /etc/docker/daemon.json and /etc/sysconfig/docker.

@mburke5678
Copy link
Contributor Author

@anpingli PTAL

Example usage:
----
"--log-driver json-file --log-opt max-size=1M --log-opt max-file=3"
"--log-driver journald --log-opt max-size=1M --log-opt max-file=3"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, They can change the values in /etc/docker/daemon.json directly.

@mburke5678
Copy link
Contributor Author

@anpingli Do you know what OpenShift versions this issues applies to? How far back do we support json-file and journald?

@mburke5678
Copy link
Contributor Author

@anpingli Do you know what OpenShift versions this issues applies to? How far back do we support json-file and journald?

@anpingli
Copy link

@mburke5678, Openshift support both journald/json file driver always. In v3.4, the default driver is json-file if you deploy openshift using openshift-ansile. In v3.5-v3.7, For Bug526262, The default driver is changed to journald. In v3.9, we had changed backup to json driver.

@mburke5678
Copy link
Contributor Author

@anpingli The 3.7 release notes say that json-file is the default. But, you suggest that journald is the default. (I tested in a 3.5 Ravello system and I get journald).

@mburke5678
Copy link
Contributor Author

mburke5678 commented Feb 22, 2018

@openshift/team-documentation PTAL.
In 3.5 journald made the default:
https://docs.openshift.com/container-platform/3.5/release_notes/ocp_3_5_release_notes.html#ocp-3-5-rhba-2017-0903-bug-fixes
Changing the json-file in 3.9
#8071

@mburke5678 mburke5678 added the peer-review-needed Signifies that the peer review team needs to review this PR label Feb 22, 2018
@mburke5678
Copy link
Contributor Author

@openshift/team-documentation PTAL.

@mburke5678
Copy link
Contributor Author

Note to self: Follow up in 3.9; change default to json-file


By default, aggregated logging uses the `journald` log driver
xref:../install_config/install/advanced_install.adoc#configuring-host-variables[unless `json-file` was specified during installation].
You can change the log driver between `journald` and `json-file` as needed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is "You can change..." supposed to be on a new line?

[IMPORTANT]
====
When using the `json-file` driver, ensure that your Docker version is Docker version *docker-1.12.6-55.gitc4618fb.el7_4 now*
or greater.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/greater/later

@ahardin-rh
Copy link
Contributor

@mburke5678 Just a few nits from me. Otherwise, looks good! 🌟

@mburke5678 mburke5678 merged commit 618155f into openshift:master Feb 23, 2018
@mburke5678
Copy link
Contributor Author

/cherrypick enterprise-3.6

@openshift-cherrypick-robot

@mburke5678: new pull request created: #7922

In response to this:

/cherrypick enterprise-3.6

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@mburke5678
Copy link
Contributor Author

/cherrypick enterprise-3.7

@openshift-cherrypick-robot

@mburke5678: new pull request created: #7923

In response to this:

/cherrypick enterprise-3.7

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@mburke5678
Copy link
Contributor Author

/cherrypick enterprise-3.9

@openshift-cherrypick-robot

@mburke5678: new pull request created: #7924

In response to this:

/cherrypick enterprise-3.9

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@mburke5678
Copy link
Contributor Author

Fixed release notes that was missed when working on this PR

See https://bugzilla.redhat.com/show_bug.cgi?id=1526262#c16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch/enterprise-3.6 branch/enterprise-3.7 branch/enterprise-3.9 peer-review-needed Signifies that the peer review team needs to review this PR size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants