kolla-ansible/ansible/roles/neutron/tasks/config-host.yml
Radosław Piliszek 6a7e6a25bc Remove deprecated sysctl knobs
Kolla Ansible stopped setting them as they turned out to be
unnecessary for its operations, yet may have conflicted with
security policies of the hosts. [1] [2]

[1] https://launchpad.net/bugs/1837551
[2] https://launchpad.net/bugs/1945453

Change-Id: Ie8ccd3ab6f22a6f548b1da8d3acd334068dc48f5
2022-09-26 11:54:08 +00:00

38 lines
1.6 KiB
YAML

---
- name: Load and persist ip6_tables module
include_role:
name: module-load
vars:
modules:
- {'name': ip6_tables}
when: >-
neutron_services |
select_services_enabled_and_mapped_to_host |
list |
intersect(["neutron-l3-agent", "neutron-linuxbridge-agent", "neutron-openvswitch-agent"]) |
list |
length > 0
- name: Setting sysctl values
become: true
vars:
neutron_l3_agent: "{{ neutron_services['neutron-l3-agent'] }}"
should_set: "{{ item.value != 'KOLLA_UNSET' }}"
sysctl:
name: "{{ item.name }}"
state: "{{ should_set | ternary('present', 'absent') }}"
value: "{{ should_set | ternary(item.value, omit) }}"
sysctl_set: "{{ should_set }}"
sysctl_file: "{{ kolla_sysctl_conf_path }}"
with_items:
- { name: "net.ipv4.neigh.default.gc_thresh1", value: "{{ neutron_l3_agent_host_ipv4_neigh_gc_thresh1 }}"}
- { name: "net.ipv4.neigh.default.gc_thresh2", value: "{{ neutron_l3_agent_host_ipv4_neigh_gc_thresh2 }}"}
- { name: "net.ipv4.neigh.default.gc_thresh3", value: "{{ neutron_l3_agent_host_ipv4_neigh_gc_thresh3 }}"}
- { name: "net.ipv6.neigh.default.gc_thresh1", value: "{{ neutron_l3_agent_host_ipv6_neigh_gc_thresh1 }}"}
- { name: "net.ipv6.neigh.default.gc_thresh2", value: "{{ neutron_l3_agent_host_ipv6_neigh_gc_thresh2 }}"}
- { name: "net.ipv6.neigh.default.gc_thresh3", value: "{{ neutron_l3_agent_host_ipv6_neigh_gc_thresh3 }}"}
when:
- set_sysctl | bool
- item.value != 'KOLLA_SKIP'
- (neutron_l3_agent.enabled | bool and neutron_l3_agent.host_in_groups | bool)