Fix post up checksum script

The post up checksum script was being executed by the legacy networking
To ensure we retain the same capabilities the checksum fix script has
been moved into a systemd oneshot service.

Change-Id: I58d393eb8c78a541142a29c5e0678cbd6ec18b65
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2018-03-27 09:59:03 -05:00 committed by Jesse Pretorius (odyssey4me)
parent fcd755320b
commit 39b3e9a934
5 changed files with 47 additions and 23 deletions

View File

@ -120,10 +120,20 @@
notify:
- Restart neutron services
# NOTE: Remove this in S
# This option has been removed with the implementation of networkd within the
# 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
file:
path: "{{ neutron_checksum_script }}"
state: absent
- name: Drop metadata iptables checksum fix
copy:
src: "post-up-metadata-checksum"
dest: "{{ neutron_checksum_script }}"
dest: "/usr/local/bin/post-up-metadata-checksum"
owner: "root"
group: "root"
mode: "0755"
@ -131,27 +141,26 @@
- neutron_metadata_checksum_fix | bool
- neutron_services['neutron-linuxbridge-agent']['group'] in group_names
- name: Ensure the postup/postdown scripts are loaded (RedHat)
lineinfile:
dest: "/etc/sysconfig/network-scripts/ifup-post"
line: ". {{ neutron_checksum_script }}"
insertbefore: "^exit 0"
when:
- neutron_metadata_checksum_fix | bool
- neutron_services['neutron-linuxbridge-agent']['group'] in group_names
- ansible_pkg_mgr in ['yum', 'dnf']
- name: Ensure the postup/postdown scripts are loaded (SUSE)
lineinfile:
dest: "/etc/sysconfig/network/config"
line: "POST_UP_SCRIPT='wicked:{{ neutron_checksum_script }}'"
when:
- neutron_metadata_checksum_fix | bool
- neutron_services['neutron-linuxbridge-agent']['group'] in group_names
- ansible_pkg_mgr == 'zypper'
- name: Run metadata iptables checksum fix
command: "{{ neutron_checksum_script }}"
- 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

View File

@ -63,6 +63,6 @@
src: https://github.com/opendaylight/integration-packaging-ansible-opendaylight
version: master
- name: systemd_service
src: https://github.com/cloudnull/ansible-systemd_service
src: https://github.com/openstack/ansible-role-systemd_service
scm: git
version: master

View File

@ -13,6 +13,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# NOTE: Remove this in S
# This option has been removed with the implementation of networkd within the
# 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.
neutron_checksum_script: /etc/sysconfig/network-scripts/ifup-post-metadata-checksum
neutron_ovs_distro_packages:

View File

@ -14,6 +14,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# NOTE: Remove this in S
# This option has been removed with the implementation of networkd within the
# 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.
neutron_checksum_script: /etc/sysconfig/network/scripts/ifup-post-metadata-checksum
neutron_ovs_distro_packages:

View File

@ -13,6 +13,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# NOTE: Remove this in S
# This option has been removed with the implementation of networkd within the
# 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.
neutron_checksum_script: /etc/network/if-up.d/post-up-metadata-checksum
neutron_ovs_distro_packages: