Browse Source

Neutron L3 service cleanups for hiera json hook

This patch resolves a few issues I noticed when porting our
Neutron L3 service to support the new heat hiera agent hook (which
uses Json instead of Yaml).

 - If NeutronExternalNetworkBridge is an emptry string '' Json was
   dropping the single quotes thus causing the bridge to get set
   incorrectly in the config file. To correct this we use a heat
   conditional to avoid setting the external bridge (the '' default
   is what we want in this case) if the bridge is an empty string.

Change-Id: I5037cbde6b76a37a4c22c4616278420e9d759109
Partial-bug: #1596373
tags/6.0.0.0b1
Dan Prince 2 years ago
parent
commit
36aa652247
1 changed files with 15 additions and 7 deletions
  1. 15
    7
      puppet/services/neutron-l3.yaml

+ 15
- 7
puppet/services/neutron-l3.yaml View File

@@ -1,4 +1,4 @@
1
-heat_template_version: 2016-04-08
1
+heat_template_version: 2016-10-14
2 2
 
3 3
 description: >
4 4
   OpenStack Neutron L3 agent configured with Puppet
@@ -43,6 +43,10 @@ parameters:
43 43
       tag: openstack.neutron.agent.l3
44 44
       path: /var/log/neutron/l3-agent.log
45 45
 
46
+conditions:
47
+
48
+  external_network_bridge_empty: {equals : [{get_param: NeutronExternalNetworkBridge}, "''"]}
49
+
46 50
 resources:
47 51
 
48 52
   NeutronBase:
@@ -63,12 +67,16 @@ outputs:
63 67
         - neutron
64 68
       config_settings:
65 69
         map_merge:
66
-          - get_attr: [NeutronBase, role_data, config_settings]
70
+        - get_attr: [NeutronBase, role_data, config_settings]
71
+        - neutron::agents::l3::router_delete_namespaces: True
72
+          neutron::agents::l3::agent_mode: {get_param: NeutronL3AgentMode}
73
+          tripleo.neutron_l3.firewall_rules:
74
+            '106 neutron_l3 vrrp':
75
+              proto: vrrp
76
+        - 
77
+          if:
78
+          - external_network_bridge_empty
79
+          - {}
67 80
           - neutron::agents::l3::external_network_bridge: {get_param: NeutronExternalNetworkBridge}
68
-            neutron::agents::l3::router_delete_namespaces: True
69
-            neutron::agents::l3::agent_mode : {get_param: NeutronL3AgentMode}
70
-            tripleo.neutron_l3.firewall_rules:
71
-              '106 neutron_l3 vrrp':
72
-                proto: vrrp
73 81
       step_config: |
74 82
         include tripleo::profile::base::neutron::l3

Loading…
Cancel
Save