You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/cluster-logging-systemd-scaling.adoc
+47-59Lines changed: 47 additions & 59 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,45 +17,62 @@ and other settings.
17
17
18
18
.Procedure
19
19
20
-
. Create a `journald.conf` file with the required settings:
20
+
. Create a Butane config file, `40-worker-custom-journald.bu`, that includes an `/etc/systemd/journald.conf` file with the required settings.
21
21
+
22
-
[source,terminal]
22
+
[NOTE]
23
+
====
24
+
See "Creating machine configs with Butane" for information about Butane.
25
+
====
26
+
+
27
+
[source,yaml]
23
28
----
24
-
Compress=yes <1>
25
-
ForwardToConsole=no <2>
26
-
ForwardToSyslog=no
27
-
MaxRetentionSec=1month <3>
28
-
RateLimitBurst=10000 <4>
29
-
RateLimitIntervalSec=30s
30
-
Storage=persistent <5>
31
-
SyncIntervalSec=1s <6>
32
-
SystemMaxUse=8g <7>
33
-
SystemKeepFree=20% <8>
34
-
SystemMaxFileSize=10M <9>
29
+
variant: openshift
30
+
version: 4.8.0
31
+
metadata:
32
+
name: 40-worker-custom-journald
33
+
labels:
34
+
machineconfiguration.openshift.io/role: worker
35
+
storage:
36
+
files:
37
+
- path: /etc/systemd/journald.conf
38
+
mode: 0644 <1>
39
+
overwrite: true
40
+
contents:
41
+
inline: |
42
+
Compress=yes <2>
43
+
ForwardToConsole=no <3>
44
+
ForwardToSyslog=no
45
+
MaxRetentionSec=1month <4>
46
+
RateLimitBurst=10000 <5>
47
+
RateLimitIntervalSec=30s
48
+
Storage=persistent <6>
49
+
SyncIntervalSec=1s <7>
50
+
SystemMaxUse=8g <8>
51
+
SystemKeepFree=20% <9>
52
+
SystemMaxFileSize=10M <10>
35
53
----
36
54
+
37
-
<1> Specify whether you want logs compressed before they are written to the file system.
55
+
<1> Set the permissions for the `journal.conf` file. It is recommended to set `0644` permissions.
56
+
<2> Specify whether you want logs compressed before they are written to the file system.
38
57
Specify `yes` to compress the message or `no` to not compress. The default is `yes`.
39
-
<2> Configure whether to forward log messages. Defaults to `no` for each. Specify:
58
+
<3> Configure whether to forward log messages. Defaults to `no` for each. Specify:
40
59
* `ForwardToConsole` to forward logs to the system console.
41
60
* `ForwardToKsmg` to forward logs to the kernel log buffer.
42
61
* `ForwardToSyslog` to forward to a syslog daemon.
43
62
* `ForwardToWall` to forward messages as wall messages to all logged-in users.
44
-
<3> Specify the maximum time to store journal entries. Enter a number to specify seconds. Or
63
+
<4> Specify the maximum time to store journal entries. Enter a number to specify seconds. Or
45
64
include a unit: "year", "month", "week", "day", "h" or "m". Enter `0` to disable. The default is `1month`.
46
-
<4> Configure rate limiting. If, during the time interval defined by `RateLimitIntervalSec`, more logs than specified in `RateLimitBurst`
47
-
are received, all further messages within the interval are dropped until the interval is over. It is recommended to set
48
-
`RateLimitIntervalSec=30s` and `RateLimitBurst=10000`, which are the defaults.
49
-
<5> Specify how logs are stored. The default is `persistent`:
65
+
<5> Configure rate limiting. If more logs are received than what is specified in `RateLimitBurst` during the time interval defined by `RateLimitIntervalSec`, all further messages within the interval are dropped until the interval is over. It is recommended to set `RateLimitIntervalSec=30s` and `RateLimitBurst=10000`, which are the defaults.
66
+
<6> Specify how logs are stored. The default is `persistent`:
50
67
* `volatile` to store logs in memory in `/var/log/journal/`.
51
-
* `persistent` to store logs to disk in `/var/log/journal/`. systemd creates the directory if it does not exist.
52
-
* `auto` to store logs in in `/var/log/journal/` if the directory exists. If it does not exist, systemd temporarily stores logs in `/run/systemd/journal`.
68
+
* `persistent` to store logs to disk in `/var/log/journal/`. systemd creates the directory if it does not exist.
69
+
* `auto` to store logs in `/var/log/journal/` if the directory exists. If it does not exist, systemd temporarily stores logs in `/run/systemd/journal`.
53
70
* `none` to not store logs. systemd drops all logs.
54
-
<6> Specify the timeout before synchronizing journal files to disk for *ERR*, *WARNING*, *NOTICE*, *INFO*, and *DEBUG* logs.
71
+
<7> Specify the timeout before synchronizing journal files to disk for *ERR*, *WARNING*, *NOTICE*, *INFO*, and *DEBUG* logs.
55
72
systemd immediately syncs after receiving a *CRIT*, *ALERT*, or *EMERG* log. The default is `1s`.
56
-
<7> Specify the maximum size the journal can use. The default is `8g`.
57
-
<8> Specify how much disk space systemd must leave free. The default is `20%`.
58
-
<9> Specify the maximum size for individual journal files stored persistently in `/var/log/journal`. The default is `10M`.
73
+
<8> Specify the maximum size the journal can use. The default is `8g`.
74
+
<9> Specify how much disk space systemd must leave free. The default is `20%`.
75
+
<10> Specify the maximum size for individual journal files stored persistently in `/var/log/journal`. The default is `10M`.
59
76
+
60
77
[NOTE]
61
78
====
@@ -68,47 +85,18 @@ For more information on systemd settings, see link:https://www.freedesktop.org/s
68
85
+
69
86
// Defaults from https://github.com/openshift/openshift-ansible/pull/3753/files#diff-40b7a7231e77d95ca6009dc9bcc0f470R33-R34
70
87
71
-
. Convert the `journal.conf` fileto base64:
88
+
. Use Butane to generate a `MachineConfig` object file, `40-worker-custom-journald.yaml`, containing the configuration to be delivered to the nodes:
. Create a `MachineConfig` object that includes the `jrnl_cnf` variable, which is the encoded contents of the `journald.conf` you created in the previous step.
Copy file name to clipboardExpand all lines: modules/machineconfig-modify-journald.adoc
+29-49Lines changed: 29 additions & 49 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,73 +11,53 @@ If you need to configure settings for the `journald` service on {product-title}
11
11
This procedure describes how to modify `journald` rate limiting settings in the `/etc/systemd/journald.conf` file and apply them to worker nodes. See the `journald.conf` man page for information on how to use that file.
12
12
13
13
.Prerequisites
14
-
* Have a running {product-title} cluster (version 4.4 or later).
14
+
* Have a running {product-title} cluster.
15
15
* Log in to the cluster as a user with administrative privileges.
16
16
17
17
.Procedure
18
18
19
-
. Create the contents of the `/etc/systemd/journald.conf` file and encode it as base64. For example:
19
+
. Create a Butane config file, `40-worker-custom-journald.bu`, that includes an `/etc/systemd/journald.conf` file with the required settings.
20
20
+
21
-
[source,terminal]
22
-
----
23
-
$ cat > /tmp/jrnl.conf <<EOF
24
-
# Disable rate limiting
25
-
RateLimitInterval=1s
26
-
RateLimitBurst=10000
27
-
Storage=volatile
28
-
Compress=no
29
-
MaxRetentionSec=30s
30
-
EOF
31
-
----
32
-
33
-
. Convert the temporary `journal.conf` file to base64 and save it into a variable (`jrnl_cnf`):
21
+
[NOTE]
22
+
====
23
+
See "Creating machine configs with Butane" for information about Butane.
. Create the machine config, including the encoded contents of `journald.conf` (`jrnl_cnf` variable):
49
+
. Use Butane to generate a `MachineConfig` object file, `40-worker-custom-journald.yaml`, containing the configuration to be delivered to the worker nodes:
. Check that the new machine config is applied and that the nodes are not in a degraded state. It might take a few minutes. The worker pool will show the updates in progress, as each node successfully has the new machine config applied:
0 commit comments