From ea2a0cae5149f1238e53873f98c5a02cc6385b1a Mon Sep 17 00:00:00 2001 From: qqustc Date: Wed, 17 Apr 2024 13:20:51 -0400 Subject: [PATCH] Update Envoy to d417618 2024/04/15 (#1133) - sync files - add `# unique` in .bazelrc to avoid CI failure https://dev.azure.com/cncf/4684fb3d-0389-4e0b-8251-221942316e06/_apis/build/builds/168119/logs/57 - add `cluster_manager_->initialize(bootstrap_);` to fix a CI crash which is introduced by https://github.com/envoyproxy/envoy/pull/33221 Signed-off-by: Qin Qin --- .bazelrc | 21 +++++++++++++++------ bazel/repositories.bzl | 4 ++-- ci/run_envoy_docker.sh | 2 +- source/client/process_impl.cc | 6 ++++++ source/server/README.md | 7 +++++++ tools/code_format/config.yaml | 6 ------ 6 files changed, 31 insertions(+), 15 deletions(-) diff --git a/.bazelrc b/.bazelrc index 665420d67..e8702ae43 100644 --- a/.bazelrc +++ b/.bazelrc @@ -99,6 +99,8 @@ build:sanitizer --linkopt -ldl build:clang --action_env=BAZEL_COMPILER=clang build:clang --action_env=CC=clang --action_env=CXX=clang++ build:clang --linkopt=-fuse-ld=lld +build:clang --action_env=CC=clang --host_action_env=CC=clang +build:clang --action_env=CXX=clang++ --host_action_env=CXX=clang++ # Flags for Clang + PCH build:clang-pch --spawn_strategy=local @@ -116,7 +118,6 @@ build:clang-tidy --output_groups=report build:clang-tidy --build_tag_filters=-notidy # Basic ASAN/UBSAN that works for gcc -build:asan --action_env=ENVOY_ASAN=1 build:asan --config=sanitizer # ASAN install its signal handler, disable ours so the stacktrace will be printed by ASAN build:asan --define signal_trace=disabled @@ -141,11 +142,19 @@ build:asan --copt -O1 build:asan --copt -fno-optimize-sibling-calls # Clang ASAN/UBSAN -build:clang-asan --config=clang -build:clang-asan --config=asan -build:clang-asan --linkopt -fuse-ld=lld -build:clang-asan --linkopt --rtlib=compiler-rt -build:clang-asan --linkopt --unwindlib=libgcc +build:clang-asan-common --config=clang +build:clang-asan-common --config=asan +build:clang-asan-common --linkopt -fuse-ld=lld +build:clang-asan-common --linkopt --rtlib=compiler-rt +build:clang-asan-common --linkopt --unwindlib=libgcc + +build:clang-asan --config=clang-asan-common +build:clang-asan --linkopt='-L/opt/llvm/lib/clang/14.0.0/lib/x86_64-unknown-linux-gnu' # unique +build:clang-asan --linkopt=-l:libclang_rt.ubsan_standalone.a +build:clang-asan --linkopt=-l:libclang_rt.ubsan_standalone_cxx.a +build:clang-asan --action_env=ENVOY_UBSAN_VPTR=1 +build:clang-asan --copt=-fsanitize=vptr,function +build:clang-asan --linkopt=-fsanitize=vptr,function # macOS build:macos --cxxopt=-std=c++20 --host_cxxopt=-std=c++20 diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index 3924e4a78..681bdfa34 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -1,7 +1,7 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -ENVOY_COMMIT = "1ae6fb29cab8043cc23e070b118fa25c79f7f7d8" -ENVOY_SHA = "15d19b258d3f0f2c0b13e0aca307d127c326a891d3183ecc0a711b7e9c01dee6" +ENVOY_COMMIT = "d41761887ee34c8d015e2fd8272d118d14912081" +ENVOY_SHA = "4d3a7a59717f4c5bd3a006d63575c2cc1d2e3146e787117c190788d344532181" HDR_HISTOGRAM_C_VERSION = "0.11.2" # October 12th, 2020 HDR_HISTOGRAM_C_SHA = "637f28b5f64de2e268131e4e34e6eef0b91cf5ff99167db447d9b2825eae6bad" diff --git a/ci/run_envoy_docker.sh b/ci/run_envoy_docker.sh index 20728490f..9dd348c90 100755 --- a/ci/run_envoy_docker.sh +++ b/ci/run_envoy_docker.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/source/client/process_impl.cc b/source/client/process_impl.cc index d23c6660d..59b985899 100644 --- a/source/client/process_impl.cc +++ b/source/client/process_impl.cc @@ -902,6 +902,12 @@ bool ProcessImpl::runInternal(OutputCollector& collector, const UriPtr& tracing_ } ENVOY_LOG(debug, "Computed configuration: {}", absl::StrCat(bootstrap_)); cluster_manager_ = cluster_manager_factory_->clusterManagerFromProto(bootstrap_); + absl::Status status = cluster_manager_->initialize(bootstrap_); + if (!status.ok()) { + ENVOY_LOG(error, "cluster_manager initialize failed. Received bad status: {}", + status.message()); + return false; + } maybeCreateTracingDriver(bootstrap_.tracing()); cluster_manager_->setInitializedCb( [this]() -> void { init_manager_.initialize(init_watcher_); }); diff --git a/source/server/README.md b/source/server/README.md index d641b3c4b..e2a3f7443 100644 --- a/source/server/README.md +++ b/source/server/README.md @@ -202,6 +202,7 @@ bazel-bin/nighthawk_test_server [--stats-tag ] ... [--allow-unknown-fields] [--config-yaml ] [-c ] [--concurrency ] [--base-id-path ] +[--skip-hot-restart-on-no-parent] [--use-dynamic-base-id] [--base-id ] [--] [--version] [-h] @@ -324,6 +325,12 @@ Path to configuration file --base-id-path Path to which the base ID is written +--skip-hot-restart-on-no-parent +When hot restarting with epoch>0, the default behavior is for the +child to crash if the connection to the parent cannot be established. +Set this to true to instead continue with a regular startup, while +retaining the new epoch value. + --use-dynamic-base-id The server chooses a base ID dynamically. Supersedes a static base ID. May not be used when the restart epoch is non-zero. diff --git a/tools/code_format/config.yaml b/tools/code_format/config.yaml index 1b1b1b46a..1d9416457 100644 --- a/tools/code_format/config.yaml +++ b/tools/code_format/config.yaml @@ -92,7 +92,6 @@ paths: - source/common/config/utility.h - source/common/matcher/map_matcher.h - source/common/matcher/field_matcher.h - - source/common/protobuf/visitor_helper.h - source/extensions/common/matcher/trie_matcher.h - envoy/common/exception.h # legacy core files which throw exceptions. We can add to this list but strongly prefer @@ -110,22 +109,17 @@ paths: - source/common/network/address_impl.cc - source/common/network/utility.cc - source/common/network/dns_resolver/dns_factory_util.cc - - source/common/ssl/tls_certificate_config_impl.cc - source/common/formatter/http_specific_formatter.cc - source/common/formatter/stream_info_formatter.h - source/common/formatter/stream_info_formatter.cc - source/common/formatter/substitution_formatter.h - - source/common/formatter/substitution_format_utility.cc - source/common/formatter/substitution_format_string.h - source/common/stats/tag_extractor_impl.cc - - source/common/stats/tag_producer_impl.cc - source/common/http/http2/codec_impl.cc - source/common/http/hash_policy.cc - source/common/http/conn_manager_utility.cc - source/common/protobuf/yaml_utility.cc - - source/common/protobuf/visitor.cc - source/common/protobuf/utility.cc - - source/common/protobuf/message_validator_impl.cc - source/common/quic/quic_server_transport_socket_factory.cc - source/common/secret/secret_manager_impl.cc - source/common/grpc/google_grpc_utils.cc