Browse Source

Merge pull request #6525 from luis5tb/fix-provider-network

Fix provider network support at openstack playbook
Michael Gugino 7 years ago
parent
commit
986b28f8ec

+ 17 - 7
roles/openshift_openstack/templates/heat_stack.yaml.j2

@@ -523,7 +523,7 @@ resources:
           floating_network:
             if:
               - no_floating
-              - null
+              - ''
               - {{ openshift_openstack_external_network_name }}
 {% if openshift_openstack_provider_network_name %}
           attach_float_net: false
@@ -589,8 +589,13 @@ resources:
           secgrp:
             - { get_resource: lb-secgrp }
             - { get_resource: common-secgrp }
-{% if not openshift_openstack_provider_network_name %}
-          floating_network: {{ openshift_openstack_external_network_name }}
+          floating_network:
+            if:
+              - no_floating
+              - ''
+              - {{ openshift_openstack_external_network_name }}
+{% if openshift_openstack_provider_network_name %}
+          attach_float_net: false
 {% endif %}
           volume_size: {{ openshift_openstack_lb_volume_size }}
 {% if not openshift_openstack_provider_network_name %}
@@ -655,7 +660,7 @@ resources:
           floating_network:
             if:
               - no_floating
-              - null
+              - ''
               - {{ openshift_openstack_external_network_name }}
 {% if openshift_openstack_provider_network_name %}
           attach_float_net: false
@@ -725,7 +730,7 @@ resources:
           floating_network:
             if:
               - no_floating
-              - null
+              - ''
               - {{ openshift_openstack_external_network_name }}
 {% if openshift_openstack_provider_network_name %}
           attach_float_net: false
@@ -792,8 +797,13 @@ resources:
 {% endif %}
             - { get_resource: infra-secgrp }
             - { get_resource: common-secgrp }
-{% if not openshift_openstack_provider_network_name %}
-          floating_network: {{ openshift_openstack_external_network_name }}
+          floating_network:
+            if:
+              - no_floating
+              - ''
+              - {{ openshift_openstack_external_network_name }}
+{% if openshift_openstack_provider_network_name %}
+          attach_float_net: false
 {% endif %}
           volume_size: {{ openshift_openstack_infra_volume_size }}
 {% if openshift_openstack_infra_server_group_policies|length > 0 %}

+ 0 - 2
roles/openshift_openstack/templates/heat_stack_server.yaml.j2

@@ -102,13 +102,11 @@ parameters:
     label: Attach-float-net
     description: A switch for floating network port connection
 
-{% if not openshift_openstack_provider_network_name %}
   floating_network:
     type: string
     default: ''
     label: Floating network
     description: Network to allocate floating IP from
-{% endif %}
 
   availability_zone:
     type: string