diff --git a/tests/roles/bootstrap-host/defaults/main.yml b/tests/roles/bootstrap-host/defaults/main.yml index 56580a54bd..9c6c962889 100644 --- a/tests/roles/bootstrap-host/defaults/main.yml +++ b/tests/roles/bootstrap-host/defaults/main.yml @@ -118,6 +118,25 @@ netmask: "255.255.252.0" # # NICs bootstrap_host_public_interface: "{{ ansible_default_ipv4.interface }}" +# +# Utility paths +bootstrap_host_network_utils: + apt: + iptables: /sbin/iptables + ethtool: /sbin/ethtool + ip: /sbin/ip + yum: + iptables: /usr/sbin/iptables + ethtool: /usr/sbin/ethtool + ip: /usr/sbin/ip + zypper: + iptables: /usr/sbin/iptables + ethtool: /sbin/ethtool + ip: /sbin/ip +# +bootstrap_host_iptables_path: "{{ bootstrap_host_network_utils[ansible_pkg_mgr]['iptables'] }}" +bootstrap_host_ethtool_path: "{{ bootstrap_host_network_utils[ansible_pkg_mgr]['ethtool'] }}" +bootstrap_host_ip_path: "{{ bootstrap_host_network_utils[ansible_pkg_mgr]['ip'] }}" ## Extra storage # An AIO may optionally be built using a second storage device. If a diff --git a/tests/roles/bootstrap-host/tasks/prepare_networking.yml b/tests/roles/bootstrap-host/tasks/prepare_networking.yml index 9f8b8fbe85..cebe775cd1 100644 --- a/tests/roles/bootstrap-host/tasks/prepare_networking.yml +++ b/tests/roles/bootstrap-host/tasks/prepare_networking.yml @@ -213,26 +213,26 @@ RemainAfterExit: yes service_type: oneshot execstarts: - - "-/sbin/iptables -t nat -A POSTROUTING -o {{ bootstrap_host_public_interface }} -j MASQUERADE" - - "-/sbin/ethtool -K bond0 gso off sg off tso off tx off" - - "-/sbin/ethtool -K bond1 gso off sg off tso off tx off" - - "-/sbin/ethtool -K br-mgmt gso off sg off tso off tx off" - - "-/sbin/ethtool -K br-vxlan gso off sg off tso off tx off" - - "-/sbin/ethtool -K br-storage gso off sg off tso off tx off" - - "-/sbin/ethtool -K br-vlan gso off sg off tso off tx off" - - "-/sbin/ethtool -K br-dbaas gso off sg off tso off tx off" - - "-/sbin/ethtool -K br-lbaas gso off sg off tso off tx off" - - "-/bin/ip link set eth12 up" - - "-/bin/ip link set br-vlan-veth up" - - "-/sbin/ethtool -K eth12 gso off sg off tso off tx off" - - "-/bin/ip link set eth13 up" - - "-/bin/ip link set br-dbaas-veth up" - - "-/sbin/ethtool -K eth13 gso off sg off tso off tx off" - - "-/bin/ip link set eth14 up" - - "-/bin/ip link set br-lbaas-veth up" - - "-/sbin/ethtool -K eth14 gso off sg off tso off tx off" + - "-{{ bootstrap_host_iptables_path }} -t nat -A POSTROUTING -o {{ bootstrap_host_public_interface }} -j MASQUERADE" + - "-{{ bootstrap_host_ethtool_path }} -K bond0 gso off sg off tso off tx off" + - "-{{ bootstrap_host_ethtool_path }} -K bond1 gso off sg off tso off tx off" + - "-{{ bootstrap_host_ethtool_path }} -K br-mgmt gso off sg off tso off tx off" + - "-{{ bootstrap_host_ethtool_path }} -K br-vxlan gso off sg off tso off tx off" + - "-{{ bootstrap_host_ethtool_path }} -K br-storage gso off sg off tso off tx off" + - "-{{ bootstrap_host_ethtool_path }} -K br-vlan gso off sg off tso off tx off" + - "-{{ bootstrap_host_ethtool_path }} -K br-dbaas gso off sg off tso off tx off" + - "-{{ bootstrap_host_ethtool_path }} -K br-lbaas gso off sg off tso off tx off" + - "-{{ bootstrap_host_ip_path }} link set eth12 up" + - "-{{ bootstrap_host_ip_path }} link set br-vlan-veth up" + - "-{{ bootstrap_host_ethtool_path }} -K eth12 gso off sg off tso off tx off" + - "-{{ bootstrap_host_ip_path }} link set eth13 up" + - "-{{ bootstrap_host_ip_path }} link set br-dbaas-veth up" + - "-{{ bootstrap_host_ethtool_path }} -K eth13 gso off sg off tso off tx off" + - "-{{ bootstrap_host_ip_path }} link set eth14 up" + - "-{{ bootstrap_host_ip_path }} link set br-lbaas-veth up" + - "-{{ bootstrap_host_ethtool_path }} -K eth14 gso off sg off tso off tx off" execstops: - - "/sbin/iptables -t nat -D POSTROUTING -o {{ bootstrap_host_public_interface }} -j MASQUERADE" + - "{{ bootstrap_host_iptables_path }} -t nat -D POSTROUTING -o {{ bootstrap_host_public_interface }} -j MASQUERADE" enabled: yes state: started systemd_tempd_prefix: openstack