When using external_resource_subnet_id and external_resource_segment_id in additional subnets the deployment fails

Bug #1840059 reported by Martin Schuppert
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Undecided
Martin Schuppert

Bug Description

when using e.g.:
- name: InternalApi
  name_lower: internal_api
  external_resource_network_id: 5eb79743-7ff4-4f68-9904-6e9c36fbaaa6
  external_resource_subnet_id: dbc24086-0aa7-421d-857d-4e3956adec10
  external_resource_segment_id: e1a510f2-e866-43aa-9a2b-05aa8e8c8d47
  external_resource_vip_id: 1a287ad7-e574-483a-8288-e7c385ee88a0
  vip: true
  vlan: 20
  ip_subnet: '172.16.2.0/24'
  allocation_pools: [{'start': '172.16.2.4', 'end': '172.16.2.250'}]
  ipv6_subnet: 'fd00:fd00:fd00:2000::/64'
  ipv6_allocation_pools: [{'start': 'fd00:fd00:fd00:2000::10', 'end': 'fd00:fd00:fd00:2000:ffff:ffff:ffff:fffe'}]
  mtu: 1500
  subnets:
    internal_api_cell1:
      external_resource_subnet_id: 16b8cf48-6ca1-4117-ad90-3273396cb41d
      external_resource_segment_id: b310daec-7811-46be-a958-a05a5b0569ef
      vlan: 21
      ip_subnet: '172.17.2.0/24'
      allocation_pools: [{'start': '172.17.2.10', 'end': '172.17.2.250'}]
      gateway_ip: '172.17.2.254'

The deployment fails with:

 Stack cell1-cmp/df17e983-9945-4045-97a5-942eebe2f8e1 CREATE_FAILED

cell1-cmp.Networks.InternalApiNetwork.InternalApiSegment_internal_api_cell1:
  resource_type: OS::Neutron::Segment
  physical_resource_id:
  status: CREATE_FAILED
  status_reason: |
    ConflictException: resources.InternalApiSegment_internal_api_cell1: ConflictException: 409: Client Error for url: https://192.168.24.2:13696/v2.0/segments, Unable to create the flat network. Physical network internal_api_internal_api_cell1 is in use.
cell1-cmp.Networks.StorageMgmtNetwork.StorageMgmtSegment_storage_mgmt_cell1:
  resource_type: OS::Neutron::Segment
  physical_resource_id:
  status: CREATE_FAILED
  status_reason: |
    ConflictException: resources.StorageMgmtSegment_storage_mgmt_cell1: ConflictException: 409: Client Error for url: https://192.168.24.2:13696/v2.0/segments, Unable to create the flat network. Physical network storage_mgmt_storage_mgmt_cell1 is in use.
cell1-cmp.Networks.StorageNetwork.StorageSegment_storage_cell1:
  resource_type: OS::Neutron::Segment
  physical_resource_id:
  status: CREATE_FAILED
  status_reason: |
    ConflictException: resources.StorageSegment_storage_cell1: ConflictException: 409: Client Error for url: https://192.168.24.2:13696/v2.0/segments, Unable to create the flat network. Physical network storage_storage_cell1 is in use.
cell1-cmp.Networks.ExternalNetwork.ExternalSegment_external_cell1:
  resource_type: OS::Neutron::Segment
  physical_resource_id:
  status: CREATE_FAILED
  status_reason: |
    ConflictException: resources.ExternalSegment_external_cell1: ConflictException: 409: Client Error for url: https://192.168.24.2:13696/v2.0/segments, Unable to create the flat network. Physical network external_external_cell1 is in use.
Heat Stack create failed.
Heat Stack create failed.

The issue is that the generated heat templates don't include the external_resource_subnet_id / external_resource_segment_id reference. Therefore heat tries to create them.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (master)

Fix proposed to branch: master
Review: https://review.opendev.org/676226

Changed in tripleo:
assignee: nobody → Martin Schuppert (mschuppert)
status: New → In Progress
tags: added: stein-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (master)

Reviewed: https://review.opendev.org/676226
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=253fef996a7ef770106649dcf62ccf7a2b775adb
Submitter: Zuul
Branch: master

commit 253fef996a7ef770106649dcf62ccf7a2b775adb
Author: Martin Schuppert <email address hidden>
Date: Tue Aug 13 17:44:21 2019 +0200

    Fix external resource usage in additional subnets

    When external_resource_subnet_id / external_resource_segment_id
    are used in additional subnets, the value is not evaluated correct
    and the conditional never met. As a result the created heat
    template won't include the extrenal resource reference

    subnet contains the name of the subnet, so
    subnet.external_resource_segment_id won't return the external
    id. Lets use network.subnets[subnet].external_resource_segment_id
    instead.

    Change-Id: I0a9d3cafa8f66e05410f135b7631fc037d7d2471
    Closes-Bug: #1840059

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (stable/stein)

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/676666

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (stable/stein)

Reviewed: https://review.opendev.org/676666
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=d5723703f3654f1c0ddca74cd5c0e1f0c47ee8fe
Submitter: Zuul
Branch: stable/stein

commit d5723703f3654f1c0ddca74cd5c0e1f0c47ee8fe
Author: Martin Schuppert <email address hidden>
Date: Tue Aug 13 17:44:21 2019 +0200

    Fix external resource usage in additional subnets

    When external_resource_subnet_id / external_resource_segment_id
    are used in additional subnets, the value is not evaluated correct
    and the conditional never met. As a result the created heat
    template won't include the extrenal resource reference

    subnet contains the name of the subnet, so
    subnet.external_resource_segment_id won't return the external
    id. Lets use network.subnets[subnet].external_resource_segment_id
    instead.

    Change-Id: I0a9d3cafa8f66e05410f135b7631fc037d7d2471
    Closes-Bug: #1840059
    (cherry picked from commit 253fef996a7ef770106649dcf62ccf7a2b775adb)

tags: added: in-stable-stein
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 10.6.1

This issue was fixed in the openstack/tripleo-heat-templates 10.6.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 11.2.0

This issue was fixed in the openstack/tripleo-heat-templates 11.2.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.