summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2017-09-20 02:54:10 -0700
committerGitHub <noreply@github.com>2017-09-20 02:54:10 -0700
commitaf580f808d78667bde54b88d4c33fca493828945 (patch)
tree824369ed3aa2491fbb1ff46e92e32f29150e0885 /roles
parent993436532384cb76ae4039dca224ad132fe43d45 (diff)
parentf827350f1d3dea4e910dff1a9698e5cc75fecb93 (diff)
downloadopenshift-af580f808d78667bde54b88d4c33fca493828945.tar.gz
openshift-af580f808d78667bde54b88d4c33fca493828945.tar.bz2
openshift-af580f808d78667bde54b88d4c33fca493828945.tar.xz
openshift-af580f808d78667bde54b88d4c33fca493828945.zip
Merge pull request #3753 from soltysh/issue12558
Automatic merge from submit-queue Increase rate limiting in journald.conf @sdodson ptal, this is to address issues from https://github.com/openshift/origin/issues/12558 @smarterclayton @stevekuznetsov fyi
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_master/tasks/main.yml22
-rw-r--r--roles/openshift_master/vars/main.yml19
2 files changed, 41 insertions, 0 deletions
diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml
index 1fe0e94b1..6203bfc7b 100644
--- a/roles/openshift_master/tasks/main.yml
+++ b/roles/openshift_master/tasks/main.yml
@@ -182,6 +182,28 @@
- name: Install the systemd units
include: systemd_units.yml
+- name: Checking for journald.conf
+ stat: path=/etc/systemd/journald.conf
+ register: journald_conf_file
+
+- name: Update journald setup
+ replace:
+ dest: /etc/systemd/journald.conf
+ regexp: '^(\#| )?{{ item.var }}=\s*.*?$'
+ replace: ' {{ item.var }}={{ item.val }}'
+ backup: yes
+ with_items: "{{ journald_vars_to_replace | default([]) }}"
+ when: journald_conf_file.stat.exists
+ register: journald_update
+
+# I need to restart journald immediatelly, otherwise it gets into way during
+# further steps in ansible
+- name: Restart journald
+ systemd:
+ name: systemd-journald
+ state: restarted
+ when: journald_update | changed
+
- name: Install Master system container
include: system_container.yml
when:
diff --git a/roles/openshift_master/vars/main.yml b/roles/openshift_master/vars/main.yml
index cf39b73f6..0c681c764 100644
--- a/roles/openshift_master/vars/main.yml
+++ b/roles/openshift_master/vars/main.yml
@@ -20,3 +20,22 @@ openshift_master_valid_grant_methods:
- deny
openshift_master_is_scaleup_host: False
+
+# These defaults assume forcing journald persistence, fsync to disk once
+# a second, rate-limiting to 10,000 logs a second, no forwarding to
+# syslog or wall, using 8GB of disk space maximum, using 10MB journal
+# files, keeping only a days worth of logs per journal file, and
+# retaining journal files no longer than a month.
+journald_vars_to_replace:
+- { var: Storage, val: persistent }
+- { var: Compress, val: yes }
+- { var: SyncIntervalSec, val: 1s }
+- { var: RateLimitInterval, val: 1s }
+- { var: RateLimitBurst, val: 10000 }
+- { var: SystemMaxUse, val: 8G }
+- { var: SystemKeepFree, val: 20% }
+- { var: SystemMaxFileSize, val: 10M }
+- { var: MaxRetentionSec, val: 1month }
+- { var: MaxFileSec, val: 1day }
+- { var: ForwardToSyslog, val: no }
+- { var: ForwardToWall, val: no }