Some non-supported actions in Ironic nova driver do not return errors to the user

Bug #1310131 reported by Daryl Walleck
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ironic
Invalid
Low
Unassigned
OpenStack Compute (nova)
Expired
Undecided
Unassigned

Bug Description

While performing checking Nova API actions that I expected to fail when testing with the Ironic driver, I noticed in some cases a positive response is returned, but the action fails within the compute process when the action is attempted to be executed. When working with other drivers, I expect to see some time of immediate response from the initial request stating that the action isn't possible. The actions I've specifically verified this with are:

- Pause

 2014-04-19 21:47:30.940 ERROR oslo.messaging._drivers.common [req-10dedfe7-9fe2-4c0d-9a4e-a85abdd137df demo demo] ['Traceback (most recent call last):\n', ' File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 133, in _dispatch_and_reply\n incoming.message))\n', ' File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 176, in _dispatch\n return self._do_dispatch(endpoint, method, ctxt, args)\n', ' File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 122, in _do_dispatch\n result = getattr(endpoint, method)(ctxt, **new_args)\n', ' File "/opt/stack/nova/nova/exception.py", line 88, in wrapped\n payload)\n', ' File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__\n six.reraise(self.type_, self.value, self.tb)\n', ' File "/opt/stack/nova/nova/exception.py", line 71, in wrapped\n return f(self, context, *args, **kw)\n', ' File "/opt/stack/nova/nova/compute/manager.py", line 276, in decorated_function\n pass\n', ' File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__\n six.reraise(self.type_, self.value, self.tb)\n', ' File "/opt/stack/nova/nova/compute/manager.py", line 262, in decorated_function\n
     return function(self, context, *args, **kwargs)\n', ' File "/opt/stack/nova/nova/compute/manager.py", line 329, in decorated_function\n
  function(self, context, *args, **kwargs)\n', ' File "/opt/stack/nova/nova/compute/manager.py", line 305, in decorated_function\n e, sys.exc_info())\n', ' File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__\n six.reraise(self.type_, self.value, self.tb)\n', ' File "/opt/stack/nova/nova/compute/manager.py", line 292, in decorated_function\n return function(self, context, *args, **kwargs)\n', ' File "/opt/stack/nova/nova/compute/manager.py", line 3659, in pause_instance\n self.driver.pause(instance)\n', ' File "/opt/stack/nova/nova/virt/driver.py", line 521, in pause\n raise NotImplementedError()\n', 'NotImplementedError\n']

- Rescue

 screen-n-cpu.log:2014-04-19 21:56:29.518 DEBUG ironicclient.common.http [req-d3128aae-9558-4f4b-adc4-b75b092a3acb demo demo]
 screen-n-cpu.log:2014-04-19 21:56:29.523 ERROR oslo.messaging.rpc.dispatcher [req-d3128aae-9558-4f4b-adc4-b75b092a3acb demo demo] Exception during message handling: Instance 5b43d631-91e1-4384-9b87-93283b3ae958 cannot be rescued: Driver Error:
 screen-n-cpu.log:2014-04-19 21:56:29.524 ERROR oslo.messaging._drivers.common [req-d3128aae-9558-4f4b-adc4-b75b092a3acb demo demo] Returning exception Instance 5b43d631-91e1-4384-9b87-93283b3ae958 cannot be rescued: Driver Error: to caller
 screen-n-cpu.log:2014-04-19 21:56:29.524 ERROR oslo.messaging._drivers.common [req-d3128aae-9558-4f4b-adc4-b75b092a3acb demo demo] ['Traceback (most recent call last):\n', ' File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 133, in _dispatch_and_reply\n incoming.message))\n', ' File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 176, in _dispatch\n return self._do_dispatch(endpoint, method, ctxt, args)\n', ' File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 122, in _do_dispatch\n result = getattr(endpoint, method)(ctxt, **new_args)\n', ' File "/opt/stack/nova/nova/compute/manager.py", line 395, in decorated_function\n return function(self, context, *args, **kwargs)\n', ' File "/opt/stack/nova/nova/exception.py", line 88, in wrapped\n payload)\n', ' File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__\n six.reraise(self.type_, self.value, self.tb)\n', ' File "/opt/stack/nova/nova/exception.py", line 71, in wrapped\n return f(self, context, *args, **kw)\n', ' File "/opt/stack/nova/nova/compute/manager.py", line 276, in decorated_function\n pass\n', ' File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__\n six.reraise(self.type_, self.value, self.tb)\n', ' File "/opt/stack/nova/nova/compute/manager.py", line 262, in decorated_function\n return function(self, context, *args, **kwargs)\n', ' File "/opt/stack/nova/nova/compute/manager.py", line 329, in decorated_function\n function(self, context, *args, **kwargs)\n', ' File "/opt/stack/nova/nova/compute/manager.py", line 2984, in rescue_instance\n
    reason=_("Driver Error: %s") % unicode(e))\n', 'InstanceNotRescuable: Instance 5b43d631-91e1-4384-9b87-93283b3ae958 cannot be rescued: Driver Error: \n'])

aeva black (tenbrae)
tags: added: nova-driver
Changed in ironic:
status: New → Confirmed
Dmitry Tantsur (divius)
Changed in ironic:
importance: Undecided → Low
Dmitry Tantsur (divius)
summary: - Some non-supported with ironic nova driver do not return errors to the
- user
+ Some non-supported actions in Ironic nova driver do not return errors to
+ the user
tags: added: ironic
Sean Dague (sdague)
Changed in nova:
status: New → Confirmed
importance: Undecided → Medium
Michael Turek (mjturek)
Changed in ironic:
assignee: nobody → Michael Turek (mjturek)
Changed in nova:
assignee: nobody → Michael Turek (mjturek)
Revision history for this message
Michael Turek (mjturek) wrote :

I'm trying to understand what the expected behavior for this should be. So currently, we see a NotImplementedError exception being thrown whenever an unsupported action is attempted.

I believe this is the proper way to handle such an exception. However, I'd suggest a message be included with the exception (ie: "pause not supported by the Ironic nova driver"). This is what vmware does for pause.

Otherwise, are you suggesting that an error message be delivered to the client? For example, when using python-novaclient:

~$ nova pause <instance-id>
Action not supported by Ironic nova driver.

If so, this would probably require a patch in novaclient. Let me know your thoughts, thanks!

Revision history for this message
Sean Dague (sdague) wrote :

I believe we should be issuing the error all the way back to the user in these cases. It's probably a 400 error with a json payload that explains that it's not supported.

The client could then translate it to a user friendly message.

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

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

Revision history for this message
Jim Rollenhagen (jim-rollenhagen) wrote :

This is related to https://bugs.launchpad.net/nova/+bug/1483639

We've talked about making capabilities discoverable for a given hypervisor or instance, and I think that's what we need here to be able to determine at the API level if a call is acceptable or not.

Changed in ironic:
assignee: Michael Turek (mjturek) → nobody
Changed in nova:
assignee: Michael Turek (mjturek) → nobody
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Michael Still (<email address hidden>) on branch: master
Review: https://review.openstack.org/243258
Reason: This patch has been idle for a long time, so I am abandoning it to keep the review clean sane. If you're interested in still working on this patch, then please unabandon it and upload a new patchset.

Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote : Cleanup EOL bug report

This is an automated cleanup. This bug report has been closed because it
is older than 18 months and there is no open code change to fix this.
After this time it is unlikely that the circumstances which lead to
the observed issue can be reproduced.

If you can reproduce the bug, please:
* reopen the bug report (set to status "New")
* AND add the detailed steps to reproduce the issue (if applicable)
* AND leave a comment "CONFIRMED FOR: <RELEASE_NAME>"
  Only still supported release names are valid (LIBERTY, MITAKA, OCATA, NEWTON).
  Valid example: CONFIRMED FOR: LIBERTY

Changed in nova:
importance: Medium → Undecided
status: Confirmed → Expired
Revision history for this message
Jay Faulkner (jason-oldos) wrote :

Yes, this is still an issue, but it has to be fixed by a major feature update (capabilities) to Nova, so there's no Ironic action/code to fix. Therefore marking this invalid against Ironic.

Changed in ironic:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers