From b68e3a3cff329a20c6e20f4f766694c9ce47eda1 Mon Sep 17 00:00:00 2001 From: Marc Gariepy Date: Thu, 12 Jan 2017 10:53:13 -0500 Subject: [PATCH] Add checksum script for CentOS AIO. Add checksum script for CentOS and load it like other ifup-post script are loaded. Change-Id: Id6dcab2d80232f40222ae324ec8bbdc73c5eaf4d --- tasks/neutron_post_install.yml | 16 +++++++++++++--- vars/redhat-7.yml | 1 + vars/ubuntu-16.04.yml | 1 + 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/tasks/neutron_post_install.yml b/tasks/neutron_post_install.yml index 76936bd5..881974c0 100644 --- a/tasks/neutron_post_install.yml +++ b/tasks/neutron_post_install.yml @@ -122,7 +122,7 @@ - name: Drop metadata iptables checksum fix copy: src: "post-up-metadata-checksum" - dest: "/etc/network/if-up.d/post-up-metadata-checksum" + dest: "{{ neutron_checksum_script }}" owner: "root" group: "root" mode: "0755" @@ -130,8 +130,18 @@ - neutron_metadata_checksum_fix | bool - neutron_services['neutron-linuxbridge-agent']['group'] in group_names -- name: Run metadata iptables checksum fix - command: /etc/network/if-up.d/post-up-metadata-checksum +- 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 == 'yum' + +- name: Run metadata iptables checksum fix + command: "{{ neutron_checksum_script }}" when: - neutron_metadata_checksum_fix | bool - neutron_services['neutron-linuxbridge-agent']['group'] in group_names diff --git a/vars/redhat-7.yml b/vars/redhat-7.yml index 76a32809..bf32b351 100644 --- a/vars/redhat-7.yml +++ b/vars/redhat-7.yml @@ -14,6 +14,7 @@ # limitations under the License. rdo_package: "https://rdoproject.org/repos/rdo-release.rpm" +neutron_checksum_script: /etc/sysconfig/network-scripts/ifup-post-metadata-checksum neutron_ovs_distro_packages: - openvswitch diff --git a/vars/ubuntu-16.04.yml b/vars/ubuntu-16.04.yml index 753b963c..d6c2f399 100644 --- a/vars/ubuntu-16.04.yml +++ b/vars/ubuntu-16.04.yml @@ -17,6 +17,7 @@ uca_openstack_release: newton uca_repo_dist: "{{ ansible_lsb.codename }}-updates/{{ uca_openstack_release }}" uca_repo: "deb {{ uca_apt_repo_url }} {{ uca_repo_dist }} main" +neutron_checksum_script: /etc/network/if-up.d/post-up-metadata-checksum neutron_ovs_distro_packages: - openvswitch-common