Reviewed: https://review.openstack.org/514825 Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=1ca191fcc4d809c991c23dedc951bbe7206edf1d Submitter: Zuul Branch: master
commit 1ca191fcc4d809c991c23dedc951bbe7206edf1d Author: Matt Riedemann <[email protected]> Date: Tue Oct 24 16:45:57 2017 -0400 Fix AttributeError in BlockDeviceMapping.obj_load_attr The BDM has no uuid attribute so the debug message in here would result in an AttributeError. This has been around since the creation of this object, and the debug log message was probably copied from the Instance object. This was only exposed in Pike when this code started lazy-loading the instance field: I1dc54a38f02bb48921bcbc4c2fdcc2c946e783c1 So this change fixes that bug and adds tests for obj_load_attr. Change-Id: I8b55227b1530a76c2f396c035384abd89237d936 Closes-Bug: #1726871 ** Changed in: nova Status: In Progress => Fix Released -- 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/1726871 Title: AttributeError: 'BlockDeviceMapping' object has no attribute 'uuid' Status in OpenStack Compute (nova): Fix Released Status in OpenStack Compute (nova) pike series: Confirmed Bug description: running Pike, Cinder is configured with disabled NAS security and enabled snapshots in NFS driver. While trying to make a snapshot nova-api reports: 2017-10-24 13:36:16.558 39 INFO nova.osapi_compute.wsgi.server [req-e6c3dec2-40ea-4858-af91-3d77395d6978 6f4347f3c1b34d69946b17592aaf5b7f aeb3218c5fdc4d58b1094a4d360a2a96 - default default] 10.196.245.222,10.196.245.203 "GET /v2.1/ HTTP/1.1" status: 200 len: 763 time: 0.0097859 2017-10-24 13:36:17.315 39 ERROR nova.api.openstack.extensions [req-cb2a54c0-6103-41ca-a5dc-587e301bfbb1 6f4347f3c1b34d69946b17592aaf5b7f aeb3218c5fdc4d58b1094a4d360a2a96 - default default] Unexpected exception in API method: AttributeError: 'BlockDeviceMapping' object has no attribute 'uuid' 2017-10-24 13:36:17.315 39 ERROR nova.api.openstack.extensions Traceback (most recent call last): 2017-10-24 13:36:17.315 39 ERROR nova.api.openstack.extensions File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/api/openstack/extensions.py", line 336, in wrapped 2017-10-24 13:36:17.315 39 ERROR nova.api.openstack.extensions return f(*args, **kwargs) 2017-10-24 13:36:17.315 39 ERROR nova.api.openstack.extensions File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 108, in wrapper 2017-10-24 13:36:17.315 39 ERROR nova.api.openstack.extensions return func(*args, **kwargs) 2017-10-24 13:36:17.315 39 ERROR nova.api.openstack.extensions File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/api/openstack/compute/assisted_volume_snapshots.py", line 52, in create 2017-10-24 13:36:17.315 39 ERROR nova.api.openstack.extensions create_info) 2017-10-24 13:36:17.315 39 ERROR nova.api.openstack.extensions File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/compute/api.py", line 4165, in volume_snapshot_create 2017-10-24 13:36:17.315 39 ERROR nova.api.openstack.extensions return do_volume_snapshot_create(self, context, bdm.instance) 2017-10-24 13:36:17.315 39 ERROR nova.api.openstack.extensions File "/var/lib/kolla/venv/lib/python2.7/site-packages/oslo_versionedobjects/base.py", line 67, in getter 2017-10-24 13:36:17.315 39 ERROR nova.api.openstack.extensions self.obj_load_attr(name) 2017-10-24 13:36:17.315 39 ERROR nova.api.openstack.extensions File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/objects/block_device.py", line 288, in obj_load_attr 2017-10-24 13:36:17.315 39 ERROR nova.api.openstack.extensions 'uuid': self.uuid, 2017-10-24 13:36:17.315 39 ERROR nova.api.openstack.extensions AttributeError: 'BlockDeviceMapping' object has no attribute 'uuid' 2017-10-24 13:36:17.315 39 ERROR nova.api.openstack.extensions 2017-10-24 13:36:17.317 39 INFO nova.api.openstack.wsgi [req-cb2a54c0-6103-41ca-a5dc-587e301bfbb1 6f4347f3c1b34d69946b17592aaf5b7f aeb3218c5fdc4d58b1094a4d360a2a96 - default default] HTTP exception thrown: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible. <type 'exceptions.AttributeError'> To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1726871/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

