xds: introduce initial_fetch_timeout option to limit initialization time (#6048)

Introduce new optional configuration parameter initial_fetch_timeout to ConfigSource proto.
This parameter can be used to limit time Envoy spend on initialization of CDS, LDS and RDS.
Enabling this timeout prevents Envoy from being stuck in PRE_INITIALIZING or INITIALIZING phase, as described in #5862.

Risk Level: Low (optional feature, disabled by default)
Testing: manual testing, unit tests
Docs Changes: add new parameter initial_fetch_timeout to ConfigSource proto
Release Notes: Added

Fixes #5862

Signed-off-by: Marcin Falkowski <marcin.falkowski@allegro.pl>

Mirrored from https://github.com/envoyproxy/envoy @ 06576443805cc651a8b404da995aa26f9a8720f5
pull/620/head
data-plane-api(CircleCI) 6 years ago
parent e0cc112c27
commit 27ab049ddc
  1. 10
      envoy/api/v2/core/config_source.proto

@ -111,4 +111,14 @@ message ConfigSource {
// source in the bootstrap configuration is used. // source in the bootstrap configuration is used.
AggregatedConfigSource ads = 3; AggregatedConfigSource ads = 3;
} }
// Optional initialization timeout.
// When this timeout is specified, Envoy will wait no longer than the specified time for first
// config response on this xDS subscription during the :ref:`initialization process
// <arch_overview_initialization>`. After reaching the timeout, Envoy will move to the next
// initialization phase, even if the first config is not delivered yet. The timer is activated
// when the xDS API subscription starts, and is disarmed on first config update or on error. 0
// means no timeout - Envoy will wait indefinitely for the first xDS config (unless another
// timeout applies). Default 0.
google.protobuf.Duration initial_fetch_timeout = 4;
} }

Loading…
Cancel
Save