Instance creation fails if the IP address of the attached port is being referred by the allowed-address parameter of another port
Issue
-
There is ports which have allowed-address setting
$ openstack port create --fixed-ip ip-address=192.168.0.11 --allowed-address ip-address=192.168.0.10 --network network1 port1
-
Type A: Create a new port with the IP address which is specified by the allowed-address of another port.
When an instance is attempted to be created with the port, the instance creation fails withFailed to allocate the network(s), not rescheduling
error.$ openstack port create --fixed-ip ip-address=192.168.0.10 --network network1 port2 $ openstack server create --flavor flavor1 --image image1 --key-name key1 --port port2 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'} |
-
Type B: Create a new instance without pre-created port fails randomly with
Failed to allocate the network(s), not rescheduling
error.$ openstack server create --flavor flavor1 --image image1 --key-name key1 --network network1 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
- Red Hat OpenStack Platform 17.1
- ML2/OVN
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.