When I tried to create 10 instances on a compute node:
# nova list --all-t | grep test_batch
nova CLI is deprecated and will be a removed in a future release
| a501ea6c-bee1-4d1f-9afd-d8eaf0e5964f | test_batch-1 | 0584825def4f48dc94d553c1ecf28921 | ACTIVE | - | Running | rally-test-network=192.168.15.189, 192.168.15.83 |
| f142200d-9432-41b5-b334-760a3b2d7be0 | test_batch-10 | 0584825def4f48dc94d553c1ecf28921 | ACTIVE | - | Running | rally-test-network=192.168.15.245 |
| b6b590cf-0423-4306-8e4a-51c5305affb7 | test_batch-2 | 0584825def4f48dc94d553c1ecf28921 | ERROR | - | NOSTATE | |
| 201dee76-fab2-4ed5-9ca4-f599fc6a10d4 | test_batch-3 | 0584825def4f48dc94d553c1ecf28921 | ACTIVE | - | Running | rally-test-network=192.168.15.110 |
| 6f2f5160-cc49-4060-8c17-bbf77ab10fdc | test_batch-4 | 0584825def4f48dc94d553c1ecf28921 | ACTIVE | - | Running | rally-test-network=192.168.15.242 |
| 83d5584c-fd5c-4976-aa0b-4dd585de08fa | test_batch-5 | 0584825def4f48dc94d553c1ecf28921 | ACTIVE | - | Running | rally-test-network=192.168.15.56 |
| 68cbdbe5-53de-47d5-9d0e-44acb10075af | test_batch-6 | 0584825def4f48dc94d553c1ecf28921 | ERROR | - | NOSTATE | |
| 1413f96f-491b-489b-bb3c-36e81372015b | test_batch-7 | 0584825def4f48dc94d553c1ecf28921 | ACTIVE | - | Running | rally-test-network=192.168.15.158 |
| 77731a84-7da7-4416-9769-c2fd65114a81 | test_batch-8 | 0584825def4f48dc94d553c1ecf28921 | ACTIVE | - | Running | rally-test-network=192.168.15.236 |
| b815d3cc-41b4-4c31-8f93-4dbeddd98a91 | test_batch-9 | 0584825def4f48dc94d553c1ecf28921 | ACTIVE | - | Running | rally-test-network=192.168.15.193 |
# nova interface-list 201dee76-fab2-4ed5-9ca4-f599fc6a10d4
nova CLI is deprecated and will be a removed in a future release
+------------+--------------------------------------+--------------------------------------+----------------+-------------------+-----+
| Port State | Port ID | Net ID | IP addresses | MAC Addr | Tag |
+------------+--------------------------------------+--------------------------------------+----------------+-------------------+-----+
| ACTIVE | b72e161e-03ff-4df7-b1a1-b358a1c98f9c | a0a294ed-812e-451d-bcc0-5879026560e2 | 192.168.15.110 | fa:16:3e:d3:b3:c7 | - |
+------------+--------------------------------------+--------------------------------------+----------------+-------------------+-----+
test_batch-2 and test_batch-3 got failed. The reason why test_batch-3 failed is that Nova is waiting for a "network-vif-plugged" event while for this VM, neutron sends a "network-changed" event to Nova, then nova failed.
However, when I checked neutron, I found some attribute of these two ports are different:
Successful port:
Request body: {'port': {'device_id': '201dee76-fab2-4ed5-9ca4-f599fc6a10d4', 'network_id': 'a0a294ed-812e-451d-bcc0-5879026560e2', 'admin_state_up': True, 'tenant_id': '0584825def4f48dc94d553c1ecf28921'}}
CheckRevisionNumberCommand(name=b72e161e-03ff-4df7-b1a1-b358a1c98f9c, resource={'id': 'b72e161e-03ff-4df7-b1a1-b358a1c98f9c', 'name': '', 'network_id': 'a0a294ed-812e-451d-bcc0-5879026560e2', 'tenant_id': '0584825def4f48dc94d553c1ecf28921', 'mac_address': 'fa:16:3e:d3:b3:c7', 'admin_state_up': True, 'status': 'ACTIVE', 'device_id': '201dee76-fab2-4ed5-9ca4-f599fc6a10d4', 'device_owner': 'compute:nova', 'standard_attr_id': 265663, 'fixed_ips': [{'subnet_id': '9cd5439f-cf67-46ca-b29c-703c406d0420', 'ip_address': '192.168.15.110'}], 'allowed_address_pairs': [], 'extra_dhcp_opts': [], 'security_groups': ['782b406d-c521-43f6-91e9-671a8ba08a87'], 'description': '', 'binding:vnic_type': 'normal', 'binding:profile': {}, 'binding:host_id': 'compute-10', 'binding:vif_type': 'ovs', 'binding:vif_details': {'port_filter': True, 'connectivity': 'l2'}, 'port_security_enabled': True, 'tags': [], 'created_at': '2023-02-01T23:16:54Z', 'updated_at': '2023-02-01T23:16:56Z', 'revision_number': 4, 'project_id': '0584825def4f48dc94d553c1ecf28921', 'network': {'id': 'a0a294ed-812e-451d-bcc0-5879026560e2', 'name': 'rally-test-network', 'tenant_id': 'ba4d5e8e34e746f1a1d6d7cb712a4eb7', 'admin_state_up': True, 'mtu': 1500, 'status': 'ACTIVE', 'subnets': ['9cd5439f-cf67-46ca-b29c-703c406d0420'], 'standard_attr_id': 144871, 'shared': True, 'availability_zone_hints': [], 'availability_zones': [], 'ipv4_address_scope': None, 'ipv6_address_scope': None, 'router:external': False, 'vlan_transparent': None, 'description': '', 'port_security_enabled': True, 'tags': [], 'created_at': '2023-01-04T00:31:33Z', 'updated_at': '2023-01-04T00:50:21Z', 'revision_number': 3, 'project_id': 'ba4d5e8e34e746f1a1d6d7cb712a4eb7', 'provider:network_type': 'geneve', 'provider:physical_network': None, 'provider:segmentation_id': 1450}}
Failed port:
neutron-server.log.1:2023-02-01 15:16:54.523 25 DEBUG neutron.api.v2.base [req-d40bc291-8d8f-43cb-aea2-fd4f54922114 5d9a7cccf26c44e1800cee064de79113 d9c1ae22d6a84b438d83c7563ded2415 - default default] Request body: {'port': {'device_id': 'b6b590cf-0423-4306-8e4a-51c5305affb7', 'device_owner': 'compute:nova', 'binding:host_id': 'compute-10', 'dns_name': 'test-batch-2'}} prepare_request_body /var/lib/kolla/venv/lib/python3.6/site-packages/neutron/api/v2/base.py:729
CheckRevisionNumberCommand(name=685917b8-3277-485c-bb12-0a4c6d1aa595, resource={'id': '685917b8-3277-485c-bb12-0a4c6d1aa595', 'name': '', 'network_id': 'a0a294ed-812e-451d-bcc0-5879026560e2', 'tenant_id': '0584825def4f48dc94d553c1ecf28921', 'mac_address': 'fa:16:3e:4e:ab:c1', 'admin_state_up': True, 'status': 'DOWN', 'device_id': 'b6b590cf-0423-4306-8e4a-51c5305affb7', 'device_owner': 'compute:nova', 'standard_attr_id': 265660, 'fixed_ips': [{'subnet_id': '9cd5439f-cf67-46ca-b29c-703c406d0420', 'ip_address': '192.168.15.90'}], 'allowed_address_pairs': [], 'extra_dhcp_opts': [], 'security_groups': ['782b406d-c521-43f6-91e9-671a8ba08a87'], 'description': '', 'binding:vnic_type': 'normal', 'binding:profile': {}, 'binding:host_id': 'compute-10', 'binding:vif_type': 'unbound', 'binding:vif_details': {}, 'port_security_enabled': True, 'tags': [], 'created_at': '2023-02-01T23:16:54Z', 'updated_at': '2023-02-01T23:16:54Z', 'revision_number': 2, 'project_id': '0584825def4f48dc94d553c1ecf28921', 'network': {'id': 'a0a294ed-812e-451d-bcc0-5879026560e2', 'name': 'rally-test-network', 'tenant_id': 'ba4d5e8e34e746f1a1d6d7cb712a4eb7', 'admin_state_up': True, 'mtu': 1500, 'status': 'ACTIVE', 'subnets': ['9cd5439f-cf67-46ca-b29c-703c406d0420'], 'standard_attr_id': 144871, 'shared': True, 'availability_zone_hints': [], 'availability_zones': [], 'ipv4_address_scope': None, 'ipv6_address_scope': None, 'router:external': False, 'vlan_transparent': None, 'description': '', 'port_security_enabled': True, 'tags': [], 'created_at': '2023-01-04T00:31:33Z', 'updated_at': '2023-01-04T00:50:21Z', 'revision_number': 3, 'project_id': 'ba4d5e8e34e746f1a1d6d7cb712a4eb7', 'provider:network_type': 'geneve', 'provider:physical_network': None, 'provider:segmentation_id': 1450}}
This is easy to reproduce, especially when creating a batch of instances.
This happens on OpenStack Xena.