Use operating system specific IP utilities
Operating systems seem to have decided to put network utilities in different places, therefore our network bootstrap code was not working on CentOS because it was not located in the same place as Ubuntu. This fixes it which should bring up the interfaces as needed. Change-Id: I6bf403b4c7d13e6a084ba29fad37b89893321369
This commit is contained in:
parent
2d96bff9ae
commit
829b7940bb
@ -118,6 +118,25 @@ netmask: "255.255.252.0"
|
|||||||
#
|
#
|
||||||
# NICs
|
# NICs
|
||||||
bootstrap_host_public_interface: "{{ ansible_default_ipv4.interface }}"
|
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
|
## Extra storage
|
||||||
# An AIO may optionally be built using a second storage device. If a
|
# An AIO may optionally be built using a second storage device. If a
|
||||||
|
@ -213,26 +213,26 @@
|
|||||||
RemainAfterExit: yes
|
RemainAfterExit: yes
|
||||||
service_type: oneshot
|
service_type: oneshot
|
||||||
execstarts:
|
execstarts:
|
||||||
- "-/sbin/iptables -t nat -A POSTROUTING -o {{ bootstrap_host_public_interface }} -j MASQUERADE"
|
- "-{{ bootstrap_host_iptables_path }} -t nat -A POSTROUTING -o {{ bootstrap_host_public_interface }} -j MASQUERADE"
|
||||||
- "-/sbin/ethtool -K bond0 gso off sg off tso off tx off"
|
- "-{{ bootstrap_host_ethtool_path }} -K bond0 gso off sg off tso off tx off"
|
||||||
- "-/sbin/ethtool -K bond1 gso off sg off tso off tx off"
|
- "-{{ bootstrap_host_ethtool_path }} -K bond1 gso off sg off tso off tx off"
|
||||||
- "-/sbin/ethtool -K br-mgmt gso off sg off tso off tx off"
|
- "-{{ bootstrap_host_ethtool_path }} -K br-mgmt gso off sg off tso off tx off"
|
||||||
- "-/sbin/ethtool -K br-vxlan gso off sg off tso off tx off"
|
- "-{{ bootstrap_host_ethtool_path }} -K br-vxlan gso off sg off tso off tx off"
|
||||||
- "-/sbin/ethtool -K br-storage gso off sg off tso off tx off"
|
- "-{{ bootstrap_host_ethtool_path }} -K br-storage gso off sg off tso off tx off"
|
||||||
- "-/sbin/ethtool -K br-vlan gso off sg off tso off tx off"
|
- "-{{ bootstrap_host_ethtool_path }} -K br-vlan gso off sg off tso off tx off"
|
||||||
- "-/sbin/ethtool -K br-dbaas gso off sg off tso off tx off"
|
- "-{{ bootstrap_host_ethtool_path }} -K br-dbaas gso off sg off tso off tx off"
|
||||||
- "-/sbin/ethtool -K br-lbaas gso off sg off tso off tx off"
|
- "-{{ bootstrap_host_ethtool_path }} -K br-lbaas gso off sg off tso off tx off"
|
||||||
- "-/bin/ip link set eth12 up"
|
- "-{{ bootstrap_host_ip_path }} link set eth12 up"
|
||||||
- "-/bin/ip link set br-vlan-veth up"
|
- "-{{ bootstrap_host_ip_path }} link set br-vlan-veth up"
|
||||||
- "-/sbin/ethtool -K eth12 gso off sg off tso off tx off"
|
- "-{{ bootstrap_host_ethtool_path }} -K eth12 gso off sg off tso off tx off"
|
||||||
- "-/bin/ip link set eth13 up"
|
- "-{{ bootstrap_host_ip_path }} link set eth13 up"
|
||||||
- "-/bin/ip link set br-dbaas-veth up"
|
- "-{{ bootstrap_host_ip_path }} link set br-dbaas-veth up"
|
||||||
- "-/sbin/ethtool -K eth13 gso off sg off tso off tx off"
|
- "-{{ bootstrap_host_ethtool_path }} -K eth13 gso off sg off tso off tx off"
|
||||||
- "-/bin/ip link set eth14 up"
|
- "-{{ bootstrap_host_ip_path }} link set eth14 up"
|
||||||
- "-/bin/ip link set br-lbaas-veth up"
|
- "-{{ bootstrap_host_ip_path }} link set br-lbaas-veth up"
|
||||||
- "-/sbin/ethtool -K eth14 gso off sg off tso off tx off"
|
- "-{{ bootstrap_host_ethtool_path }} -K eth14 gso off sg off tso off tx off"
|
||||||
execstops:
|
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
|
enabled: yes
|
||||||
state: started
|
state: started
|
||||||
systemd_tempd_prefix: openstack
|
systemd_tempd_prefix: openstack
|
||||||
|
Loading…
Reference in New Issue
Block a user