Zun changes the format of 'addresses' attribute

Bug #1709191 reported by hongbin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
hongbin

Bug Description

The OS::Zun::Container resource has a 'addresses' attribute. This attribute is of format:

  {
      'private': [{
          'version': 4,
          'addr': '10.0.0.12',
          'port': 'ab5c12d8-f414-48a3-b765-8ce34a6714d2'
      }]
  }

With the original format, users can retrieve IP address by:

  {get_attr: [<container>, addresses, private, 0, addr]}

In order to handle the scenario that multiple neutron networks have the same name, Zun switches to use uuid instead:

    {
      <uuid>: [{
          'version': 4,
          'addr': '10.0.0.12',
          'port': 'ab5c12d8-f414-48a3-b765-8ce34a6714d2'
      }]
  }

For users who try to retrieve IP address by name, it will break.

hongbin (hongbin034)
Changed in heat:
assignee: nobody → hongbin (hongbin034)
Changed in heat:
status: New → In Progress
Rico Lin (rico-lin)
Changed in heat:
importance: Undecided → Medium
milestone: none → pike-rc1
tags: added: zun
tags: added: backward-compatibility
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/491081
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=46c57e7ae0e0ec905370f7dd61391c8f8a2646f4
Submitter: Jenkins
Branch: master

commit 46c57e7ae0e0ec905370f7dd61391c8f8a2646f4
Author: Hongbin Lu <email address hidden>
Date: Fri Aug 4 20:11:11 2017 +0000

    Extend addresses attribute of Zun container

    The original 'addresses' field is a map from neutron network uuid
    to an address list. For example:

      {'ed5c1b52-01ab-4a89-8b99-00705d9066c6': [..]}

    This commit proposes to extend it to neutron network name. This
    allows the address list to be hashed from uuid or name of a network.

      {'ed5c1b52-01ab-4a89-8b99-00705d9066c6': [...],
       'private': [...]}

    This improvement will make the format of addresses consistent
    between containers and VMs. In addition, it allows retrieving IP
    addresses through either network name or network id. For example:

      {get_attr: [my-container, addresses, private, 0, addr]}

    or

      {get_attr: [my-container, addresses, <uuid>, 0, addr]}

    The first form is more user-friendly and the latter is able to
    resolve ambiguity that two networks have the same name.

    Closes-Bug: #1709191
    Change-Id: Ib319e3683529fe71ee1c8dbe3087c9f30f1f1116

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

This issue was fixed in the openstack/heat 9.0.0.0rc1 release candidate.

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.