-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Conversation
I added the wording from the release notes to the Aggregating Container Logs topic (removing the existing wording from the NOTE). |
[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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anpingli PTAL ^^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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.
@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" |
There was a problem hiding this comment.
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.
5142110
to
5a8ed7c
Compare
@anpingli Do you know what OpenShift versions this issues applies to? How far back do we support json-file and journald? |
@anpingli Do you know what OpenShift versions this issues applies to? How far back do we support json-file and journald? |
@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. |
38c52a4
to
9dcbc1b
Compare
@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). |
@openshift/team-documentation PTAL. |
@openshift/team-documentation PTAL. |
Note to self: Follow up in 3.9; change default to json-file |
f5c476f
to
0fb3037
Compare
|
||
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. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/greater/later
@mburke5678 Just a few nits from me. Otherwise, looks good! 🌟 |
0fb3037
to
0f7c261
Compare
/cherrypick enterprise-3.6 |
@mburke5678: new pull request created: #7922 In response to this:
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. |
/cherrypick enterprise-3.7 |
@mburke5678: new pull request created: #7923 In response to this:
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. |
/cherrypick enterprise-3.9 |
@mburke5678: new pull request created: #7924 In response to this:
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. |
Fixed release notes that was missed when working on this PR |
https://bugzilla.redhat.com/show_bug.cgi?id=1526262