Skip to content

Conversation

@fedepaol
Copy link
Member

@fedepaol fedepaol commented Oct 14, 2022

This reverts commit aea1881.

The meaning of the annotation is that MetalLB may colocate the two services sharing the same IP, but it's a best effort indication. If the two services are incompatible (i.e. they have different external traffic policies), they won't get the same IP and they should not. This also fixes a bug where:

  • the controller is stopped
  • a service without an external ip is created
  • a service with an external ip is already present
  • the controller is started

If the controller processes the service without IP first, it may get the first available IP (because metallb doesn't know the allocation yet), but when the second service is processed, instead of getting a new IP because it is not compatible with the first processed service, the controller silently fail and the service holds the same IP as the other, even if no request of sharing through the annotation were made.

Fixes #1591

This reverts commit aea1881.

The meaning of the annotation is that MetalLB _may_ colocate the two
services sharing the same IP, but it's a best effort indication. If the
two services are incompatible (i.e. they have different external traffic
policies), they won't get the same IP and they should not.
This also fixes a bug where:
- the controller is stopped
- a service without an external ip is created
- a service with an external ip is already present
- the controller is started

If the controller processes the service without IP first, it may get the
first available IP (because metallb doesn't know the allocation yet),
but when the second service is processed, instead of getting a new IP
because it is not compatible with the first processed service, the
controller silently fail and the service holds the same IP as the other,
even if no request of sharing through the annotation were made.
@fedepaol fedepaol changed the title Revert "When services share IP, modifying any service should fail ins… Revert "When services share IP, modifying any service should fail Oct 14, 2022
Copy link
Member

@oribon oribon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reassignment Duplicate IP after deleting IP pool

2 participants