Merge "Neutron chart: add tunnel types, bridge mappings and default interfaces"
This commit is contained in:
commit
4f1aecb9c4
@ -26,9 +26,14 @@ chown neutron: /run/openvswitch/db.sock
|
||||
# see https://github.com/att-comdev/openstack-helm/issues/88
|
||||
timeout 3m neutron-sanity-check --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/openvswitch_agent.ini --ovsdb_native --nokeepalived_ipv6_support
|
||||
|
||||
tunnel_interface={{ .Values.network.interface.tunnel }}
|
||||
if [ not $tunnel_interface ] ; then
|
||||
# search for interface with default routing
|
||||
tunnel_interface=$(ip r | grep default | grep -oP '(?<=dev ).*')
|
||||
fi
|
||||
|
||||
# determine local-ip dynamically based on interface provided but only if tunnel_types is not null
|
||||
IP=$(ip a s {{ .Values.network.interface.tunnel | default .Values.network.interface.default}} | grep 'inet ' | awk '{print $2}' | awk -F "/" '{print $1}')
|
||||
IP=$(ip a s $tunnel_interface | grep 'inet ' | awk '{print $2}' | awk -F "/" '{print $1}')
|
||||
cat <<EOF>/tmp/ml2-local-ip.ini
|
||||
[ovs]
|
||||
local_ip = $IP
|
||||
|
@ -14,6 +14,10 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if not .Values.ml2 -}}{{- set . "Values.ml2" dict -}}{{- end -}}
|
||||
{{- if not .Values.ml2.ovs -}}{{- set . "Values.ml2.ovs" dict -}}{{- end -}}
|
||||
{{- if not .Values.ml2.ovs.auto_bridge_add -}}{{- set . "Values.ml2.ovs.auto_bridge_add" dict -}}{{- end -}}
|
||||
|
||||
set -x
|
||||
|
||||
bridge=$1
|
||||
@ -23,12 +27,16 @@ port=$2
|
||||
# and br-int and br-tun are assumed and handled
|
||||
# by the agent
|
||||
ovs-vsctl --no-wait --may-exist add-br $bridge
|
||||
ovs-vsctl --no-wait --may-exist add-port $bridge $port
|
||||
ip link set dev $port up
|
||||
if [ $port] ; then
|
||||
ovs-vsctl --no-wait --may-exist add-port $bridge $port
|
||||
ip link set dev $port up
|
||||
fi
|
||||
|
||||
# handle any bridge mappings
|
||||
{{- range $bridge, $port := .Values.ml2.ovs.auto_bridge_add }}
|
||||
ovs-vsctl --no-wait --may-exist add-br {{ $bridge }}
|
||||
ovs-vsctl --no-wait --may-exist add-port {{ $bridge }} {{ $port }}
|
||||
ip link set dev {{ $port }} up
|
||||
if [ {{ $port }} ] ; then
|
||||
ovs-vsctl --no-wait --may-exist add-port {{ $bridge }} {{ $port }}
|
||||
ip link set dev {{ $port }} up
|
||||
fi
|
||||
{{- end}}
|
||||
|
@ -23,5 +23,5 @@ modprobe gre
|
||||
modprobe vxlan
|
||||
|
||||
ovs-vsctl --no-wait show
|
||||
bash /tmp/openvswitch-ensure-configured.sh {{ .Values.network.external_bridge }} {{ .Values.network.interface.external | default .Values.network.interface.default }}
|
||||
bash /tmp/openvswitch-ensure-configured.sh {{ .Values.network.external_bridge }} {{ .Values.network.interface.external }}
|
||||
exec /usr/sbin/ovs-vswitchd unix:/run/openvswitch/db.sock --mlockall -vconsole:emer -vconsole:err -vconsole:info
|
||||
|
@ -76,8 +76,11 @@ network:
|
||||
external_bridge: br-ex
|
||||
ip_address: 0.0.0.0
|
||||
interface:
|
||||
external: enp12s0f0
|
||||
default: enp11s0f0
|
||||
# External interface will be automatically added to external_bridge. Default is null.
|
||||
# Tunnel interface will be used for VXLAN tunneling. Default is null, with
|
||||
# fallback mechanism to search for interface with default routing.
|
||||
external: null
|
||||
tunnel: null
|
||||
server:
|
||||
name: "neutron-server"
|
||||
port: 9696
|
||||
@ -112,12 +115,14 @@ metadata_agent:
|
||||
metadata:
|
||||
workers: 4
|
||||
|
||||
|
||||
ml2:
|
||||
ovs:
|
||||
auto_bridge_add:
|
||||
br-physnet1: enp11s0f0
|
||||
bridge_mappings:
|
||||
- "physnet1:br-physnet1"
|
||||
auto_bridge_add: []
|
||||
# To automatically add a physical interface to a specific bridge using,
|
||||
# for example eth3 to bridge br-physnet1 define the following key/value
|
||||
# in auto_bridge_add:
|
||||
# - br-physnet1:eth3
|
||||
|
||||
dependencies:
|
||||
db_init:
|
||||
@ -341,10 +346,13 @@ conf:
|
||||
neutron:
|
||||
ml2:
|
||||
flat_networks: "*"
|
||||
ml2_type_vlan:
|
||||
neutron:
|
||||
ml2:
|
||||
network_vlan_ranges: "physnet1:1100:1110"
|
||||
# If you want to use the external network as a tagged provider network,
|
||||
# a range should be specified including the intended VLAN target
|
||||
# using ml2_type_vlan.neutron.ml2.network_vlan_ranges:
|
||||
# ml2_type_vlan:
|
||||
# neutron:
|
||||
# ml2:
|
||||
# network_vlan_ranges: "external:1100:1110"
|
||||
ml2_conf_sriov:
|
||||
override:
|
||||
append:
|
||||
@ -377,12 +385,18 @@ conf:
|
||||
openvswitch_agent:
|
||||
override:
|
||||
append:
|
||||
ovs:
|
||||
agent:
|
||||
neutron:
|
||||
ml2:
|
||||
ovs:
|
||||
agent:
|
||||
tunnel_types: vxlan
|
||||
ovs:
|
||||
neutron:
|
||||
ml2:
|
||||
ovs:
|
||||
agent:
|
||||
bridge_mappings: "external:br-ex"
|
||||
ovsdb_connection: unix:/var/run/openvswitch/db.sock
|
||||
securitygroup:
|
||||
neutron:
|
||||
|
Loading…
x
Reference in New Issue
Block a user