Instance creation fails if the IP address of the attached port is being referred by the allowed-address parameter of another port
Issue
-
Create two ports. The IP address of the first port is referred by the allowed-address parameter of another port.
In the following example, the first portport1
has192.168.0.10
, which is referred by the allowed-address parameter of another portport2
.$ openstack port create --fixed-ip ip-address=192.168.0.10 --network network1 port1 $ openstack port create --fixed-ip ip-address=192.168.0.11 --allowed-address ip-address=192.168.0.10 --network network1 port2
-
When an instance is attempted to be created with the first port
port1
, the instance creation fails with the following error message.# openstack server create --flavor flavor1 --image image1 --key-name key1 --port port1 test1 # openstack server list +--------------------------------------+-------+--------+----------+--------+---------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+-------+--------+----------+--------+---------+ | aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa | test1 | ERROR | | image1 | flavor1 | +--------------------------------------+-------+--------+----------+--------+---------+ $ openstack server show test1 --fit-width : | fault | {'code': 500, 'created': '2023-01-01T01:39:12Z', 'message': 'Build of instance aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa aborted: | | | Failed to allocate the network(s), not rescheduling.', 'details': 'Traceback (most recent call last):\n File | | | "/usr/lib/python3.6/site-packages/nova/virt/libvirt/driver.py", line 6652, in _create_domain_and_network\n network_info)\n | : | | request_spec)\n File "/usr/lib/python3.6/site-packages/nova/compute/manager.py", line 2551, in _build_and_run_instance\n | | | reason=msg)\nnova.exception.BuildAbortException: Build of instance aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa aborted: Failed to | | | allocate the network(s), not rescheduling.\n'} |
-
This issue only occurs on RHOSP 16.2.4 or later.
This issue doesn't occur on RHOSP 16.2.3 or earlier.
Environment
- Red Hat OpenStack Platform 16.2.4 or later
- ML2/OVN
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.