Skip to content

Flaky E2E test: floatingip-create-full fails due to IP collision with router gateway port #812

@mandre

Description

@mandre

Problem description

The floatingip-create-full E2E test is flaky. It fails when Neutron's auto-allocated IP for the router gateway port collides with the hardcoded floatingIP: 192.168.155.5 requested by the FloatingIP resource.

Observed failure

Root cause

The test creates an external subnet 192.168.155.0/24 without allocationPools, then:

  1. A Router with an external gateway on that subnet — Neutron auto-allocates an IP from the full pool for the gateway port
  2. A FloatingIP requesting floatingIP: 192.168.155.5

In the failing run, Neutron assigned 192.168.155.5 to the router gateway port. The subsequent FloatingIP creation received HTTP 409 Conflict because the IP was already in use:

INFO neutron.api.v2.resource create failed (client error): 
  There was a conflict when trying to complete your request.
POST /networking/v2.0/floatingips => HTTP/1.1 409

ORC correctly classified this as a terminal error (non-quota 409), set Progressing=False, and stopped reconciling. The test timed out waiting for status.resource which would never appear.

Why it's flaky

The router gateway IP is non-deterministically assigned by Neutron. Most runs get an IP other than .5 and the test passes. Occasionally it gets .5, causing the collision.

Fix

Add allocationPools to the external subnet to constrain auto-allocated IPs away from 192.168.155.5:

resource:
  networkRef: floatingip-create-full-external
  ipVersion: 4
  cidr: 192.168.155.0/24
  allocationPools:
    - start: 192.168.155.100
      end: 192.168.155.200

This is the only test affected. All other floatingip tests either don't have a router on the same external network, or don't request a specific floating IP address.


Want me to adjust anything — title, labels, wording, level of detail?

ORC version

main

Additional information

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions