diff options
author | Scott Dodson <sdodson@redhat.com> | 2016-11-02 13:02:16 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-02 13:02:16 -0400 |
commit | 0ddc73e7b6b7e4ea8e339b53d665ed6125b1496b (patch) | |
tree | 691a8de1e2bd75fe0ea4153739e24d15bcb8deff | |
parent | f232cfd42b3824ee64ce32f78c19616164a6b13a (diff) | |
parent | 36ecf1707a18a1411e2057355028e6cb285197a4 (diff) | |
download | openshift-0ddc73e7b6b7e4ea8e339b53d665ed6125b1496b.tar.gz openshift-0ddc73e7b6b7e4ea8e339b53d665ed6125b1496b.tar.bz2 openshift-0ddc73e7b6b7e4ea8e339b53d665ed6125b1496b.tar.xz openshift-0ddc73e7b6b7e4ea8e339b53d665ed6125b1496b.zip |
Merge pull request #2700 from dgoodwin/oom-service
Deploy an OOM systemd override for openvswitch.
-rw-r--r-- | roles/openshift_node/tasks/systemd_units.yml | 19 | ||||
-rw-r--r-- | roles/openshift_node/templates/openvswitch-avoid-oom.conf | 3 |
2 files changed, 20 insertions, 2 deletions
diff --git a/roles/openshift_node/tasks/systemd_units.yml b/roles/openshift_node/tasks/systemd_units.yml index 27c9b48f0..f722a6e69 100644 --- a/roles/openshift_node/tasks/systemd_units.yml +++ b/roles/openshift_node/tasks/systemd_units.yml @@ -24,11 +24,26 @@ notify: - restart openvswitch +# May be a temporary workaround. +# https://bugzilla.redhat.com/show_bug.cgi?id=1331590 +- name: Create OpenvSwitch service.d directory + file: path=/etc/systemd/system/openvswitch.service.d/ state=directory + when: openshift.common.use_openshift_sdn | default(true) | bool + +- name: Install OpenvSwitch service OOM fix + template: + dest: "/etc/systemd/system/openvswitch.service.d/01-avoid-oom.conf" + src: openvswitch-avoid-oom.conf + when: openshift.common.use_openshift_sdn | default(true) | bool + register: install_oom_fix_result + notify: + - restart openvswitch + - name: Install OpenvSwitch docker service file template: dest: "/etc/systemd/system/openvswitch.service" src: openvswitch.docker.service - when: openshift.common.is_containerized | bool and openshift.common.use_openshift_sdn | bool + when: openshift.common.is_containerized | bool and openshift.common.use_openshift_sdn | default(true) | bool notify: - restart openvswitch @@ -67,6 +82,6 @@ - name: Reload systemd units command: systemctl daemon-reload - when: openshift.common.is_containerized | bool and (install_node_result | changed or install_ovs_sysconfig | changed or install_node_dep_result | changed) + when: (openshift.common.is_containerized | bool and (install_node_result | changed or install_ovs_sysconfig | changed or install_node_dep_result | changed)) or install_oom_fix_result | changed notify: - restart node diff --git a/roles/openshift_node/templates/openvswitch-avoid-oom.conf b/roles/openshift_node/templates/openvswitch-avoid-oom.conf new file mode 100644 index 000000000..3229bc56b --- /dev/null +++ b/roles/openshift_node/templates/openvswitch-avoid-oom.conf @@ -0,0 +1,3 @@ +# Avoid the OOM killer for openvswitch and it's children: +[Service] +OOMScoreAdjust=-1000 |