Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Merge "Create OVNMacAddrNet network on Undercloud" into stable/ussuri
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and openstack-gerrit committed Apr 3, 2021
2 parents 83210e3 + d690b41 commit 87c763f
Show file tree
Hide file tree
Showing 10 changed files with 93 additions and 1 deletion.
2 changes: 2 additions & 0 deletions environments/standalone/standalone-overcloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions environments/standalone/standalone-tripleo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions environments/undercloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions environments/undercloud/undercloud-minion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,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
Expand Down
3 changes: 3 additions & 0 deletions network/networks.j2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ resources:
type: OS::TripleO::Network::{{network.name}}
{%- endfor %}

OVNMacAddressNetwork:
type: OS::TripleO::OVNMacAddressNetwork

NetworkExtraConfig:
type: OS::TripleO::Network::ExtraConfig

Expand Down
37 changes: 37 additions & 0 deletions network/ovn_mac_addr_net.yaml
Original file line number Diff line number Diff line change
@@ -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 changes: 27 additions & 0 deletions network/ports/ovn_mac_addr_port.yaml
Original file line number Diff line number Diff line change
@@ -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 changes: 4 additions & 0 deletions overcloud-resource-registry-puppet.j2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,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 %}
Expand Down
7 changes: 7 additions & 0 deletions sample-env-generator/standalone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion sample-env-generator/undercloud-minion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,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
Expand Down Expand Up @@ -277,4 +281,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

0 comments on commit 87c763f

Please sign in to comment.