fullstack test neutron.tests.fullstack.test_l3_agent.TestHAL3Agent.test_gateway_ip_changed failed intermittently

Bug #1808595 reported by Hongbin Lu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Hongbin Lu

Bug Description

Neutron fullstack test 'neutron.tests.fullstack.test_l3_agent.TestHAL3Agent.test_gateway_ip_changed' intermittently failed with the following error

Traceback (most recent call last):
  File "/opt/stack/new/neutron/neutron/tests/base.py", line 151, in func
    return f(self, *args, **kwargs)
  File "/opt/stack/new/neutron/neutron/tests/fullstack/test_l3_agent.py", line 428, in test_gateway_ip_changed
    self._test_gateway_ip_changed()
  File "/opt/stack/new/neutron/neutron/tests/fullstack/test_l3_agent.py", line 116, in _test_gateway_ip_changed
    {'ip_address': ip_2}])
  File "/opt/stack/new/neutron/neutron/tests/fullstack/resources/client.py", line 141, in update_port
    return self._update_resource('port', port_id, kwargs)
  File "/opt/stack/new/neutron/neutron/tests/fullstack/resources/client.py", line 57, in _update_resource
    resp = update(id, body=body)
  File "/opt/stack/new/neutron/.tox/dsvm-fullstack/lib/python3.5/site-packages/neutronclient/v2_0/client.py", line 799, in update_port
    revision_number=revision_number)
  File "/opt/stack/new/neutron/.tox/dsvm-fullstack/lib/python3.5/site-packages/neutronclient/v2_0/client.py", line 2375, in _update_resource
    return self.put(path, **kwargs)
  File "/opt/stack/new/neutron/.tox/dsvm-fullstack/lib/python3.5/site-packages/neutronclient/v2_0/client.py", line 363, in put
    headers=headers, params=params)
  File "/opt/stack/new/neutron/.tox/dsvm-fullstack/lib/python3.5/site-packages/neutronclient/v2_0/client.py", line 331, in retry_request
    headers=headers, params=params)
  File "/opt/stack/new/neutron/.tox/dsvm-fullstack/lib/python3.5/site-packages/neutronclient/v2_0/client.py", line 294, in do_request
    self._handle_fault_response(status_code, replybody, resp)
  File "/opt/stack/new/neutron/.tox/dsvm-fullstack/lib/python3.5/site-packages/neutronclient/v2_0/client.py", line 269, in _handle_fault_response
    exception_handler_v20(status_code, error_body)
  File "/opt/stack/new/neutron/.tox/dsvm-fullstack/lib/python3.5/site-packages/neutronclient/v2_0/client.py", line 93, in exception_handler_v20
    request_ids=request_ids)
neutronclient.common.exceptions.IpAddressAlreadyAllocatedClient: IP address 240.27.66.102 already allocated in subnet 814bfcc0-0d3d-4b45-8436-c76e7a000150
Neutron server returns request_ids: ['req-bf114fe1-66a9-4c86-8bc7-d759e10bf660']

Failure examples:

http://logs.openstack.org/36/617736/10/check/neutron-fullstack/61fa2eb/logs/testr_results.html.gz
http://logs.openstack.org/68/424468/34/check/neutron-fullstack/4422e70/logs/testr_results.html.gz
http://logs.openstack.org/08/620708/2/check/neutron-fullstack/51099db/logs/testr_results.html.gz
http://logs.openstack.org/09/608909/24/check/neutron-fullstack/2891c09/logs/testr_results.html.gz
http://logs.openstack.org/82/610182/13/check/neutron-fullstack/de0ad4f/logs/testr_results.html.gz

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/625359

Changed in neutron:
assignee: nobody → Hongbin Lu (hongbin.lu)
status: New → In Progress
tags: added: gate-failure
Changed in neutron:
importance: Undecided → Critical
importance: Critical → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/625359
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=ae4b331725012c7694132d17e28312159aedb1f3
Submitter: Zuul
Branch: master

commit ae4b331725012c7694132d17e28312159aedb1f3
Author: Hongbin Lu <email address hidden>
Date: Fri Dec 14 22:04:48 2018 +0000

    fullstack: retry on updating port's IP address

    If the update_port call failed with error IpAddressAlreadyAllocatedClient,
    retry a few more times in order to find IP addresses that are available.

    Change-Id: I7c5d51b01fa56083b1a689fa629a9a34c8b77012
    Closes-Bug: #1808595

Changed in neutron:
status: In Progress → Fix Released
tags: added: neutron-proactive-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 14.0.0.0b2

This issue was fixed in the openstack/neutron 14.0.0.0b2 development milestone.

Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/684279

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (master)

Reviewed: https://review.opendev.org/684279
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=94f69ab407d081ce49fa5a93946c4cd41bf6ee89
Submitter: Zuul
Branch: master

commit 94f69ab407d081ce49fa5a93946c4cd41bf6ee89
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Tue Sep 24 11:00:03 2019 +0000

    Randomize BaseFullStackTestCase._find_available_ips

    Instead of retrieving an IP address of the CIDR network in
    ascending order, this patch randomizes the IP address selection.

    Change-Id: I5971d078bd68c3c0b104eea0d443511e741540c4
    Related-Bug: #1808595

Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

The same problem is still affecting the related test cases. E.g.:
https://storage.bhs1.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_942/660722/22/check/neutron-fullstack/9422481/testr_results.html.gz

Between the method to retrieve available IPs and the port update, sometimes those IP addresses are used.

Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

A bug was introduced in [1], as seen in [2]. Error log:

neutronclient.common.exceptions.InvalidIpForNetworkClient: IP address 240.10.143.255 is not a valid IP for any of the subnets on the specified network.

Broadcast address can't be used. The initial position defined in [3] should be reduced by one, to avoid getting the broadcast address in the previously created IPSet.

[1] https://review.opendev.org/#/c/684279/
[2] https://8e5339063fd8d98f3aba-875157a44fab70cabf10b03c4d83bfb0.ssl.cf2.rackcdn.com/660722/22/check/neutron-fullstack/6ea7ccc/testr_results.html.gz
[3] https://github.com/openstack/neutron/blob/0fa7e74ebb386b178d36ae684ff04f03bdd6cb0d/neutron/tests/fullstack/base.py#L140

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/693041

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by Rodolfo Alonso Hernandez (<email address hidden>) on branch: master
Review: https://review.opendev.org/693041
Reason: In favor of https://review.opendev.org/#/c/692135/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (stable/train)

Related fix proposed to branch: stable/train
Review: https://review.opendev.org/705210

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (stable/stein)

Related fix proposed to branch: stable/stein
Review: https://review.opendev.org/705211

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (stable/train)

Reviewed: https://review.opendev.org/705210
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=9e8bdef93c90fa2b2fbd34fc5aebadf94df703d0
Submitter: Zuul
Branch: stable/train

commit 9e8bdef93c90fa2b2fbd34fc5aebadf94df703d0
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Tue Sep 24 11:00:03 2019 +0000

    Randomize BaseFullStackTestCase._find_available_ips

    Instead of retrieving an IP address of the CIDR network in
    ascending order, this patch randomizes the IP address selection.

    Change-Id: I5971d078bd68c3c0b104eea0d443511e741540c4
    Related-Bug: #1808595
    (cherry picked from commit 94f69ab407d081ce49fa5a93946c4cd41bf6ee89)

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (stable/stein)

Reviewed: https://review.opendev.org/705211
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=e1bcc6022866ec340f58a04d4dbb21595f18b9e6
Submitter: Zuul
Branch: stable/stein

commit e1bcc6022866ec340f58a04d4dbb21595f18b9e6
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Tue Sep 24 11:00:03 2019 +0000

    Randomize BaseFullStackTestCase._find_available_ips

    Instead of retrieving an IP address of the CIDR network in
    ascending order, this patch randomizes the IP address selection.

    Change-Id: I5971d078bd68c3c0b104eea0d443511e741540c4
    Related-Bug: #1808595
    (cherry picked from commit 94f69ab407d081ce49fa5a93946c4cd41bf6ee89)

tags: added: in-stable-stein
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.