diff options
author | Jiri Mencak <jmencak@redhat.com> | 2017-10-03 19:57:01 +0200 |
---|---|---|
committer | Jiri Mencak <jmencak@redhat.com> | 2017-10-10 13:47:35 +0200 |
commit | 17e38ad8c62ac8f1c8f983e63181f69879a45d85 (patch) | |
tree | a3038e8f2fe7d8d0ea7f20b77a7ea7c3841ea14e | |
parent | 2fb41eea9aa4b328d7da1c5e4b7de2e717549ed7 (diff) | |
download | openshift-17e38ad8c62ac8f1c8f983e63181f69879a45d85.tar.gz openshift-17e38ad8c62ac8f1c8f983e63181f69879a45d85.tar.bz2 openshift-17e38ad8c62ac8f1c8f983e63181f69879a45d85.tar.xz openshift-17e38ad8c62ac8f1c8f983e63181f69879a45d85.zip |
Separate tuned daemon setup into a role.
Currently, profiles for the tuned daemon are set only for
OpenShift node(s). This excludes the OpenShift loadbalancer.
As a result, ARP cache limits on loadbalancers are not raised.
This causes problems with HA setups where loadbalancers serve
1k+ OpenShift nodes.
This commit ensures the openshift-control-plane role is applied
to loadbalancers, masters and OpenShift infra nodes. Regular
OpenShift worker nodes get the openshift-node profile.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1498213
-rw-r--r-- | playbooks/common/openshift-loadbalancer/config.yml | 1 | ||||
-rw-r--r-- | playbooks/common/openshift-master/config.yml | 1 | ||||
-rw-r--r-- | playbooks/common/openshift-node/configure_nodes.yml | 1 | ||||
-rw-r--r-- | roles/openshift_node/tasks/config.yml | 4 | ||||
-rw-r--r-- | roles/tuned/defaults/main.yml | 3 | ||||
-rw-r--r-- | roles/tuned/meta/main.yml | 13 | ||||
-rw-r--r-- | roles/tuned/tasks/main.yml (renamed from roles/openshift_node/tasks/tuned.yml) | 2 | ||||
-rw-r--r-- | roles/tuned/templates/openshift-control-plane/tuned.conf (renamed from roles/openshift_node/templates/tuned/openshift-control-plane/tuned.conf) | 0 | ||||
-rw-r--r-- | roles/tuned/templates/openshift-node/tuned.conf (renamed from roles/openshift_node/templates/tuned/openshift-node/tuned.conf) | 0 | ||||
-rw-r--r-- | roles/tuned/templates/openshift/tuned.conf (renamed from roles/openshift_node/templates/tuned/openshift/tuned.conf) | 0 | ||||
-rw-r--r-- | roles/tuned/templates/recommend.conf (renamed from roles/openshift_node/templates/tuned/recommend.conf) | 9 |
11 files changed, 25 insertions, 9 deletions
diff --git a/playbooks/common/openshift-loadbalancer/config.yml b/playbooks/common/openshift-loadbalancer/config.yml index ecbb092bc..9e148e636 100644 --- a/playbooks/common/openshift-loadbalancer/config.yml +++ b/playbooks/common/openshift-loadbalancer/config.yml @@ -27,6 +27,7 @@ roles: - role: os_firewall - role: openshift_loadbalancer + - role: tuned - name: Load Balancer Install Checkpoint End hosts: localhost diff --git a/playbooks/common/openshift-master/config.yml b/playbooks/common/openshift-master/config.yml index bc1fee982..04e2bdbbf 100644 --- a/playbooks/common/openshift-master/config.yml +++ b/playbooks/common/openshift-master/config.yml @@ -198,6 +198,7 @@ openshift_master_default_registry_value: "{{ hostvars[groups.oo_first_master.0].l_default_registry_value }}" openshift_master_default_registry_value_api: "{{ hostvars[groups.oo_first_master.0].l_default_registry_value_api }}" openshift_master_default_registry_value_controllers: "{{ hostvars[groups.oo_first_master.0].l_default_registry_value_controllers }}" + - role: tuned - role: nuage_ca when: openshift_use_nuage | default(false) | bool - role: nuage_common diff --git a/playbooks/common/openshift-node/configure_nodes.yml b/playbooks/common/openshift-node/configure_nodes.yml index c96e4921c..17259422d 100644 --- a/playbooks/common/openshift-node/configure_nodes.yml +++ b/playbooks/common/openshift-node/configure_nodes.yml @@ -13,4 +13,5 @@ roles: - role: os_firewall - role: openshift_node + - role: tuned - role: nickhammond.logrotate diff --git a/roles/openshift_node/tasks/config.yml b/roles/openshift_node/tasks/config.yml index e3898b520..e5fcaf9af 100644 --- a/roles/openshift_node/tasks/config.yml +++ b/roles/openshift_node/tasks/config.yml @@ -111,9 +111,5 @@ msg: Node failed to start please inspect the logs and try again when: node_start_result | failed -- name: Setup tuned - include: tuned.yml - static: yes - - set_fact: node_service_status_changed: "{{ node_start_result | changed }}" diff --git a/roles/tuned/defaults/main.yml b/roles/tuned/defaults/main.yml new file mode 100644 index 000000000..418a4b521 --- /dev/null +++ b/roles/tuned/defaults/main.yml @@ -0,0 +1,3 @@ +--- +tuned_etc_directory: '/etc/tuned' +tuned_templates_source: '../templates' diff --git a/roles/tuned/meta/main.yml b/roles/tuned/meta/main.yml new file mode 100644 index 000000000..833d94c13 --- /dev/null +++ b/roles/tuned/meta/main.yml @@ -0,0 +1,13 @@ +--- +galaxy_info: + author: Jiri Mencak + description: Restart the tuned daemon if present and make it use the recommended profile + company: Red Hat, Inc. + license: Apache License, Version 2.0 + min_ansible_version: 2.3 + platforms: + - name: EL + versions: + - 7 + categories: + - cloud diff --git a/roles/openshift_node/tasks/tuned.yml b/roles/tuned/tasks/main.yml index 425bf6a26..e95d274d5 100644 --- a/roles/openshift_node/tasks/tuned.yml +++ b/roles/tuned/tasks/main.yml @@ -12,8 +12,6 @@ - name: Set tuned OpenShift variables set_fact: openshift_tuned_guest_profile: "{{ 'atomic-guest' if openshift.common.is_atomic else 'virtual-guest' }}" - tuned_etc_directory: '/etc/tuned' - tuned_templates_source: '../templates/tuned' - name: Ensure directory structure exists file: diff --git a/roles/openshift_node/templates/tuned/openshift-control-plane/tuned.conf b/roles/tuned/templates/openshift-control-plane/tuned.conf index f22f21065..f22f21065 100644 --- a/roles/openshift_node/templates/tuned/openshift-control-plane/tuned.conf +++ b/roles/tuned/templates/openshift-control-plane/tuned.conf diff --git a/roles/openshift_node/templates/tuned/openshift-node/tuned.conf b/roles/tuned/templates/openshift-node/tuned.conf index 78c7d19c9..78c7d19c9 100644 --- a/roles/openshift_node/templates/tuned/openshift-node/tuned.conf +++ b/roles/tuned/templates/openshift-node/tuned.conf diff --git a/roles/openshift_node/templates/tuned/openshift/tuned.conf b/roles/tuned/templates/openshift/tuned.conf index 68ac5dadb..68ac5dadb 100644 --- a/roles/openshift_node/templates/tuned/openshift/tuned.conf +++ b/roles/tuned/templates/openshift/tuned.conf diff --git a/roles/openshift_node/templates/tuned/recommend.conf b/roles/tuned/templates/recommend.conf index 5fa765798..086e5673d 100644 --- a/roles/openshift_node/templates/tuned/recommend.conf +++ b/roles/tuned/templates/recommend.conf @@ -1,8 +1,11 @@ -[openshift-node] -/etc/origin/node/node-config.yaml=.*region=primary - [openshift-control-plane,master] /etc/origin/master/master-config.yaml=.* [openshift-control-plane,node] /etc/origin/node/node-config.yaml=.*region=infra + +[openshift-control-plane,lb] +/etc/haproxy/haproxy.cfg=.* + +[openshift-node] +/etc/origin/node/node-config.yaml=.* |