Nova deletes port when detaching auto-created interface
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
In Progress
|
Undecided
|
Unassigned |
Bug Description
Description
===========
When detaching an interface that was auto-created (for example, with networks='auto' at server boot time), Nova deletes the port.
Steps to reproduce
==================
1. Boot a server with an auto-created Neutron port.
2. Detach the port using the Nova API.
Expected result
===============
Port is detached, but still present in Neutron. While it makes sense to delete auto-created ports when deleting the server to avoid leaking ports, IMO when an auto-created port is detached its ownership now belongs to the user, as they've explicitly requested an operation on it, and are now responsible for its future life cycle.
Actual result
=============
The port is completely deleted from Neutron.
Environment
===========
Reproduced on master with a func test, reported in stable/train.
Related fix proposed to branch: master /review. opendev. org/c/openstack /nova/+ /844325
Review: https:/