Drop checksum checks

We currently run the agents on bare metal so the workaround for
checksums is no longer necessary.

Change-Id: I683eb4a1690a6194888dbfacdd6acf7deca3c300
This commit is contained in:
Mohammed Naser 2018-08-17 11:43:30 -04:00
parent a26234c9b8
commit 581075ca73
4 changed files with 5 additions and 90 deletions

View File

@ -395,13 +395,6 @@ neutron_dnsmasq_lease_max: 16777216
# neutron_metadata_workers: 16
neutron_metadata_backlog: 4096
# When running in an AIO, we need to implement an iptables rule in any
# neutron_agent containers to that ensure instances can communicate with
# the neutron metadata service. This is necessary because in an AIO
# environment there are no physical interfaces involved in instance ->
# metadata requests, and this results in the checksums being incorrect.
neutron_metadata_checksum_fix: False
# The protocol used by neutron to access the nova metadata service.
nova_metadata_protocol: http

View File

@ -1,43 +0,0 @@
#!/usr/bin/env bash
# Copyright 2016, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# NOTICE:
# When running in an AIO, we need to drop the following iptables rule in any
# neutron_agent containers to that ensure instances can communicate with the
# neutron metadata service. This is necessary because in an AIO environment
# there are no physical interfaces involved in instance -> metadata requests,
# and this results in the checksums being incorrect.
# Iptables path, used for ipv4 firewall.
IPTABLES=$(which iptables)
if [ ! -z "${IPTABLES}" ]; then
if ! ${IPTABLES} -C POSTROUTING -t mangle -p tcp --sport 80 -j CHECKSUM --checksum-fill 2> /dev/null; then
${IPTABLES} -A POSTROUTING -t mangle -p tcp --sport 80 -j CHECKSUM --checksum-fill
fi
if ! ${IPTABLES} -C POSTROUTING -t mangle -p tcp --sport 8000 -j CHECKSUM --checksum-fill 2> /dev/null; then
${IPTABLES} -A POSTROUTING -t mangle -p tcp --sport 8000 -j CHECKSUM --checksum-fill
fi
fi
# Ip6tables path, used for ipv6 firewall.
IP6TABLES=$(which ip6tables)
if [ ! -z "${IP6TABLES}" ]; then
if ! ${IP6TABLES} -C POSTROUTING -t mangle -p udp --sport 80 -j CHECKSUM --checksum-fill 2> /dev/null; then
${IP6TABLES} -A POSTROUTING -t mangle -p udp --sport 80 -j CHECKSUM --checksum-fill
fi
if ! ${IP6TABLES} -C POSTROUTING -t mangle -p udp --sport 8000 -j CHECKSUM --checksum-fill 2> /dev/null; then
${IP6TABLES} -A POSTROUTING -t mangle -p udp --sport 8000 -j CHECKSUM --checksum-fill
fi
fi

View File

@ -164,42 +164,10 @@
# host and container. Additionally the execution of this script is now
# controlled by a systemd oneshot service so the legacy configs are no longer
# needed.
- name: Remove legacy checksum fix script
- name: Remove checksum fix scripts
file:
path: "{{ neutron_checksum_script }}"
path: "{{ item }}"
state: absent
- name: Drop metadata iptables checksum fix
copy:
src: "post-up-metadata-checksum"
dest: "/usr/local/bin/post-up-metadata-checksum"
owner: "root"
group: "root"
mode: "0755"
when:
- neutron_metadata_checksum_fix | bool
- neutron_services['neutron-linuxbridge-agent']['group'] in group_names
- name: Run the systemd service role
include_role:
name: systemd_service
private: true
vars:
systemd_services:
- service_name: "neutron-post-up-metadata-checksum"
config_overrides:
Unit:
Description: networking-post-up
After: network-online.target
Wants: network-online.target
Service:
RemainAfterExit: yes
service_type: oneshot
execstarts:
- "/usr/local/bin/post-up-metadata-checksum"
enabled: yes
state: started
systemd_tempd_prefix: openstack
when:
- neutron_metadata_checksum_fix | bool
- neutron_services['neutron-linuxbridge-agent']['group'] in group_names
with_items:
- "{{ neutron_checksum_script }}"
- "/usr/local/bin/post-up-metadata-checksum"

View File

@ -62,9 +62,6 @@
name: iptables
state: present
- name: Add iptables rule for communication w/ metadata agent
command: /sbin/iptables -t mangle -A POSTROUTING -p tcp --sport 80 -j CHECKSUM --checksum-fill
- name: Deploy neutron
hosts: neutron_all
user: root