port 'binding:profile' can't be removed when VM is deleted

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

Bug Description

reproduce this problem:
1. create a sriov port
2. use this port to boot a VM
3. delete this VM
4. we can see port still exist, but the 'binding:profile' can't be removed.

Henry Gessau (gessau)
tags: added: sriov-pci-pt
Moshe Levi (moshele)
Changed in neutron:
assignee: nobody → Moshe Levi (moshele)
Revision history for this message
Moshe Levi (moshele) wrote :

so looking on the code only administrator can update this filed see https://github.com/openstack/neutron/blob/master/etc/policy.json#L83
and nova update the binding:profile see
https://github.com/openstack/nova/blob/master/nova/network/neutronv2/api.py#L763-L779
I also tested it myself via the rest api and the update is working see
http://pastebin.com/TSKEK0zh

so I think you are using the neutron client and it is not implemented see
https://github.com/openstack/python-neutronclient/blob/13b95c83edab2d9966e7eee49bb2eefabb8c3c62/neutronclient/neutron/v2_0/port.py#L310-L313
It is implemented only for create https://github.com/openstack/python-neutronclient/blob/13b95c83edab2d9966e7eee49bb2eefabb8c3c62/neutronclient/neutron/v2_0/port.py#L249-L251

why do you need to update this filed? basically it is intend for nova to pass the pci information.

Changed in neutron:
status: New → Incomplete
Revision history for this message
Yan Songming (songmingyan) wrote :

One pci can only assigned to one port, if we don't update profile, and we create another vm ,myabe we will see one pci in many ports.
when we create port not use '--binding:profile', it is None in "neutron port-show",I think it should be None when the port deallocated from VM

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

I guess it make sees to update the binding:profile to None when we delete the VM.
can you update the bug to indicate that this is the problem and not that you are not able to update the binding:profile field

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

see my nova patch https://review.openstack.org/#/c/261369/ to set binding:profile to empty dictionary when unbinding the port.

Changed in neutron:
status: Incomplete → Confirmed
status: Confirmed → In Progress
status: In Progress → Fix Committed
Changed in neutron:
status: Fix Committed → In Progress
Moshe Levi (moshele)
affects: neutron → nova
Changed in nova:
importance: Undecided → Low
importance: Low → Undecided
Matt Riedemann (mriedem)
Changed in nova:
importance: Undecided → Medium
tags: added: networking neutron
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit caeeb5d5052b5ecb6ba910a88aae24ccf710f3f3
Author: Moshe Levi <email address hidden>
Date: Thu Dec 24 18:50:12 2015 +0200

    Sets binding:profile to empty dic when unbinding port

    When binding preexisting ports, direct/macvtap, nova
    adds the binding:profile information. But when deleting
    the VM, the port binding:profile information still kept.

    This patch sets binding:profile to empty dic when unbinding it.

    Closes-Bug: #1524643

    Change-Id: I127e88a9bcdad44b795a245e566ab276de09fd82

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/nova 13.0.0.0b2

This issue was fixed in the openstack/nova 13.0.0.0b2 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.