From 2395c3aa8d73b78962b30331f3ada39516a109d3 Mon Sep 17 00:00:00 2001 From: Brent Eagles Date: Thu, 25 Jan 2018 10:31:30 -0330 Subject: [PATCH] Add compute node L3 agent container for DVR Neutron OVS DVR requires a L3 agent container with a special configuration on the compute node. Change-Id: Iab06c11de90b8ebc7dc6bd946367e5693a4a0f71 Closes-Bug: #1717316 (cherry picked from commit bb1100dd3dbe73ffe75f72e2ea56496620acc157) --- environments/services/neutron-ovs-dvr.yaml | 41 ++++++++++++++++ puppet/services/neutron-l3.yaml | 22 ++++++++- roles/ComputeDVR.yaml | 57 ++++++++++++++++++++++ 3 files changed, 118 insertions(+), 2 deletions(-) create mode 100644 environments/services/neutron-ovs-dvr.yaml create mode 100644 roles/ComputeDVR.yaml diff --git a/environments/services/neutron-ovs-dvr.yaml b/environments/services/neutron-ovs-dvr.yaml new file mode 100644 index 0000000000..e41307084b --- /dev/null +++ b/environments/services/neutron-ovs-dvr.yaml @@ -0,0 +1,41 @@ +# A Heat environment file that enables DVR in the overcloud. Used with Compute +# DVR role. Note that the network configuration is consistent with the default +# tripleo network templates so some customization is likely required for +# production deployments. +resource_registry: + OS::TripleO::Services::ComputeNeutronL3Agent: ../../docker/services/neutron-l3.yaml + OS::TripleO::Services::ComputeNeutronMetadataAgent: ../../docker/services/neutron-metadata.yaml + OS::TripleO::ComputeDVR::Net::SoftwareConfig: ../../net-config-bridge.yaml + +parameter_defaults: + + # DVR requires that the L2 population feature is enabled + NeutronMechanismDrivers: ['openvswitch', 'l2population'] + NeutronEnableL2Pop: 'True' + + # Setting NeutronEnableDVR enables distributed routing support in the + # ML2 plugin and agents that support this feature + NeutronEnableDVR: true + + # We also need to set the proper agent mode for the L3 agent. This will only + # affect the agent on the controller node. + NeutronL3AgentMode: 'dvr_snat' + + # Enabling DVR deploys additional services to the compute nodes that through + # normal operation will consume memory. The amount required is roughly + # proportional to the number of Neutron routers that will be scheduled to + # that host. It is necessary to reserve memory on the compute nodes to avoid + # memory issues when creating instances that are connected to routed + # networks. The current expected consumption is 50 MB per router in addition + # to the base reserved amount. Deployers should refer to existing + # documentation, release notes, etc. for additional information on estimating + # an appropriate value. The provided value here is based on an estimate of 10 + # routers and is an example value *only* and should be reviewed and modified + # if necessary before deploying. + NovaReservedHostMemory: 2560 + + # Required if deploying with the ComputeDVR role, which is recommended + # if using the default network templates as it will configure the + # host networking to work with the default 'datacentre' network. + ComputeDVRParameters: + NeutronL3AgentMode: 'dvr' diff --git a/puppet/services/neutron-l3.yaml b/puppet/services/neutron-l3.yaml index ba290c1ad9..ef1aa37c98 100644 --- a/puppet/services/neutron-l3.yaml +++ b/puppet/services/neutron-l3.yaml @@ -43,6 +43,9 @@ parameters: - allowed_values: - legacy - dvr_snat + - dvr + tags: + - role_specific MonitoringSubscriptionNeutronL3: default: 'overcloud-neutron-l3-agent' type: string @@ -83,6 +86,21 @@ resources: RoleName: {get_param: RoleName} RoleParameters: {get_param: RoleParameters} + + # Merging role-specific parameters (RoleParameters) with the default parameters. + # RoleParameters will have the precedence over the default parameters. + RoleParametersValue: + type: OS::Heat::Value + properties: + type: json + value: + map_replace: + - map_replace: + - neutron::agents::l3::agent_mode: NeutronL3AgentMode + - values: {get_param: [RoleParameters]} + - values: + NeutronL3AgentMode: {get_param: NeutronL3AgentMode} + outputs: role_data: description: Role data for the Neutron L3 agent service. @@ -92,8 +110,8 @@ outputs: config_settings: map_merge: - get_attr: [NeutronBase, role_data, config_settings] - - neutron::agents::l3::agent_mode: {get_param: NeutronL3AgentMode} - neutron::agents::l3::debug: + - get_attr: [RoleParametersValue, value] + - neutron::agents::l3::debug: if: - service_debug_unset - {get_param: Debug} diff --git a/roles/ComputeDVR.yaml b/roles/ComputeDVR.yaml new file mode 100644 index 0000000000..c805afca48 --- /dev/null +++ b/roles/ComputeDVR.yaml @@ -0,0 +1,57 @@ +############################################################################### +# Role: ComputeDVR # +############################################################################### +- name: ComputeDVR + description: | + DVR enabled Compute Node role + CountDefault: 1 + networks: + - InternalApi + - Tenant + - Storage + - External + HostnameFormatDefault: '%stackname%-novacompute-dvr-%index%' + ServicesDefault: + - OS::TripleO::Services::Aide + - OS::TripleO::Services::AuditD + - OS::TripleO::Services::CACerts + - OS::TripleO::Services::CephClient + - OS::TripleO::Services::CephExternal + - OS::TripleO::Services::CertmongerUser + - OS::TripleO::Services::Collectd + - OS::TripleO::Services::ComputeCeilometerAgent + - OS::TripleO::Services::ComputeNeutronCorePlugin + - OS::TripleO::Services::ComputeNeutronL3Agent + - OS::TripleO::Services::ComputeNeutronMetadataAgent + - OS::TripleO::Services::ComputeNeutronOvsAgent + - OS::TripleO::Services::Docker + - OS::TripleO::Services::Fluentd + - OS::TripleO::Services::Ipsec + - OS::TripleO::Services::Iscsid + - OS::TripleO::Services::Kernel + - OS::TripleO::Services::LoginDefs + - OS::TripleO::Services::MySQLClient + - OS::TripleO::Services::NeutronBgpVpnBagpipe + - OS::TripleO::Services::NeutronLinuxbridgeAgent + - OS::TripleO::Services::NeutronVppAgent + - OS::TripleO::Services::NovaCompute + - OS::TripleO::Services::NovaLibvirt + - OS::TripleO::Services::NovaMigrationTarget + - OS::TripleO::Services::Ntp + - OS::TripleO::Services::ContainersLogrotateCrond + - OS::TripleO::Services::OpenDaylightOvs + - OS::TripleO::Services::Rhsm + - OS::TripleO::Services::RsyslogSidecar + - OS::TripleO::Services::Securetty + - OS::TripleO::Services::SensuClient + - OS::TripleO::Services::SkydiveAgent + - OS::TripleO::Services::Snmp + - OS::TripleO::Services::Sshd + - OS::TripleO::Services::Timezone + - OS::TripleO::Services::TripleoFirewall + - OS::TripleO::Services::TripleoPackages + - OS::TripleO::Services::Tuned + - OS::TripleO::Services::Vpp + - OS::TripleO::Services::OVNController + - OS::TripleO::Services::OVNMetadataAgent + - OS::TripleO::Services::Ptp