network notfound error was not caught correct when creating nova server

Bug #1589341 reported by Yanyan Hu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
senlin
Fix Released
Undecided
Yanyan Hu

Bug Description

The following error was happened if given network was not found when creating nova server cluster/node:

2016-06-06 02:27:19.134 7267 ERROR senlin.engine.actions.base [req-123b4a6a-2967-427e-8cae-23c97ed396d2 436283781e7a41b59cc0c84d1415637e 31feb32b21c04b23869a9c7da65eaf54 - - -] Unexpected exception occurred during action NODE_CREATE (036ea25d-e334-4c1b-8491-ffb421ae07ff) execution: 'NoneType' object has no attribute 'id'
2016-06-06 02:27:19.134 7267 ERROR senlin.engine.actions.base Traceback (most recent call last):
2016-06-06 02:27:19.134 7267 ERROR senlin.engine.actions.base File "/opt/stack/new/senlin/senlin/engine/actions/base.py", line 520, in ActionProc
2016-06-06 02:27:19.134 7267 ERROR senlin.engine.actions.base result, reason = action.execute()
2016-06-06 02:27:19.134 7267 ERROR senlin.engine.actions.base File "/opt/stack/new/senlin/senlin/engine/actions/node_action.py", line 233, in execute
2016-06-06 02:27:19.134 7267 ERROR senlin.engine.actions.base res, reason = self._execute()
2016-06-06 02:27:19.134 7267 ERROR senlin.engine.actions.base File "/opt/stack/new/senlin/senlin/engine/actions/node_action.py", line 195, in _execute
2016-06-06 02:27:19.134 7267 ERROR senlin.engine.actions.base return method()
2016-06-06 02:27:19.134 7267 ERROR senlin.engine.actions.base File "/opt/stack/new/senlin/senlin/engine/actions/node_action.py", line 69, in do_create
2016-06-06 02:27:19.134 7267 ERROR senlin.engine.actions.base res = self.node.do_create(self.context)
2016-06-06 02:27:19.134 7267 ERROR senlin.engine.actions.base File "/opt/stack/new/senlin/senlin/engine/node.py", line 253, in do_create
2016-06-06 02:27:19.134 7267 ERROR senlin.engine.actions.base physical_id = profile_base.Profile.create_object(context, self)
2016-06-06 02:27:19.134 7267 ERROR senlin.engine.actions.base File "/opt/stack/new/senlin/senlin/profiles/base.py", line 191, in create_object
2016-06-06 02:27:19.134 7267 ERROR senlin.engine.actions.base return profile.do_create(obj)
2016-06-06 02:27:19.134 7267 ERROR senlin.engine.actions.base File "/opt/stack/new/senlin/senlin/profiles/os/nova/server.py", line 346, in do_create
2016-06-06 02:27:19.134 7267 ERROR senlin.engine.actions.base self.neutron(obj))
2016-06-06 02:27:19.134 7267 ERROR senlin.engine.actions.base File "/opt/stack/new/senlin/senlin/profiles/os/nova/server.py", line 289, in _resolve_network
2016-06-06 02:27:19.134 7267 ERROR senlin.engine.actions.base network['uuid'] = res.id
2016-06-06 02:27:19.134 7267 ERROR senlin.engine.actions.base AttributeError: 'NoneType' object has no attribute 'id'
2016-06-06 02:27:19.134 7267 ERROR senlin.engine.actions.base
2016-06-06 02:27:19.160 7267 ERROR senlin.engine.event [req-123b4a6a-2967-427e-8cae-23c97ed396d2 436283781e7a41b59cc0c84d1415637e 31feb32b21c04b23869a9c7da65eaf54 - - -] node-ecf3c744-002 [fa2a9d84] NODE_CREATE - FAILED: 'NoneType' object has no attribute 'id'
2016-06-06 02:27:19.171 7267 ERROR senlin.engine.actions.base [req-123b4a6a-2967-427e-8cae-23c97ed396d2 436283781e7a41b59cc0c84d1415637e 31feb32b21c04b23869a9c7da65eaf54 - - -] Unexpected exception occurred during action NODE_CREATE (c7952d39-196d-496c-a30a-2fc7e846a114) execution: 'NoneType' object has no attribute 'id'

Senlin neutron driver should catch network notfound error correctly rather than handle it like this.

Yanyan Hu (yanyanhu)
Changed in senlin:
assignee: nobody → Yanyan Hu (yanyanhu)
Changed in senlin:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to senlin (master)

Reviewed: https://review.openstack.org/325720
Committed: https://git.openstack.org/cgit/openstack/senlin/commit/?id=7bbab37916be99cf2a8d98e0add3071142fe9155
Submitter: Jenkins
Branch: master

commit 7bbab37916be99cf2a8d98e0add3071142fe9155
Author: yanyanhu <email address hidden>
Date: Mon Jun 6 00:59:36 2016 -0400

    Revise some neutron_v2 driver interfaces

    This patch revises all resource_get interfaces of neutron_v2
    driver to add ignore_missing parameter. This allows Senlin
    driver to catch and handle NotFound exception raised by
    openstacksdk when specified resource can not be found.

    Change-Id: I8ae52eea5811edd67232484e116b3ccd9d2a1a78
    Closes-Bug: #1589341

Changed in senlin:
status: In Progress → Fix Released
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/senlin 2.0.0.0b2

This issue was fixed in the openstack/senlin 2.0.0.0b2 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.