You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by sh...@apache.org on 2020/12/22 20:18:51 UTC
[trafficserver] branch master updated: traffic_manager should not
retry on disk failure (#7397)
This is an automated email from the ASF dual-hosted git repository.
shinrich pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new e59e118 traffic_manager should not retry on disk failure (#7397)
e59e118 is described below
commit e59e118a87a3471ed2e966e33447d930b2aa5b99
Author: Susan Hinrichs <sh...@yahoo-inc.com>
AuthorDate: Tue Dec 22 14:18:40 2020 -0600
traffic_manager should not retry on disk failure (#7397)
---
iocore/cache/Cache.cc | 10 +++++++---
src/traffic_manager/traffic_manager.cc | 10 +++++++---
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc
index 8d2d9e1..88c3713 100644
--- a/iocore/cache/Cache.cc
+++ b/iocore/cache/Cache.cc
@@ -729,6 +729,8 @@ CacheProcessor::start_internal(int flags)
}
Emergency("Cache initialization failed - only %d out of %d disks were valid and all were required.", gndisks,
theCacheStore.n_disks_in_config);
+ } else if (this->waitForCache() == 2 && static_cast<unsigned int>(gndisks) < theCacheStore.n_disks_in_config) {
+ Warning("Cache initialization incomplete - only %d out of %d disks were valid.", gndisks, theCacheStore.n_disks_in_config);
}
// If we got here, we have enough disks to proceed
@@ -784,7 +786,9 @@ CacheProcessor::diskInitialized()
if (cb_after_init) {
cb_after_init();
}
- Fatal("Cache initialization failed - only %d of %d disks were available.", gndisks, theCacheStore.n_disks_in_config);
+ Emergency("Cache initialization failed - only %d of %d disks were available.", gndisks, theCacheStore.n_disks_in_config);
+ } else if (this->waitForCache() == 2) {
+ Warning("Cache initialization incomplete - only %d of %d disks were available.", gndisks, theCacheStore.n_disks_in_config);
}
}
@@ -1052,7 +1056,7 @@ CacheProcessor::cacheInitialized()
// TS-3848
if (CACHE_INIT_FAILED == CacheProcessor::initialized && cacheProcessor.waitForCache() > 1) {
- Fatal("Cache initialization failed with cache required, exiting.");
+ Emergency("Cache initialization failed with cache required, exiting.");
}
}
@@ -2062,7 +2066,7 @@ Cache::open_done()
// TS-3848
if (ready == CACHE_INIT_FAILED && cacheProcessor.waitForCache() >= 2) {
- Fatal("Failed to initialize cache host table");
+ Emergency("Failed to initialize cache host table");
}
cacheProcessor.cacheInitialized();
diff --git a/src/traffic_manager/traffic_manager.cc b/src/traffic_manager/traffic_manager.cc
index 4d507b0..4d4ea34 100644
--- a/src/traffic_manager/traffic_manager.cc
+++ b/src/traffic_manager/traffic_manager.cc
@@ -492,7 +492,8 @@ main(int argc, const char **argv)
char *tsArgs = nullptr;
int disable_syslog = false;
char userToRunAs[MAX_LOGIN + 1];
- RecInt fds_throttle = -1;
+ RecInt fds_throttle = -1;
+ bool printed_unrecoverable = false;
ArgumentDescription argument_descriptions[] = {
{"proxyOff", '-', "Disable proxy", "F", &proxy_off, nullptr, nullptr},
@@ -831,9 +832,12 @@ main(int argc, const char **argv)
} else {
just_started++;
}
- } else { /* Give the proxy a chance to fire up */
- if (!lmgmt->proxy_recoverable) {
+ } else {
+ // Even if we shouldn't try to start the proxy again, leave manager around to
+ // avoid external automated restarts
+ if (!lmgmt->proxy_recoverable && !printed_unrecoverable) {
mgmt_log("[main] Proxy is un-recoverable. Proxy will not be relaunched.\n");
+ printed_unrecoverable = true;
}
just_started++;