cannot attach direct type port (sr-iov) to existing instance

Bug #1499269 reported by Pedro Sousa
34
This bug affects 5 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Wishlist
Unassigned

Bug Description

Whenever I try to attach a direct port to an existing instance It fails:

#neutron port-create Management --binding:vnic_type direct
Created a new port:
+-----------------------+-------------------------------------------------------------------------------------+
| Field | Value |
+-----------------------+-------------------------------------------------------------------------------------+
| admin_state_up | True |
| allowed_address_pairs | |
| binding:host_id | |
| binding:profile | {} |
| binding:vif_details | {} |
| binding:vif_type | unbound |
| binding:vnic_type | direct |
| device_id | |
| device_owner | |
| fixed_ips | {"subnet_id": "6c82ff4c-124e-469a-8444-1446cc5d979f", "ip_address": "10.92.29.123"} |
| id | ce455654-4eb5-4b89-b868-b426381951c8 |
| mac_address | fa:16:3e:6b:15:e8 |
| name | |
| network_id | 5764ca50-1f30-4daa-8c86-a21fed9a679c |
| security_groups | 5d2faf7b-2d32-49a8-978e-a91f57ece17d |
| status | DOWN |
| tenant_id | d5ecb0eea96f4996b565fd983a768b11 |
+-----------------------+-------------------------------------------------------------------------------------+

# nova interface-attach --port-id ce455654-4eb5-4b89-b868-b426381951c8 voicisc4srv1
ERROR (ClientException): Failed to attach interface (HTTP 500) (Request-ID: req-11516bf4-7ab7-414c-a4ee-63e44aaf00a5)

nova-compute.log:

0a14aeb82013e5a1631de80 d5ecb0eea96f4996b565fd983a768b11 - - -] Exception during message handling: Failed to attach network adapter device to 056d455a-314d-4853-839e-70229a56dfcd
2015-09-24 10:41:35.434 43535 TRACE oslo_messaging.rpc.dispatcher Traceback (most recent call last):
2015-09-24 10:41:35.434 43535 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply
2015-09-24 10:41:35.434 43535 TRACE oslo_messaging.rpc.dispatcher executor_callback))
2015-09-24 10:41:35.434 43535 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch
2015-09-24 10:41:35.434 43535 TRACE oslo_messaging.rpc.dispatcher executor_callback)
2015-09-24 10:41:35.434 43535 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 130, in _do_dispatch
2015-09-24 10:41:35.434 43535 TRACE oslo_messaging.rpc.dispatcher result = func(ctxt, **new_args)
2015-09-24 10:41:35.434 43535 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 6632, in attach_interface
2015-09-24 10:41:35.434 43535 TRACE oslo_messaging.rpc.dispatcher port_id, requested_ip)
2015-09-24 10:41:35.434 43535 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 443, in decorated_function
2015-09-24 10:41:35.434 43535 TRACE oslo_messaging.rpc.dispatcher return function(self, context, *args, **kwargs)
2015-09-24 10:41:35.434 43535 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/exception.py", line 88, in wrapped
2015-09-24 10:41:35.434 43535 TRACE oslo_messaging.rpc.dispatcher payload)
2015-09-24 10:41:35.434 43535 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 85, in __exit__
2015-09-24 10:41:35.434 43535 TRACE oslo_messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
2015-09-24 10:41:35.434 43535 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/exception.py", line 71, in wrapped
2015-09-24 10:41:35.434 43535 TRACE oslo_messaging.rpc.dispatcher return f(self, context, *args, **kw)
2015-09-24 10:41:35.434 43535 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 327, in decorated_function
2015-09-24 10:41:35.434 43535 TRACE oslo_messaging.rpc.dispatcher LOG.warning(msg, e, instance_uuid=instance_uuid)
2015-09-24 10:41:35.434 43535 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 85, in __exit__
2015-09-24 10:41:35.434 43535 TRACE oslo_messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
2015-09-24 10:41:35.434 43535 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 298, in decorated_function
2015-09-24 10:41:35.434 43535 TRACE oslo_messaging.rpc.dispatcher return function(self, context, *args, **kwargs)
2015-09-24 10:41:35.434 43535 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 355, in decorated_function
2015-09-24 10:41:35.434 43535 TRACE oslo_messaging.rpc.dispatcher kwargs['instance'], e, sys.exc_info())
2015-09-24 10:41:35.434 43535 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 85, in __exit__
2015-09-24 10:41:35.434 43535 TRACE oslo_messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
2015-09-24 10:41:35.434 43535 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 343, in decorated_function
2015-09-24 10:41:35.434 43535 TRACE oslo_messaging.rpc.dispatcher return function(self, context, *args, **kwargs)
2015-09-24 10:41:35.434 43535 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 5078, in attach_interface
2015-09-24 10:41:35.434 43535 TRACE oslo_messaging.rpc.dispatcher instance_uuid=instance.uuid)
2015-09-24 10:41:35.434 43535 TRACE oslo_messaging.rpc.dispatcher InterfaceAttachFailed: Failed to attach network adapter device to 056d455a-314d-4853-839e-70229a56dfcd
2015-09-24 10:41:35.434 43535 TRACE oslo_messaging.rpc.dispatcher
2015-09-24 10:41:35.434 43535 ERROR oslo_messaging._drivers.common [req-11516bf4-7ab7-414c-a4ee-63e44aaf00a5 9340dc4e70a14aeb82013e5a1631de80 d5ecb0eea96f4996b565fd983a768b11 - - -] Returning exception Failed to attach network adapter device to 056d455a-314d-4853-839e-70229a56dfcd to caller
2015-09-24 10:41:35.434 43535 ERROR oslo_messaging._drivers.common [req-11516bf4-7ab7-414c-a4ee-63e44aaf00a5 9340dc4e70a14aeb82013e5a1631de80 d5ecb0eea96f4996b565fd983a768b11 - - -] ['Traceback (most recent call last):\n', ' File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply\n executor_callback))\n', ' File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch\n executor_callback)\n', ' File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 130, in _do_dispatch\n result = func(ctxt, **new_args)\n', ' File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 6632, in attach_interface\n port_id, requested_ip)\n', ' File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 443, in decorated_function\n return function(self, context, *args, **kwargs)\n', ' File "/usr/lib/python2.7/site-packages/nova/exception.py", line 88, in wrapped\n payload)\n', ' File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 85, in __exit__\n six.reraise(self.type_, self.value, self.tb)\n', ' File "/usr/lib/python2.7/site-packages/nova/exception.py", line 71, in wrapped\n return f(self, context, *args, **kw)\n', ' File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 327, in decorated_function\n LOG.warning(msg, e, instance_uuid=instance_uuid)\n', ' File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 85, in __exit__\n six.reraise(self.type_, self.value, self.tb)\n', ' File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 298, in decorated_function\n return function(self, context, *args, **kwargs)\n', ' File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 355, in decorated_function\n kwargs[\'instance\'], e, sys.exc_info())\n', ' File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 85, in __exit__\n six.reraise(self.type_, self.value, self.tb)\n', ' File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 343, in decorated_function\n return function(self, context, *args, **kwargs)\n', ' File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 5078, in attach_interface\n instance_uuid=instance.uuid)\n', 'InterfaceAttachFailed: Failed to attach network adapter device to 056d455a-314d-4853-839e-70229a56dfcd\n']
2015-09-24 10:41:36.181 43535 DEBUG nova.openstack.common.periodic_task [req-be840a83-9a40-477f-80c1-08126cfa665f - - - - -] Running periodic task ComputeManager._heal_instance_info_cache run_periodic_tasks /usr/lib/python2.7/site-packages/nova/openstack/common/periodic_task.py:219

tags: added: sriov-pci-pt
tags: added: needs-attention
Karthik S (ksundara)
Changed in neutron:
assignee: nobody → Karthik S (ksundara)
Revision history for this message
Gary Kotton (garyk) wrote :

This looks like a nova issue and not a neutron one.

Revision history for this message
Moshe Levi (moshele) wrote :

we are working on adding Attach/detach SR-IOV interface in nova https://review.openstack.org/#/c/139910/.
as gray said it is not related to neutron

Karthik S (ksundara)
Changed in neutron:
assignee: Karthik S (ksundara) → nobody
Moshe Levi (moshele)
no longer affects: nova
affects: neutron → nova
Changed in nova:
importance: Undecided → Wishlist
Changed in nova:
status: New → Confirmed
assignee: nobody → Moshe Levi (moshele)
assignee: Moshe Levi (moshele) → lvmxh (shaohef)
Changed in nova:
status: Confirmed → In Progress
Revision history for this message
Sivasathurappan Radhakrishnan (siva-radhakrishnan) wrote :

lvmxh Can you please let me know if you are still working on this wishlist

Revision history for this message
Anusha Unnam (anusha-unnam) wrote :

@lvmxh If you wish to work on this bug, please reassign yourself.

Changed in nova:
assignee: lvmxh (shaohef) → nobody
status: In Progress → Confirmed
Revision history for this message
Matt Riedemann (mriedem) wrote :

See: https://docs.openstack.org/nova/latest/contributor/project-scope.html#api-scope

You can create a port and then attach it to the server, so if you need a more advanced type of port, do it that way so the compute API doesn't have to orchestrate that for you.

Changed in nova:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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