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

envoy: fix init order between accesslog and xDS server #27617

Merged

Conversation

mhofstetter
Copy link
Member

@mhofstetter mhofstetter commented Aug 22, 2023

Currently, the envoy accesslog server depends on the xDS server to get information about local endpoints. This leads to the xDS server being initialized and started before the accesslog server. Therefore, the accesslog server might not be ready when Envoy is receiving the xDS resources and starts to initialize Cilium components in envoy. This results in silent errors of the form Cilium filter can not open access log socket (e.g. Cilium L7 policy filter).

This commit introduces the LocalEndPointStore which contains this information and is shared between the two components. The direct dependency between the accesslog server and xDS server can be replaced - and the components start initializing at the same time.

In addition, the dependency from the xDS server to the accesslog server gets introduced.

This dependency only serves the purpose of enforcing the accesslog server being initialized first before the xDS server is starting up.

Currently, the envoy accesslog server depends on the xDS server to get
information about local endpoints. This leads to the xDS server being
initialized and started before the accesslog server. Therefore, the
accesslog server might not be ready when Envoy is receiving the xDS
resources and starts to initialize Cilium components in envoy. This
results in silent errors.

This commit introduces the LocalEndPointStore which contains this
information and is shared between the two components. The direct
dependency between the accesslog server and xDS server can be replaced -
and the components start initializing at the same time.

Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
In addition to introducing the LocalEndpointStore to get rid of the
direct dependency between accesslog and xDS server, the dependency from
the xDS server to the accesslog server gets introduced.

This dependency only serves the purpose of enforcing the accesslog
server being initialized first before the xDS server is started up.

Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
@mhofstetter mhofstetter added kind/bug This is a bug in the Cilium logic. area/proxy Impacts proxy components, including DNS, Kafka, Envoy and/or XDS servers. release-note/bug This PR fixes an issue in a previous release of Cilium. labels Aug 22, 2023
@mhofstetter
Copy link
Member Author

/test

@mhofstetter mhofstetter marked this pull request as ready for review August 22, 2023 07:36
@mhofstetter mhofstetter requested a review from a team as a code owner August 22, 2023 07:36
This commit introduces a log message once the Envoy access log server
starts to listen for incoming connections.

Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
@mhofstetter
Copy link
Member Author

/test

Copy link
Member

@jrajahalme jrajahalme 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 for this fix :-)

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Aug 23, 2023
@jrajahalme jrajahalme merged commit b22bc6d into cilium:main Aug 23, 2023
60 checks passed
@mhofstetter mhofstetter deleted the pr/mhofstetter/envoy-resource-init-order branch August 23, 2023 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/proxy Impacts proxy components, including DNS, Kafka, Envoy and/or XDS servers. kind/bug This is a bug in the Cilium logic. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/bug This PR fixes an issue in a previous release of Cilium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants