diff --git a/tasks/neutron_post_install.yml b/tasks/neutron_post_install.yml index 34bbea1f..1c06015f 100644 --- a/tasks/neutron_post_install.yml +++ b/tasks/neutron_post_install.yml @@ -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 diff --git a/tests/ansible-role-requirements.yml b/tests/ansible-role-requirements.yml index c3580227..ed94f710 100644 --- a/tests/ansible-role-requirements.yml +++ b/tests/ansible-role-requirements.yml @@ -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 diff --git a/vars/redhat-7.yml b/vars/redhat-7.yml index 05977e62..3910faba 100644 --- a/vars/redhat-7.yml +++ b/vars/redhat-7.yml @@ -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: diff --git a/vars/suse-42.yml b/vars/suse-42.yml index c237caac..2c1661db 100644 --- a/vars/suse-42.yml +++ b/vars/suse-42.yml @@ -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: diff --git a/vars/ubuntu-16.04.yml b/vars/ubuntu-16.04.yml index a9fe9dc1..be807a7b 100644 --- a/vars/ubuntu-16.04.yml +++ b/vars/ubuntu-16.04.yml @@ -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: