Skip to content

Commit 0f7c261

Browse files
committed
clarified support for journald per BZ
1 parent 028e414 commit 0f7c261

File tree

3 files changed

+75
-17
lines changed

3 files changed

+75
-17
lines changed

install_config/aggregate_logging.adoc

Lines changed: 66 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,23 @@ administrators can view all logs, but application developers can only view logs
4242
for projects they have permission to view. The stack components communicate
4343
securely.
4444

45-
[NOTE]
46-
====
47-
xref:../install_config/install/host_preparation.adoc#managing-docker-container-logs[Managing
48-
Docker Container Logs] discusses the use of `json-file` logging driver options
45+
Aggregated logging is supported using the `json-file` or `journald` driver in Docker.
46+
The Docker log driver is set to `journald` as the default for all nodes. See
47+
xref:fluentd-upgrade-source[Updating Fluentd's Log Source After a Docker Log
48+
Driver Update] for more information about switching between `json-file` and `journald`.
49+
Fluentd automatically determines which log driver (`journald` or `json-file`) the container runtime is using.
50+
51+
When the log driver is set to `journald`, Fluentd reads journald logs. When set to `json-file` Fluentd reads from *_/var/log/containers_*.
52+
53+
See xref:../install_config/install/host_preparation.adoc#managing-docker-container-logs[Managing
54+
Docker Container Logs] for information on `json-file` logging driver options
4955
to manage container logs and prevent filling node disks.
5056

51-
Aggregated logging is only supported using the `journald` driver in Docker. See
52-
xref:fluentd-upgrade-source[Updating Fluentd's Log Source After a Docker Log
53-
Driver Update] for more information.
57+
58+
[IMPORTANT]
59+
====
60+
If Docker log-driver is set to journald, there is no log rate throttling with the `journald` driver.
61+
As a result, there is a risk of denial-of-service attacks from rogue containers.
5462
====
5563

5664
[[aggregate-logging-pre-deployment-configuration]]
@@ -1654,6 +1662,57 @@ $ curl --key /etc/elasticsearch/secret/admin-key \
16541662
----
16551663
====
16561664

1665+
[[fluentd-update-source]]
1666+
== Changing the Aggregated Logging Driver
1667+
1668+
By default, aggregated logging uses the `journald` log driver
1669+
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.
1670+
1671+
[IMPORTANT]
1672+
====
1673+
When using the `json-file` driver, ensure that your Docker version is Docker version *docker-1.12.6-55.gitc4618fb.el7_4 now*
1674+
or later.
1675+
====
1676+
1677+
Fluentd determines the driver Docker is using by checking the *_/etc/docker/daemon.json_* and *_/etc/sysconfig/docker_* files.
1678+
1679+
You can determine which driver Docker is using with the `docker info` command:
1680+
1681+
----
1682+
# docker info | grep Logging
1683+
1684+
Logging Driver: journald
1685+
----
1686+
1687+
To change between `json-file` and `journald` after installation:
1688+
1689+
. Modify either the *_/etc/sysconfig/docker_* or *_/etc/docker/daemon.json_* files.
1690+
+
1691+
For example:
1692+
+
1693+
[source,json]
1694+
----
1695+
# cat /etc/sysconfig/docker
1696+
OPTIONS=' --selinux-enabled --log-driver=json-file --log-opt max-size=1M --log-opt max-file=3 --signature-verification=False'
1697+
1698+
cat /etc/docker/daemon.json
1699+
{
1700+
"log-driver": "json-file",
1701+
"log-opts": {
1702+
"max-size": "1M",
1703+
"max-file": "1"
1704+
}
1705+
}
1706+
----
1707+
1708+
. Restart the Docker service:
1709+
+
1710+
----
1711+
systemctl restart docker
1712+
----
1713+
1714+
. Update the xref:fluentd-upgrade-source[Fluentd log source].
1715+
16571716
[[fluentd-upgrade-source]]
16581717
== Updating Fluentd's Log Source After a Docker Log Driver Update
16591718

install_config/install/advanced_install.adoc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -486,10 +486,16 @@ which may cause invalid configurations. Example usage:
486486
*{'image-gc-high-threshold': ['90'],'image-gc-low-threshold': ['80']}*.
487487

488488
|`openshift_docker_options`
489-
|This variable configures additional `docker` options within
489+
a|This variable configures additional `docker` options within
490490
*_/etc/sysconfig/docker_*, such as options used in
491-
xref:../../install_config/install/host_preparation.adoc#managing-docker-container-logs[Managing Container Logs]. Example usage: *"--log-driver json-file --log-opt max-size=1M
492-
--log-opt max-file=3"*. Do not use when
491+
xref:../../install_config/install/host_preparation.adoc#managing-docker-container-logs[Managing Container Logs].
492+
Use `json-file` or `journald`. The default is `journald`.
493+
Example usage:
494+
----
495+
"--log-driver json-file --log-opt max-size=1M --log-opt max-file=3"
496+
"--log-driver journald"
497+
----
498+
Do not use when
493499
xref:advanced-install-docker-system-container[running `docker` as a system container].
494500

495501
|`openshift_schedulable`

install_config/install/host_preparation.adoc

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -579,13 +579,6 @@ container is running) can increase to a problematic size. You can manage this by
579579
configuring Docker's `json-file` logging driver to restrict the size and number
580580
of log files.
581581

582-
[IMPORTANT]
583-
====
584-
Aggregated logging is only supported using the `journald` driver in Docker. See
585-
xref:../../install_config/aggregate_logging.adoc#fluentd-upgrade-source[Updating
586-
Fluentd's Log Source After a Docker Log Driver Update] for more information.
587-
====
588-
589582
[options="header"]
590583
|===
591584

0 commit comments

Comments
 (0)