commit 6be51fa67a0b16e8cd1cc2e240329bae54ebbaa8 Author: Radosław Piliszek Date: Mon Sep 21 11:47:05 2020 +0200 Add support for changing sysctl.conf path via kolla_sysctl_conf_path Change-Id: I09b20fa008a7fecedcb599b4792f24215179b853 diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index 23230f9..d2a6cde 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -516,6 +516,9 @@ openstack_service_rpc_workers: "{{ [ansible_processor_vcpus, 3]|min }}" # Optionally allow Kolla to set sysctl values set_sysctl: "yes" +# Optionally change the path to sysctl.conf modified by Kolla Ansible plays. +kolla_sysctl_conf_path: /etc/sysctl.conf + # Endpoint type used to connect with OpenStack services with ansible modules. # Valid options are [ public, internal, admin ] openstack_interface: "admin" diff --git a/ansible/roles/elasticsearch/tasks/config-host.yml b/ansible/roles/elasticsearch/tasks/config-host.yml index 638721a..c5ab5a6 100644 --- a/ansible/roles/elasticsearch/tasks/config-host.yml +++ b/ansible/roles/elasticsearch/tasks/config-host.yml @@ -5,6 +5,7 @@ name: "{{ item.name }}" value: "{{ item.value }}" sysctl_set: yes + sysctl_file: "{{ kolla_sysctl_conf_path }}" with_items: - { name: "vm.max_map_count", value: 262144} when: diff --git a/ansible/roles/haproxy/tasks/config-host.yml b/ansible/roles/haproxy/tasks/config-host.yml index eb5bb49..68bc515 100644 --- a/ansible/roles/haproxy/tasks/config-host.yml +++ b/ansible/roles/haproxy/tasks/config-host.yml @@ -4,6 +4,7 @@ name: "{{ item.name }}" value: "{{ item.value }}" sysctl_set: yes + sysctl_file: "{{ kolla_sysctl_conf_path }}" become: true with_items: - { name: "net.ipv4.ip_nonlocal_bind", value: 1} diff --git a/ansible/roles/neutron/tasks/config-host.yml b/ansible/roles/neutron/tasks/config-host.yml index a212236..fde07af 100644 --- a/ansible/roles/neutron/tasks/config-host.yml +++ b/ansible/roles/neutron/tasks/config-host.yml @@ -21,6 +21,7 @@ name: "{{ item.name }}" value: "{{ item.value }}" sysctl_set: yes + sysctl_file: "{{ kolla_sysctl_conf_path }}" with_items: - { name: "net.ipv4.ip_forward", value: 1} - { name: "net.ipv4.conf.all.rp_filter", value: "{{ neutron_l3_agent_host_rp_filter_mode }}"} diff --git a/ansible/roles/nova-cell/tasks/config-host.yml b/ansible/roles/nova-cell/tasks/config-host.yml index 43ccab9..c2a1168 100644 --- a/ansible/roles/nova-cell/tasks/config-host.yml +++ b/ansible/roles/nova-cell/tasks/config-host.yml @@ -14,6 +14,7 @@ name: "{{ item.name }}" value: "{{ item.value }}" sysctl_set: yes + sysctl_file: "{{ kolla_sysctl_conf_path }}" with_items: - { name: "net.bridge.bridge-nf-call-iptables", value: 1} - { name: "net.bridge.bridge-nf-call-ip6tables", value: 1} diff --git a/etc/kolla/globals.yml b/etc/kolla/globals.yml index 34c2ae6..ede902e 100644 --- a/etc/kolla/globals.yml +++ b/etc/kolla/globals.yml @@ -52,6 +52,9 @@ # kolla_external_vip_address. #kolla_external_fqdn: "{{ kolla_external_vip_address }}" +# Optionally change the path to sysctl.conf modified by Kolla Ansible plays. +#kolla_sysctl_conf_path: /etc/sysctl.conf + ################ # Docker options ################ diff --git a/releasenotes/notes/custom-sysctl-conf-path-ce58e897fc067410.yaml b/releasenotes/notes/custom-sysctl-conf-path-ce58e897fc067410.yaml new file mode 100644 index 0000000..142238c --- /dev/null +++ b/releasenotes/notes/custom-sysctl-conf-path-ce58e897fc067410.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + Adds ``kolla_sysctl_conf_path`` variable that allows to customise the path + to ``sysctl.conf`` that will be modified by Kolla Ansible plays. + The default is ``/etc/sysctl.conf`` as it was before.