IpAddressGenerationFailure warning while running tempest test test_create_subnet_from_pool_with_subnet_cidr

Bug #1760584 reported by venkata anil
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Invalid
Medium
Unassigned
tempest
Invalid
Undecided
Unassigned

Bug Description

When I run tempest run

neutron.tests.tempest.api.test_subnetpools.SubnetPoolsTest.test_create_subnet_from_pool_with_subnet_cidr

I see below warning in neutron-server
Apr 02 08:46:28 test.rdocloud neutron-server[12690]: WARNING neutron.api.rpc.handlers.dhcp_rpc [None req-4bfb3f1d-659f-49b8-8572-c74e7d955731 None None] Action create_port for network 8e90dae6-018e-4979-bfad-2cc96e281ea8 could not complete successfully: No more IP addresses available on network 8e90dae6-018e-4979-bfad-2cc96e281ea8.: IpAddressGenerationFailure: No more IP addresses available on network 8e90dae6-018e-4979-bfad-2cc96e281ea8.

This test tries to create a subnet with cidr 10.11.12.0/31 i.e only one address to allocate(which will be taken for gateway_ip). This subnet creation will notify dhcp agent, which will try to create a dhcp port but will fail as there are no address available. Still the subnet create api will be successful as port creation is triggered later from dhcp agent.

These tests may fail with vendor's drivers if their implementation try to create dhcp port as part of subnet creation. There is no point in creating a subnet with no IP address. Better to change the tempest tests to provide CIDR with adequate addresses.

Revision history for this message
Brian Haley (brian-haley) wrote :

The other option is to pass "disable-dhcp" when creating the subnet. I guess I would prefer this since technically a /31 is valid for a subnet (point to point links).

We would just have to add this to the body in the API call:

'enable_dhcp': False

Changed in neutron:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Brian Haley (brian-haley) wrote :

Actually, we found that running this on OVN also fails, since it is allocating a DHCP port all the time for metadata, so using --disable-dhcp won't work in that case. So maybe changing to a /30 is the best solution.

Revision history for this message
Slawek Kaplonski (slaweq) wrote :

I agree with Brian that it should be changed to /30 in test. But maybe we should also add some additional validation on Neutron's side and raise some error when user tries to do such small subnet with no any IP address available.

Revision history for this message
Brian Haley (brian-haley) wrote :

The bug that was causing the OVN failure was fixed in https://review.openstack.org/#/c/559771/ - it changed the subnet cidr to a /29 so it should always succeed.

In reality it seems anything of /30 and smaller with DHCP enabled and a gateway attached is unusable, not sure if we need to validate that and return an error, the next IP allocation should fail with a reasonable error.

Revision history for this message
Martin Kopec (mkopec) wrote :

The issue, based on the comments, got resolved in the neutron-tempest-plugin, so from tempest perspective, this can be closed then. I'll mark it as Invalid. If you feel like there is a change needed in tempest, provide info and feel free to reopen it.

Changed in tempest:
status: New → Invalid
Changed in neutron:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.