Skip to content

admin: Add socket options#7562

Merged
mattklein123 merged 8 commits intoenvoyproxy:masterfrom
euroelessar:admin-sockopt
Jul 17, 2019
Merged

admin: Add socket options#7562
mattklein123 merged 8 commits intoenvoyproxy:masterfrom
euroelessar:admin-sockopt

Conversation

@euroelessar
Copy link
Copy Markdown
Contributor

@euroelessar euroelessar commented Jul 12, 2019

Description: Add ability to configure socket options for admin listener socket
Risk Level: LOW (opt-in change)
Testing: unit and integration test to ensure parsing and propagation of new protobuf field
Docs Changes: inline documentation
Release Notes: updated
Fixes #7524

Signed-off-by: Ruslan Nigmatullin <elessar@dropbox.com>
@euroelessar
Copy link
Copy Markdown
Contributor Author

@mattklein123 I need some guidance how to test this change:
It looks like admin interface is not abstracted enough to be able to test it without spawning the full envoy, but in that case it's impossible to mock/track syscalls and hard to observe potential side effects.

@mattklein123 mattklein123 self-assigned this Jul 15, 2019
Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Thanks, a few small nits.

For testing, we have various integration tests that start the admin server. Is there any socket option that you could set that we could verify somehow? Another thought, maybe you could actually configure reuse port and spawn 2 envoys and see that it works? https://github.com/envoyproxy/envoy/blob/master/test/integration/hotrestart_test.sh or some variant of that?

/wait

- use const reference for socket options argument
- add test

Signed-off-by: Ruslan Nigmatullin <elessar@dropbox.com>
Signed-off-by: Ruslan Nigmatullin <elessar@dropbox.com>
Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Nice, LGTM with a small nit.

/wait

const std::string& address_out_path,
Network::Address::InstanceConstSharedPtr address,
Network::Socket::OptionsSharedPtr socketOptions,
const Network::Socket::OptionsSharedPtr& socketOptions,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: s/socketOptions/socket_options here and elsewhere.

Signed-off-by: Ruslan Nigmatullin <elessar@dropbox.com>
Ruslan Nigmatullin added 2 commits July 15, 2019 22:06
Signed-off-by: Ruslan Nigmatullin <elessar@dropbox.com>
Signed-off-by: Ruslan Nigmatullin <elessar@dropbox.com>
@mattklein123
Copy link
Copy Markdown
Member

Can you merge master? It should fix coverage.

/wait

Signed-off-by: Ruslan Nigmatullin <elessar@dropbox.com>
@mattklein123
Copy link
Copy Markdown
Member

Sorry I think CI is wedged. Can you push an empty commit or merge master again?

/wait

Signed-off-by: Ruslan Nigmatullin <elessar@dropbox.com>
Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Thank you!

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.

admin: Using SO_REUSEPORT socket option

2 participants