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

xds: Relax the CHECK on factories for typed per-filter config #15965

Closed
wants to merge 8 commits into from

Conversation

soulxu
Copy link
Member

@soulxu soulxu commented Apr 14, 2021

Commit Message: xds: Relax the CHECK on factories for typed per-filter config
Additional Description:
Currently, if typed per-filter config includes an unknown filter, the exception will be raised. This PR aims to relax the check. A new runtime flag envoy.reloadable_features.ignore_check_unknown_typed_per_filter_config_factory is added, the default value is true. When it is true and unknown filter received from the rds API, instead of rejecting the update, a warning log will be emitted and increases a new counter unknown_per_filter_typed_config_factory's value.

Risk Level: low
Testing: unit tests and integration tests are added
Docs Changes:
Release Notes: add a note as a new feature
Runtime guard: "envoy.reloadable_features.ignore_check_unknown_typed_per_filter_config_factory"
Fixes #15770

Signed-off-by: He Jie Xu <hejie.xu@intel.com>
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
@soulxu
Copy link
Member Author

soulxu commented Apr 14, 2021

/wait

I missed this comment, looks like people want to make filter as an optional #15770 (comment)

throw EnvoyException(
fmt::format("The filter {} doesn't support virtual host-specific configurations", name));
} else {
ENVOY_LOG(warn,
Copy link
Member

Choose a reason for hiding this comment

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

We probably want to track these in a stats to allow automated monitoring.

@htuch
Copy link
Member

htuch commented Apr 14, 2021

@dmitri-d for first pass review.

@@ -1029,7 +1044,8 @@ class ConfigImpl : public Config {
public:
ConfigImpl(const envoy::config::route::v3::RouteConfiguration& config,
Server::Configuration::ServerFactoryContext& factory_context,
ProtobufMessage::ValidationVisitor& validator, bool validate_clusters_default);
ProtobufMessage::ValidationVisitor& validator, bool validate_clusters_default,
RdsStats* rds_stats = nullptr);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is rds_stats a nullptr by default? Can it ever be a nullptr?

Copy link
Member Author

Choose a reason for hiding this comment

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

For the bootstrap config, there will be nullptr passed in, since there is no rds_stats for bootstrap config.

@dmitri-d
Copy link
Contributor

I still think that skipping over unknown configurations has a potential to make filter chains brittle, and I feel that debugging resulting filter chain configuration problems could be difficult too. I think that only supporting disabling of filters marked "optional" (see comment here: #15770 (comment)) would help.

@soulxu
Copy link
Member Author

soulxu commented Apr 15, 2021

I still think that skipping over unknown configurations has a potential to make filter chains brittle, and I feel that debugging resulting filter chain configuration problems could be difficult too. I think that only supporting disabling of filters marked "optional" (see comment here: #15770 (comment)) would help.

Yea, I got it, let me check with Mark if he need any help. :)

@soulxu soulxu closed this Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[xds] Relax the CHECK on factories for typed per-filter config
3 participants