Bug 978349

Summary: nova: when a nova command fails the reason for the failure is not printed only the req id
Product: Red Hat OpenStack Reporter: Dafna Ron <dron>
Component: openstack-novaAssignee: Solly Ross <sross>
Status: CLOSED UPSTREAM QA Contact: Ami Jeain <ajeain>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: dallan, jkt, ndipanov, sgordon, yeylon
Target Milestone: ---Keywords: Triaged
Target Release: 5.0 (RHEL 7)   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-04-08 15:05:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
log none

Description Dafna Ron 2013-06-26 12:36:43 UTC
Created attachment 765545 [details]
log

Description of problem:

when we run a nova command which fails nova reports that it was unable to complete the task and the id of the request but it would be very helpful to print the reason instead of having the user go to the log. 

example: 

[root@opens-vdsb lib(keystone_admin)]# nova root-password 651650e2-5572-4b5a-9e4d-c9d49f041126
New password: 
Again: 
ERROR: Unable to set password on instance (HTTP 501) (Request-ID: req-5f740868-1250-45d5-b54f-fda4a8fb48a9)

in the compute log we can see that the reason is: 

NotImplementedError: set_admin_password is not implemented by this driver or guest instance.

it would be useful if the trace error could be printed to the screen instead of having the user go and check the log (primarily when we are running a script for a large set of commands) 

Version-Release number of selected component (if applicable):

openstack-nova-compute-2013.1.2-2.el6ost.noarch

How reproducible:

100%

Steps to Reproduce:
1. run an instance with libvirt
2. try to change root password 
3.

Actual results:

nova returns with: 
ERROR: Unable to set password on instance (HTTP 501) (Request-ID: req-5f740868-1250-45d5-b54f-fda4a8fb48a9)

stack trace in the log shows the following: 

NotImplementedError: set_admin_password is not implemented by this driver or guest instance.

Expected results:

it would be helpful if we can print the error from the trace 

example: 

ERROR: Unable to set password on instance (HTTP 501) (Request-ID: req-5f740868-1250-45d5-b54f-fda4a8fb48a9) - NotImplementedError: set_admin_password is not implemented by this driver or guest instance.

Additional info: log


2013-06-26 15:05:59.476 ERROR nova.openstack.common.rpc.amqp [req-5f740868-1250-45d5-b54f-fda4a8fb48a9 4e8268c19c2143a0b3cf978afab45fea f372ca53f0484f589413148b6c9ad39c] Except
ion during message handling
2013-06-26 15:05:59.476 31371 TRACE nova.openstack.common.rpc.amqp Traceback (most recent call last):
2013-06-26 15:05:59.476 31371 TRACE nova.openstack.common.rpc.amqp   File "/usr/lib/python2.6/site-packages/nova/openstack/common/rpc/amqp.py", line 430, in _process_data
2013-06-26 15:05:59.476 31371 TRACE nova.openstack.common.rpc.amqp     rval = self.proxy.dispatch(ctxt, version, method, **args)
2013-06-26 15:05:59.476 31371 TRACE nova.openstack.common.rpc.amqp   File "/usr/lib/python2.6/site-packages/nova/openstack/common/rpc/dispatcher.py", line 133, in dispatch
2013-06-26 15:05:59.476 31371 TRACE nova.openstack.common.rpc.amqp     return getattr(proxyobj, method)(ctxt, **kwargs)
2013-06-26 15:05:59.476 31371 TRACE nova.openstack.common.rpc.amqp   File "/usr/lib/python2.6/site-packages/nova/exception.py", line 117, in wrapped
2013-06-26 15:05:59.476 31371 TRACE nova.openstack.common.rpc.amqp     temp_level, payload)
2013-06-26 15:05:59.476 31371 TRACE nova.openstack.common.rpc.amqp   File "/usr/lib64/python2.6/contextlib.py", line 23, in __exit__
2013-06-26 15:05:59.476 31371 TRACE nova.openstack.common.rpc.amqp     self.gen.next()
2013-06-26 15:05:59.476 31371 TRACE nova.openstack.common.rpc.amqp   File "/usr/lib/python2.6/site-packages/nova/exception.py", line 94, in wrapped
2013-06-26 15:05:59.476 31371 TRACE nova.openstack.common.rpc.amqp     return f(self, context, *args, **kw)
2013-06-26 15:05:59.476 31371 TRACE nova.openstack.common.rpc.amqp   File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 209, in decorated_function
2013-06-26 15:05:59.476 31371 TRACE nova.openstack.common.rpc.amqp     pass
2013-06-26 15:05:59.476 31371 TRACE nova.openstack.common.rpc.amqp   File "/usr/lib64/python2.6/contextlib.py", line 23, in __exit__
2013-06-26 15:05:59.476 31371 TRACE nova.openstack.common.rpc.amqp     self.gen.next()
2013-06-26 15:05:59.476 31371 TRACE nova.openstack.common.rpc.amqp   File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 195, in decorated_function
2013-06-26 15:05:59.476 31371 TRACE nova.openstack.common.rpc.amqp     return function(self, context, *args, **kwargs)
2013-06-26 15:05:59.476 31371 TRACE nova.openstack.common.rpc.amqp   File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 260, in decorated_function
2013-06-26 15:05:59.476 31371 TRACE nova.openstack.common.rpc.amqp     function(self, context, *args, **kwargs)
2013-06-26 15:05:59.476 31371 TRACE nova.openstack.common.rpc.amqp   File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 237, in decorated_function
2013-06-26 15:05:59.476 31371 TRACE nova.openstack.common.rpc.amqp     e, sys.exc_info())
2013-06-26 15:05:59.476 31371 TRACE nova.openstack.common.rpc.amqp   File "/usr/lib64/python2.6/contextlib.py", line 23, in __exit__
2013-06-26 15:05:59.476 31371 TRACE nova.openstack.common.rpc.amqp     self.gen.next()
2013-06-26 15:05:59.476 31371 TRACE nova.openstack.common.rpc.amqp   File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 224, in decorated_function
2013-06-26 15:05:59.476 31371 TRACE nova.openstack.common.rpc.amqp     return function(self, context, *args, **kwargs)
2013-06-26 15:05:59.476 31371 TRACE nova.openstack.common.rpc.amqp   File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1888, in set_admin_password
2013-06-26 15:05:59.476 31371 TRACE nova.openstack.common.rpc.amqp     raise NotImplementedError(_msg)
2013-06-26 15:05:59.476 31371 TRACE nova.openstack.common.rpc.amqp NotImplementedError: set_admin_password is not implemented by this driver or guest instance.
2013-06-26 15:05:59.476 31371 TRACE nova.openstack.common.rpc.amqp 
2013-06-26 15:05:59.477 ERROR nova.openstack.common.rpc.common [req-5f740868-1250-45d5-b54f-fda4a8fb48a9 4e8268c19c2143a0b3cf978afab45fea f372ca53f0484f589413148b6c9ad39c] Retu
rning exception set_admin_password is not implemented by this driver or guest instance. to caller
2013-06-26 15:05:59.478 ERROR nova.openstack.common.rpc.common [req-5f740868-1250-45d5-b54f-fda4a8fb48a9 4e8268c19c2143a0b3cf978afab45fea f372ca53f0484f589413148b6c9ad39c] ['Tr
aceback (most recent call last):\n', '  File "/usr/lib/python2.6/site-packages/nova/openstack/common/rpc/amqp.py", line 430, in _process_data\n    rval = self.proxy.dispatch(ct
xt, version, method, **args)\n', '  File "/usr/lib/python2.6/site-packages/nova/openstack/common/rpc/dispatcher.py", line 133, in dispatch\n    return getattr(proxyobj, method)
:

Comment 1 Solly Ross 2014-04-08 15:05:42 UTC
This should be alleviated (although not solved -- I'm not sure if this is a solvable problem, entirely) by https://review.openstack.org/#/c/81370/ (which got merged a while ago).