InternalApi heat resource renamed to Internal

Bug #1718764 reported by Tim Rozet
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
High
Tim Rozet

Bug Description

With the new way of dynamically generating networks via the network_data.yaml file:
https://github.com/openstack/tripleo-heat-templates/blob/master/network_data.yaml

The heat resource OS::Tripleo::Network::InternalApi has been renamed to OS::Tripleo::Network::Internal. This breaks backwards compatibility when using previous heat templates with resource registry entries that override that resource. Such as:

resource_registry:
  OS::TripleO::Network::External: |-
     /usr/share/openstack-tripleo-heat-templates/network/external.yaml
  OS::TripleO::Network::InternalApi: OS::Heat::None

The cause of this renaming is due to InternalApi network having compat_name:
https://github.com/openstack/tripleo-heat-templates/blob/master/network_data.yaml#L61

As it is used to create the resource registry via j2:
https://github.com/openstack/tripleo-heat-templates/blob/stable/pike/network/networks.j2.yaml#L7

By removing compat_name for InternalApi network, the problem is fixed.

Tim Rozet (trozet)
Changed in tripleo:
assignee: nobody → Tim Rozet (trozet)
status: New → In Progress
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.openstack.org/506345

Changed in tripleo:
importance: Undecided → High
tags: added: pike-backport-potential
Changed in tripleo:
assignee: Tim Rozet (trozet) → Dan Sneddon (dsneddon)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (master)

Reviewed: https://review.openstack.org/506345
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=97244b942d29d2b5acd7a3eb07acdba0d9b99677
Submitter: Jenkins
Branch: master

commit 97244b942d29d2b5acd7a3eb07acdba0d9b99677
Author: Tim Rozet <email address hidden>
Date: Thu Sep 21 15:47:44 2017 -0400

    Fixes heat resource name for Internal API Network

    With the dynamic Jinja2 rendering for networks, the heat resource for
    Internal API network was accidentally being renamed to:
    OS::TripleO::Network::Internal

    when it should be the same as previous versions:
    OS::TripleO::Network::InternalApi

    This patch removes the 'compat_name' which was overriding the network
    name for rendering the resource. This patch also removes the
    compat_name functionality from the network/networks.j2.yaml file
    since it is no longer needed.

    Closes-Bug: 1718764

    Change-Id: If756cddd91933edb303cc056515d98b941a3eb14
    Signed-off-by: Tim Rozet <email address hidden>

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/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/509583

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

Reviewed: https://review.openstack.org/509583
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=520be6bb4056ead8e6fad08ad96e99f7da5b341e
Submitter: Jenkins
Branch: stable/pike

commit 520be6bb4056ead8e6fad08ad96e99f7da5b341e
Author: Tim Rozet <email address hidden>
Date: Thu Sep 21 15:47:44 2017 -0400

    Fixes heat resource name for Internal API Network

    With the dynamic Jinja2 rendering for networks, the heat resource for
    Internal API network was accidentally being renamed to:
    OS::TripleO::Network::Internal

    when it should be the same as previous versions:
    OS::TripleO::Network::InternalApi

    This patch removes the 'compat_name' which was overriding the network
    name for rendering the resource. This patch also removes the
    compat_name functionality from the network/networks.j2.yaml file
    since it is no longer needed.

    Closes-Bug: 1718764

    Change-Id: If756cddd91933edb303cc056515d98b941a3eb14
    Signed-off-by: Tim Rozet <email address hidden>
    (cherry picked from commit 97244b942d29d2b5acd7a3eb07acdba0d9b99677)

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

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

Revision history for this message
Alex Schultz (alex-schultz) wrote :

fix for pike being reverted https://review.openstack.org/#/c/511558/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to tripleo-heat-templates (master)

Reviewed: https://review.openstack.org/511559
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=8817c546d3bce0eca9b92177c78f86f28076c7d4
Submitter: Jenkins
Branch: master

commit 8817c546d3bce0eca9b92177c78f86f28076c7d4
Author: Tim Rozet <email address hidden>
Date: Thu Oct 12 19:25:53 2017 +0000

    Revert "Fixes heat resource name for Internal API Network"

    This reverts commit 97244b942d29d2b5acd7a3eb07acdba0d9b99677.

    This introduced a bug:
    https://bugzilla.redhat.com/show_bug.cgi?id=1501515

    where during upgrade, the previous heat resource would for the
    InternalApi network would have the incorrect name "Internal" and the
    upgrade would try to delete the resource in order to create
    "InternalApi". This needs to be reverted and a proper fix will be
    submitted that accounts for this upgrade scenario.

    Related-Bug: #1718764

    Change-Id: Ied908020ed856a5573f1333b9139029d0ffc37b4

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

Reviewed: https://review.openstack.org/511558
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=a8e7a2087532658af9703dc69481958657b3868f
Submitter: Jenkins
Branch: stable/pike

commit a8e7a2087532658af9703dc69481958657b3868f
Author: Tim Rozet <email address hidden>
Date: Thu Oct 12 19:21:59 2017 +0000

    Revert "Fixes heat resource name for Internal API Network"

    This reverts commit 520be6bb4056ead8e6fad08ad96e99f7da5b341e.

    This introduced a bug:
    https://bugzilla.redhat.com/show_bug.cgi?id=1501515

    where during upgrade, the previous heat resource would for the
    InternalApi network would have the incorrect name "Internal" and the
    upgrade would try to delete the resource in order to create
    "InternalApi". This needs to be reverted and a proper fix will be
    submitted that accounts for this upgrade scenario.

    Related-Bug: #1718764

    Change-Id: Id906fac421db317ce48d5cecfcd43397a0f4ab3d

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

Fix proposed to branch: master
Review: https://review.openstack.org/512395

Tim Rozet (trozet)
Changed in tripleo:
status: Fix Released → In Progress
assignee: Dan Sneddon (dsneddon) → Tim Rozet (trozet)
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.openstack.org/512397

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

This issue was fixed in the openstack/tripleo-heat-templates 8.0.0.0b1 development milestone.

Changed in tripleo:
assignee: Tim Rozet (trozet) → Alex Schultz (alex-schultz)
Changed in tripleo:
assignee: Alex Schultz (alex-schultz) → Tim Rozet (trozet)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (master)

Reviewed: https://review.openstack.org/512395
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=602b481804a79d0ef106b1b21f0bdcd15df7f39f
Submitter: Zuul
Branch: master

commit 602b481804a79d0ef106b1b21f0bdcd15df7f39f
Author: Tim Rozet <email address hidden>
Date: Mon Oct 16 13:56:24 2017 -0400

    Adds detection for legacy API network resource

    Currently in network_data.yaml there is compat_name which is used as a
    workaround for upgrades with regards to a bug where the Heat resource
    for API network was being created as InternalNetwork instead of
    InternalApiNetwork. This workaround does work for upgrades, but
    consequently also causes all future new deployments to have the wrong
    resource name.

    This patch adds detection, so that if the legacy resource is detected
    already in the overcloud stack, then the compatibility will be enabled
    if not already set in network_data.yaml. This allows for the removal of
    compat_name from the network in network_data.yaml and thus removing the
    incorrect name for future deployments.

    Partial-Bug: 1718764

    Change-Id: I695259ad87e2303f948875078bccb619786470e0
    Signed-off-by: Tim Rozet <email address hidden>

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

Reviewed: https://review.openstack.org/512397
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=1fd272a308402b31626d516fbd91513a4de0c2ba
Submitter: Zuul
Branch: master

commit 1fd272a308402b31626d516fbd91513a4de0c2ba
Author: Tim Rozet <email address hidden>
Date: Mon Oct 16 15:41:39 2017 -0400

    Fixes InternalApi Heat network resource

    Detection for using legacy network is now in tripleo-common so there is
    no need to set it network_data.yaml anymore.

    Depends-On: I695259ad87e2303f948875078bccb619786470e0

    Closes-Bug: 1718764

    Change-Id: I52468a687ba7215ec32c5700de346b3ed4ebd1f9
    Signed-off-by: Tim Rozet <email address hidden>

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 8.0.0.0b2

This issue was fixed in the openstack/tripleo-heat-templates 8.0.0.0b2 development milestone.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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