summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOpenShift Bot <eparis+openshiftbot@redhat.com>2017-05-23 09:45:28 -0500
committerGitHub <noreply@github.com>2017-05-23 09:45:28 -0500
commit26c48ee4b031aa924b38216d4de4ce918e86052c (patch)
treee9c2c6bc7ede40b98a6f29ad9d7282815dce9bd1
parent4449ee8daefabb87b6c486511f7024b0a1522ca8 (diff)
parente266fb169d48f191ebec8d79b625f5db195a1ad0 (diff)
downloadopenshift-26c48ee4b031aa924b38216d4de4ce918e86052c.tar.gz
openshift-26c48ee4b031aa924b38216d4de4ce918e86052c.tar.bz2
openshift-26c48ee4b031aa924b38216d4de4ce918e86052c.tar.xz
openshift-26c48ee4b031aa924b38216d4de4ce918e86052c.zip
Merge pull request #4248 from abutcher/sysctl-workaround
Merged by openshift-bot
-rw-r--r--roles/openshift_node/handlers/main.yml3
-rw-r--r--roles/openshift_node/tasks/main.yml8
2 files changed, 10 insertions, 1 deletions
diff --git a/roles/openshift_node/handlers/main.yml b/roles/openshift_node/handlers/main.yml
index cb51416d4..4dcf1eef8 100644
--- a/roles/openshift_node/handlers/main.yml
+++ b/roles/openshift_node/handlers/main.yml
@@ -12,3 +12,6 @@
- name: restart node
systemd: name={{ openshift.common.service_type }}-node state=restarted
when: (not skip_node_svc_handlers | default(False) | bool) and not (node_service_status_changed | default(false) | bool)
+
+- name: reload sysctl.conf
+ command: /sbin/sysctl -p
diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml
index 656874f56..54ba5ba01 100644
--- a/roles/openshift_node/tasks/main.yml
+++ b/roles/openshift_node/tasks/main.yml
@@ -104,8 +104,14 @@
# The atomic-openshift-node service will set this parameter on
# startup, but if the network service is restarted this setting is
# lost. Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1372388
+#
+# Use lineinfile w/ a handler for this task until
+# https://github.com/ansible/ansible/pull/24277 is included in an
+# ansible release and we can use the sysctl module.
- name: Persist net.ipv4.ip_forward sysctl entry
- sysctl: name="net.ipv4.ip_forward" value=1 sysctl_set=yes state=present reload=yes
+ lineinfile: dest=/etc/sysctl.conf regexp='^net.ipv4.ip_forward' line='net.ipv4.ip_forward=1'
+ notify:
+ - reload sysctl.conf
- name: Start and enable openvswitch service
systemd: