composable neutron l3 service
authorDan Prince <dprince@redhat.com>
Fri, 8 Apr 2016 18:16:34 +0000 (14:16 -0400)
committerDan Prince <dprince@redhat.com>
Wed, 18 May 2016 12:25:00 +0000 (08:25 -0400)
Adds new puppet and puppet pacemaker specific services for
the Neutron L3 agent.

Partially-implements: blueprint composable-services-within-roles

Change-Id: I0316043efe357a41ef3b4088a55d98dbb6d25963

12 files changed:
environments/neutron-midonet.yaml
environments/neutron-nuage-config.yaml
environments/neutron-opencontrail.yaml
environments/neutron-plumgrid.yaml
environments/puppet-pacemaker.yaml
overcloud-resource-registry-puppet.yaml
overcloud.yaml
puppet/controller.yaml
puppet/manifests/overcloud_controller.pp
puppet/manifests/overcloud_controller_pacemaker.pp
puppet/services/neutron-l3.yaml [new file with mode: 0644]
puppet/services/pacemaker/neutron-l3.yaml [new file with mode: 0644]

index 726852a..463c187 100644 (file)
@@ -2,13 +2,13 @@
 resource_registry:
   OS::TripleO::AllNodesExtraConfig: ../puppet/extraconfig/all_nodes/neutron-midonet-all-nodes.yaml
   OS::TripleO::Controller::Net::SoftwareConfig: ../net-config-linux-bridge.yaml # We have to avoid any ovs bridge. MidoNet is incompatible with its datapath
+  OS::TripleO::Services::NeutronL3Agent: OS::Heat::None
 
 parameter_defaults:
   EnableZookeeperOnController: true
   EnableCassandraOnController: true
   NeutronCorePlugin: 'midonet.neutron.plugin_v1.MidonetPluginV2' # Overriding default core_plugin in Neutron. Don't touch it
   NeutronEnableIsolatedMetadata: true  # MidoNet 1.9 needs this one to work. Don't change it
-  NeutronEnableL3Agent: false
   NeutronEnableOVSAgent: false
 
   # Other available options for MidoNet Services
index 6fdcf63..8eb25cc 100644 (file)
@@ -2,6 +2,7 @@
 # a Neutron Nuage backend on the controller, configured via puppet
 resource_registry:
   OS::TripleO::ControllerExtraConfigPre: ../puppet/extraconfig/pre_deploy/controller/neutron-nuage.yaml
+  OS::TripleO::Services::NeutronL3Agent: OS::Heat::None
 
 parameter_defaults:
   NeutronNuageOSControllerIp: '0.0.0.0'
@@ -15,7 +16,6 @@ parameter_defaults:
   UseForwardedFor: true
   NeutronCorePlugin: 'neutron.plugins.nuage.plugin.NuagePlugin'
   NeutronEnableDHCPAgent: false
-  NeutronEnableL3Agent: false
   NeutronEnableMetadataAgent: false
   NeutronEnableOVSAgent: false
   NeutronServicePlugins: []
index c9d918f..0a832f4 100644 (file)
@@ -4,11 +4,11 @@ resource_registry:
   OS::TripleO::ControllerExtraConfigPre: ../puppet/extraconfig/pre_deploy/controller/neutron-opencontrail.yaml
   OS::TripleO::ComputeExtraConfigPre: ../puppet/extraconfig/pre_deploy/compute/neutron-opencontrail.yaml
   OS::TripleO::Services::NeutronDhcpAgent: OS::Heat::None
+  OS::TripleO::Services::NeutronL3Agent: OS::Heat::None
 
 parameter_defaults:
   NeutronCorePlugin: neutron_plugin_contrail.plugins.opencontrail.contrail_plugin.NeutronPluginContrailCoreV2
   NeutronServicePlugins: neutron_plugin_contrail.plugins.opencontrail.loadbalancer.plugin.LoadBalancerPlugin
-  NeutronEnableL3Agent: false
   NeutronEnableMetadataAgent: false
   NeutronEnableOVSAgent: false
   NeutronEnableTunnelling: false
index 8f17b8b..47a6f29 100755 (executable)
@@ -2,8 +2,9 @@
 # extensions, configured via puppet
 resource_registry:
   OS::TripleO::ControllerExtraConfigPre: ../puppet/extraconfig/pre_deploy/controller/neutron-plumgrid.yaml
-  # PLUMgrid doesn't require dhcp
+  # PLUMgrid doesn't require dhcp and l3 agents
   OS::TripleO::Services::NeutronDhcpAgent: OS::Heat::None
+  OS::TripleO::Services::NeutronL3Agent: OS::Heat::None
 
 parameter_defaults:
   NeutronCorePlugin: networking_plumgrid.neutron.plugins.plugin.NeutronPluginPLUMgridV2
@@ -24,7 +25,6 @@ parameter_defaults:
   #PLUMgridNeutronPluginVersion: present
   #PLUMgridPlumlibVersion: present
 
-  # PLUMgrid doesn't require l3, ovs and metadata agents
-  NeutronEnableL3Agent: false
+  # PLUMgrid doesn't require ovs and metadata agents
   NeutronEnableMetadataAgent: false
   NeutronEnableOVSAgent: false
index 48e93a0..a73b1b4 100644 (file)
@@ -13,3 +13,4 @@ resource_registry:
   OS::TripleO::Services::GlanceApi: ../puppet/services/pacemaker/glance-api.yaml
   OS::TripleO::Services::GlanceRegistry: ../puppet/services/pacemaker/glance-registry.yaml
   OS::TripleO::Services::NeutronDhcpAgent: ../puppet/services/pacemaker/neutron-dhcp.yaml
+  OS::TripleO::Services::NeutronL3Agent: ../puppet/services/pacemaker/neutron-l3.yaml
index eb967f1..58db81d 100644 (file)
@@ -127,6 +127,7 @@ resource_registry:
   OS::TripleO::Services::GlanceApi: puppet/services/glance-api.yaml
   OS::TripleO::Services::GlanceRegistry: puppet/services/glance-registry.yaml
   OS::TripleO::Services::NeutronDhcpAgent: puppet/services/neutron-dhcp.yaml
+  OS::TripleO::Services::NeutronL3Agent: puppet/services/neutron-l3.yaml
 
 parameter_defaults:
   EnablePackageInstall: false
index cf20b51..3fbfbe5 100644 (file)
@@ -118,10 +118,6 @@ parameters:
     default: false
     description: Enable IPv6 features in Memcached.
     type: boolean
-  NeutronExternalNetworkBridge:
-    description: Name of bridge used for external network traffic.
-    type: string
-    default: 'br-ex'
   NeutronBridgeMappings:
     description: >
       The OVS logical->physical bridge mappings to use. See the Neutron
@@ -668,6 +664,7 @@ parameters:
       - OS::TripleO::Services::GlanceApi
       - OS::TripleO::Services::GlanceRegistry
       - OS::TripleO::Services::NeutronDhcpAgent
+      - OS::TripleO::Services::NeutronL3Agent
     description: A list of service resources (configured in the Heat
                  resource_registry) which represent nested stacks
                  for each service that should get installed on the Controllers.
@@ -928,7 +925,6 @@ resources:
           NeutronFlatNetworks: {get_param: NeutronFlatNetworks}
           NeutronBridgeMappings: {get_param: NeutronBridgeMappings}
           NeutronTenantMtu: {get_param: NeutronTenantMtu}
-          NeutronExternalNetworkBridge: {get_param: NeutronExternalNetworkBridge}
           NeutronEnableTunnelling: {get_param: NeutronEnableTunnelling}
           NeutronEnableL2Pop: {get_param: NeutronEnableL2Pop}
           NeutronNetworkVLANRanges: {get_param: NeutronNetworkVLANRanges}
index d38a24e..57c1c2a 100644 (file)
@@ -314,10 +314,6 @@ parameters:
     type: string
     hidden: true
     default: ''  # Has to be here because of the ignored empty value bug
-  NeutronExternalNetworkBridge:
-    description: Name of bridge used for external network traffic.
-    type: string
-    default: 'br-ex'
   NeutronBridgeMappings:
     description: >
       The OVS logical->physical bridge mappings to use. See the Neutron
@@ -328,10 +324,6 @@ parameters:
       scripts or be sure to keep 'datacentre' as a mapping network name.
     type: comma_delimited_list
     default: "datacentre:br-ex"
-  NeutronEnableL3Agent:
-    description: Knob to enable/disable L3 agent
-    type: boolean
-    default: true
   NeutronEnableMetadataAgent:
     description: Knob to enable/disable Metadata agent
     type: boolean
@@ -976,7 +968,6 @@ resources:
             template: DRIVERS
             params:
               DRIVERS: {get_param: NeutronTypeDrivers}
-        neutron_enable_l3_agent: {get_param: NeutronEnableL3Agent}
         neutron_enable_metadata_agent: {get_param: NeutronEnableMetadataAgent}
         neutron_enable_ovs_agent: {get_param: NeutronEnableOVSAgent}
         neutron_mechanism_drivers:
@@ -996,7 +987,6 @@ resources:
             template: MAPPINGS
             params:
               MAPPINGS: {get_param: NeutronBridgeMappings}
-        neutron_external_network_bridge: {get_param: NeutronExternalNetworkBridge}
         neutron_public_interface: {get_param: NeutronPublicInterface}
         neutron_public_interface_raw_device: {get_param: NeutronPublicInterfaceRawDevice}
         neutron_public_interface_default_route: {get_param: NeutronPublicInterfaceDefaultRoute}
@@ -1386,7 +1376,6 @@ resources:
                 neutron::server::identity_uri: {get_input: keystone_identity_uri}
                 neutron::server::database_connection: {get_input: neutron_dsn}
                 neutron::server::api_workers: {get_input: neutron_workers}
-                neutron::agents::l3::external_network_bridge: {get_input: neutron_external_network_bridge}
                 neutron::network_device_mtu: {get_input: neutron_tenant_mtu}
                 neutron::agents::ml2::ovs::enable_tunneling: {get_input: neutron_enable_tunneling}
                 neutron::agents::ml2::ovs::l2_population: {get_input: neutron_enable_l2pop}
@@ -1399,7 +1388,6 @@ resources:
                 neutron_router_distributed: {get_input: neutron_router_distributed}
                 neutron::core_plugin: {get_input: neutron_core_plugin}
                 neutron::service_plugins: {get_input: neutron_service_plugins}
-                neutron::enable_l3_agent: {get_input: neutron_enable_l3_agent}
                 neutron::enable_metadata_agent: {get_input: neutron_enable_metadata_agent}
                 neutron::enable_ovs_agent: {get_input: neutron_enable_ovs_agent}
                 neutron::plugins::ml2::type_drivers: {get_input: neutron_type_drivers}
index 34ca845..79e0826 100644 (file)
@@ -305,7 +305,6 @@ if hiera('step') >= 4 {
       metadata_proxy_shared_secret => hiera('nova::api::neutron_metadata_proxy_shared_secret'),
     }
   } else {
-    include ::neutron::agents::l3
     include ::neutron::agents::metadata
 
     # If the value of core plugin is set to 'midonet',
@@ -349,13 +348,9 @@ if hiera('step') >= 4 {
         include ::neutron::plugins::ml2::bigswitch::restproxy
         include ::neutron::agents::bigswitch
       }
-      neutron_l3_agent_config {
-        'DEFAULT/ovs_use_veth': value => hiera('neutron_ovs_use_veth', false);
-      }
       Service['neutron-server'] -> Service['neutron-ovs-agent-service']
     }
 
-    Service['neutron-server'] -> Service['neutron-l3']
     Service['neutron-server'] -> Service['neutron-metadata']
   }
 
index 1890918..abb66c6 100644 (file)
@@ -592,12 +592,6 @@ if hiera('step') >= 4 or ( hiera('step') >= 3 and $sync_db ) {
       metadata_proxy_shared_secret => hiera('nova::api::neutron_metadata_proxy_shared_secret'),
     }
   }
-  if hiera('neutron::enable_l3_agent',true) {
-    class { '::neutron::agents::l3' :
-      manage_service => false,
-      enabled        => false,
-    }
-  }
   if hiera('neutron::enable_metadata_agent',true) {
     class { '::neutron::agents::metadata':
       manage_service => false,
@@ -635,9 +629,6 @@ if hiera('step') >= 4 or ( hiera('step') >= 3 and $sync_db ) {
     include ::neutron::plugins::ml2::bigswitch::restproxy
     include ::neutron::agents::bigswitch
   }
-  neutron_l3_agent_config {
-    'DEFAULT/ovs_use_veth': value => hiera('neutron_ovs_use_veth', false);
-  }
 
   include ::cinder
   include ::cinder::config
@@ -1130,12 +1121,6 @@ if hiera('step') >= 5 {
                           Pacemaker::Resource::Service[$::sahara::params::engine_service_name]],
     }
 
-    if hiera('neutron::enable_l3_agent', true) {
-      pacemaker::resource::service { $::neutron::params::l3_agent_service:
-        clone_params => 'interleave=true',
-      }
-    }
-
     if hiera('neutron::enable_ovs_agent', true) {
       pacemaker::resource::service { $::neutron::params::ovs_agent_service:
         clone_params => 'interleave=true',
diff --git a/puppet/services/neutron-l3.yaml b/puppet/services/neutron-l3.yaml
new file mode 100644 (file)
index 0000000..2ea1b19
--- /dev/null
@@ -0,0 +1,37 @@
+heat_template_version: 2016-04-08
+
+description: >
+  OpenStack Neutron L3 agent configured with Puppet
+
+parameters:
+  EndpointMap:
+    default: {}
+    description: Mapping of service endpoint -> protocol. Typically set
+                 via parameter_defaults in the resource registry.
+    type: json
+  MysqlVirtualIPUri:
+    type: string
+    default: ''
+  Debug:
+    type: string
+    default: ''
+  NeutronExternalNetworkBridge:
+    description: Name of bridge used for external network traffic.
+    type: string
+    default: 'br-ex'
+
+resources:
+
+  NeutronBase:
+    type: ./neutron-base.yaml
+
+outputs:
+  role_data:
+    description: Role data for the Neutron L3 agent service.
+    value:
+      config_settings:
+        map_merge:
+          - get_attr: [NeutronBase, role_data, config_settings]
+          - neutron::agents::l3::external_network_bridge: {get_param: NeutronExternalNetworkBridge}
+      step_config: |
+        include tripleo::profile::base::neutron::l3
diff --git a/puppet/services/pacemaker/neutron-l3.yaml b/puppet/services/pacemaker/neutron-l3.yaml
new file mode 100644 (file)
index 0000000..84bff80
--- /dev/null
@@ -0,0 +1,33 @@
+heat_template_version: 2016-04-08
+
+description: >
+  OpenStack Neutron L3 service with Pacemaker configured with Puppet.
+
+parameters:
+  EndpointMap:
+    default: {}
+    description: Mapping of service endpoint -> protocol. Typically set
+                 via parameter_defaults in the resource registry.
+    type: json
+  MysqlVirtualIPUri:
+    type: string
+    default: ''
+
+resources:
+
+  NeutronL3Base:
+    type: ../neutron-l3.yaml
+    properties:
+      EndpointMap: {get_param: EndpointMap}
+      MysqlVirtualIPUri: {get_param: MysqlVirtualIPUri}
+
+outputs:
+  role_data:
+    description: Role data for the Neutron L3 role.
+    value:
+      config_settings:
+        map_merge:
+          - get_attr: [NeutronL3Base, role_data, config_settings]
+          - tripleo::profile::pacemaker::neutron::enable_l3: True
+      step_config: |
+        include ::tripleo::profile::pacemaker::neutron::l3