Browse Source

Create OVNMacAddrNet network on Undercloud

A network used to allocate MAC addresses for OVN chassis.
Ports without and IP allocation will be created on this
network, the MAC addresses of the ports will by used to
configure the ovn-chassis-mac-mappings.

NOTE, we may want to change the 'base_mac' option of the
undercloud, so that we don't have collissions with the
overcloud 'base_mac'.

Related-Bug: #1881593
Change-Id: If495b5d5c1e6beff02b48507051cccfb70fd995c
changes/74/732174/10
Harald Jensås 1 year ago
parent
commit
2082099332
  1. 2
      environments/standalone/standalone-overcloud.yaml
  2. 2
      environments/standalone/standalone-tripleo.yaml
  3. 4
      environments/undercloud.yaml
  4. 2
      environments/undercloud/undercloud-minion.yaml
  5. 3
      network/networks.j2.yaml
  6. 37
      network/ovn_mac_addr_net.yaml
  7. 27
      network/ports/ovn_mac_addr_port.yaml
  8. 4
      overcloud-resource-registry-puppet.j2.yaml
  9. 7
      sample-env-generator/standalone.yaml
  10. 6
      sample-env-generator/undercloud-minion.yaml

2
environments/standalone/standalone-overcloud.yaml

@ -47,6 +47,8 @@ parameter_defaults:
SwiftReplicas: 1
resource_registry:
OS::TripleO::OVNMacAddressNetwork: OS::Heat::None
OS::TripleO::OVNMacAddressPort: OS::Heat::None
OS::TripleO::Services::AodhApi: OS::Heat::None
OS::TripleO::Services::AodhEvaluator: OS::Heat::None
OS::TripleO::Services::AodhListener: OS::Heat::None

2
environments/standalone/standalone-tripleo.yaml

@ -56,6 +56,8 @@ resource_registry:
OS::TripleO::Network::Ports::ControlPlaneVipPort: ../../deployed-server/deployed-neutron-port.yaml
OS::TripleO::Network::Ports::OVNDBsVipPort: ../../network/ports/noop.yaml
OS::TripleO::Network::Ports::RedisVipPort: ../../network/ports/noop.yaml
OS::TripleO::OVNMacAddressNetwork: OS::Heat::None
OS::TripleO::OVNMacAddressPort: OS::Heat::None
OS::TripleO::Services::AodhApi: OS::Heat::None
OS::TripleO::Services::AodhEvaluator: OS::Heat::None
OS::TripleO::Services::AodhListener: OS::Heat::None

4
environments/undercloud.yaml

@ -65,6 +65,10 @@ resource_registry:
# Undercloud HA services
OS::TripleO::Services::HAproxy: OS::Heat::None
# Don't create OVN Chassis MAC address nets/ports on the undercloud
OS::TripleO::OVNMacAddressNetwork: OS::Heat::None
OS::TripleO::OVNMacAddressPort: OS::Heat::None
parameter_defaults:
# ensure we enable ip_forward before docker gets run
KernelIpForward: 1

2
environments/undercloud/undercloud-minion.yaml

@ -30,6 +30,8 @@ parameter_defaults:
resource_registry:
OS::TripleO::Network::Ports::ControlPlaneVipPort: OS::Heat::None
OS::TripleO::OVNMacAddressNetwork: OS::Heat::None
OS::TripleO::OVNMacAddressPort: OS::Heat::None
OS::TripleO::Services::AodhApi: OS::Heat::None
OS::TripleO::Services::AodhEvaluator: OS::Heat::None
OS::TripleO::Services::AodhListener: OS::Heat::None

3
network/networks.j2.yaml

@ -14,6 +14,9 @@ resources:
type: OS::TripleO::Network::{{network.name}}
{%- endfor %}
OVNMacAddressNetwork:
type: OS::TripleO::OVNMacAddressNetwork
NetworkExtraConfig:
type: OS::TripleO::Network::ExtraConfig

37
network/ovn_mac_addr_net.yaml

@ -0,0 +1,37 @@
heat_template_version: rocky
description: Network used to allocate MAC addresses for OVN chassis.
parameters:
OVNMacAddressNetworkName:
default: ovn_mac_addr_net
description: The name of the OVNMacAddr network.
type: string
ManageNetworks:
default: true
type: boolean
description: >
Manage the network and related resources (subnets and segments) with
either create, update, or delete operations (depending on the stack
operation). Does not apply to ports which will always be managed as
needed. Defaults to true. For multi-stack use cases where the network
related resources have already been managed by a separate stack, this
parameter can be set to false.
conditions:
manage_networks: {get_param: ManageNetworks}
resources:
OVNMacAddressNetwork:
type: OS::Neutron::Net
condition: manage_networks
properties:
name: {get_param: OVNMacAddressNetworkName}
value_specs:
description: Network used to allocate MAC addresses for OVN chassis.
outputs:
OS::stack_id:
description: >
Network used to allocate MAC addresses for OVN chassis.
value: {get_resource: OVNMacAddressNetwork}

27
network/ports/ovn_mac_addr_port.yaml

@ -0,0 +1,27 @@
heat_template_version: rocky
description: >
Port without IP address, used to allocate MAC addresses for OVN chassis.
parameters:
PortName:
description: Name of the port
default: ''
type: string
OVNMacAddressNetworkName:
default: ovn_mac_addr_net
description: The name of the OVNMacAddr network.
type: string
resources:
OVNMacAddressPort:
type: OS::Neutron::Port
properties:
name: {get_param: PortName}
network: {get_param: OVNMacAddressNetworkName}
fixed_ips: []
outputs:
mac_address:
description: MAC address of the port
value: {get_attr: [OVNMacAddressPort, mac_address]}

4
overcloud-resource-registry-puppet.j2.yaml

@ -67,6 +67,10 @@ resource_registry:
# TripleO overcloud networks
OS::TripleO::Network: network/networks.yaml
# Special network to allocate unique OVN chassis mac addresses, for distributed vlan traffic.
OS::TripleO::OVNMacAddressNetwork: network/ovn_mac_addr_net.yaml
OS::TripleO::OVNMacAddressPort: network/ports/ovn_mac_addr_port.yaml
{%- for network in networks if network.enabled|default(true) %}
OS::TripleO::Network::{{network.name}}: OS::Heat::None
{%- endfor %}

7
sample-env-generator/standalone.yaml

@ -140,6 +140,9 @@ environments:
OS::TripleO::Services::SaharaEngine: OS::Heat::None
# Zaqar
OS::TripleO::Services::Zaqar: OS::Heat::None
# Don't create OVN Chassis MAC address nets/ports on the standalone
OS::TripleO::OVNMacAddressNetwork: OS::Heat::None
OS::TripleO::OVNMacAddressPort: OS::Heat::None
-
name: standalone/standalone-overcloud
@ -186,6 +189,10 @@ environments:
OS::TripleO::Services::OpenStackClients: ../../deployment/clients/openstack-clients-baremetal-ansible.yaml
# Don't create OVN Chassis MAC address nets/ports on the standalone
OS::TripleO::OVNMacAddressNetwork: OS::Heat::None
OS::TripleO::OVNMacAddressPort: OS::Heat::None
# Aodh
OS::TripleO::Services::AodhApi: OS::Heat::None
OS::TripleO::Services::AodhEvaluator: OS::Heat::None

6
sample-env-generator/undercloud-minion.yaml

@ -51,6 +51,10 @@ environments:
# Disable by default
OS::TripleO::Services::IronicConductor: OS::Heat::None
# Don't create OVN Chassis MAC address nets/ports on the standalone
OS::TripleO::OVNMacAddressNetwork: OS::Heat::None
OS::TripleO::OVNMacAddressPort: OS::Heat::None
# Disable all the services not used when deploying just a minion
OS::TripleO::Services::AodhApi: OS::Heat::None
OS::TripleO::Services::AodhEvaluator: OS::Heat::None
@ -231,4 +235,4 @@ environments:
OS::TripleO::Services::Vpp: OS::Heat::None
OS::TripleO::Services::VRTSHyperScale: OS::Heat::None
OS::TripleO::Services::Xinetd: OS::Heat::None
OS::TripleO::Services::Zaqar: OS::Heat::None
OS::TripleO::Services::Zaqar: OS::Heat::None
Loading…
Cancel
Save