Fail to suspend guest with direct-physical ports

Bug #1623089 reported by Ludovic Beliveau
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Ludovic Beliveau
Newton
Fix Committed
Medium
Sahid Orentino

Bug Description

Description
===========

Suspending a guest with direct-physical ports (PCI passthrough) is failing and the guest is set in error.

Steps to reproduce
==================

1) NETID=`neutron net-list | grep private | awk '{print $2}'`
2) PORTID=`neutron port-create $NETID --name sriov_port --binding:vnic_type direct-physical | grep "\ id\ " | awk '{ print $4 }'`
3) nova boot test --image=cirros-0.3.4-x86_64-uec --nic port-id=$PORTID --flavor=m1.small
4) nova suspend test

Expected result
===============

Instance is successfully suspended.

Actual result
=============

Instance is put in error.

Stack trace:

2016-09-13 09:23:22.724 ERROR nova.compute.manager [req-ca82e24d-fc99-42c8-8bea-18e1c7185282 demo demo] [instance: 6b069ca8-4bb8-4781-93a7-7d58cf8122a1] Setting instance vm_state to ERROR
2016-09-13 09:23:22.724 TRACE nova.compute.manager [instance: 6b069ca8-4bb8-4781-93a7-7d58cf8122a1] Traceback (most recent call last):
2016-09-13 09:23:22.724 TRACE nova.compute.manager [instance: 6b069ca8-4bb8-4781-93a7-7d58cf8122a1] File "/opt/stack/nova/nova/compute/manager.py", line 6571, in _error_out_instance_on_exception
2016-09-13 09:23:22.724 TRACE nova.compute.manager [instance: 6b069ca8-4bb8-4781-93a7-7d58cf8122a1] yield
2016-09-13 09:23:22.724 TRACE nova.compute.manager [instance: 6b069ca8-4bb8-4781-93a7-7d58cf8122a1] File "/opt/stack/nova/nova/compute/manager.py", line 4113, in suspend_instance
2016-09-13 09:23:22.724 TRACE nova.compute.manager [instance: 6b069ca8-4bb8-4781-93a7-7d58cf8122a1] self.driver.suspend(context, instance)
2016-09-13 09:23:22.724 TRACE nova.compute.manager [instance: 6b069ca8-4bb8-4781-93a7-7d58cf8122a1] File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 2435, in suspend
2016-09-13 09:23:22.724 TRACE nova.compute.manager [instance: 6b069ca8-4bb8-4781-93a7-7d58cf8122a1] guest.save_memory_state()
2016-09-13 09:23:22.724 TRACE nova.compute.manager [instance: 6b069ca8-4bb8-4781-93a7-7d58cf8122a1] File "/opt/stack/nova/nova/virt/libvirt/guest.py", line 426, in save_memory_state
2016-09-13 09:23:22.724 TRACE nova.compute.manager [instance: 6b069ca8-4bb8-4781-93a7-7d58cf8122a1] self._domain.managedSave(0)
2016-09-13 09:23:22.724 TRACE nova.compute.manager [instance: 6b069ca8-4bb8-4781-93a7-7d58cf8122a1] File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 186, in doit
2016-09-13 09:23:22.724 TRACE nova.compute.manager [instance: 6b069ca8-4bb8-4781-93a7-7d58cf8122a1] result = proxy_call(self._autowrap, f, *args, **kwargs)
2016-09-13 09:23:22.724 TRACE nova.compute.manager [instance: 6b069ca8-4bb8-4781-93a7-7d58cf8122a1] File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 144, in proxy_call
2016-09-13 09:23:22.724 TRACE nova.compute.manager [instance: 6b069ca8-4bb8-4781-93a7-7d58cf8122a1] rv = execute(f, *args, **kwargs)
2016-09-13 09:23:22.724 TRACE nova.compute.manager [instance: 6b069ca8-4bb8-4781-93a7-7d58cf8122a1] File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 125, in execute
2016-09-13 09:23:22.724 TRACE nova.compute.manager [instance: 6b069ca8-4bb8-4781-93a7-7d58cf8122a1] six.reraise(c, e, tb)
2016-09-13 09:23:22.724 TRACE nova.compute.manager [instance: 6b069ca8-4bb8-4781-93a7-7d58cf8122a1] File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 83, in tworker
2016-09-13 09:23:22.724 TRACE nova.compute.manager [instance: 6b069ca8-4bb8-4781-93a7-7d58cf8122a1] rv = meth(*args, **kwargs)
2016-09-13 09:23:22.724 TRACE nova.compute.manager [instance: 6b069ca8-4bb8-4781-93a7-7d58cf8122a1] File "/usr/lib64/python2.7/site-packages/libvirt.py", line 1397, in managedSave
2016-09-13 09:23:22.724 TRACE nova.compute.manager [instance: 6b069ca8-4bb8-4781-93a7-7d58cf8122a1] if ret == -1: raise libvirtError ('virDomainManagedSave() failed', dom=self)
2016-09-13 09:23:22.724 TRACE nova.compute.manager [instance: 6b069ca8-4bb8-4781-93a7-7d58cf8122a1] libvirtError: Requested operation is not valid: domain has assigned non-USB host devices
2016-09-13 09:23:22.724 TRACE nova.compute.manager [instance: 6b069ca8-4bb8-4781-93a7-7d58cf8122a1]

Environment
===========

commit 5b207f9a1376b5edda9d4900ccadc4980d26dd1f
Merge: ba718e3 f5b7a33
Author: Jenkins <email address hidden>
Date: Tue Sep 13 01:46:47 2016 +0000

    Merge "Example & Parameter verification of os-security-group-default-rules.inc"

Tags: pci
Revision history for this message
Ludovic Beliveau (ludovic-beliveau) wrote :
Changed in nova:
status: New → Confirmed
importance: Undecided → Low
tags: added: pci
Changed in nova:
assignee: nobody → Ludovic Beliveau (ludovic-beliveau)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/369556
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=8568cb4ce162661f2e9bab4524e4f5adb299549c
Submitter: Jenkins
Branch: master

commit 8568cb4ce162661f2e9bab4524e4f5adb299549c
Author: Ludovic Beliveau <email address hidden>
Date: Tue Sep 13 12:00:16 2016 -0400

    Fixed suspend for PCI passthrough

    The VNIC_TYPE_DIRECT_PHYSICAL was being ignored by the _has_sriov_port()
    method.

    The fix is to also check for VNIC_TYPE_DIRECT_PHYSICAL so that PF
    devices are unplugged.

    Change-Id: I8ccc5b30ccdbd16a90165a4a8a33e081ae23736c
    Closes-Bug: #1623089

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

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

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

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/462503

Matt Riedemann (mriedem)
Changed in nova:
importance: Low → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/newton)

Reviewed: https://review.openstack.org/462503
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=b4bbe68e279aa94aa71aef1a3879d42bf90d3170
Submitter: Jenkins
Branch: stable/newton

commit b4bbe68e279aa94aa71aef1a3879d42bf90d3170
Author: Ludovic Beliveau <email address hidden>
Date: Tue Sep 13 12:00:16 2016 -0400

    Fixed suspend for PCI passthrough

    The VNIC_TYPE_DIRECT_PHYSICAL was being ignored by the _has_sriov_port()
    method.

    The fix is to also check for VNIC_TYPE_DIRECT_PHYSICAL so that PF
    devices are unplugged.

    Change-Id: I8ccc5b30ccdbd16a90165a4a8a33e081ae23736c
    Closes-Bug: #1623089
    (cherry picked from commit 8568cb4ce162661f2e9bab4524e4f5adb299549c)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 14.0.7

This issue was fixed in the openstack/nova 14.0.7 release.

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.