port in use can be deleted by neutron, left an orphan interface in vm

Bug #1314614 reported by Zang MingJie
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
neutron
Expired
Medium
Unassigned

Bug Description

Way to reproduce:

nova boot --flavor m1.tiny --image cirros-0.3.1-x86_64-uec test
neutron port-delete c702e88f-f249-48fa-90fd-00397e681814 (id of the port assigned to the vm)

result:

left an unmanaged interface in vm, nova info cache and neutron port database de-sync.

$ nova list
+--------------------------------------+------+--------+------------+-------------+------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+------+--------+------------+-------------+------------------+
| 202abd0d-d459-4026-9ec9-0b2493ff7371 | test | ACTIVE | - | Running | private=10.0.0.4 |
+--------------------------------------+------+--------+------------+-------------+------------------+
$ nova interface-list test
+------------+---------+--------+--------------+----------+
| Port State | Port ID | Net ID | IP addresses | MAC Addr |
+------------+---------+--------+--------------+----------+
+------------+---------+--------+--------------+----------+

potential fix:

Forbid to delete a port which is in use

Tags: neutron-core
Changed in neutron:
assignee: nobody → Zang MingJie (zealot0630)
tags: added: neutron-core
Revision history for this message
Eugene Nikanorov (enikanorov) wrote :

I'm not sure how this can be handled by neutron, especially that the described behavior is somewhat expected.
VM's port belong to a tenant, so tenant may need to have control.
Technically it's not quite clear what is 'port is in use'.

Changed in neutron:
status: New → Incomplete
Revision history for this message
Tiantian Gao (gtt116) wrote :

@Eugene

I don't agree with you. We would like Neutron to be a robust program, when user submitted an error input if we can't gracefully process it, ignoring the risk, and letting it happened not looks good. It is our duty to warn them that the action is dangerous, and reject the request for protecting the system.

In cinder, when a volume is attached, cinder will reject user to delete the volume before detach it. I think we can follow this pattern to return a 400 to user if he want to delete a 'in use' port. Although an alternative solution is leaving a message about this in network documents, but I don't think it's a good choice. :)

Changed in neutron:
status: Incomplete → Confirmed
Revision history for this message
Tiantian Gao (gtt116) wrote :

How about defining a port is 'in used' if it's device_owner, device_id is not None?

Revision history for this message
Eugene Nikanorov (enikanorov) wrote :

Yep, that's what I was asking about. Right now every of these fields can be updated by user, in other words, user may make port 'not in use' by this definition.

Changed in neutron:
assignee: Zang MingJie (zealot0630) → Eugene Nikanorov (enikanorov)
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/99358

Changed in neutron:
assignee: Eugene Nikanorov (enikanorov) → Zang MingJie (zealot0630)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by Zang MingJie (<email address hidden>) on branch: master
Review: https://review.openstack.org/99358

Revision history for this message
Cedric Brandily (cbrandily) wrote :

This bug is > 365 days without activity. We are unsetting assignee and milestone and setting status to Incomplete in order to allow its expiry in 60 days.

If the bug is still valid, then update the bug status.

Changed in neutron:
assignee: Zang MingJie (zealot0630) → nobody
status: In Progress → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for neutron because there has been no activity for 60 days.]

Changed in neutron:
status: Incomplete → Expired
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.