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

How to access InitManager during grpc initialisation #36710

Open
nbaws opened this issue Oct 20, 2024 · 2 comments
Open

How to access InitManager during grpc initialisation #36710

nbaws opened this issue Oct 20, 2024 · 2 comments
Labels
question Questions that are neither investigations, bugs, nor enhancements

Comments

@nbaws
Copy link
Contributor

nbaws commented Oct 20, 2024

As part of removing AWS request signing dependency on curl, I have run into an issue which surfaces due to grpc credentials extension being instantiated with a CommonFactoryContext.

AWS request signing credential retrieval has now been refactored to use Http::AsyncClient. This creates a dependency on ServerFactoryContext->initManager(), as we need to wait for clusters to come online before attempting to retrieve credentials.

context_->initManager().add(*init_target_);

This is fine for normal extension initialization case (upstream and downstream filter). However initmanager is not available in CommonFactoryContext.

Is this even possible? I'm not entirely clear on the rationale behind the two different factory contexts, why grpc credentials uses Common rather than Server or whether an init manager is reasonable for this part of the startup process.

Server::Configuration::CommonFactoryContext& context) {

@wbpcode

@nbaws nbaws added the triage Issue requires triage label Oct 20, 2024
@mattklein123 mattklein123 added question Questions that are neither investigations, bugs, nor enhancements and removed triage Issue requires triage labels Oct 21, 2024
@mattklein123
Copy link
Member

cc @kyessenov who probably has more recent knowledge on this than I do.

@nbaws
Copy link
Contributor Author

nbaws commented Oct 22, 2024

best I've been able to work out is that the grpc credentials extension kicks in very early, before ThreadLocalClusterManager is available. So even with Init Manager access, I won't be able to add these clusters.
It seems like a catch-22, if the grpc credentials extension depends on us, which depends on ThreadLocalClusterManager to be initialized, I have to find a way to wait for initialization to complete first. I'll keep kicking the tyres on this to see what I can work out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions that are neither investigations, bugs, nor enhancements
Projects
None yet
Development

No branches or pull requests

2 participants