Skip to content

Commit

Permalink
minor fixes.
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Baichoo <kbaichoo@google.com>
  • Loading branch information
KBaichoo committed Oct 14, 2020
1 parent 8a27924 commit 11b0e04
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/root/api-v3/config/watchdog/watchdog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Watchdog
:maxdepth: 2

../../extensions/watchdog/profile_action/v3alpha/*
../../watchdog/abort_action/v3alpha/*
../../watchdog/v3alpha/*
2 changes: 1 addition & 1 deletion docs/root/version_history/current.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Minor Behavior Changes
*Changes that may cause incompatibilities for some users, but should not for most*

* ext_authz filter: the deprecated field :ref:`use_alpha <envoy_api_field_config.filter.http.ext_authz.v2.ExtAuthz.use_alpha>` is no longer supported and cannot be set anymore.
* watchdog: the watchdog action :ref:`abort_action <envoy_api_msg_watchdog.abort_action.v3alpha.AbortActionConfig>` is now the default action to terminate the process if watchdog kill / multikill is enabled.
* watchdog: the watchdog action :ref:`abort_action <envoy_v3_api_msg_watchdog.v3alpha.AbortActionConfig>` is now the default action to terminate the process if watchdog kill / multikill is enabled.

Bug Fixes
---------
Expand Down
2 changes: 1 addition & 1 deletion docs/root/version_history/v1.16.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ New Features
* watchdog: support randomizing the watchdog's kill timeout to prevent synchronized kills via a maximium jitter parameter :ref:`max_kill_timeout_jitter<envoy_v3_api_field_config.bootstrap.v3.Watchdog.max_kill_timeout_jitter>`.
* watchdog: supports an extension point where actions can be registered to fire on watchdog events such as miss, megamiss, kill and multikill. See :ref:`watchdog actions<envoy_v3_api_field_config.bootstrap.v3.Watchdog.actions>`.
* watchdog: watchdog action extension that does cpu profiling. See :ref:`Profile Action <envoy_v3_api_file_envoy/extensions/watchdog/profile_action/v3alpha/profile_action.proto>`.
* watchdog: watchdog action extension that sends SIGABRT to the stuck thread to terminate the process. See :ref:`Abort Action <envoy_v3_api_file_envoy/extensions/watchdog/abort_action/v3alpha/abort_action.proto>`.
* watchdog: watchdog action extension that sends SIGABRT to the stuck thread to terminate the process. See :ref:`Abort Action <envoy_v3_api_msg_watchdog.v3alpha.AbortActionConfig>`.
* xds: added :ref:`extension config discovery<envoy_v3_api_msg_config.core.v3.ExtensionConfigSource>` support for HTTP filters.
* xds: added support for mixed v2/v3 discovery response, which enable type url downgrade and upgrade. This feature is disabled by default and is controlled by runtime guard `envoy.reloadable_features.enable_type_url_downgrade_and_upgrade`.
* zlib: added option to use `zlib-ng <https://github.com/zlib-ng/zlib-ng>`_ as zlib library.
Expand Down
5 changes: 3 additions & 2 deletions source/common/thread/terminate_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ namespace Thread {
* the ThreadId. The implementation is platform dependent and currently
* only works on platforms that support SIGABRT.
*
* Returns the result from the platform specific function (i.e. kill) to terminate
* the thread. If the platform is currently unsupported, this will return false.
* Returns true if the platform specific function to terminate the thread
* succeeded (i.e. kill() == 0). If the platform is currently unsupported, this
* will return false.
*/
bool terminateThread(const ThreadId& tid);

Expand Down
4 changes: 2 additions & 2 deletions source/server/guarddog_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ GuardDogImpl::GuardDogImpl(Stats::Scope& stats_scope, const Server::Configuratio
auto actions = config.actions();

// Add default abort_action if kill and/or multi-kill is enabled.
envoy::watchdog::v3alpha::AbortActionConfig abort_config;

if (config.killTimeout().count() > 0) {
envoy::watchdog::v3alpha::AbortActionConfig abort_config;
WatchDogAction* abort_action_config = actions.Add();
abort_action_config->set_event(WatchDogAction::KILL);
abort_action_config->mutable_config()->mutable_typed_config()->PackFrom(abort_config);
}

if (config.multiKillTimeout().count() > 0) {
envoy::watchdog::v3alpha::AbortActionConfig abort_config;
WatchDogAction* abort_action_config = actions.Add();
abort_action_config->set_event(WatchDogAction::MULTIKILL);
abort_action_config->mutable_config()->mutable_typed_config()->PackFrom(abort_config);
Expand Down
3 changes: 2 additions & 1 deletion test/per_file_coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ declare -a KNOWN_LOW_COVERAGE=(
"source/common/json:90.6"
"source/common/filesystem:96.1"
"source/common/filesystem/posix:94.5"
"source/common/thread:0.0" # Functions terminate threads, leading to death.
"source/common/thread_local:95.7"
"source/common/crypto:0.0"
"source/common/common:96.1"
"source/common/common/posix:94.1"
"source/common/signal:90.4"
"source/common/watchdog/abort_action:42.9" # Death tests don't report LCOV
"source/common/watchdog:42.9" # Death tests don't report LCOV
"source/exe:93.7"
"source/extensions:96.3"
"source/extensions/common:94.4"
Expand Down

0 comments on commit 11b0e04

Please sign in to comment.