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

hardcoded v2 type urls in xds requests #10209

Closed
bennettdong opened this issue Feb 28, 2020 · 2 comments · Fixed by #10848
Closed

hardcoded v2 type urls in xds requests #10209

bennettdong opened this issue Feb 28, 2020 · 2 comments · Fixed by #10848
Assignees
Labels
api/v3 Major version release @ end of Q3 2019 bug help wanted Needs help!

Comments

@bennettdong
Copy link
Contributor

Title: hardcoded v2 type urls in xds requests

Description:
In order to migrate to v3 API, loadTypeUrl functions are used to determine type url in discovery requests. However, I found that some files are still using v2 type url constants in this file. This means that even envoy is configured to use v3, it will still send requests for v2 resources.

Correct me if there is any magic actually doing the conversion somewhere.

[optional Relevant Links:]

Envoy::Config::TypeUrl::get().RouteConfiguration);

Envoy::Config::TypeUrl::get().RouteConfiguration);

cm_.adsMux()->pause(Config::TypeUrl::get().ClusterLoadAssignment);
maybe_eds_resume = std::make_unique<Cleanup>(
[this] { cm_.adsMux()->resume(Config::TypeUrl::get().ClusterLoadAssignment); });

cm_.adsMux()->paused(Config::TypeUrl::get().ClusterLoadAssignment)) {
initializeSecondaryClusters();
} else {
cm_.adsMux()->pause(Config::TypeUrl::get().ClusterLoadAssignment);
Cleanup eds_resume(
[this] { cm_.adsMux()->resume(Config::TypeUrl::get().ClusterLoadAssignment); });

ads_mux_->pause(Config::TypeUrl::get().Cluster);
} else if (previous_warming > 0 && warming_clusters_.empty()) {
ads_mux_->resume(Config::TypeUrl::get().Cluster);

cm_.adsMux()->pause(Config::TypeUrl::get().RouteConfiguration);
maybe_eds_resume = std::make_unique<Cleanup>(
[this] { cm_.adsMux()->resume(Config::TypeUrl::get().RouteConfiguration); });

cm.adsMux()->pause(Config::TypeUrl::get().RouteConfiguration);
}
ENVOY_LOG(info, "all clusters initialized. initializing init manager");
init_manager.initialize(init_watcher_);
// Now that we're execute all the init callbacks we can resume RDS
// as we've subscribed to all the statically defined RDS resources.
if (cm.adsMux()) {
cm.adsMux()->resume(Config::TypeUrl::get().RouteConfiguration);

@mattklein123 mattklein123 added api/v3 Major version release @ end of Q3 2019 bug help wanted Needs help! labels Feb 28, 2020
@mattklein123
Copy link
Member

cc @lizan

@Shikugawa
Copy link
Member

@lizan This problem may be resolved with getResourceName in #9649. So I will fix them after merging it.

htuch pushed a commit that referenced this issue Apr 3, 2020
 #10209. There are hardcoded type URLs in resources.h. In this PR, I removed all of the dependencies of those. Now, codes that depend on that are only test code. In the future, I will remove that from test codes and completely destroy that.

Risk Level: Low
Testing: N/A

Signed-off-by: shikugawa <rei@tetrate.io>
htuch pushed a commit that referenced this issue Apr 22, 2020
To resolve #10209. This is the continuation of #10479. Remove all of hard-coded type URLs, and operate subscriptions that have the same resource name.
Risk Level: Low

Signed-off-by: shikugawa <rei@tetrate.io>
penguingao pushed a commit to penguingao/envoy that referenced this issue Apr 22, 2020
To resolve envoyproxy#10209. This is the continuation of envoyproxy#10479. Remove all of hard-coded type URLs, and operate subscriptions that have the same resource name.
Risk Level: Low

Signed-off-by: shikugawa <rei@tetrate.io>
Signed-off-by: pengg <pengg@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api/v3 Major version release @ end of Q3 2019 bug help wanted Needs help!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants