'fixed_ips' property for a OS::Neutron::Port resource is NOT required, but it throws an KeyError

Bug #1232252 reported by Rupak Ganguly
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Steve Baker

Bug Description

This is a regression bug. The template worked fine 2 days back. The error occurs with both OS::Neutron::Port and OS::Quantum::Port resource types. 'fixed_ips' is NOT a required parameter for creating Neutron ports.

See attached template, which creates a OS::Neutron::Port resource:

  "port_floating": {
   "Type": "OS::Neutron::Port",
   "Properties": {
    "network_id": { "Ref": "network" }
   }
  }

but the stack fails with an error:

stack_status_reason | Resource create failed: KeyError: 'fixed_ips'

The traceback is as follows:

2013-09-27 20:30:33.634 27215 ERROR heat.engine.resource [-] CREATE : Port "port_floating"
2013-09-27 20:30:33.634 27215 TRACE heat.engine.resource Traceback (most recent call last):
2013-09-27 20:30:33.634 27215 TRACE heat.engine.resource File "/home/ubuntu/heat-hpcloud/heat/heat/engine/resource.py", line 358, in _do_action
2013-09-27 20:30:33.634 27215 TRACE heat.engine.resource handle_data = handle()
2013-09-27 20:30:33.634 27215 TRACE heat.engine.resource File "/home/ubuntu/heat-hpcloud/heat/heat/engine/resources/neutron/port.py", line 76, in handle_create
2013-09-27 20:30:33.634 27215 TRACE heat.engine.resource for fixed_ip in props['fixed_ips']:
2013-09-27 20:30:33.634 27215 TRACE heat.engine.resource KeyError: 'fixed_ips'
2013-09-27 20:30:33.634 27215 TRACE heat.engine.resource
2013-09-27 20:30:33.646 27215 WARNING heat.engine.service [-] Stack create failed, status FAILED

Revision history for this message
Rupak Ganguly (rupakg) wrote :
Jeff Peeler (jpeeler-z)
Changed in heat:
assignee: nobody → Jeff Peeler (jpeeler-z)
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/48749

Changed in heat:
status: New → In Progress
Steven Dake (sdake)
Changed in heat:
milestone: none → havana-rc1
importance: Undecided → High
Changed in heat:
assignee: Jeff Peeler (jpeeler-z) → Steve Baker (steve-stevebaker)
Revision history for this message
Faramir (faramir) wrote : AUTO: Hai Liang Wang is on vacation from 09-29 to 10-08 (returning 10/09/2013)

I am out of the office until 10/09/2013.

Conact me by phone for anything urgency.
Phone Number - 15801213126 . thanks !

Note: This is an automated response to your message "[Bug 1232252] Re:
'fixed_ips' property for a OS::Neutron::Port resource is NOT required,
but it throws an KeyError" sent on 09/30/2013 7:07:39.

This is the only notification you will receive while this person is away.

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

Reviewed: https://review.openstack.org/48749
Committed: http://github.com/openstack/heat/commit/3f1a3091866ce0b071c3ae8794f695dee021e001
Submitter: Jenkins
Branch: master

commit 3f1a3091866ce0b071c3ae8794f695dee021e001
Author: Jeff Peeler <email address hidden>
Date: Fri Sep 27 16:52:41 2013 -0400

    Do not assume fixed_ips is a specified property

    Check if property is set before attempting use to avoid KeyError

    Fixes bug #1232252

    Change-Id: I731c13eb73b1ed624a99f84e4b6977f82a731cfc

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: havana-rc1 → 2013.2
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.