From be0d3f3520037c4e2e9fb4f9a235171aaad7e253 Mon Sep 17 00:00:00 2001 From: marios Date: Wed, 8 Jul 2015 13:29:59 +0300 Subject: [PATCH] Adds the NeutronTunnelIdRanges and NeutronVniRanges parameters This adds the NeutronTunnelIdRanges and NeutronVniRanges parameters which govern the GRE or VXLAN tunnel IDs (respectively) that are to be made available for overcloud tenant networks. These both default to "1:1000," to retain the current behaviour. They are propagated to the hiera data for puppet deploys and there is a separate change to support passing these into the config via the neutron tripleo-image-element at https://review.openstack.org/#/c/199592/ Change-Id: I967a8cae218a31e888abc438e9de5756ae627adb Related-Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1240631 --- compute.yaml | 30 ++++++++++++++++++++++++++++++ controller.yaml | 30 ++++++++++++++++++++++++++++++ overcloud-without-mergepy.yaml | 12 ++++++++++++ puppet/compute-puppet.yaml | 30 ++++++++++++++++++++++++++++++ puppet/controller-puppet.yaml | 30 ++++++++++++++++++++++++++++++ puppet/hieradata/common.yaml | 6 +----- 6 files changed, 133 insertions(+), 5 deletions(-) diff --git a/compute.yaml b/compute.yaml index 4a9a92b987..d51aa358ec 100644 --- a/compute.yaml +++ b/compute.yaml @@ -152,6 +152,18 @@ parameters: The tunnel types for the Neutron tenant network. To specify multiple values, use a comma separated string, like so: 'gre,vxlan' default: 'gre' + NeutronTunnelIdRanges: + description: | + Comma-separated list of : tuples enumerating ranges + of GRE tunnel IDs that are available for tenant network allocation + default: ["1:1000", ] + type: comma_delimited_list + NeutronVniRanges: + description: | + Comma-separated list of : tuples enumerating ranges + of VXLAN VNI IDs that are available for tenant network allocation + default: ["1:1000", ] + type: comma_delimited_list NeutronPublicInterfaceRawDevice: default: '' type: string @@ -355,6 +367,8 @@ resources: tenant_network_type: {get_input: neutron_tenant_network_type} tunnel_types: {get_input: neutron_tunnel_types} network_vlan_ranges: {get_input: neutron_network_vlan_ranges} + tunnel_id_ranges: {get_input: neutron_tunnel_id_ranges} + vni_ranges: {get_input: neutron_vni_ranges} bridge_mappings: {get_input: neutron_bridge_mappings} enable_tunneling: {get_input: neutron_enable_tunneling} physical_bridge: {get_input: neutron_physical_bridge} @@ -397,6 +411,22 @@ resources: neutron_local_ip: {get_attr: [NovaCompute, networks, ctlplane, 0]} neutron_tenant_network_type: {get_param: NeutronNetworkType} neutron_tunnel_types: {get_param: NeutronTunnelTypes} + neutron_tunnel_id_ranges: + str_replace: + template: "['RANGES']" + params: + RANGES: + list_join: + - "','" + - {get_param: NeutronTunnelIdRanges} + neutron_vni_ranges: + str_replace: + template: "['RANGES']" + params: + RANGES: + list_join: + - "','" + - {get_param: NeutronVniRanges} neutron_network_vlan_ranges: {get_param: NeutronNetworkVLANRanges} neutron_bridge_mappings: {get_param: NeutronBridgeMappings} neutron_enable_tunneling: {get_param: NeutronEnableTunnelling} diff --git a/controller.yaml b/controller.yaml index a22bb8380a..362696df7f 100644 --- a/controller.yaml +++ b/controller.yaml @@ -360,6 +360,18 @@ parameters: The tunnel types for the Neutron tenant network. To specify multiple values, use a comma separated string, like so: 'gre,vxlan' type: string + NeutronTunnelIdRanges: + description: | + Comma-separated list of : tuples enumerating ranges + of GRE tunnel IDs that are available for tenant network allocation + default: ["1:1000", ] + type: comma_delimited_list + NeutronVniRanges: + description: | + Comma-separated list of : tuples enumerating ranges + of VXLAN VNI IDs that are available for tenant network allocation + default: ["1:1000", ] + type: comma_delimited_list NovaPassword: default: unset description: The password for the nova service and db account, used by nova-api. @@ -653,6 +665,8 @@ resources: physical_bridge: br-ex tenant_network_type: {get_input: neutron_tenant_network_type} tunnel_types: {get_input: neutron_tunnel_types} + tunnel_id_ranges: {get_input: neutron_tunnel_id_ranges} + vni_ranges: {get_input: neutron_vni_ranges} ovs_db: {get_input: neutron_dsn} service-password: {get_input: neutron_password} dnsmasq-options: {get_input: neutron_dnsmasq_options} @@ -891,6 +905,22 @@ resources: neutron_public_interface_tag: {get_param: NeutronPublicInterfaceTag} neutron_tenant_network_type: {get_param: NeutronNetworkType} neutron_tunnel_types: {get_param: NeutronTunnelTypes} + neutron_tunnel_id_ranges: + str_replace: + template: "['RANGES']" + params: + RANGES: + list_join: + - "','" + - {get_param: NeutronTunnelIdRanges} + neutron_vni_ranges: + str_replace: + template: "['RANGES']" + params: + RANGES: + list_join: + - "','" + - {get_param: NeutronVniRanges} neutron_password: {get_param: NeutronPassword} neutron_dnsmasq_options: {get_param: NeutronDnsmasqOptions} neutron_dsn: diff --git a/overcloud-without-mergepy.yaml b/overcloud-without-mergepy.yaml index 4258fe0d0a..12d88e63ed 100644 --- a/overcloud-without-mergepy.yaml +++ b/overcloud-without-mergepy.yaml @@ -148,6 +148,18 @@ parameters: The tunnel types for the Neutron tenant network. To specify multiple values, use a comma separated string, like so: 'gre,vxlan' type: string + NeutronTunnelIdRanges: + description: | + Comma-separated list of : tuples enumerating ranges + of GRE tunnel IDs that are available for tenant network allocation + default: ["1:1000", ] + type: comma_delimited_list + NeutronVniRanges: + description: | + Comma-separated list of : tuples enumerating ranges + of VXLAN VNI IDs that are available for tenant network allocation + default: ["1:1000", ] + type: comma_delimited_list NeutronMechanismDrivers: default: 'openvswitch' description: | diff --git a/puppet/compute-puppet.yaml b/puppet/compute-puppet.yaml index 357a097d39..02756925e4 100644 --- a/puppet/compute-puppet.yaml +++ b/puppet/compute-puppet.yaml @@ -152,6 +152,18 @@ parameters: The tunnel types for the Neutron tenant network. To specify multiple values, use a comma separated string, like so: 'gre,vxlan' default: 'gre' + NeutronTunnelIdRanges: + description: | + Comma-separated list of : tuples enumerating ranges + of GRE tunnel IDs that are available for tenant network allocation + default: ["1:1000", ] + type: comma_delimited_list + NeutronVniRanges: + description: | + Comma-separated list of : tuples enumerating ranges + of VXLAN VNI IDs that are available for tenant network allocation + default: ["1:1000", ] + type: comma_delimited_list NeutronPublicInterfaceRawDevice: default: '' type: string @@ -378,6 +390,8 @@ resources: neutron_tenant_network_type: {get_input: neutron_tenant_network_type} neutron_tunnel_types: {get_input: neutron_tunnel_types} neutron::plugins::ml2::network_vlan_ranges: {get_input: neutron_network_vlan_ranges} + neutron::plugins::ml2::tunnel_id_ranges: {get_input: neutron_tunnel_id_ranges} + neutron::plugins::ml2::vni_ranges: {get_input: neutron_vni_ranges} neutron_bridge_mappings: {get_input: neutron_bridge_mappings} neutron::agents::ml2::ovs::enable_tunneling: {get_input: neutron_enable_tunneling} neutron_physical_bridge: {get_input: neutron_physical_bridge} @@ -433,6 +447,22 @@ resources: neutron_local_ip: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NeutronTenantNetwork]}]} neutron_tenant_network_type: {get_param: NeutronNetworkType} neutron_tunnel_types: {get_param: NeutronTunnelTypes} + neutron_tunnel_id_ranges: + str_replace: + template: "['RANGES']" + params: + RANGES: + list_join: + - "','" + - {get_param: NeutronTunnelIdRanges} + neutron_vni_ranges: + str_replace: + template: "['RANGES']" + params: + RANGES: + list_join: + - "','" + - {get_param: NeutronVniRanges} neutron_network_vlan_ranges: str_replace: template: "['RANGES']" diff --git a/puppet/controller-puppet.yaml b/puppet/controller-puppet.yaml index 9f531efe9d..8296164593 100644 --- a/puppet/controller-puppet.yaml +++ b/puppet/controller-puppet.yaml @@ -369,6 +369,18 @@ parameters: The tunnel types for the Neutron tenant network. To specify multiple values, use a comma separated string, like so: 'gre,vxlan' type: string + NeutronTunnelIdRanges: + description: | + Comma-separated list of : tuples enumerating ranges + of GRE tunnel IDs that are available for tenant network allocation + default: ["1:1000", ] + type: comma_delimited_list + NeutronVniRanges: + description: | + Comma-separated list of : tuples enumerating ranges + of VXLAN VNI IDs that are available for tenant network allocation + default: ["1:1000", ] + type: comma_delimited_list NovaPassword: default: unset description: The password for the nova service and db account, used by nova-api. @@ -713,6 +725,22 @@ resources: neutron_public_interface_tag: {get_param: NeutronPublicInterfaceTag} neutron_tenant_network_type: {get_param: NeutronNetworkType} neutron_tunnel_types: {get_param: NeutronTunnelTypes} + neutron_tunnel_id_ranges: + str_replace: + template: "['RANGES']" + params: + RANGES: + list_join: + - "','" + - {get_param: NeutronTunnelIdRanges} + neutron_vni_ranges: + str_replace: + template: "['RANGES']" + params: + RANGES: + list_join: + - "','" + - {get_param: NeutronVniRanges} neutron_password: {get_param: NeutronPassword} neutron_dnsmasq_options: {get_param: NeutronDnsmasqOptions} neutron_dsn: @@ -980,6 +1008,8 @@ resources: neutron::server::l3_ha: {get_input: neutron_l3_ha} neutron::dhcp_agents_per_network: {get_input: neutron_dhcp_agents_per_network} neutron::plugins::ml2::network_vlan_ranges: {get_input: neutron_network_vlan_ranges} + neutron::plugins::ml2::tunnel_id_ranges: {get_input: neutron_tunnel_id_ranges} + neutron::plugins::ml2::vni_ranges: {get_input: neutron_vni_ranges} neutron_bridge_mappings: {get_input: neutron_bridge_mappings} neutron_public_interface: {get_input: neutron_public_interface} neutron_public_interface_raw_device: {get_input: neutron_public_interface_raw_device} diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml index 40c44aefc0..7a03543555 100644 --- a/puppet/hieradata/common.yaml +++ b/puppet/hieradata/common.yaml @@ -13,10 +13,6 @@ nova::network::neutron::vif_plugging_is_fatal: false nova::network::neutron::vif_plugging_timeout: 30 nova::network::neutron::dhcp_domain: '' -neutron::plugins::ml2::tunnel_id_ranges: - - '1:1000' -neutron::plugins::ml2::vni_ranges: - - '1:1000' neutron::plugins::ml2::type_drivers: - flat - gre @@ -29,4 +25,4 @@ sysctl_settings: net.ipv4.tcp_keepalive_probes: value: 5 net.ipv4.tcp_keepalive_time: - value: 5 \ No newline at end of file + value: 5