Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

listener: allow rebuild listener if the num of addresses are not changed but values are changed #38530

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Shikugawa
Copy link
Member

@Shikugawa Shikugawa commented Feb 23, 2025

Commit Message: listener: allow rebuild listener if the num of addresses are not changed but values are changed
Additional Description:
When updating a Listener with the same name via LDS, the update gets rejected if the number of contained ports remains unchanged.

For example, consider the following existing Listener:

name: foo
address:
  socket_address:
    address: 127.0.0.1
    port_value: 1000
additional_addresses:
- address:
    socket_address:
      address: 127.0.0.2
      port_value: 1000

If the Listener is updated as follows:

name: foo
address:
  socket_address:
    address: 127.0.0.1
    port_value: 2000
additional_addresses:
- address:
    socket_address:
      address: 127.0.0.2
      port_value: 1000

But it's rejected.

We expect it should work: As long as there is no other Listener with conflicting ports, the existing Listener with the same name should be drained and then reconfigured instead of being outright rejected.

This fix involves a small-scale refactoring along with a small potential bug fix that the function hasCompatibleAddress() does not immediately return false when socket options are changed, then listener rebuild is not invoked.

Risk Level: Low
Testing: Unit
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

…ged but values are changed

Signed-off-by: Rei Shimizu <[email protected]>
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.

1 participant