nova assume ports with vnic_type=direct-physical use the libvirt interface element when processing network-vif-deleted events
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Invalid
|
Undecided
|
Unassigned | ||
Ussuri |
Confirmed
|
Undecided
|
Unassigned | ||
neutron |
Opinion
|
Undecided
|
Unassigned |
Bug Description
High level description
It should not be able to remove a port that it is attached to a VM. It is allowed to removed a port with with vnic_type=
LibvirtConfigGu
2020-02-18 17:41:20.190 8 ERROR oslo_messaging.
2020-02-18 17:41:20.190 8 ERROR oslo_messaging.
2020-02-18 17:41:20.190 8 ERROR oslo_messaging.
2020-02-18 17:41:20.190 8 ERROR oslo_messaging.
2020-02-18 17:41:20.190 8 ERROR oslo_messaging.
2020-02-18 17:41:20.190 8 ERROR oslo_messaging.
2020-02-18 17:41:20.190 8 ERROR oslo_messaging.
2020-02-18 17:41:20.190 8 ERROR oslo_messaging.
2020-02-18 17:41:20.190 8 ERROR oslo_messaging.
2020-02-18 17:41:20.190 8 ERROR oslo_messaging.
2020-02-18 17:41:20.190 8 ERROR oslo_messaging.
2020-02-18 17:41:20.190 8 ERROR oslo_messaging.
2020-02-18 17:41:20.190 8 ERROR oslo_messaging.
2020-02-18 17:41:20.190 8 ERROR oslo_messaging.
2020-02-18 17:41:20.190 8 ERROR oslo_messaging.
2020-02-18 17:41:20.190 8 ERROR oslo_messaging.
2020-02-18 17:41:20.190 8 ERROR oslo_messaging.
2020-02-18 17:41:20.190 8 ERROR oslo_messaging.
2020-02-18 17:41:20.190 8 ERROR oslo_messaging.
2020-02-18 17:41:20.190 8 ERROR oslo_messaging.
2020-02-18 17:41:20.190 8 ERROR oslo_messaging.
2020-02-18 17:41:20.190 8 ERROR oslo_messaging.
2020-02-18 17:41:20.190 8 ERROR oslo_messaging.
2020-02-18 17:41:20.190 8 ERROR oslo_messaging.
2020-02-18 17:41:20.190 8 ERROR oslo_messaging.
2020-02-18 17:41:20.190 8 ERROR oslo_messaging.
Step-by-step reproduction steps
1. Create a vm with a "physical direct" port and attach to a VM
(venv) (overcloud) [stack@undercloud-0 ~]$ openstack port list | grep "50.0"
| eeb2cc67-
(venv) (overcloud) [stack@undercloud-0 ~]$ openstack port show eeb2cc67-
+------
| Field | Value |
+------
| admin_state_up | UP |
| allowed_
| binding_host_id | compute-
| binding_profile | pci_slot=
| binding_vif_details | port_filter=
| binding_vif_type | hostdev_physical |
| binding_vnic_type | direct-physical |
| created_at | 2020-05-
| data_plane_status | None |
| description | |
| device_id | 2c274d1d-
| device_owner | compute:nova |
| dns_assignment | None |
| dns_name | None |
| extra_dhcp_opts | |
| fixed_ips | ip_address=
| id | eeb2cc67-
| ip_address | None |
| mac_address | f8:f2:1e:03:9b:e6 |
| name | tempest-
| network_id | c63b5f88-
| option_name | None |
| option_value | None |
| port_security_
| project_id | c2f705909fd2481
| qos_policy_id | None |
| revision_number | 9 |
| security_group_ids | c230b0e7-
| status | ACTIVE |
| subnet_id | None |
| tags | |
| trunk_details | None |
| updated_at | 2020-05-
+------
2. Delete the port
(venv) (overcloud) [stack@undercloud-0 ~]$ openstack port delete eeb2cc67-
(venv) (overcloud) [stack@undercloud-0 ~]$ openstack port list | grep "50.0"
Apart from the error in the log file, this port is removed from the list of ports even being attached to a vm
containers/
containers/
Expected output
Port should not be removed as it is attached to a VM
Actual output
Port is removed from the port list but it continues attached to the VM.
Version
Queens
affects: | neutron → nova |
affects: | nova → neutron |
That is how Neutron is designed currently. Changing that would require a lot of changes e.g. on Nova side.
IIRC we discussed that during Shanghai PTG (or in Denver) and we decided to not change that.
So from Neutron point of view You can remove port even if it's attached to the instance.