AttributeError: 'NoneType' object has no attribute 'support_requests'

Bug #1658078 reported by Moshe Levi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Moshe Levi

Bug Description

When the compute is ironic driver and the shceduler is configured with
pci passthrough filter the vm get to an error state and we can see the following error in the scheduler

2017-01-19 06:00:35.887 105364 ERROR oslo_messaging.rpc.server [req-d627c45c-a5cf-47bc-a8d1-fe4669516380 admin admin] Exception during message handling
2017-01-19 06:00:35.887 105364 ERROR oslo_messaging.rpc.server Traceback (most recent call last):
2017-01-19 06:00:35.887 105364 ERROR oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py", line 155, in _process_incoming
2017-01-19 06:00:35.887 105364 ERROR oslo_messaging.rpc.server res = self.dispatcher.dispatch(message)
2017-01-19 06:00:35.887 105364 ERROR oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 222, in dispatch
2017-01-19 06:00:35.887 105364 ERROR oslo_messaging.rpc.server return self._do_dispatch(endpoint, method, ctxt, args)
2017-01-19 06:00:35.887 105364 ERROR oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 192, in _do_dispatch
2017-01-19 06:00:35.887 105364 ERROR oslo_messaging.rpc.server result = func(ctxt, **new_args)
2017-01-19 06:00:35.887 105364 ERROR oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py", line 218, in inner
2017-01-19 06:00:35.887 105364 ERROR oslo_messaging.rpc.server return func(*args, **kwargs)
2017-01-19 06:00:35.887 105364 ERROR oslo_messaging.rpc.server File "/opt/stack/nova/nova/scheduler/manager.py", line 84, in select_destinations
2017-01-19 06:00:35.887 105364 ERROR oslo_messaging.rpc.server dests = self.driver.select_destinations(ctxt, spec_obj)
2017-01-19 06:00:35.887 105364 ERROR oslo_messaging.rpc.server File "/opt/stack/nova/nova/scheduler/filter_scheduler.py", line 51, in select_destinations
2017-01-19 06:00:35.887 105364 ERROR oslo_messaging.rpc.server selected_hosts = self._schedule(context, spec_obj)
2017-01-19 06:00:35.887 105364 ERROR oslo_messaging.rpc.server File "/opt/stack/nova/nova/scheduler/filter_scheduler.py", line 103, in _schedule
2017-01-19 06:00:35.887 105364 ERROR oslo_messaging.rpc.server spec_obj, index=num)
2017-01-19 06:00:35.887 105364 ERROR oslo_messaging.rpc.server File "/opt/stack/nova/nova/scheduler/host_manager.py", line 572, in get_filtered_hosts
2017-01-19 06:00:35.887 105364 ERROR oslo_messaging.rpc.server hosts, spec_obj, index)
2017-01-19 06:00:35.887 105364 ERROR oslo_messaging.rpc.server File "/opt/stack/nova/nova/filters.py", line 89, in get_filtered_objects
2017-01-19 06:00:35.887 105364 ERROR oslo_messaging.rpc.server list_objs = list(objs)
2017-01-19 06:00:35.887 105364 ERROR oslo_messaging.rpc.server File "/opt/stack/nova/nova/filters.py", line 44, in filter_all
2017-01-19 06:00:35.887 105364 ERROR oslo_messaging.rpc.server if self._filter_one(obj, spec_obj):
2017-01-19 06:00:35.887 105364 ERROR oslo_messaging.rpc.server File "/opt/stack/nova/nova/scheduler/filters/__init__.py", line 26, in _filter_one
2017-01-19 06:00:35.887 105364 ERROR oslo_messaging.rpc.server return self.host_passes(obj, filter_properties)
2017-01-19 06:00:35.887 105364 ERROR oslo_messaging.rpc.server File "/opt/stack/nova/nova/scheduler/filters/pci_passthrough_filter.py", line 48, in host_passes
2017-01-19 06:00:35.887 105364 ERROR oslo_messaging.rpc.server if not host_state.pci_stats.support_requests(pci_requests.requests):
2017-01-19 06:00:35.887 105364 ERROR oslo_messaging.rpc.server AttributeError: 'NoneType' object has no attribute 'support_requests'

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/423608

Changed in nova:
assignee: nobody → Moshe Levi (moshele)
status: New → In Progress
Jay Pipes (jaypipes)
Changed in nova:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/423608
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=8d11cba5edcb71b530ea9af3afa697870bcfac3a
Submitter: Jenkins
Branch: master

commit 8d11cba5edcb71b530ea9af3afa697870bcfac3a
Author: Moshe Levi <email address hidden>
Date: Sat Jan 21 11:27:36 2017 +0200

    PCI: Check pci_requests object is empty before passing to support_requests

    This commit checks that InstancePCIRequests is empty before
    passing it to the pci_stats.support_requests.
    This prevents doing the support request check for host_state
    which don't have pci_stats like ironic host.

    Closes-Bug: #1658078

    Change-Id: Ie6d870729883e2bbdc3278c52e88d147613712f6

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 15.0.0.0b3

This issue was fixed in the openstack/nova 15.0.0.0b3 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.