Repository navigation
listener: allow changing address - #16134
Conversation
Signed-off-by: Taylor Barrella <[email protected]>
lambdai
left a comment
There was a problem hiding this comment.
That's a good start but there is more work than this.
The previous constraint that the new listener and old listener have the same address simplify the logic. Now that the address could be different, you have to set the new SocketFactory instead of using the existing active or existing warming.
|
Drive-by comment: This will need an integration test. |
Signed-off-by: Taylor Barrella <[email protected]>
Signed-off-by: Taylor Barrella <[email protected]>
Signed-off-by: Taylor Barrella <[email protected]>
Signed-off-by: Taylor Barrella <[email protected]>
| EXPECT_EQ(test_server_->server().listenerManager().listeners().size(), 1); | ||
| registerTestServerPorts({listener_name_}); | ||
|
|
||
| const std::string route_config_tmpl = R"EOF( |
There was a problem hiding this comment.
nit: the route config can be defined within the http conn manager so we don't use the rds stream here.
There was a problem hiding this comment.
I think rds could be used here to prevent the listener from completing warming.
This brings up an interesting question: I'm not sure what the expected semantics are when the new listener is still warming. Should the old listener be guaranteed to still be accepting connections until the new listener is done warming? This is more complicated with the listener address changing. I think it wouldn't be in the case of localhost->wildcard, but unicast->different unicast it could matter.
There was a problem hiding this comment.
By this being more complicated, do you mean the logic should be different from when a listener is normally updated (without changing the address)? Anyway, from my understanding, the old listener isn't drained until the new one is warmed: https://github.com/envoyproxy/envoy/blob/v1.18.2/source/server/listener_manager_impl.cc#L749
Signed-off-by: Taylor Barrella <[email protected]>
Signed-off-by: Taylor Barrella <[email protected]>
|
/retest |
|
Retrying Azure Pipelines: |
lambdai
left a comment
There was a problem hiding this comment.
LGTM modulo the how far the integration est should go.
Leave @ggreenway for the further comment
Signed-off-by: Taylor Barrella <[email protected]>
ggreenway
left a comment
There was a problem hiding this comment.
I think the code looks good, but we need to figure out if there are any tricky semantics to define regarding warming after an address change.
| EXPECT_EQ(test_server_->server().listenerManager().listeners().size(), 1); | ||
| registerTestServerPorts({listener_name_}); | ||
|
|
||
| const std::string route_config_tmpl = R"EOF( |
There was a problem hiding this comment.
I think rds could be used here to prevent the listener from completing warming.
This brings up an interesting question: I'm not sure what the expected semantics are when the new listener is still warming. Should the old listener be guaranteed to still be accepting connections until the new listener is done warming? This is more complicated with the listener address changing. I think it wouldn't be in the case of localhost->wildcard, but unicast->different unicast it could matter.
Signed-off-by: Taylor Barrella <[email protected]>
Signed-off-by: Taylor Barrella <[email protected]>
|
Thank you for the reviews; updated in response to a couple comments while waiting to hear back about the others |
ggreenway
left a comment
There was a problem hiding this comment.
This brings up an interesting question: I'm not sure what the expected semantics are when the new listener is still warming. Should the old listener be guaranteed to still be accepting connections until the new listener is done warming? This is more complicated with the listener address changing. I think it wouldn't be in the case of localhost->wildcard, but unicast->different unicast it could matter.
@tbarrella I think the behavior on the semantics of this should be documented. My initial impression is that what I described above (old listener should be open until new one is warmed) is probably the correct semantic, but I'm open to discussing that if anyone else feels differently. @alyssawilk or @mattklein123 ? And I think that we need to test/validate those semantics.
|
Overall that makes sense to me, although this process of updating a listener and having two at the same time is something that has already been happening for a while. Is it that something additional/special needs to be documented/tested in the case of changing the address? |
Signed-off-by: Taylor Barrella <[email protected]>
|
/retest |
|
Retrying Azure Pipelines: |
|
/retest |
|
Retrying Azure Pipelines: |
That's a fair point. I read the existing docs, and I think they correctly describe this new mode: https://www.envoyproxy.io/docs/envoy/latest/configuration/listeners/lds.html. But please update the sentence /wait |
Signed-off-by: Taylor Barrella <[email protected]>
|
/retest |
|
Retrying Azure Pipelines: |
|
/retest |
|
Retrying Azure Pipelines: |
@lambdai already approved this; github is being weird thinking there are still changes requested
|
Thank you for the reviews! |
* listener: allow changing address Signed-off-by: Taylor Barrella <[email protected]> Signed-off-by: Gokul Nair <[email protected]>
* listener: allow changing address Signed-off-by: Taylor Barrella <[email protected]> Signed-off-by: Gokul Nair <[email protected]>
Commit Message:
listener: allow changing address
Signed-off-by: Taylor Barrella [email protected]
Additional Description:
Risk Level: Medium
Testing: unit and integration
Docs Changes: updated LDS docs to clarify socket reuse
Release Notes: noted new feature
Fixes #15907