← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1708433] Re: Attaching sriov nic VM fail with keyError pci_slot

 

Reviewed:  https://review.openstack.org/591898
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=68011c40ae2ab0900674408a88f62a60a802fef7
Submitter: Zuul
Branch:    master

commit 68011c40ae2ab0900674408a88f62a60a802fef7
Author: Matt Riedemann <mriedem.os@xxxxxxxxx>
Date:   Wed Aug 15 13:33:16 2018 +0800

    Explicitly fail if trying to attach SR-IOV port
    
    Attaching SR-IOV ports to existing instances is not supported
    since the compute service does not perform any kind of PCI
    device allocation, so we should fail fast with a clear error
    if attempted. Note that the compute RPC API "attach_interface"
    method is an RPC call from nova-api to nova-compute so the error
    raised here will result in a 400 response to the user.
    
    Blueprint sriov-interface-attach-detach would need to be
    implemented to support this use case, and could arguably involve
    a microversion to indicate when the feature was made available.
    
    A related neutron docs patch https://review.openstack.org/594325
    is posted for mentioning the limitation with SR-IOV port attach
    as well.
    
    Change-Id: Ibbf2bd3cdd45bcd61eebff883c30ded525b2495d
    Closes-Bug: #1708433


** 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/1708433

Title:
  Attaching sriov nic VM fail with keyError pci_slot

Status in OpenStack Compute (nova):
  Fix Released
Status in OpenStack Compute (nova) pike series:
  Confirmed
Status in OpenStack Compute (nova) queens series:
  Confirmed
Status in OpenStack Compute (nova) rocky series:
  Confirmed

Bug description:
  Trace back:

  2017-08-03 12:03:50.064 DEBUG nova.network.os_vif_util [req-f1414ec4-6df7-46d8-9c97-f678c0f94d77 demo admin] No conversion for VIF type hw_veb yet from (pid=134902) nova_to_osvif_vif /opt/stack/nova/nova/network/os_vif_util.py:435
  2017-08-03 12:03:50.119 ERROR oslo_messaging.rpc.server [req-f1414ec4-6df7-46d8-9c97-f678c0f94d77 demo admin] Exception during message handling: KeyError: 'pci_slot'
  2017-08-03 12:03:50.119 TRACE oslo_messaging.rpc.server Traceback (most recent call last):
  2017-08-03 12:03:50.119 TRACE oslo_messaging.rpc.server   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py", line 160, in _process_incoming
  2017-08-03 12:03:50.119 TRACE oslo_messaging.rpc.server     res = self.dispatcher.dispatch(message)
  2017-08-03 12:03:50.119 TRACE oslo_messaging.rpc.server   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 213, in dispatch
  2017-08-03 12:03:50.119 TRACE oslo_messaging.rpc.server     return self._do_dispatch(endpoint, method, ctxt, args)
  2017-08-03 12:03:50.119 TRACE oslo_messaging.rpc.server   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 183, in _do_dispatch
  2017-08-03 12:03:50.119 TRACE oslo_messaging.rpc.server     result = func(ctxt, **new_args)
  2017-08-03 12:03:50.119 TRACE oslo_messaging.rpc.server   File "/opt/stack/nova/nova/exception_wrapper.py", line 76, in wrapped
  2017-08-03 12:03:50.119 TRACE oslo_messaging.rpc.server     function_name, call_dict, binary)
  2017-08-03 12:03:50.119 TRACE oslo_messaging.rpc.server   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
  2017-08-03 12:03:50.119 TRACE oslo_messaging.rpc.server     self.force_reraise()
  2017-08-03 12:03:50.119 TRACE oslo_messaging.rpc.server   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
  2017-08-03 12:03:50.119 TRACE oslo_messaging.rpc.server     six.reraise(self.type_, self.value, self.tb)
  2017-08-03 12:03:50.119 TRACE oslo_messaging.rpc.server   File "/opt/stack/nova/nova/exception_wrapper.py", line 67, in wrapped
  2017-08-03 12:03:50.119 TRACE oslo_messaging.rpc.server     return f(self, context, *args, **kw)
  2017-08-03 12:03:50.119 TRACE oslo_messaging.rpc.server   File "/opt/stack/nova/nova/compute/manager.py", line 211, in decorated_function
  2017-08-03 12:03:50.119 TRACE oslo_messaging.rpc.server     kwargs['instance'], e, sys.exc_info())
  2017-08-03 12:03:50.119 TRACE oslo_messaging.rpc.server   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
  2017-08-03 12:03:50.119 TRACE oslo_messaging.rpc.server     self.force_reraise()
  2017-08-03 12:03:50.119 TRACE oslo_messaging.rpc.server   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
  2017-08-03 12:03:50.119 TRACE oslo_messaging.rpc.server     six.reraise(self.type_, self.value, self.tb)
  2017-08-03 12:03:50.119 TRACE oslo_messaging.rpc.server   File "/opt/stack/nova/nova/compute/manager.py", line 199, in decorated_function
  2017-08-03 12:03:50.119 TRACE oslo_messaging.rpc.server     return function(self, context, *args, **kwargs)
  2017-08-03 12:03:50.119 TRACE oslo_messaging.rpc.server   File "/opt/stack/nova/nova/compute/manager.py", line 5166, in attach_interface
  2017-08-03 12:03:50.119 TRACE oslo_messaging.rpc.server     network_info[0])
  2017-08-03 12:03:50.119 TRACE oslo_messaging.rpc.server   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1443, in attach_interface
  2017-08-03 12:03:50.119 TRACE oslo_messaging.rpc.server     self.vif_driver.plug(instance, vif)
  2017-08-03 12:03:50.119 TRACE oslo_messaging.rpc.server   File "/opt/stack/nova/nova/virt/libvirt/vif.py", line 794, in plug
  2017-08-03 12:03:50.119 TRACE oslo_messaging.rpc.server     func(instance, vif)
  2017-08-03 12:03:50.119 TRACE oslo_messaging.rpc.server   File "/opt/stack/nova/nova/virt/libvirt/vif.py", line 650, in plug_hw_veb
  2017-08-03 12:03:50.119 TRACE oslo_messaging.rpc.server     vif['profile']['pci_slot'],
  2017-08-03 12:03:50.119 TRACE oslo_messaging.rpc.server KeyError: 'pci_slot'
  2017-08-03 12:03:50.119 TRACE oslo_messaging.rpc.server

  Steps to recreate:
  - Create a VM on the compute node of a multi-node deployment.
  - Attach an direct/macvtap bound SRIOV port:
     openstack server add port VM1 port1

  Results:
  - The above traceback is found in the n-cpu service on the compute node.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1708433/+subscriptions


References