Bug 1633759
Summary: | VM fails to spawn. VIF creation failed with a database error. Duplicate entry 'fa:16:3e:2b:7c:fe/0a57d046-03a3-413a-b7ba-dc948204824c-0' for key 'uniq_virtual_interfaces0address0deleted' | |||
---|---|---|---|---|
Product: | Red Hat OpenStack | Reporter: | Mircea Vutcovici <mircea.vutcovici> | |
Component: | openstack-nova | Assignee: | René Ribaud <rribaud> | |
Status: | CLOSED ERRATA | QA Contact: | James Parker <jparker> | |
Severity: | high | Docs Contact: | ||
Priority: | high | |||
Version: | 10.0 (Newton) | CC: | alifshit, berrange, bfournie, bhaley, dasmith, eglynn, hjensas, jhakimra, jparker, kchamart, mircea.vutcovici, nova-maint, pkovacs, rribaud, sbauza, sgordon, smooney, stephenfin, vromanso | |
Target Milestone: | z9 | Keywords: | Patch, Reopened, Triaged | |
Target Release: | 16.1 (Train on RHEL 8.2) | |||
Hardware: | x86_64 | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | openstack-nova-20.4.1-1.20220307123812.1ee93b9 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 2051653 2051880 (view as bug list) | Environment: | ||
Last Closed: | 2022-12-07 20:24:45 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 2051653, 2051880 |
Description
Mircea Vutcovici
2018-09-27 16:40:34 UTC
from the inital tracback the error would appear to be related to how the f5 vnf was deployedn using heat. can the f5fw.yaml and a full set of SOSReport logs be provided to confirm. The traceback indicate that the instance failed becasue the uniqueness constraint on mac address was violated. In this case i belive it failed because the heat stack attempted to create two interfaces with the same mac on a singel network or the template is using a hardcoded mac and that mac fa:16:3e:1a:c3:39 is already in use by another port on the 0904bbe4-7075-430e-84c4-5768b6decd9d neutron network. this could happen if the mac is set staticly in the f5fw.yaml and you attempeted to launch multiple instaces of the heat template. regards sean The template contains no hard-coded MAC addresses. I do not understand why it tries to create a port with the same MAC address. One thing I noticed in the f5fw.yaml template that Harald added is that there are ports defined here with the same name, I believe this is a mistake: - port: VMAS_vzw.wsn-v6.net1_SOLKTXESW0VvVVMx-Z-F5-FWx-01 - port: VMAS_vzw.wsn-v6.net1_SOLKTXESW0VvVVMx-Z-F5-FWx-01 The port is here with this name: MariaDB [ovs_neutron]> select * from ml2_port_bindings left join ports on ports.id = ml2_port_bindings.port_id left join networks on networks.id = ports.network_id left join ipallocations on ipallocations.port_id = ports.id where ports.id = '0a57d046-03a3-413a-b7ba-dc948204824c'\G *************************** 1. row *************************** port_id: 0a57d046-03a3-413a-b7ba-dc948204824c host: vif_type: unbound vnic_type: direct profile: {} vif_details: project_id: 572ea77207944299ae64edffb856c5d6 id: 0a57d046-03a3-413a-b7ba-dc948204824c name: VMAS_vzw.wsn-v6.net1_SOLKTXESW0VvVVMx-Z-F5-FWx-01 network_id: fc6740c1-780e-40b1-8dbe-12bd912474d8 And the port_id above matches the error: Duplicate entry 'fa:16:3e:2b:7c:fe/0a57d046-03a3-413a-b7ba-dc948204824c-0' for key 'uniq_virtual_interfaces0address0deleted' It is solved. I confirm that the duplicate port VMAS_vzw.wsn-v6.net1_SOLKTXESW0VvVVMx-Z-F5-FWx-01 was the root cause. Reopening this. There's clearly a bug here in nova's API: it doesn't reject duplicate port IDs during server creation. For example: $ openstack port create --network private test-port $ openstack server create --flavor m1.small --image fedora-iso --port test-port --port test-port --wait test-server Error creating server: test-server Error creating server Looking at the logs, we see the traceback: ERROR nova.compute.manager [instance: 6cb9e513-0650-41a9-9a85-0d647e8b556e] oslo_db.exception.DBDuplicateEntry: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'fa:16:3e:62:88:38/e3caceae-2c74-4114-9f3f-262a37fc1971-0' for key 'virtual_interfaces.uniq_virtual_interfaces0address0deleted'") ERROR nova.compute.manager [instance: 6cb9e513-0650-41a9-9a85-0d647e8b556e] [SQL: INSERT INTO virtual_interfaces (created_at, updated_at, deleted_at, deleted, address, network_id, instance_uuid, uuid, tag) VALUES (%(created_at)s, %(updated_at)s, %(deleted_at)s, %(deleted)s, %(address)s, %(network_id)s, %(instance_uuid)s, %(uuid)s, %(tag)s)] ERROR nova.compute.manager [instance: 6cb9e513-0650-41a9-9a85-0d647e8b556e] [parameters: {'created_at': datetime.datetime(2022, 1, 31, 12, 16, 53, 467871), 'updated_at': None, 'deleted_at': None, 'deleted': 0, 'address': 'fa:16:3e:62:88:38/e3caceae-2c74-4114-9f3f-262a37fc1971', 'network_id': None, 'instance_uuid': '6cb9e513-0650-41a9-9a85-0d647e8b556e', 'uuid': 'e3caceae-2c74-4114-9f3f-262a37fc1971', 'tag': None}] ERROR nova.compute.manager [instance: 6cb9e513-0650-41a9-9a85-0d647e8b556e] (Background on this error at: https://sqlalche.me/e/14/gkpj) ERROR nova.compute.manager [instance: 6cb9e513-0650-41a9-9a85-0d647e8b556e] ERROR nova.compute.manager [instance: 6cb9e513-0650-41a9-9a85-0d647e8b556e] ERROR nova.compute.manager [instance: 6cb9e513-0650-41a9-9a85-0d647e8b556e] During handling of the above exception, another exception occurred: ERROR nova.compute.manager [instance: 6cb9e513-0650-41a9-9a85-0d647e8b556e] ERROR nova.compute.manager [instance: 6cb9e513-0650-41a9-9a85-0d647e8b556e] ERROR nova.compute.manager [instance: 6cb9e513-0650-41a9-9a85-0d647e8b556e] Traceback (most recent call last): ERROR nova.compute.manager [instance: 6cb9e513-0650-41a9-9a85-0d647e8b556e] ERROR nova.compute.manager [instance: 6cb9e513-0650-41a9-9a85-0d647e8b556e] File "/opt/stack/nova/nova/conductor/manager.py", line 137, in _object_dispatch ERROR nova.compute.manager [instance: 6cb9e513-0650-41a9-9a85-0d647e8b556e] ERROR nova.compute.manager [instance: 6cb9e513-0650-41a9-9a85-0d647e8b556e] File "/usr/local/lib/python3.8/dist-packages/oslo_versionedobjects/base.py", line 226, in wrapper ERROR nova.compute.manager [instance: 6cb9e513-0650-41a9-9a85-0d647e8b556e] return fn(self, *args, **kwargs) ERROR nova.compute.manager [instance: 6cb9e513-0650-41a9-9a85-0d647e8b556e] ERROR nova.compute.manager [instance: 6cb9e513-0650-41a9-9a85-0d647e8b556e] File "/opt/stack/nova/nova/objects/virtual_interface.py", line 103, in create ERROR nova.compute.manager [instance: 6cb9e513-0650-41a9-9a85-0d647e8b556e] ERROR nova.compute.manager [instance: 6cb9e513-0650-41a9-9a85-0d647e8b556e] File "/opt/stack/nova/nova/db/utils.py", line 35, in wrapper ERROR nova.compute.manager [instance: 6cb9e513-0650-41a9-9a85-0d647e8b556e] ERROR nova.compute.manager [instance: 6cb9e513-0650-41a9-9a85-0d647e8b556e] File "/opt/stack/nova/nova/db/main/api.py", line 190, in wrapper ERROR nova.compute.manager [instance: 6cb9e513-0650-41a9-9a85-0d647e8b556e] ERROR nova.compute.manager [instance: 6cb9e513-0650-41a9-9a85-0d647e8b556e] File "/opt/stack/nova/nova/db/main/api.py", line 1037, in virtual_interface_create ERROR nova.compute.manager [instance: 6cb9e513-0650-41a9-9a85-0d647e8b556e] ERROR nova.compute.manager [instance: 6cb9e513-0650-41a9-9a85-0d647e8b556e] nova.exception.VirtualInterfaceCreateException: Virtual Interface creation failed This is nothing to do with ports with duplicate MACs: neutron won't allow you to set the same MAC on two ports on the same interface and things work fine if the same MAC is used for ports on different networks. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Red Hat OpenStack Platform 16.1.9 bug fix and enhancement advisory), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:8795 The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days |