Make External Load Balancer templates work with IPv6

This change modifies the network isolation templates that allow for
fixed IP addresses on the controllers' IPs and VIPs, and makes them
compatible with IPv6 addresses.

The latest version of the patchset creates an from_service_v6.yaml
in order to properly handle service VIPs on IPv6 networks.

Note that since OVS is not currently compatible with IPv6 tunnel
endpoints, this patch does not yet enable IPv6 for the Tenant
network by default.

Change-Id: If881b000c6000ec13b54c0ee39f1c8940f079ae3
Co-Authored-By: Giulio Fidente <gfidente@redhat.com>
This commit is contained in:
Dan Sneddon 2016-01-21 01:41:46 -08:00 committed by Giulio Fidente
parent 5610ecf80c
commit 2cc592d29d
8 changed files with 444 additions and 0 deletions

View File

@ -0,0 +1,38 @@
resource_registry:
OS::TripleO::Network::Ports::NetVipMap: ../network/ports/net_vip_map_external_v6.yaml
OS::TripleO::Network::Ports::ExternalVipPort: ../network/ports/noop.yaml
OS::TripleO::Network::Ports::InternalApiVipPort: ../network/ports/noop.yaml
OS::TripleO::Network::Ports::StorageVipPort: ../network/ports/noop.yaml
OS::TripleO::Network::Ports::StorageMgmtVipPort: ../network/ports/noop.yaml
OS::TripleO::Network::Ports::RedisVipPort: ../network/ports/from_service_v6.yaml
OS::TripleO::Controller::Ports::ExternalPort: ../network/ports/external_from_pool_v6.yaml
OS::TripleO::Controller::Ports::InternalApiPort: ../network/ports/internal_api_from_pool_v6.yaml
OS::TripleO::Controller::Ports::StoragePort: ../network/ports/storage_from_pool_v6.yaml
OS::TripleO::Controller::Ports::StorageMgmtPort: ../network/ports/storage_mgmt_from_pool_v6.yaml
# OVS doesn't support IPv6 endpoints for tunneling yet, so this remains IPv4 for now.
OS::TripleO::Controller::Ports::TenantPort: ../network/ports/tenant_from_pool.yaml
parameter_defaults:
# When using an external loadbalancer set the following in parameter_defaults
# to control your VIPs (currently one per network)
# NOTE: we will eventually move to one VIP per service
#
ControlPlaneIP: 192.0.2.251
ExternalNetworkVip: 2001:db8:fd00:1000:0000:0000:0000:0005
InternalApiNetworkVip: fd00:fd00:fd00:2000:0000:0000:0000:0005
StorageNetworkVip: fd00:fd00:fd00:3000:0000:0000:0000:0005
StorageMgmtNetworkVip: fd00:fd00:fd00:4000:0000:0000:0000:0005
ServiceVips:
redis: fd00:fd00:fd00:2000:0000:0000:0000:0006
ControllerIPs:
external:
- 2001:db8:fd00:1000:0000:0000:0000:0007
internal_api:
- fd00:fd00:fd00:2000:0000:0000:0000:0007
storage:
- fd00:fd00:fd00:3000:0000:0000:0000:0007
storage_mgmt:
- fd00:fd00:fd00:4000:0000:0000:0000:0007
tenant:
- 172.16.0.253
EnableLoadBalancer: false

View File

@ -0,0 +1,54 @@
heat_template_version: 2015-04-30
description: >
Returns an IP from a network mapped list of IPs. This version is for IPv6
addresses. The ip_address_uri output will have brackets for use in URLs.
parameters:
ExternalNetName:
description: Name of the external network
default: external
type: string
PortName:
description: Name of the port
default: ''
type: string
ControlPlaneIP: # Here for compatability with noop.yaml
description: IP address on the control plane
default: ''
type: string
IPPool:
default: {}
description: A network mapped list of IPs
type: json
NodeIndex:
default: 0
description: Index of the IP to get from Pool
type: number
ExternalNetCidr:
default: '2001:db8:fd00:1000::/64'
description: Cidr for the external network.
type: string
outputs:
ip_address:
description: external network IP
value: {get_param: [IPPool, {get_param: ExternalNetName}, {get_param: NodeIndex}]}
ip_address_uri:
description: external network IP (for compatibility with IPv6)
value:
list_join:
- ''
- - '['
- {get_param: [IPPool, {get_param: ExternalNetName}, {get_param: NodeIndex}]}
- ']'
ip_subnet:
# FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?)
description: IP/Subnet CIDR for the external network IP
value:
list_join:
- ''
- - {get_param: [IPPool, {get_param: ExternalNetName}, {get_param: NodeIndex}]}
- '/'
- {get_param: [ExternalNetCidr, -2]}
- {get_param: [ExternalNetCidr, -1]}

View File

@ -0,0 +1,42 @@
heat_template_version: 2015-04-30
description: >
Returns an IP from a service mapped list of IPv6 IPs
parameters:
ServiceName:
description: Name of the service to lookup
default: ''
type: string
NetworkName: # Here for compatability with ctlplane_vip.yaml
description: Name of the network where the VIP will be created
default: ctlplane
type: string
PortName: # Here for compatability with ctlplane_vip.yaml
description: Name of the port
default: ''
type: string
ControlPlaneIP: # Here for compatability with ctlplane_vip.yaml
description: IP address on the control plane
default: ''
type: string
ControlPlaneNetwork: # Here for compatability with ctlplane_vip.yaml
description: The name of the undercloud Neutron control plane
default: ctlplane
type: string
ServiceVips:
default: {}
type: json
outputs:
ip_address:
description: network IP
value: {get_param: [ServiceVips, {get_param: ServiceName}]}
ip_address_uri:
description: network IP (with brackets for use in URLs)
value:
list_join:
- ''
- - '['
- {get_param: [ServiceVips, {get_param: ServiceName}]}
- ']'

View File

@ -0,0 +1,54 @@
heat_template_version: 2015-04-30
description: >
Returns an IP from a network mapped list of IPs. This version is for IPv6
addresses. The ip_address_uri output will have brackets for use in URLs.
parameters:
InternalApiNetName:
description: Name of the internal API network
default: internal_api
type: string
PortName:
description: Name of the port
default: ''
type: string
ControlPlaneIP: # Here for compatability with noop.yaml
description: IP address on the control plane
default: ''
type: string
IPPool:
default: {}
description: A network mapped list of IPs
type: json
NodeIndex:
default: 0
description: Index of the IP to get from Pool
type: number
InternalApiNetCidr:
default: 'fd00:fd00:fd00:2000::/64'
description: Cidr for the internal API network.
type: string
outputs:
ip_address:
description: internal API network IP
value: {get_param: [IPPool, {get_param: InternalApiNetName}, {get_param: NodeIndex}]}
ip_address_uri:
description: internal API network IP (for compatibility with internal_api_v6.yaml)
value:
list_join:
- ''
- - '['
- {get_param: [IPPool, {get_param: InternalApiNetName}, {get_param: NodeIndex}]}
- ']'
ip_subnet:
# FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?)
description: IP/Subnet CIDR for the internal API network IP
value:
list_join:
- ''
- - {get_param: [IPPool, {get_param: InternalApiNetName}, {get_param: NodeIndex}]}
- '/'
- {get_param: [InternalApiNetCidr, -2]}
- {get_param: [InternalApiNetCidr, -1]}

View File

@ -0,0 +1,95 @@
heat_template_version: 2015-04-30
parameters:
# Set these via parameter defaults to configure external VIPs
ControlPlaneIP:
default: ''
type: string
ExternalNetworkVip:
default: ''
type: string
InternalApiNetworkVip:
default: ''
type: string
StorageNetworkVip:
default: ''
type: string
StorageMgmtNetworkVip:
default: ''
type: string
# The following are unused in this template
ControlPlaneIp:
default: ''
type: string
ExternalIp:
default: ''
type: string
ExternalIpUri:
default: ''
type: string
InternalApiIp:
default: ''
type: string
InternalApiIpUri:
default: ''
type: string
StorageIp:
default: ''
type: string
StorageIpUri:
default: ''
type: string
StorageMgmtIp:
default: ''
type: string
StorageMgmtIpUri:
default: ''
type: string
TenantIp:
default: ''
type: string
TenantIpUri:
default: ''
type: string
outputs:
net_ip_map:
description: >
A Hash containing a mapping of network names to assigned IPs
for a specific machine.
value:
ctlplane: {get_param: ControlPlaneIP}
external: {get_param: ExternalNetworkVip}
internal_api: {get_param: InternalApiNetworkVip}
storage: {get_param: StorageNetworkVip}
storage_mgmt: {get_param: StorageMgmtNetworkVip}
net_ip_uri_map:
description: >
A Hash containing a mapping of netowrk names to assigned IPs for a
specific machine with brackets around IPv6 addresses for use in URLs.
value:
ctlplane: {get_param: ControlPlaneIP}
external:
list_join:
- ''
- - '['
- {get_param: ExternalNetworkVip}
- ']'
internal_api:
list_join:
- ''
- - '['
- {get_param: InternalApiNetworkVip}
- ']'
storage:
list_join:
- ''
- - '['
- {get_param: StorageNetworkVip}
- ']'
storage_mgmt:
list_join:
- ''
- - '['
- {get_param: StorageMgmtNetworkVip}
- ']'

View File

@ -0,0 +1,54 @@
heat_template_version: 2015-04-30
description: >
Returns an IP from a network mapped list of IPs. This version is for IPv6
addresses. The ip_address_uri output will have brackets for use in URLs.
parameters:
StorageNetName:
description: Name of the storage network
default: storage
type: string
PortName:
description: Name of the port
default: ''
type: string
ControlPlaneIP: # Here for compatability with noop.yaml
description: IP address on the control plane
default: ''
type: string
IPPool:
default: {}
description: A network mapped list of IPs
type: json
NodeIndex:
default: 0
description: Index of the IP to get from Pool
type: number
StorageNetCidr:
default: 'fd00:fd00:fd00:3000::/64'
description: Cidr for the storage network.
type: string
outputs:
ip_address:
description: storage network IP
value: {get_param: [IPPool, {get_param: StorageNetName}, {get_param: NodeIndex}]}
ip_address_uri:
description: storage network IP (for compatibility with storage_v6.yaml)
value:
list_join:
- ''
- - '['
- {get_param: [IPPool, {get_param: StorageNetName}, {get_param: NodeIndex}]}
- ']'
ip_subnet:
# FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?)
description: IP/Subnet CIDR for the storage network IP
value:
list_join:
- ''
- - {get_param: [IPPool, {get_param: StorageNetName}, {get_param: NodeIndex}]}
- '/'
- {get_param: [StorageNetCidr, -2]}
- {get_param: [StorageNetCidr, -1]}

View File

@ -0,0 +1,54 @@
heat_template_version: 2015-04-30
description: >
Returns an IP from a network mapped list of IPs This version is for IPv6
addresses. The ip_address_uri output will have brackets for use in URLs.
parameters:
StorageMgmtNetName:
description: Name of the storage MGMT network
default: storage_mgmt
type: string
PortName:
description: Name of the port
default: ''
type: string
ControlPlaneIP: # Here for compatability with noop.yaml
description: IP address on the control plane
default: ''
type: string
IPPool:
default: {}
description: A network mapped list of IPs
type: json
NodeIndex:
default: 0
description: Index of the IP to get from Pool
type: number
StorageMgmtNetCidr:
default: 'fd00:fd00:fd00:4000::/64'
description: Cidr for the storage MGMT network.
type: string
outputs:
ip_address:
description: storage MGMT network IP
value: {get_param: [IPPool, {get_param: StorageMgmtNetName}, {get_param: NodeIndex}]}
ip_address_uri:
description: storage MGMT network IP (for compatibility with storage_mgmt_v6.yaml)
value:
list_join:
- ''
- - '['
- {get_param: [IPPool, {get_param: StorageMgmtNetName}, {get_param: NodeIndex}]}
- ']'
ip_subnet:
# FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?)
description: IP/Subnet CIDR for the storage MGMT network IP
value:
list_join:
- ''
- - {get_param: [IPPool, {get_param: StorageMgmtNetName}, {get_param: NodeIndex}]}
- '/'
- {get_param: [StorageMgmtNetCidr, -2]}
- {get_param: [StorageMgmtNetCidr, -1]}

View File

@ -0,0 +1,53 @@
heat_template_version: 2015-04-30
description: >
Returns an IP from a network mapped list of IPs
parameters:
TenantNetName:
description: Name of the tenant network
default: tenant
type: string
PortName:
description: Name of the port
default: ''
type: string
ControlPlaneIP: # Here for compatability with noop.yaml
description: IP address on the control plane
default: ''
type: string
IPPool:
default: {}
description: A network mapped list of IPs
type: json
NodeIndex:
default: 0
description: Index of the IP to get from Pool
type: number
TenantNetCidr:
default: 'fd00:fd00:fd00:5000::/64'
description: Cidr for the tenant network.
type: string
outputs:
ip_address:
description: tenant network IP
value: {get_param: [IPPool, {get_param: TenantNetName}, {get_param: NodeIndex}]}
ip_address_uri:
description: tenant network IP (for compatibility with tenant_v6.yaml)
value:
list_join:
- ''
- - '['
- {get_param: [IPPool, {get_param: ExternalNetName}, {get_param: NodeIndex}]}
- ']'
ip_subnet:
# FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?)
description: IP/Subnet CIDR for the tenant network IP
value:
list_join:
- ''
- - {get_param: [IPPool, {get_param: TenantNetName}, {get_param: NodeIndex}]}
- '/'
- {get_param: [TenantNetCidr, -2]}
- {get_param: [TenantNetCidr, -1]}