yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #67407
[Bug 1702992] Re: get_diagnostics on a non-running instance raises unnecessary exception
[Expired for OpenStack Compute (nova) because there has been no activity
for 60 days.]
** Changed in: nova
Status: Incomplete => Expired
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1702992
Title:
get_diagnostics on a non-running instance raises unnecessary exception
Status in OpenStack Compute (nova):
Expired
Bug description:
Calling get_diagnostics on an instance that is shutdown either via CLI
or API generates an exception, and adds an row to the
nova.instance_fault table
Reproduce:
create an instance
power it off
run `nova diagnostics instance`
Expected result:
a simple error message returned to the user
actual result:
a new row in the nova.instance_faults table.
a lot of text in nova-compute.log:
2017-07-07 19:00:12.301 23077 ERROR oslo_messaging.rpc.dispatcher [req-1c775f02-887d-42b6-974d-129dbe73c7ce ffa01db44dc4435dbb613f50da552315 b1744f8baaa44d4f9762b9a7eaffc61f - - -] Exception during message handling: Instance 6ab6cc05-bebf-4bc2-95ac-7daf317125d6 in power_state 4. Cannot get_diagnostics while the instance is in this state.
2017-07-07 19:00:12.301 23077 ERROR oslo_messaging.rpc.dispatcher Traceback (most recent call last):
2017-07-07 19:00:12.301 23077 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply
2017-07-07 19:00:12.301 23077 ERROR oslo_messaging.rpc.dispatcher executor_callback))
2017-07-07 19:00:12.301 23077 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch
2017-07-07 19:00:12.301 23077 ERROR oslo_messaging.rpc.dispatcher executor_callback)
2017-07-07 19:00:12.301 23077 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 129, in _do_dispatch
2017-07-07 19:00:12.301 23077 ERROR oslo_messaging.rpc.dispatcher result = func(ctxt, **new_args)
2017-07-07 19:00:12.301 23077 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/exception.py", line 89, in wrapped
2017-07-07 19:00:12.301 23077 ERROR oslo_messaging.rpc.dispatcher payload)
2017-07-07 19:00:12.301 23077 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 195, in __exit__
2017-07-07 19:00:12.301 23077 ERROR oslo_messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
2017-07-07 19:00:12.301 23077 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/exception.py", line 72, in wrapped
2017-07-07 19:00:12.301 23077 ERROR oslo_messaging.rpc.dispatcher return f(self, context, *args, **kw)
2017-07-07 19:00:12.301 23077 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 378, in decorated_function
2017-07-07 19:00:12.301 23077 ERROR oslo_messaging.rpc.dispatcher kwargs['instance'], e, sys.exc_info())
2017-07-07 19:00:12.301 23077 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 195, in __exit__
2017-07-07 19:00:12.301 23077 ERROR oslo_messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
2017-07-07 19:00:12.301 23077 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 366, in decorated_function
2017-07-07 19:00:12.301 23077 ERROR oslo_messaging.rpc.dispatcher return function(self, context, *args, **kwargs)
2017-07-07 19:00:12.301 23077 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 4089, in get_diagnostics
2017-07-07 19:00:12.301 23077 ERROR oslo_messaging.rpc.dispatcher method='get_diagnostics')
2017-07-07 19:00:12.301 23077 ERROR oslo_messaging.rpc.dispatcher InstanceInvalidState: Instance 6ab6cc05-bebf-4bc2-95ac-7daf317125d6 in power_state 4. Cannot get_diagnostics while the instance is in this state.
2017-07-07 19:00:12.301 23077 ERROR oslo_messaging.rpc.dispatcher
2017-07-07 19:00:12.305 23077 ERROR oslo_messaging._drivers.common [req-1c775f02-887d-42b6-974d-129dbe73c7ce ffa01db44dc4435dbb613f50da552315 b1744f8baaa44d4f9762b9a7eaffc61f - - -] Returning exception Instance 6ab6cc05-bebf-4bc2-95ac-7daf317125d6 in power_state 4. Cannot get_diagnostics while the instance is in this state. to caller
2017-07-07 19:00:12.306 23077 ERROR oslo_messaging._drivers.common [req-1c775f02-887d-42b6-974d-129dbe73c7ce ffa01db44dc4435dbb613f50da552315 b1744f8baaa44d4f9762b9a7eaffc61f - - -] ['Traceback (most recent call last):\n', ' File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply\n executor_callback))\n', ' File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch\n executor_callback)\n', ' File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 129, in _do_dispatch\n result = func(ctxt, **new_args)\n', ' File "/usr/lib/python2.7/site-packages/nova/exception.py", line 89, in wrapped\n payload)\n', ' File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 195, in __exit__\n six.reraise(self.type_, self.value, self.tb)\n', ' File "/usr/lib/python2.7/site-packages/nova/exception.py", line 72, in wrapped\n return f(self, context, *args, **kw)\n', ' File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 378, in decorated_function\n kwargs[\'instance\'], e, sys.exc_info())\n', ' File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 195, in __exit__\n six.reraise(self.type_, self.value, self.tb)\n', ' File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 366, in decorated_function\n return function(self, context, *args, **kwargs)\n', ' File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 4089, in get_diagnostics\n method=\'get_diagnostics\')\n', 'InstanceInvalidState: Instance 6ab6cc05-bebf-4bc2-95ac-7daf317125d6 in power_state 4. Cannot get_diagnostics while the instance is in this state.\n']
Environment:
Liberty w/ libvirt+kvm
# rpm -qa |grep nova
python-nova-12.0.4-1.el7.noarch
openstack-nova-common-12.0.4-1.el7.noarch
openstack-nova-network-12.0.4-1.el7.noarch
openstack-nova-compute-12.0.4-1.el7.noarch
python-novaclient-2.30.1-1.el7.noarch
openstack-nova-api-12.0.4-1.el7.noarch
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1702992/+subscriptions
References