vif_port_id of ironic port is not updating after neutron port-delete

Bug #1606229 reported by Andrey Shestakov
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ironic
Won't Fix
Undecided
Unassigned
neutron
Won't Fix
Medium
Andrey Shestakov

Bug Description

Steps to reproduce:
1. Get list of attached ports of instance:
nova interface-list 42dd8b8b-b2bc-420e-96b6-958e9295b2d4
+------------+--------------------------------------+--------------------------------------+-----------------------------------------------+-------------------+
| Port State | Port ID | Net ID | IP addresses | MAC Addr |
+------------+--------------------------------------+--------------------------------------+-----------------------------------------------+-------------------+
| ACTIVE | 512e6c8e-3829-4bbd-8731-c03e5d7f7639 | ccd0fd43-9cc3-4544-b17c-dfacd8fa4d14 | 10.1.0.6,fdea:fd32:11ff:0:f816:3eff:fed1:8a7c | 52:54:00:85:19:89 |
+------------+--------------------------------------+--------------------------------------+-----------------------------------------------+-------------------+
2. Show ironic port. it has vif_port_id in extra with id of neutron port:
ironic port-show 735fcaf5-145d-4125-8701-365c58c6b796
+-----------------------+-----------------------------------------------------------+
| Property | Value |
+-----------------------+-----------------------------------------------------------+
| address | 52:54:00:85:19:89 |
| created_at | 2016-07-20T13:15:23+00:00 |
| extra | {u'vif_port_id': u'512e6c8e-3829-4bbd-8731-c03e5d7f7639'} |
| local_link_connection | |
| node_uuid | 679fa8a9-066e-4166-ac1e-6e77af83e741 |
| pxe_enabled | |
| updated_at | 2016-07-22T13:31:29+00:00 |
| uuid | 735fcaf5-145d-4125-8701-365c58c6b796 |
+-----------------------+-----------------------------------------------------------+
3. Delete neutron port:
neutron port-delete 512e6c8e-3829-4bbd-8731-c03e5d7f7639
Deleted port: 512e6c8e-3829-4bbd-8731-c03e5d7f7639
4. It is done from interface list:
nova interface-list 42dd8b8b-b2bc-420e-96b6-958e9295b2d4
+------------+---------+--------+--------------+----------+
| Port State | Port ID | Net ID | IP addresses | MAC Addr |
+------------+---------+--------+--------------+----------+
+------------+---------+--------+--------------+----------+
5. ironic port still has vif_port_id with neutron's port id:
ironic port-show 735fcaf5-145d-4125-8701-365c58c6b796
+-----------------------+-----------------------------------------------------------+
| Property | Value |
+-----------------------+-----------------------------------------------------------+
| address | 52:54:00:85:19:89 |
| created_at | 2016-07-20T13:15:23+00:00 |
| extra | {u'vif_port_id': u'512e6c8e-3829-4bbd-8731-c03e5d7f7639'} |
| local_link_connection | |
| node_uuid | 679fa8a9-066e-4166-ac1e-6e77af83e741 |
| pxe_enabled | |
| updated_at | 2016-07-22T13:31:29+00:00 |
| uuid | 735fcaf5-145d-4125-8701-365c58c6b796 |
+-----------------------+-----------------------------------------------------------+

This can confuse when user wants to get list of unused ports of ironic node.
vif_port_id should be removed after neutron port-delete.

Tags: baremetal
Revision history for this message
Jakub Libosvar (libosvar) wrote :

If you call 'neutron port-show 512e6c8e-3829-4bbd-8731-c03e5d7f7639' after you deleted the port via neutron, is it still available? Seems more like an ironic issue to me, if neutron doesn't report the port back.

Changed in neutron:
status: New → Incomplete
Revision history for this message
Andrey Shestakov (ashestakov) wrote :

neutron port is not available after deletion.
But ironic should remove reference to that port.
This can be achieved by notification event to nova virt driver.
Addressed in reviews:
https://review.openstack.org/#/c/346823/
https://review.openstack.org/#/c/346824/

Changed in neutron:
status: Incomplete → In Progress
assignee: nobody → Andrey Shestakov (ashestakov)
tags: added: usability
tags: added: baremetal
tags: removed: usability
Changed in neutron:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/346823
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=8b69189fdd87592a2a98be1a8bdfa20e76744cb1
Submitter: Jenkins
Branch: master

commit 8b69189fdd87592a2a98be1a8bdfa20e76744cb1
Author: Andrey Shestakov <email address hidden>
Date: Mon Jul 25 16:53:31 2016 +0300

    Consider baremetal device_owner as compute for nova notify

    Interface should be correctly removed from ironic when port-delete.
    Nova should receive notify when baremetal port deleted.

    Change-Id: I3d53bff8278dabafd929ecbea0b4b3b441c9e1cf
    Partial-Bug: #1606229

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/neutron-lib 0.4.0

This issue was fixed in the openstack/neutron-lib 0.4.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

This issue was fixed in the openstack/neutron-lib 0.4.0 release.

Revision history for this message
Sam Betts (sambetts) wrote :

I believe this fix has been put in the wrong place, we should have fixed Ironic to not change the port device_owner in neutron if the port has come from nova. This is because the neutron ports Ironic is operating are still owned by the nova instance, and therefore are expected to be managed by nova. I believe only ports created by Ironic should have the device_owner = baremetal:none if they are for a nova instance they should remain device_owner = compute:none

Changed in ironic:
status: New → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to ironic (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/424650

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ironic (master)

Change abandoned by Vasyl Saienko (<email address hidden>) on branch: master
Review: https://review.openstack.org/424650
Reason: https://review.openstack.org/#/c/424248

Revision history for this message
Vladyslav Drok (vdrok) wrote :

Ironic side of the issue was resolved by one of the patches from this bug - https://bugs.launchpad.net/neutron/+bug/1656010

Changed in ironic:
status: Triaged → Won't Fix
Changed in neutron:
status: In Progress → Won't Fix
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.