Public bug reported: Reproduced here:
http://logs.openstack.org/74/467674/2/check/gate-tempest-dsvm-neutron- full-ubuntu- xenial/414bb96/logs/screen-n-api.txt.gz?level=TRACE#_May_25_02_46_02_139728 May 25 02:46:02.139728 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api [req-4a040119-d445-4eb8-8d56-a29653bb6866 tempest-TestVolumeBootPattern-1408924396 tempest-TestVolumeBootPattern-1408924396] Failed BDM validation for volume: 4eb7a1cf-1f6d-4b7c-ae37-99688a0c1e6d May 25 02:46:02.140058 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api Traceback (most recent call last): May 25 02:46:02.140638 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api File "/opt/stack/new/nova/nova/compute/api.py", line 1412, in _validate_bdm May 25 02:46:02.140851 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api context, volume_id, instance) May 25 02:46:02.141057 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api File "/opt/stack/new/nova/nova/compute/api.py", line 3711, in _check_attach_and_reserve_volume May 25 02:46:02.141281 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api instance=instance) May 25 02:46:02.141487 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api File "/opt/stack/new/nova/nova/volume/cinder.py", line 285, in check_availability_zone May 25 02:46:02.141700 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api instance_az = az.get_instance_availability_zone(context, instance) May 25 02:46:02.141997 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api File "/opt/stack/new/nova/nova/availability_zones.py", line 167, in get_instance_availability_zone May 25 02:46:02.142308 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api host = instance.get('host') May 25 02:46:02.142540 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api File "/usr/local/lib/python2.7/dist-packages/oslo_versionedobjects/base.py", line 771, in get May 25 02:46:02.142762 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api return getattr(self, key) May 25 02:46:02.142978 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api File "/usr/local/lib/python2.7/dist-packages/oslo_versionedobjects/base.py", line 67, in getter May 25 02:46:02.143196 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api self.obj_load_attr(name) May 25 02:46:02.143414 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api File "/opt/stack/new/nova/nova/objects/instance.py", line 1029, in obj_load_attr May 25 02:46:02.143636 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api reason='attribute %s not lazy-loadable' % attrname) May 25 02:46:02.144016 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api ObjectActionError: Object action obj_load_attr failed because: attribute host not lazy-loadable May 25 02:46:02.144244 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api This is because the instance object here is not created from the database, it's created in the API code to be set in the BuildRequest object, and it doesn't have the host field set: https://github.com/openstack/nova/blob/4b732b5b3e7c1da63fa20af52028e7903986ba6a/nova/compute/api.py#L1023 So we need to handle the fact that 'host' might not be set in the instance object in this code. ** Affects: nova Importance: High Assignee: Matt Riedemann (mriedem) Status: Triaged ** Affects: nova/ocata Importance: High Status: Triaged ** Tags: api availability-zones ** Also affects: nova/ocata Importance: Undecided Status: New ** Changed in: nova/ocata Status: New => Triaged -- 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/1693600 Title: Boot from volume fails when cross_az_attach=False due to: ObjectActionError: Object action obj_load_attr failed because: attribute host not lazy-loadable Status in OpenStack Compute (nova): Triaged Status in OpenStack Compute (nova) ocata series: Triaged Bug description: Reproduced here: http://logs.openstack.org/74/467674/2/check/gate-tempest-dsvm-neutron- full-ubuntu- xenial/414bb96/logs/screen-n-api.txt.gz?level=TRACE#_May_25_02_46_02_139728 May 25 02:46:02.139728 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api [req-4a040119-d445-4eb8-8d56-a29653bb6866 tempest-TestVolumeBootPattern-1408924396 tempest-TestVolumeBootPattern-1408924396] Failed BDM validation for volume: 4eb7a1cf-1f6d-4b7c-ae37-99688a0c1e6d May 25 02:46:02.140058 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api Traceback (most recent call last): May 25 02:46:02.140638 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api File "/opt/stack/new/nova/nova/compute/api.py", line 1412, in _validate_bdm May 25 02:46:02.140851 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api context, volume_id, instance) May 25 02:46:02.141057 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api File "/opt/stack/new/nova/nova/compute/api.py", line 3711, in _check_attach_and_reserve_volume May 25 02:46:02.141281 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api instance=instance) May 25 02:46:02.141487 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api File "/opt/stack/new/nova/nova/volume/cinder.py", line 285, in check_availability_zone May 25 02:46:02.141700 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api instance_az = az.get_instance_availability_zone(context, instance) May 25 02:46:02.141997 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api File "/opt/stack/new/nova/nova/availability_zones.py", line 167, in get_instance_availability_zone May 25 02:46:02.142308 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api host = instance.get('host') May 25 02:46:02.142540 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api File "/usr/local/lib/python2.7/dist-packages/oslo_versionedobjects/base.py", line 771, in get May 25 02:46:02.142762 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api return getattr(self, key) May 25 02:46:02.142978 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api File "/usr/local/lib/python2.7/dist-packages/oslo_versionedobjects/base.py", line 67, in getter May 25 02:46:02.143196 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api self.obj_load_attr(name) May 25 02:46:02.143414 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api File "/opt/stack/new/nova/nova/objects/instance.py", line 1029, in obj_load_attr May 25 02:46:02.143636 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api reason='attribute %s not lazy-loadable' % attrname) May 25 02:46:02.144016 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api ObjectActionError: Object action obj_load_attr failed because: attribute host not lazy-loadable May 25 02:46:02.144244 ubuntu-xenial-infracloud-vanilla-8978830 nova-api[17948]: ERROR nova.compute.api This is because the instance object here is not created from the database, it's created in the API code to be set in the BuildRequest object, and it doesn't have the host field set: https://github.com/openstack/nova/blob/4b732b5b3e7c1da63fa20af52028e7903986ba6a/nova/compute/api.py#L1023 So we need to handle the fact that 'host' might not be set in the instance object in this code. To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1693600/+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

