[fullstack] Error assigning IPv4 (network address) in "test_gateway_ip_changed"

Bug #1880845 reported by Rodolfo Alonso
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Invalid
Low
Rodolfo Alonso

Bug Description

Error assigning IPv4 (network address) in "test_gateway_ip_changed".

LOG: https://8e3d76ba7bcafd7367d8-a42dfacf856f2ce428049edff149969f.ssl.cf1.rackcdn.com/730888/1/check/neutron-fullstack/31482ea/testr_results.html

ERROR MESSAGE: http://paste.openstack.org/show/794029/
"""
neutronclient.common.exceptions.InvalidIpForNetworkClient: IP address 240.135.228.0 is not a valid IP for any of the subnets on the specified network.
"""

Changed in neutron:
assignee: nobody → Rodolfo Alonso (rodolfo-alonso-hernandez)
Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

According to the logs, the subnet allocation pools are: http://paste.openstack.org/show/794043/
{"start":"240.135.228.2","end":"240.135.228.254"}

This is the method calculating the available IPs for this network: https://github.com/openstack/neutron/blob/058dd639a9817fcdb638809b8228f20a1417774a/neutron/tests/fullstack/base.py#L130-L148

This method should never return an IP address outside the first allocation pool, in this case 240.135.228.2-240.135.228.254.

IPs used in this subnet: 240.135.228.2, 240.135.228.56 and 240.135.228.84

Port update request: http://paste.openstack.org/show/794044/

Sorry but I don't understand how "_find_available_ips" returned **240.135.228.0** and 240.135.228.3.

Help is welcomed.

Regards.

Revision history for this message
Lajos Katona (lajos-katona) wrote :

I check it

Revision history for this message
Lajos Katona (lajos-katona) wrote :

Hmmm, I was not able to create such situation even by playing with numbers.
As this is only a test method we can add debug logs to have more info for next times failure

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

I think I figured out the issue here, so will close this.

Here's my thinking.

The referenced log above was from a change on stable/train:

  https://review.opendev.org/c/openstack/neutron/+/730888

Lajos fixed a bug in _find_available_ips that seems related:

  https://review.opendev.org/c/openstack/neutron/+/692135

commit 3c9b0a5fac2e3a1321eadc272c8ed46aa61efd3e
Author: elajkat <email address hidden>
Date: Wed Oct 30 13:38:30 2019 +0100

    [fullstack] find ip based on allocation_pool

    _find_available_ips tried to find available ips based on the given
    subnet's cidr field, which can be misleading if random selection goes
    out-of allocation-pool. This patch changes this behaviour to use
    cidr's allocation_pool field.

    Closes-Bug: #1850292
    Change-Id: Ied2ffb5ed58007789b0f5157731687dc2e0b9bb1

That change is only included in these versions:

  master stable/2023.1 stable/2023.2 stable/victoria stable/wallaby stable/xena stable/zed
  unmaintained/victoria unmaintained/wallaby unmaintained/xena unmaintained/yoga

So I'm guessing merged in Victoria.

Since the change was from stable/train we could have had an issue with the subnet['cidr'] being used, which would have included IP addresses outside the start/end allocation pool.

Changed in neutron:
status: New → 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.