yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #27163
[Bug 1413855] [NEW] "None type" object error when suspend vm with sriov nic
Public bug reported:
When suspend vm with sriov nic, a "None type" error will be throw and
the suspend failed.
there is error log:
-------------------------------------------------------------------------------------------------------------------------------------------------------
2015-01-22T11:42:32+00:00 localhost nova-compute ERROR [pid:19338] [GreenThread-9] [dispatcher.py:146 _dispatch_and_reply] Exception during message handling: 'NoneType' object has no attribute 'encode' Traceback (most recent call last): File "/usr/lib64/python2.6/site-packages/oslo/messaging/rpc/dispatcher.py", line 137, in _dispatch_and_reply incoming.message)) File "/usr/lib64/python2.6/site-packages/oslo/messaging/rpc/dispatcher.py", line 180, in _dispatch return self._do_dispatch(endpoint, method, ctxt, args) File "/usr/lib64/python2.6/site-packages/oslo/messaging/rpc/dispatcher.py", line 126, in _do_dispatch result = getattr(endpoint, method)(ctxt, **new_args) File "/usr/lib64/python2.6/site-packages/nova/exception.py", line 88, in wrapped payload) File "/usr/lib64/python2.6/site-packages/nova/openstack/common/excutils.py", line 82, in __exit__ six.reraise(self.type_, self.value, self.tb) File "/usr/lib64/python2.6/site-packages/nova/exception.py", line 71, in wrapped return f(self, context, *args, **kw) File "/usr/lib64/python2.6/site-packages/nova/compute/manager.py", line 298, in decorated_function pass File "/usr/lib64/python2.6/site-packages/nova/openstack/common/excutils.py", line 82, in __exit__ six.reraise(self.type_, self.value, self.tb) File "/usr/lib64/python2.6/site-packages/nova/compute/manager.py", line 284, in decorated_function return function(self, context, *args, **kwargs) File "/usr/lib64/python2.6/site-packages/nova/compute/manager.py", line 348, in decorated_function return function(self, context, *args, **kwargs) File "/usr/lib64/python2.6/site-packages/nova/compute/manager.py", line 326, in decorated_function kwargs['instance'], e, sys.exc_info()) File "/usr/lib64/python2.6/site-packages/nova/openstack/common/excutils.py", line 82, in __exit__ six.reraise(self.type_, self.value, self.tb) File "/usr/lib64/python2.6/site-packages/nova/compute/manager.py", line 314, in decorated_function return function(self, context, *args, **kwargs) File "/usr/lib64/python2.6/site-packages/nova/compute/manager.py", line 4100, in suspend_instance self.driver.suspend(instance) File "/usr/lib64/python2.6/site-packages/nova/virt/libvirt/driver.py", line 2507, in suspend self._detach_sriov_ports(instance, dom) File "/usr/lib64/python2.6/site-packages/nova/virt/libvirt/driver.py", line 3249, in _detach_sriov_ports instance) File "/usr/lib64/python2.6/site-packages/nova/virt/libvirt/driver.py", line 3201, in _prepare_args_for_get_config context, self._image_api, image_ref, instance) File "/usr/lib64/python2.6/site-packages/nova/compute/utils.py", line 201, in get_image_metadata image = image_api.get(context, image_id_or_uri) File "/usr/lib64/python2.6/site-packages/nova/image/api.py", line 89, in get include_locations=include_locations) File "/usr/lib64/python2.6/site-packages/nova/image/glance.py", line 312, in show _reraise_translated_image_exception(image_id) File "/usr/lib64/python2.6/site-packages/nova/image/glance.py", line 310, in show image = self._client.call(context, version, 'get', image_id) File "/usr/lib64/python2.6/site-packages/nova/image/glance.py", line 233, in call return getattr(client.images, method)(*args, **kwargs) File "/usr/lib64/python2.6/site-packages/glanceclient/v1/images.py", line 127, in get % urlparse.quote(str(image_id))) File "/usr/lib64/python2.6/site-packages/glanceclient/common/http.py", line 250, in head return self._request('HEAD', url, **kwargs) File "/usr/lib64/python2.6/site-packages/glanceclient/common/http.py", line 194, in _request self.log_curl_request(method, conn_url, headers, data, kwargs) File "/usr/lib64/python2.6/site-packages/glanceclient/common/http.py", line 101, in log_curl_request header = '-H \'%s: %s\'' % safe_header(key, value) File "/usr/lib64/python2.6/site-packages/glanceclient/common/utils.py", line 394, in safe_header v = value.encode('utf-8') AttributeError: 'NoneType' object has no attribute 'encode'
-------------------------------------------------------------------------------------------------------------------------------------------------------
The reason of failed is auth_token is none which created by "context =
nova_context.get_admin_context()" in libvirt function
"_detach_sriov_ports". It will cause the "None type" error when get the
glance image info.
Like this bug: "https://bugs.launchpad.net/nova/+bug/1408865", but arise
at different placement.
** Affects: nova
Importance: Undecided
Status: New
--
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/1413855
Title:
"None type" object error when suspend vm with sriov nic
Status in OpenStack Compute (Nova):
New
Bug description:
When suspend vm with sriov nic, a "None type" error will be throw and
the suspend failed.
there is error log:
-------------------------------------------------------------------------------------------------------------------------------------------------------
2015-01-22T11:42:32+00:00 localhost nova-compute ERROR [pid:19338] [GreenThread-9] [dispatcher.py:146 _dispatch_and_reply] Exception during message handling: 'NoneType' object has no attribute 'encode' Traceback (most recent call last): File "/usr/lib64/python2.6/site-packages/oslo/messaging/rpc/dispatcher.py", line 137, in _dispatch_and_reply incoming.message)) File "/usr/lib64/python2.6/site-packages/oslo/messaging/rpc/dispatcher.py", line 180, in _dispatch return self._do_dispatch(endpoint, method, ctxt, args) File "/usr/lib64/python2.6/site-packages/oslo/messaging/rpc/dispatcher.py", line 126, in _do_dispatch result = getattr(endpoint, method)(ctxt, **new_args) File "/usr/lib64/python2.6/site-packages/nova/exception.py", line 88, in wrapped payload) File "/usr/lib64/python2.6/site-packages/nova/openstack/common/excutils.py", line 82, in __exit__ six.reraise(self.type_, self.value, self.tb) File "/usr/lib64/python2.6/site-packages/nova/exception.py", line 71, in wrapped return f(self, context, *args, **kw) File "/usr/lib64/python2.6/site-packages/nova/compute/manager.py", line 298, in decorated_function pass File "/usr/lib64/python2.6/site-packages/nova/openstack/common/excutils.py", line 82, in __exit__ six.reraise(self.type_, self.value, self.tb) File "/usr/lib64/python2.6/site-packages/nova/compute/manager.py", line 284, in decorated_function return function(self, context, *args, **kwargs) File "/usr/lib64/python2.6/site-packages/nova/compute/manager.py", line 348, in decorated_function return function(self, context, *args, **kwargs) File "/usr/lib64/python2.6/site-packages/nova/compute/manager.py", line 326, in decorated_function kwargs['instance'], e, sys.exc_info()) File "/usr/lib64/python2.6/site-packages/nova/openstack/common/excutils.py", line 82, in __exit__ six.reraise(self.type_, self.value, self.tb) File "/usr/lib64/python2.6/site-packages/nova/compute/manager.py", line 314, in decorated_function return function(self, context, *args, **kwargs) File "/usr/lib64/python2.6/site-packages/nova/compute/manager.py", line 4100, in suspend_instance self.driver.suspend(instance) File "/usr/lib64/python2.6/site-packages/nova/virt/libvirt/driver.py", line 2507, in suspend self._detach_sriov_ports(instance, dom) File "/usr/lib64/python2.6/site-packages/nova/virt/libvirt/driver.py", line 3249, in _detach_sriov_ports instance) File "/usr/lib64/python2.6/site-packages/nova/virt/libvirt/driver.py", line 3201, in _prepare_args_for_get_config context, self._image_api, image_ref, instance) File "/usr/lib64/python2.6/site-packages/nova/compute/utils.py", line 201, in get_image_metadata image = image_api.get(context, image_id_or_uri) File "/usr/lib64/python2.6/site-packages/nova/image/api.py", line 89, in get include_locations=include_locations) File "/usr/lib64/python2.6/site-packages/nova/image/glance.py", line 312, in show _reraise_translated_image_exception(image_id) File "/usr/lib64/python2.6/site-packages/nova/image/glance.py", line 310, in show image = self._client.call(context, version, 'get', image_id) File "/usr/lib64/python2.6/site-packages/nova/image/glance.py", line 233, in call return getattr(client.images, method)(*args, **kwargs) File "/usr/lib64/python2.6/site-packages/glanceclient/v1/images.py", line 127, in get % urlparse.quote(str(image_id))) File "/usr/lib64/python2.6/site-packages/glanceclient/common/http.py", line 250, in head return self._request('HEAD', url, **kwargs) File "/usr/lib64/python2.6/site-packages/glanceclient/common/http.py", line 194, in _request self.log_curl_request(method, conn_url, headers, data, kwargs) File "/usr/lib64/python2.6/site-packages/glanceclient/common/http.py", line 101, in log_curl_request header = '-H \'%s: %s\'' % safe_header(key, value) File "/usr/lib64/python2.6/site-packages/glanceclient/common/utils.py", line 394, in safe_header v = value.encode('utf-8') AttributeError: 'NoneType' object has no attribute 'encode'
-------------------------------------------------------------------------------------------------------------------------------------------------------
The reason of failed is auth_token is none which created by "context =
nova_context.get_admin_context()" in libvirt function
"_detach_sriov_ports". It will cause the "None type" error when get
the glance image info.
Like this bug: "https://bugs.launchpad.net/nova/+bug/1408865", but
arise at different placement.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1413855/+subscriptions
Follow ups
References