port_extra_properties feature of the OS::Nova::Server Heat resource in Mitaka doesn't seem to be working correctly

Bug #1607364 reported by Perry
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Thomas Herve

Bug Description

port_extra_properties feature of the OS::Nova::Server Heat resource in Mitaka doesn't seem to be working correctly.

Neutron didn't receive any allowed_address_pairs and there is some thing wrong with Heat.

Request body: {u'port': {u'network_id': u'b6bdd5ae-0213-4cb8-956e-610468079e27', u'allowed_address_pairs': [{u'ip_address': u'10.10.10.10/24'}], u'admin_state_up': True}}

When adding subnet info to the template (uncomment the line of subnet below), Heat passed value_specs to neutron which won't understand value_specs.

Request body: {u'port': {u'name': u'server1-port-0', u'allowed_address_pairs': [{u'ip_address': u'192.168.10.0/24', u'mac_address': u'fa:16:3e:00:00:00'}], u'admin_state_up': True, u'network_id': u'b6bdd5ae-0213-4cb8-956e-610468079e27', u'value_specs': {}, u'fixed_ips': [{u'subnet_id': u'cd50dc29-05ff-4df7-a861-3bb528b38720'}]}}

#template

resources:
  server1:
    type: OS::Nova::Server
    properties:
      name: Server1
      image: { get_param: image }
      flavor: { get_param: flavor }
      key_name: { get_param: key_name }
      networks:
        - network: { get_param: private_net_id }
# subnet: { get_param: private_subnet_id }
          port_extra_properties:
            allowed_address_pairs:
               - ip_address: 192.168.10.0/24
                 mac_address: fa:16:3e:00:00:00

Revision history for this message
Thomas Herve (therve) wrote :

So you need the subnet to be able to create the port. If you don't pass the subnet, heat ignores port_extra_properties, which sounds like a problem. The other problem is that when you pass the subnet, it fails on value_specs because it's not a correct property.

Changed in heat:
importance: Undecided → Medium
assignee: nobody → Thomas Herve (therve)
milestone: none → newton-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

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

Changed in heat:
status: New → In Progress
Revision history for this message
Perry (panxia6679) wrote :

Thanks for your quick help.

The fix looks work. Two failed test cases were test_api_reload_on_sighup and test_stack_validate_provider_references_parent_resource. The former is to verify workers and the latter one is to verify registered stack with software deployment.

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

Reviewed: https://review.openstack.org/348409
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=2245aa117e8fae5710244ab1182b499aba82b339
Submitter: Jenkins
Branch: master

commit 2245aa117e8fae5710244ab1182b499aba82b339
Author: Thomas Herve <email address hidden>
Date: Thu Jul 28 16:54:37 2016 +0200

    Don't pass value_specs when creating internal port

    When we create the internal port on a nova server, we shouldn't pass
    value_specs when specifying extra properties, as it's an internal
    dictionary which is not accepted by the API.

    Change-Id: I0bb4407e89b5575dbaf8f198402e0926b550224d
    Closes-Bug: #1607364

Changed in heat:
status: In Progress → Fix Released
Revision history for this message
Perry (panxia6679) wrote :

HI Thomas,

This was found in Mitaka. Would you please submit the change to Mitaka as well? Welcome any suggestion. Thanks.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/356985

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

Reviewed: https://review.openstack.org/356985
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=97d8f9c3d6ddfe1195217a12a1d5fa3ffe262379
Submitter: Jenkins
Branch: stable/mitaka

commit 97d8f9c3d6ddfe1195217a12a1d5fa3ffe262379
Author: Thomas Herve <email address hidden>
Date: Thu Jul 28 16:54:37 2016 +0200

    Don't pass value_specs when creating internal port

    When we create the internal port on a nova server, we shouldn't pass
    value_specs when specifying extra properties, as it's an internal
    dictionary which is not accepted by the API.

    Change-Id: I0bb4407e89b5575dbaf8f198402e0926b550224d
    Closes-Bug: #1607364
    (cherry picked from commit 2245aa117e8fae5710244ab1182b499aba82b339)

tags: added: in-stable-mitaka
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/heat 7.0.0.0b3

This issue was fixed in the openstack/heat 7.0.0.0b3 development milestone.

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

This issue was fixed in the openstack/heat 6.1.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.