OS::Nova::Server resource fails on clouds which don't implement os_interface extension

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

Bug Description

The failure is of the form:

== BEGIN STACKTRACE ==
2015-09-24 10:27:10.948 19121 INFO heat.engine.resource [-] CREATE: CloudServer "test_server" [80180c63-6ac3-4de8-9089-83122180c2f2] Stack "pm-test-2" [cfd09d70-8b77-4985-88e4-316966002fa3]
2015-09-24 10:27:10.948 19121 ERROR heat.engine.resource Traceback (most recent call last):
2015-09-24 10:27:10.948 19121 ERROR heat.engine.resource File "/opt/heat/lib/python2.7/site-packages/heat/engine/resource.py", line 612, in _action_recorder
2015-09-24 10:27:10.948 19121 ERROR heat.engine.resource yield
2015-09-24 10:27:10.948 19121 ERROR heat.engine.resource File "/opt/heat/lib/python2.7/site-packages/heat/engine/resource.py", line 682, in _do_action
2015-09-24 10:27:10.948 19121 ERROR heat.engine.resource yield self.action_handler_task(action, args=handler_args)
2015-09-24 10:27:10.948 19121 ERROR heat.engine.resource File "/opt/heat/lib/python2.7/site-packages/heat/engine/scheduler.py", line 309, in wrapper
2015-09-24 10:27:10.948 19121 ERROR heat.engine.resource step = next(subtask)
2015-09-24 10:27:10.948 19121 ERROR heat.engine.resource File "/opt/heat/lib/python2.7/site-packages/heat/engine/resource.py", line 656, in action_handler_task
2015-09-24 10:27:10.948 19121 ERROR heat.engine.resource while not check(handler_data):
2015-09-24 10:27:10.948 19121 ERROR heat.engine.resource File "/opt/heat/lib/heat/rackspace/cloud_server.py", line 165, in check_create_complete
2015-09-24 10:27:10.948 19121 ERROR heat.engine.resource if not super(CloudServer, self).check_create_complete(server_id):
2015-09-24 10:27:10.948 19121 ERROR heat.engine.resource File "/opt/heat/lib/python2.7/site-packages/heat/engine/resources/openstack/nova/server.py", line 762, in check_create_complete
2015-09-24 10:27:10.948 19121 ERROR heat.engine.resource self.store_external_ports()
2015-09-24 10:27:10.948 19121 ERROR heat.engine.resource File "/opt/heat/lib/python2.7/site-packages/heat/engine/resources/openstack/nova/server_network_mixin.py", line 163, in store_external_ports
2015-09-24 10:27:10.948 19121 ERROR heat.engine.resource ifaces = server.interface_list()
2015-09-24 10:27:10.948 19121 ERROR heat.engine.resource File "/opt/heat/lib/python2.7/site-packages/novaclient/v2/servers.py", line 399, in interface_list
2015-09-24 10:27:10.948 19121 ERROR heat.engine.resource return self.manager.interface_list(self)
2015-09-24 10:27:10.948 19121 ERROR heat.engine.resource File "/opt/heat/lib/python2.7/site-packages/novaclient/v2/servers.py", line 1240, in interface_list
2015-09-24 10:27:10.948 19121 ERROR heat.engine.resource 'interfaceAttachments')
2015-09-24 10:27:10.948 19121 ERROR heat.engine.resource File "/opt/heat/lib/python2.7/site-packages/novaclient/base.py", line 72, in _list
2015-09-24 10:27:10.948 19121 ERROR heat.engine.resource _resp, body = self.api.client.get(url)
2015-09-24 10:27:10.948 19121 ERROR heat.engine.resource File "/opt/heat/lib/python2.7/site-packages/novaclient/client.py", line 446, in get
2015-09-24 10:27:10.948 19121 ERROR heat.engine.resource return self._cs_request(url, 'GET', **kwargs)
2015-09-24 10:27:10.948 19121 ERROR heat.engine.resource File "/opt/heat/lib/python2.7/site-packages/novaclient/client.py", line 424, in _cs_request
2015-09-24 10:27:10.948 19121 ERROR heat.engine.resource resp, body = self._time_request(url, method, **kwargs)
2015-09-24 10:27:10.948 19121 ERROR heat.engine.resource File "/opt/heat/lib/python2.7/site-packages/novaclient/client.py", line 397, in _time_request
2015-09-24 10:27:10.948 19121 ERROR heat.engine.resource resp, body = self.request(url, method, **kwargs)
2015-09-24 10:27:10.948 19121 ERROR heat.engine.resource File "/opt/heat/lib/python2.7/site-packages/novaclient/client.py", line 391, in request
2015-09-24 10:27:10.948 19121 ERROR heat.engine.resource raise exceptions.from_response(resp, body, url, method)
2015-09-24 10:27:10.948 19121 ERROR heat.engine.resource NotFound: Not found (HTTP 404) (Request-ID: req-0aaaf3b0-0dc9-463b-991d-4ee12cc233c4)

== END STACKTRACE ==

This can be reproduced by the following code using novaclient:

== BEGIN PYTHON CODE ==
from novaclient import client as novaclient
args = {...}
client = novaclient.Client(1.1, **args)
server = client.servers.get(<uuid>)
print server.interface_list()

== END PYTHON CODE ==

The os-interface extension is documented here: http://developer.openstack.org/api-ref-compute-v2-ext.html#os-interface. Since its an extension, its not guaranteed to exist on vendor clouds.

Revision history for this message
Sergey Kraynev (skraynev) wrote :

This issue affects two resources Nova::Server and EC2::Instance.
Related code was added couple releases ago, so probably we have not so much users without this extension.
Anyway I think it should be fixed and backported.

Changed in heat:
status: New → Triaged
importance: Undecided → Medium
milestone: none → mitaka-1
assignee: nobody → Sergey Kraynev (skraynev)
Changed in heat:
assignee: Sergey Kraynev (skraynev) → Pratik Mallya (pratik-mallya)
status: Triaged → In Progress
tags: added: liberty-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

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

commit 46d8c276b70e7698438988faa9d997577a7e1750
Author: Pratik Mallya <email address hidden>
Date: Thu Oct 1 17:41:09 2015 -0500

    Check if os-interface extension is present before saving ports

    If that extension is not present, then the code to extract and
    save ports created during server create by nova will fail.

    Change-Id: I6008a0da0c16a34c40e343af4e7237520db4ae36
    Closes-Bug: #1499877

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
no longer affects: heat/mitaka
no longer affects: heat/liberty
Changed in heat:
status: Triaged → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/231734

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

Reviewed: https://review.openstack.org/231734
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=fecc2bacb51c7dabdb83b87313df48dea527feae
Submitter: Jenkins
Branch: stable/liberty

commit fecc2bacb51c7dabdb83b87313df48dea527feae
Author: Pratik Mallya <email address hidden>
Date: Thu Oct 1 17:41:09 2015 -0500

    Check if os-interface extension is present before saving ports

    If that extension is not present, then the code to extract and
    save ports created during server create by nova will fail.

    Change-Id: I6008a0da0c16a34c40e343af4e7237520db4ae36
    Closes-Bug: #1499877
    (cherry picked from commit 46d8c276b70e7698438988faa9d997577a7e1750)

tags: added: in-stable-liberty
Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: liberty-rc2 → 5.0.0
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/235237

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)
Download full text (9.5 KiB)

Reviewed: https://review.openstack.org/235237
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=4bf298763005b4b8e0c9c8d64ad7ad0863405b50
Submitter: Jenkins
Branch: master

commit 4348b7ababd1048e17ec354ca38c903c908cd74e
Author: Steve Baker <email address hidden>
Date: Tue Oct 6 12:54:24 2015 +1300

    Do no net/subnet checks during validate

    Currently validation fails if the network or the subnet are defined in
    the same template as the server because they don't exist during
    validate.

    _validate_belonging_subnet_to_net is called during _build_nics so this
    check still happens when the required resources actually exist.

    Also, test method validate_internal_port_subnet_not_this_network was not
    running because its name was not prefixed with test_. Fixing and
    updating this test revealed issues with the validation failed message.

    Closes-Bug: #1503060
    Change-Id: I2e062abf5b9fb7446b979ba6acc2e2b531d957d6

commit 7e911cec083e98f344bfcfeb7e2e843ce2330d5d
Author: Pratik Mallya <email address hidden>
Date: Mon Oct 5 00:34:12 2015 -0500

    Correctly filter events on resource name

    Filtering on resource name can be accomplished by using the db
    filters instead of using a filter method. Furthermore, using a
    custom filter breaks certain assumptions made by other parts of
    the codebase, which lead to pagination being broken.
    Specifically, custom filter for resource name is applied only
    after other filtering is finished. As a result, we try to find
    result from only 1 event and this event belongs to whole
    stack and thus its resource_name is equal to the stack name.
    This returns an event not found error instead of returning
    the first event assosciated with the resource name.

    Change-Id: Ie7d28ffb88a79d6e0f516f0db385be2eed59f7f0
    Closes-Bug: #1502751
    (cherry picked from commit 6322ff6fceabdfa226e5359328bde292d189e703)

commit fecc2bacb51c7dabdb83b87313df48dea527feae
Author: Pratik Mallya <email address hidden>
Date: Thu Oct 1 17:41:09 2015 -0500

    Check if os-interface extension is present before saving ports

    If that extension is not present, then the code to extract and
    save ports created during server create by nova will fail.

    Change-Id: I6008a0da0c16a34c40e343af4e7237520db4ae36
    Closes-Bug: #1499877
    (cherry picked from commit 46d8c276b70e7698438988faa9d997577a7e1750)

commit 6c3fa4e25d3e35adf53ad1e80d5455bf9f7a924a
Author: Peter Razumovsky <email address hidden>
Date: Mon Sep 14 17:43:49 2015 +0300

    Fix translating for props with get_param value

    If some map or list type properties specified with
    json-type or commadelimitedlist parameters, error
    raised in case of wrong properties data parsing.
    Fix this case by adding check if data is GetParam
    instance, resolve it. Other function can be safely
    replaced without resolve.

    Change-Id: I0c9a6af29b56b629cbdad2acb868c3033e38b5ef
    Closes-bug: #1494364
    (cherry picked from commit aea59ecdac6ed6635125eb2064554140e3e645fc)

commit 8810a28a9016b3bfa515fc11efd5f5dfa103b380
Author: OpenStack Propos...

Read more...

Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/heat 6.0.0.0b1

This issue was fixed in the openstack/heat 6.0.0.0b1 development milestone.

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.