[trafficserver] branch 9.0.x updated: Removes the records.config.shadow alternative config file

2019-11-04 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 0bb82b0  Removes the records.config.shadow alternative config file
0bb82b0 is described below

commit 0bb82b0aef43e49ca50b83247677a4ffcdc0c65e
Author: Leif Hedstrom 
AuthorDate: Mon Nov 4 09:25:37 2019 -0700

Removes the records.config.shadow alternative config file

In addition, cleans up the usage and definitions of "records.config".

(cherry picked from commit bbcffa075ede77058dbb713d8c9bc42e2f0f9e81)
---
 include/tscore/Filenames.h|  5 +
 lib/records/P_RecDefs.h   |  4 
 lib/records/RecCore.cc| 13 +
 mgmt/LocalManager.cc  |  3 ++-
 src/traffic_layout/info.cc|  2 +-
 src/traffic_manager/AddConfigFilesHere.cc |  2 +-
 src/traffic_manager/traffic_manager.cc|  3 ++-
 src/tscore/Filenames.cc   |  5 +
 src/tscore/unit_tests/test_layout.cc  |  5 +++--
 9 files changed, 24 insertions(+), 18 deletions(-)

diff --git a/include/tscore/Filenames.h b/include/tscore/Filenames.h
index 67065fb..6c880e0 100644
--- a/include/tscore/Filenames.h
+++ b/include/tscore/Filenames.h
@@ -24,3 +24,8 @@
 ///
 // Configuration file names
 extern const char *STORAGE_CONF_FILENAME;
+extern const char *RECORDS_CONF_FILENAME;
+
+///
+// Various other file names
+extern const char *RECORDS_STATS_FILE;
diff --git a/lib/records/P_RecDefs.h b/lib/records/P_RecDefs.h
index 0aa4c09..e987e63 100644
--- a/lib/records/P_RecDefs.h
+++ b/lib/records/P_RecDefs.h
@@ -25,10 +25,6 @@
 
 #include "I_RecDefs.h"
 
-#define REC_CONFIG_FILE "records.config"
-#define REC_SHADOW_EXT ".shadow"
-#define REC_RAW_STATS_FILE "records.snap"
-
 #define REC_MESSAGE_ELE_MAGIC 0xF00DF00D
 
 // We need at least this many internal record entries for our configurations 
and metrics. Any
diff --git a/lib/records/RecCore.cc b/lib/records/RecCore.cc
index f8b832c..1310082 100644
--- a/lib/records/RecCore.cc
+++ b/lib/records/RecCore.cc
@@ -24,6 +24,7 @@
 #include "tscore/ink_platform.h"
 #include "tscore/ink_memory.h"
 #include "tscore/ink_string.h"
+#include "tscore/Filenames.h"
 
 #include "RecordsConfig.h"
 #include "P_RecFile.h"
@@ -218,14 +219,10 @@ RecCoreInit(RecModeT mode_type, Diags *_diags)
 
 ink_mutex_init(_rec_config_lock);
 
-g_rec_config_fpath = ats_stringdup(RecConfigReadConfigPath(nullptr, 
REC_CONFIG_FILE REC_SHADOW_EXT));
+g_rec_config_fpath = ats_stringdup(RecConfigReadConfigPath(nullptr, 
RECORDS_CONF_FILENAME));
 if (RecFileExists(g_rec_config_fpath) == REC_ERR_FAIL) {
-  ats_free(const_cast(g_rec_config_fpath));
-  g_rec_config_fpath = ats_stringdup(RecConfigReadConfigPath(nullptr, 
REC_CONFIG_FILE));
-  if (RecFileExists(g_rec_config_fpath) == REC_ERR_FAIL) {
-RecLog(DL_Warning, "Could not find '%s', system will run with 
defaults\n", REC_CONFIG_FILE);
-file_exists = false;
-  }
+  RecLog(DL_Warning, "Could not find '%s', system will run with 
defaults\n", RECORDS_CONF_FILENAME);
+  file_exists = false;
 }
 
 if (file_exists) {
@@ -1260,7 +1257,7 @@ std::string
 RecConfigReadPersistentStatsPath()
 {
   std::string rundir(RecConfigReadRuntimeDir());
-  return Layout::relative_to(rundir, REC_RAW_STATS_FILE);
+  return Layout::relative_to(rundir, RECORDS_STATS_FILE);
 }
 
 void
diff --git a/mgmt/LocalManager.cc b/mgmt/LocalManager.cc
index 946cf77..369cfd6 100644
--- a/mgmt/LocalManager.cc
+++ b/mgmt/LocalManager.cc
@@ -38,6 +38,7 @@
 #include "tscpp/util/TextView.h"
 #include "tscore/BufferWriter.h"
 #include "tscore/bwf_std_format.h"
+#include "tscore/Filenames.h"
 
 #if TS_USE_POSIX_CAP
 #include 
@@ -749,7 +750,7 @@ LocalManager::processEventQueue()
 // check if we have a local file update
 if (mh->msg_id == MGMT_EVENT_CONFIG_FILE_UPDATE) {
   // records.config
-  if (!(strcmp(payload.begin(), REC_CONFIG_FILE))) {
+  if (!(strcmp(payload.begin(), RECORDS_CONF_FILENAME))) {
 if (RecReadConfigFile() != REC_ERR_OKAY) {
   mgmt_elog(errno, "[fileUpdated] Config update failed for 
records.config\n");
 } else {
diff --git a/src/traffic_layout/info.cc b/src/traffic_layout/info.cc
index 51aba61..64afb61 100644
--- a/src/traffic_layout/info.cc
+++ b/src/traffic_layout/info.cc
@@ -155,7 +155,7 @@ produce_layout(bool json)
   print_var("PLUGINDIR", RecConfigReadPluginDir(), json);
   print_var("INCLUDEDIR", Layout::get()->includedir, json);
 
-  print_var("records.config", RecConfigReadConfigPath(nullptr, 
REC_CONFIG_FILE), json);
+  print_var(RECORDS_CONF_FILENAME, RecConfigReadConfigPath(nullptr, 
RECORDS_CONF_FILENAME), 

[trafficserver] branch master updated (85c0cd4 -> bbcffa0)

2019-11-04 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


from 85c0cd4  Fixing include synopsis rendering for API docs.
 add bbcffa0  Removes the records.config.shadow alternative config file

No new revisions were added by this update.

Summary of changes:
 include/tscore/Filenames.h|  5 +
 lib/records/P_RecDefs.h   |  4 
 lib/records/RecCore.cc| 13 +
 mgmt/LocalManager.cc  |  3 ++-
 src/traffic_layout/info.cc|  2 +-
 src/traffic_manager/AddConfigFilesHere.cc |  2 +-
 src/traffic_manager/traffic_manager.cc|  3 ++-
 src/tscore/Filenames.cc   |  5 +
 src/tscore/unit_tests/test_layout.cc  |  5 +++--
 9 files changed, 24 insertions(+), 18 deletions(-)



[trafficserver] branch 9.0.x updated: Issue #4294: Handle return value of SSL_write() properly.

2019-11-04 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new f6a32a1  Issue #4294: Handle return value of SSL_write() properly.
f6a32a1 is described below

commit f6a32a12eb8a709af08559d6cc1a543b86854fbd
Author: Phil Sorber 
AuthorDate: Tue Oct 29 11:24:10 2019 -0600

Issue #4294: Handle return value of SSL_write() properly.

(cherry picked from commit 5083cf97b9ab6a910c288e745e0569d4c3d02f19)
---
 tests/gold_tests/tls/ssl-post.c | 6 +++---
 tools/http_load/http_load.c | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/gold_tests/tls/ssl-post.c b/tests/gold_tests/tls/ssl-post.c
index 35ec009..dcb7ace 100644
--- a/tests/gold_tests/tls/ssl-post.c
+++ b/tests/gold_tests/tls/ssl-post.c
@@ -134,15 +134,15 @@ spawn_same_session_send(void *arg)
 ret = select(sfd + 1, , , NULL, NULL);
 if (FD_ISSET(sfd, ) || FD_ISSET(sfd, )) {
   ret = write_ret = SSL_write(ssl, req_buf, strlen(req_buf));
-  if (write_ret >= 0)
+  if (write_ret > 0)
 post_write_ret = SSL_write(ssl, post_buf, sizeof(post_buf));
 }
   }
 
-  while (write_ret < 0) {
+  while (write_ret <= 0) {
 write_ret = SSL_write(ssl, req_buf, strlen(req_buf));
   }
-  while (post_write_ret < 0) {
+  while (post_write_ret <= 0) {
 post_write_ret = SSL_write(ssl, post_buf, sizeof(post_buf));
   }
 
diff --git a/tools/http_load/http_load.c b/tools/http_load/http_load.c
index da8c74c..59bd5dd 100644
--- a/tools/http_load/http_load.c
+++ b/tools/http_load/http_load.c
@@ -1098,7 +1098,7 @@ start_socket(int url_num, int cnum, struct timeval *nowP)
   r = SSL_write(connections[cnum].ssl, urls[url_num].buf, 
urls[url_num].buf_bytes);
 else
   r = write(connections[cnum].conn_fd, urls[url_num].buf, 
urls[url_num].buf_bytes);
-if (r < 0) {
+if (r <= 0) {
   perror(urls[url_num].url_str);
   connections[cnum].reusable = 0;
   close_connection(cnum);
@@ -1216,7 +1216,7 @@ handle_connect(int cnum, struct timeval *nowP, int 
double_check)
 r = SSL_write(connections[cnum].ssl, urls[url_num].buf, 
urls[url_num].buf_bytes);
   else
 r = write(connections[cnum].conn_fd, urls[url_num].buf, 
urls[url_num].buf_bytes);
-  if (r < 0) {
+  if (r <= 0) {
 perror(urls[url_num].url_str);
 connections[cnum].reusable = 0;
 close_connection(cnum);



[trafficserver] branch 9.0.x updated: Rewrote remap_stats plugin to use C++

2019-11-04 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 0932b0a  Rewrote remap_stats plugin to use C++
0932b0a is described below

commit 0932b0ae864924a644baa66ab6b51aef92a78b67
Author: Silvano Cerza 
AuthorDate: Thu Oct 10 16:57:40 2019 +0200

Rewrote remap_stats plugin to use C++

(cherry picked from commit a42e61f725d52c6c976c0ab1a03bfe2e77b95c69)
---
 plugins/experimental/remap_stats/Makefile.inc  |   2 +-
 .../remap_stats/{remap_stats.c => remap_stats.cc}  | 136 +
 2 files changed, 56 insertions(+), 82 deletions(-)

diff --git a/plugins/experimental/remap_stats/Makefile.inc 
b/plugins/experimental/remap_stats/Makefile.inc
index 9cf318e..ce92258 100644
--- a/plugins/experimental/remap_stats/Makefile.inc
+++ b/plugins/experimental/remap_stats/Makefile.inc
@@ -17,4 +17,4 @@
 pkglib_LTLIBRARIES += experimental/remap_stats/remap_stats.la
 
 experimental_remap_stats_remap_stats_la_SOURCES = \
-  experimental/remap_stats/remap_stats.c
+  experimental/remap_stats/remap_stats.cc
diff --git a/plugins/experimental/remap_stats/remap_stats.c 
b/plugins/experimental/remap_stats/remap_stats.cc
similarity index 65%
rename from plugins/experimental/remap_stats/remap_stats.c
rename to plugins/experimental/remap_stats/remap_stats.cc
index 79c9315..43df970 100644
--- a/plugins/experimental/remap_stats/remap_stats.c
+++ b/plugins/experimental/remap_stats/remap_stats.cc
@@ -21,57 +21,42 @@
 
 #include "tscore/ink_config.h"
 #include "tscore/ink_defs.h"
+#include "tscore/BufferWriter.h"
 
 #include "ts/ts.h"
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
+
+#include 
+#include 
+#include 
 
 #define PLUGIN_NAME "remap_stats"
 #define DEBUG_TAG PLUGIN_NAME
 
 #define MAX_STAT_LENGTH (1 << 8)
 
-typedef struct {
+struct config_t {
   bool post_remap_host;
   int txn_slot;
   TSStatPersistence persist_type;
   TSMutex stat_creation_mutex;
-} config_t;
+};
 
 // From "core" sigh, but we need it for now at least.
 extern int max_records_entries;
 
 static void
-stat_add(char *name, TSMgmtInt amount, TSStatPersistence persist_type, TSMutex 
create_mutex)
+stat_add(const char *name, TSMgmtInt amount, TSStatPersistence persist_type, 
TSMutex create_mutex)
 {
   int stat_id = -1;
-  ENTRY search, *result = NULL;
-  static __thread struct hsearch_data stat_cache;
-  static __thread bool hash_init = false;
-
-  if (unlikely(!hash_init)) {
-// NOLINTNEXTLINE
-hcreate_r(max_records_entries << 1, _cache); // This is weird, but oh 
well.
-hash_init = true;
-TSDebug(DEBUG_TAG, "stat cache hash init");
-  }
-
-  search.key  = name;
-  search.data = 0;
-  // NOLINTNEXTLINE
-  hsearch_r(search, FIND, , _cache);
+  static thread_local std::unordered_map hash;
 
-  if (unlikely(result == NULL)) {
+  if (unlikely(hash.find(name) == hash.cend())) {
 // This is an unlikely path because we most likely have the stat cached
 // so this mutex won't be much overhead and it fixes a race condition
 // in the RecCore. Hopefully this can be removed in the future.
 TSMutexLock(create_mutex);
-if (TS_ERROR == TSStatFindName((const char *)name, _id)) {
-  stat_id = TSStatCreate((const char *)name, TS_RECORDDATATYPE_INT, 
persist_type, TS_STAT_SYNC_SUM);
+if (TS_ERROR == TSStatFindName(name, _id)) {
+  stat_id = TSStatCreate(name, TS_RECORDDATATYPE_INT, persist_type, 
TS_STAT_SYNC_SUM);
   if (stat_id == TS_ERROR) {
 TSDebug(DEBUG_TAG, "Error creating stat_name: %s", name);
   } else {
@@ -81,14 +66,11 @@ stat_add(char *name, TSMgmtInt amount, TSStatPersistence 
persist_type, TSMutex c
 TSMutexUnlock(create_mutex);
 
 if (stat_id >= 0) {
-  search.key  = TSstrdup(name);
-  search.data = (void *)((intptr_t)stat_id);
-  // NOLINTNEXTLINE
-  hsearch_r(search, ENTER, , _cache);
+  hash.emplace(name, stat_id);
   TSDebug(DEBUG_TAG, "Cached stat_name: %s stat_id: %d", name, stat_id);
 }
   } else {
-stat_id = (int)((intptr_t)result->data);
+stat_id = hash.at(name);
   }
 
   if (likely(stat_id >= 0)) {
@@ -130,7 +112,7 @@ handle_read_req_hdr(TSCont cont, TSEvent event ATS_UNUSED, 
void *edata)
   config_t *config;
   void *txnd;
 
-  config = (config_t *)TSContDataGet(cont);
+  config = static_cast(TSContDataGet(cont));
   txnd   = (void *)get_effective_host(txn); // low bit left 0 because we do 
not know that remap succeeded yet
   TSHttpTxnArgSet(txn, config->txn_slot, txnd);
 
@@ -142,11 +124,11 @@ handle_read_req_hdr(TSCont cont, TSEvent event 
ATS_UNUSED, void *edata)
 static int
 handle_post_remap(TSCont cont, TSEvent event ATS_UNUSED, void *edata)
 {
-  TSHttpTxn txn = (TSHttpTxn)edata;
+  TSHttpTxn txn = static_cast(edata);
   config_t *config;
   void *txnd = (void *)0x01; // low bit 1 because we 

[trafficserver] branch master updated (452d60e -> 85c0cd4)

2019-11-04 Thread rrm
This is an automated email from the ASF dual-hosted git repository.

rrm pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


from 452d60e  Adding an autest for traffic_dump.
 add 85c0cd4  Fixing include synopsis rendering for API docs.

No new revisions were added by this update.

Summary of changes:
 doc/developer-guide/api/functions/TSAPI.en.rst| 6 --
 doc/developer-guide/api/functions/TSAcceptor.en.rst   | 4 +++-
 doc/developer-guide/api/functions/TSActionCancel.en.rst   | 4 +++-
 doc/developer-guide/api/functions/TSActionDone.en.rst | 4 +++-
 doc/developer-guide/api/functions/TSCacheRead.en.rst  | 4 +++-
 doc/developer-guide/api/functions/TSCacheRemove.en.rst| 4 +++-
 doc/developer-guide/api/functions/TSCacheWrite.en.rst | 4 +++-
 doc/developer-guide/api/functions/TSClientProtocolStack.en.rst| 4 +++-
 doc/developer-guide/api/functions/TSConfig.en.rst | 4 +++-
 doc/developer-guide/api/functions/TSContCall.en.rst   | 4 +++-
 doc/developer-guide/api/functions/TSContCreate.en.rst | 4 +++-
 doc/developer-guide/api/functions/TSContDataGet.en.rst| 4 +++-
 doc/developer-guide/api/functions/TSContDataSet.en.rst| 4 +++-
 doc/developer-guide/api/functions/TSContDestroy.en.rst| 4 +++-
 doc/developer-guide/api/functions/TSContMutexGet.en.rst   | 4 +++-
 doc/developer-guide/api/functions/TSContSchedule.en.rst   | 4 +++-
 doc/developer-guide/api/functions/TSContScheduleOnPool.en.rst | 4 +++-
 doc/developer-guide/api/functions/TSContScheduleOnThread.en.rst   | 4 +++-
 .../api/functions/TSContThreadAffinityClear.en.rst| 4 +++-
 doc/developer-guide/api/functions/TSContThreadAffinityGet.en.rst  | 4 +++-
 doc/developer-guide/api/functions/TSContThreadAffinitySet.en.rst  | 4 +++-
 doc/developer-guide/api/functions/TSDebug.en.rst  | 4 +++-
 doc/developer-guide/api/functions/TSEventThreadSelf.en.rst| 4 +++-
 doc/developer-guide/api/functions/TSHostLookup.en.rst | 4 +++-
 .../api/functions/TSHostLookupResultAddrGet.en.rst| 4 +++-
 doc/developer-guide/api/functions/TSHttpArgs.en.rst   | 4 +++-
 doc/developer-guide/api/functions/TSHttpConnect.en.rst| 4 +++-
 .../api/functions/TSHttpConnectWithPluginId.en.rst| 4 +++-
 doc/developer-guide/api/functions/TSHttpHdrClone.en.rst   | 4 +++-
 doc/developer-guide/api/functions/TSHttpHdrCopy.en.rst| 4 +++-
 doc/developer-guide/api/functions/TSHttpHdrCreate.en.rst  | 4 +++-
 doc/developer-guide/api/functions/TSHttpHdrDestroy.en.rst | 4 +++-
 doc/developer-guide/api/functions/TSHttpHdrHostGet.en.rst | 4 +++-
 doc/developer-guide/api/functions/TSHttpHdrLengthGet.en.rst   | 4 +++-
 doc/developer-guide/api/functions/TSHttpHdrMethodGet.en.rst   | 4 +++-
 doc/developer-guide/api/functions/TSHttpHdrMethodSet.en.rst   | 4 +++-
 doc/developer-guide/api/functions/TSHttpHdrPrint.en.rst   | 4 +++-
 doc/developer-guide/api/functions/TSHttpHdrReasonGet.en.rst   | 4 +++-
 doc/developer-guide/api/functions/TSHttpHdrReasonLookup.en.rst| 4 +++-
 doc/developer-guide/api/functions/TSHttpHdrReasonSet.en.rst   | 4 +++-
 doc/developer-guide/api/functions/TSHttpHdrStatusGet.en.rst   | 4 +++-
 doc/developer-guide/api/functions/TSHttpHdrStatusSet.en.rst   | 4 +++-
 doc/developer-guide/api/functions/TSHttpHdrTypeGet.en.rst | 4 +++-
 doc/developer-guide/api/functions/TSHttpHdrTypeSet.en.rst | 4 +++-
 doc/developer-guide/api/functions/TSHttpHdrUrlGet.en.rst  | 4 +++-
 doc/developer-guide/api/functions/TSHttpHdrUrlSet.en.rst  | 4 +++-
 doc/developer-guide/api/functions/TSHttpHdrVersionGet.en.rst  | 4 +++-
 doc/developer-guide/api/functions/TSHttpHdrVersionSet.en.rst  | 4 +++-
 doc/developer-guide/api/functions/TSHttpHookAdd.en.rst| 4 +++-
 doc/developer-guide/api/functions/TSHttpOverridableConfig.en.rst  | 4 +++-
 doc/developer-guide/api/functions/TSHttpParserCreate.en.rst   | 4 +++-
 doc/developer-guide/api/functions/TSHttpSsnClientFdGet.en.rst | 4 +++-
 doc/developer-guide/api/functions/TSHttpSsnIdGet.en.rst   | 4 +++-
 doc/developer-guide/api/functions/TSHttpSsnReenable.en.rst| 4 +++-
 doc/developer-guide/api/functions/TSHttpTxnAborted.en.rst | 6 --
 .../api/functions/TSHttpTxnCacheLookupStatusGet.en.rst| 4 +++-
 .../api/functions/TSHttpTxnCacheLookupUrlGet.en.rst   | 8 ++--
 doc/developer-guide/api/functions/TSHttpTxnCachedReqGet.en.rst| 4 +++-
 doc/developer-guide/api/functions/TSHttpTxnCachedRespGet.en.rst   | 4 +++-
 doc/developer-guide/api/functions/TSHttpTxnClientFdGet.en.rst | 4 +++-
 .../api/functions/TSHttpTxnClientPacketDscpSet.en.rst | 

[trafficserver] branch master updated (5083cf9 -> 452d60e)

2019-11-04 Thread bcall
This is an automated email from the ASF dual-hosted git repository.

bcall pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


from 5083cf9  Issue #4294: Handle return value of SSL_write() properly.
 add 452d60e  Adding an autest for traffic_dump.

No new revisions were added by this update.

Summary of changes:
 plugins/experimental/traffic_dump/traffic_dump.cc  |   2 +-
 tests/Pipfile  |   1 +
 .../traffic_dump/gold/200.gold}|   7 +-
 .../pluginTest/traffic_dump/traffic_dump.test.py   | 112 +
 .../pluginTest/traffic_dump/verify_replay.py   |  96 ++
 5 files changed, 213 insertions(+), 5 deletions(-)
 copy tests/gold_tests/{remap/gold/remap-https-200.gold => 
pluginTest/traffic_dump/gold/200.gold} (60%)
 create mode 100644 
tests/gold_tests/pluginTest/traffic_dump/traffic_dump.test.py
 create mode 100644 tests/gold_tests/pluginTest/traffic_dump/verify_replay.py



[trafficserver] branch master updated (33a5ebe -> 5083cf9)

2019-11-04 Thread bcall
This is an automated email from the ASF dual-hosted git repository.

bcall pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


from 33a5ebe  Fix null pointer dereference reported by clang-analyzer
 add 5083cf9  Issue #4294: Handle return value of SSL_write() properly.

No new revisions were added by this update.

Summary of changes:
 tests/gold_tests/tls/ssl-post.c | 6 +++---
 tools/http_load/http_load.c | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)



[trafficserver] branch 9.0.x updated: Fixes misc. spelling and whitespace

2019-11-04 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 4f6b220  Fixes misc. spelling and whitespace
4f6b220 is described below

commit 4f6b220f001227d0ff23a4594cba3e0a04922514
Author: Randall Meyer 
AuthorDate: Thu Oct 31 15:58:38 2019 -0700

Fixes misc. spelling and whitespace

(cherry picked from commit 20ec81edccff4629ca60287700e1d0f9a1f293c8)

 Conflicts:
doc/admin-guide/files/records.config.en.rst
---
 doc/admin-guide/files/records.config.en.rst | 7 +--
 doc/admin-guide/plugins/cachekey.en.rst | 2 +-
 src/tscore/HostLookup.cc| 2 +-
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/doc/admin-guide/files/records.config.en.rst 
b/doc/admin-guide/files/records.config.en.rst
index d52c0af..5e60598 100644
--- a/doc/admin-guide/files/records.config.en.rst
+++ b/doc/admin-guide/files/records.config.en.rst
@@ -331,7 +331,7 @@ Thread Variables
  accept_threads  exec_thread.listen Effect
 == =
``0`` ``0``  All worker threads accept new 
connections and share listen fd.
-   ``1`` ``0``  New conections are accepted on 
a dedicated accept thread and distributed to worker threads in round robin 
fashion.
+   ``1`` ``0``  New connections are accepted 
on a dedicated accept thread and distributed to worker threads in round robin 
fashion.
``0`` ``1``  All worker threads listen on 
the same port using SO_REUSEPORT. Each thread has its own listen fd and new 
connections are accepted on all the threads.
 == =
 
@@ -2462,7 +2462,10 @@ DNS
 .. ts:cv:: CONFIG proxy.config.dns.nameservers STRING NULL
:reloadable:
 
-   The DNS servers.
+   The DNS servers. Note that this does not override 
:ts:cv:`proxy.config.dns.resolv_conf`.
+   That is, the contents of the file listed in 
:ts:cv:`proxy.config.dns.resolv_conf` will
+   be appended to the list of nameservers specified here. To prevent this, a 
bogus file
+   can be listed there.
 
 .. ts:cv:: CONFIG proxy.config.srv_enabled INT 0
:reloadable:
diff --git a/doc/admin-guide/plugins/cachekey.en.rst 
b/doc/admin-guide/plugins/cachekey.en.rst
index ff8e435..3945a43 100644
--- a/doc/admin-guide/plugins/cachekey.en.rst
+++ b/doc/admin-guide/plugins/cachekey.en.rst
@@ -56,7 +56,7 @@ The plugin manipulates the `cache key` by default. If `parent 
selection URL` man
 * ``--key-type=``  (default: ``cache_key``) - list of 
``cache_key`` or ``parent_selection_url``, if multiple ``--key-type`` options 
are specified then all values are combined together.
 
 An instance of this plugin can be used for applying manipulations to `cache 
key`, `parent selection URL` or both depending on the need. See `simultaneous 
cache key and parent selection URL manipulation`_
-for examples of how to apply the **same** set of manupulations to both targets 
with a single plugin instance or applying **diferent** sets of manipulations to 
each target using separate plugin instances.
+for examples of how to apply the **same** set of manipulations to both targets 
with a single plugin instance or applying **different** sets of manipulations 
to each target using separate plugin instances.
 
 
 Cache key structure and related plugin parameters
diff --git a/src/tscore/HostLookup.cc b/src/tscore/HostLookup.cc
index 22ee664..79c5095 100644
--- a/src/tscore/HostLookup.cc
+++ b/src/tscore/HostLookup.cc
@@ -211,7 +211,7 @@ struct CharIndexBlock {
 // --- 
 //   0 ||| || |
 //   . ||| || |
-//CharIndexBlock   . ||| || |
+//CharIndexBlock . ||| || |
 //-- . ||| || |
 //  0 |   || . |||   |-->23| ptr|  0  |  (ptr is to the
 //  . |   ||   |>25| 0  |   -| || |   hostBranch 
for



[trafficserver] branch 9.0.x updated: Updated ChangeLog

2019-11-04 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 807e6cb  Updated ChangeLog
807e6cb is described below

commit 807e6cbdeb9c9d79be768fe73a19a5b6167d4e32
Author: Leif Hedstrom 
AuthorDate: Mon Nov 4 10:18:25 2019 -0700

Updated ChangeLog
---
 CHANGELOG-9.0.0 | 86 -
 1 file changed, 17 insertions(+), 69 deletions(-)

diff --git a/CHANGELOG-9.0.0 b/CHANGELOG-9.0.0
index d211d56..2d52082 100644
--- a/CHANGELOG-9.0.0
+++ b/CHANGELOG-9.0.0
@@ -9,14 +9,11 @@ Changes with Apache Traffic Server 9.0.0
   #3900 - ts/Extendible and AcidPtr classes
   #3901 - MemArena: Add make method to construct objects in the arena.
   #3907 - IntrusiveDList: Refreshed for C++ eleventy, added const_iterator.
-  #3913 - Doc: fix build error in traffic_layout documentation.
   #3921 - Bug fix in microServer's threading and reorganized some code
   #3925 - Enforce sphinx>=1.7.5 when building docs
   #3930 - Remove proxy.config.config_dir from records.config
   #3941 - Fix RecConfigReadPluginDir and clean up RecCore
-  #3942 - Doc: Fix build error in Lua plugin documentation.
   #3943 - Handle response parsing case where EOF happens before any data 
arrives.
-  #3945 - Doc: Tweak to fix doc issues in IntrusiveDList documentation.
   #3951 - Fixed broken sphinx version check on MacOS
   #3955 - IntrusiveHashMap: Refresh TSHashTable for C++ eleventy.
   #3957 - Add generic "guard" class (PostScript) for exception and early 
function return safety.
@@ -27,12 +24,12 @@ Changes with Apache Traffic Server 9.0.0
   #3966 - Add BWF support for SourceLocation.
   #3967 - BufferWriter: Add print overloads to FixedBufferWriter
   #3968 - Test: Convert test_Regex.cc to Catch.
-  #3982 - Minor update on README's directory structure
   #3992 - TextView: More unit tests.
   #3993 - Test: Convert test_Ptr.cc to Catch.
   #4003 - Fix another crash on shutdown
   #4008 - Add support for 'fwd' value to X-Debug header, and move to later 
hook any deletion of X-Debug header from client request.
   #4020 - Add logic to clean up vios on HttpSM shutdown
+  #4028 - proxy.config.http.connect_attempts_timeout tracks TTBF instead of 
connect
   #4029 - Replace TSHashTable in server session management with 
IntrusiveHashMap
   #4033 - Removes remnants of dprintf support
   #4039 - Enable ECDH explicitly only if OpenSSL version is v1.0.2 or lower
@@ -42,7 +39,6 @@ Changes with Apache Traffic Server 9.0.0
   #4047 - Improve log entry for http connect result errors
   #4049 - Removes carriage returns from MT_hashtable.h
   #4050 - Optimize: make NetAccept::init_accept_loop has the logic similar to 
NetAccept::init_accept_per_thread
-  #4051 - Doc: Document TSContCall
   #4063 - BWF: Add "FirstOf" for better handling of printing alternates for 
null strings.
   #4064 - Runroot: Update test to support different layout
   #4067 - Bug fix for timeout test
@@ -51,21 +47,17 @@ Changes with Apache Traffic Server 9.0.0
   #4089 - reenable timeout and change microServer timeout logic
   #4095 - Optimize: Assign nh->mutex to new NetVC first and switch to new 
mutex within UnixNetVC::acceptEvent
   #4098 - adding a Mutex to the continuation
-  #4100 - Doc: Update comments in InkAPI.cc in the header and for member 
converters.
   #4107 - Fixes MacOS linker issue with release build
   #4113 - Disables openclose_h2 test.
   #4115 - TextView: Add overload for strcasecmp for string_view & TextView.
   #4125 - ssl_session_reuse plugin
-  #4127 - Allows to run Spinx builds on portions of the docs
   #4129 - Update IPAllow infrastructure.
-  #4132 - Completes documentation regarding redirects
   #4133 - Disables the double test for inconsistent execution
   #4140 - Meta: Add conditional compilation case meta structures.
   #4145 - Adds configurable behavior on redirect to loopback
   #4146 - Cleanup: remove unused and unimplemented functions from ink_string.h
   #4148 - Cleanup: Remove #define INT_TO_BOOL, use local lambda instead.
   #4149 - Clang-format: Redo clang-format error that slipped through.
-  #4163 - Doc: Remove deprecated configs from examples of traffic_ctl
   #4168 - YAML: Convert ip_allow.config
   #4175 - TextView: Better support for std::string assignment.
   #4176 - TextView: Add support for use as "Source" in STL containers.
@@ -82,11 +74,9 @@ Changes with Apache Traffic Server 9.0.0
   #4220 - IntrusiveHashMap: Inserts preserve order for equal keys, as with 
std::multimap
   #4221 - IntrusiveHashMap: Fix for find false positive in some cases.
   #4226 - HttpSessionManager: Fix potential infinite loop problem.
-  #4234 - Corrects path to test file in docs
   #4240 - Inherited Extendible
   #4249 - Test: Convert test_PriorityQueue.cc to Catch
   #4257 - Update base version of AuTest to 1.6.0
-  #4259 - 

[trafficserver] branch 9.0.x updated: Ignore MgmtMessageHdr if ProcessManager is not running

2019-11-04 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 8573b23  Ignore MgmtMessageHdr if ProcessManager is not running
8573b23 is described below

commit 8573b234eaac86034f5e29532b44b31c4b555f1f
Author: Masaori Koshiba 
AuthorDate: Wed Oct 23 13:48:17 2019 +0900

Ignore MgmtMessageHdr if ProcessManager is not running

(cherry picked from commit 5936dcdda6d8f6695ce613e6022bf735732ca566)
---
 mgmt/ProcessManager.cc | 4 
 1 file changed, 4 insertions(+)

diff --git a/mgmt/ProcessManager.cc b/mgmt/ProcessManager.cc
index ef18e23..897cef1 100644
--- a/mgmt/ProcessManager.cc
+++ b/mgmt/ProcessManager.cc
@@ -266,6 +266,10 @@ ProcessManager::signalManager(int msg_id, std::string_view 
text)
 void
 ProcessManager::signalManager(MgmtMessageHdr *mh)
 {
+  if (!this->running) {
+Warning("MgmtMessageHdr is ignored. Because ProcessManager is not 
running");
+return;
+  }
   ink_release_assert(::enqueue(mgmt_signal_queue, mh));
 
 #if HAVE_EVENTFD



[trafficserver] branch 9.0.x updated: Updated API header and ssl_session_reuse for new TSSslSessionInsert changes

2019-11-04 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 782d9e4  Updated API header and ssl_session_reuse for new 
TSSslSessionInsert changes
782d9e4 is described below

commit 782d9e4d92336a55c4b2d7dd4e9d9bae2277
Author: Bryan Call 
AuthorDate: Thu Oct 24 15:16:06 2019 -0700

Updated API header and ssl_session_reuse for new TSSslSessionInsert changes

(cherry picked from commit ed2a8befdf4333cd5473baae99807850f1be2392)
---
 include/ts/ts.h   | 2 +-
 iocore/net/SSLSessionCache.cc | 2 +-
 iocore/net/SSLSessionCache.h  | 2 +-
 plugins/experimental/ssl_session_reuse/src/session_process.cc | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/ts/ts.h b/include/ts/ts.h
index a0887de..60828f9 100644
--- a/include/ts/ts.h
+++ b/include/ts/ts.h
@@ -1262,7 +1262,7 @@ TSReturnCode TSVConnProtocolEnable(TSVConn connp, const 
char *protocol_name);
 tsapi int TSVConnIsSsl(TSVConn sslp);
 tsapi TSSslSession TSSslSessionGet(const TSSslSessionID *session_id);
 tsapi int TSSslSessionGetBuffer(const TSSslSessionID *session_id, char 
*buffer, int *len_ptr);
-tsapi TSReturnCode TSSslSessionInsert(const TSSslSessionID *session_id, 
TSSslSession add_session);
+tsapi TSReturnCode TSSslSessionInsert(const TSSslSessionID *session_id, 
TSSslSession add_session, TSSslConnection ssl_conn);
 tsapi TSReturnCode TSSslSessionRemove(const TSSslSessionID *session_id);
 
 /* --
diff --git a/iocore/net/SSLSessionCache.cc b/iocore/net/SSLSessionCache.cc
index 611b4c8..17fb174 100644
--- a/iocore/net/SSLSessionCache.cc
+++ b/iocore/net/SSLSessionCache.cc
@@ -168,7 +168,7 @@ SSLSessionBucket::insertSession(const SSLSessionID , 
SSL_SESSION *sess, SSL *
   ink_release_assert(static_cast(buf_exdata->block_size()) >= 
len_exdata);
   ssl_session_cache_exdata *exdata = reinterpret_cast(buf_exdata->data());
   // This could be moved to a function in charge of populating exdata
-  exdata->curve = SSLGetCurveNID(ssl);
+  exdata->curve = (ssl == nullptr) ? 0 : SSLGetCurveNID(ssl);
 
   ats_scoped_obj ssl_session(new SSLSession(id, buf, len, 
buf_exdata));
 
diff --git a/iocore/net/SSLSessionCache.h b/iocore/net/SSLSessionCache.h
index 7968b46..44ba12d 100644
--- a/iocore/net/SSLSessionCache.h
+++ b/iocore/net/SSLSessionCache.h
@@ -33,7 +33,7 @@
 #define SSL_MAX_SESSION_SIZE 256
 
 struct ssl_session_cache_exdata {
-  ssl_curve_id curve;
+  ssl_curve_id curve = 0;
 };
 
 struct SSLSessionID : public TSSslSessionID {
diff --git a/plugins/experimental/ssl_session_reuse/src/session_process.cc 
b/plugins/experimental/ssl_session_reuse/src/session_process.cc
index 3f69e18..be6e029 100644
--- a/plugins/experimental/ssl_session_reuse/src/session_process.cc
+++ b/plugins/experimental/ssl_session_reuse/src/session_process.cc
@@ -249,7 +249,7 @@ add_session(char *session_id, int session_id_len, const 
std::string _s
   if (sid.len > sizeof(sid.bytes)) {
 sid.len = sizeof(sid.bytes);
   }
-  TSSslSessionInsert(, reinterpret_cast(sess));
+  TSSslSessionInsert(, reinterpret_cast(sess), nullptr);
   // Free the sesison object created by d2i_SSL_SESSION
   // We should make an API that just takes the ASN buffer
   SSL_SESSION_free(sess);



[trafficserver] branch 9.0.x updated: Fixing session sharing with IP matching.

2019-11-04 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 479baec  Fixing session sharing with IP matching.
479baec is described below

commit 479baecb710acd927356a15eb55b0701b7b07144
Author: bneradt 
AuthorDate: Fri Oct 18 15:26:43 2019 +

Fixing session sharing with IP matching.

(cherry picked from commit 1d5089243f0dcdf0d9b39379dea47f3c14f383ab)
---
 proxy/http/HttpSessionManager.cc   |   3 +
 tests/Pipfile  |   1 +
 tests/gold_tests/session_sharing/gold/200.gold |  19 
 .../session_sharing/session_match.test.py  | 113 +
 4 files changed, 136 insertions(+)

diff --git a/proxy/http/HttpSessionManager.cc b/proxy/http/HttpSessionManager.cc
index b50e854..3667e6f 100644
--- a/proxy/http/HttpSessionManager.cc
+++ b/proxy/http/HttpSessionManager.cc
@@ -133,6 +133,9 @@ ServerSessionPool::acquireSession(sockaddr const *addr, 
CryptoHash const 
   break;
 }
   }
+} else if (last != first) {
+  --last;
+  zret = HSM_DONE;
 }
 if (zret == HSM_DONE) {
   to_return = last;
diff --git a/tests/Pipfile b/tests/Pipfile
index 83578ac..f8a6bcc 100644
--- a/tests/Pipfile
+++ b/tests/Pipfile
@@ -30,6 +30,7 @@ dnslib = "*"
 requests = "*"
 gunicorn = "*"
 httpbin = "*"
+microserver = ">=1.0.4"
 
 [requires]
 python_version = "3"
diff --git a/tests/gold_tests/session_sharing/gold/200.gold 
b/tests/gold_tests/session_sharing/gold/200.gold
new file mode 100644
index 000..c1ac419
--- /dev/null
+++ b/tests/gold_tests/session_sharing/gold/200.gold
@@ -0,0 +1,19 @@
+``
+< HTTP/1.1 200 OK
+``
+< Content-Length: 0
+``
+< Connection: close
+``
+< HTTP/1.1 200 OK
+``
+< Content-Length: 0
+``
+< Connection: close
+``
+< HTTP/1.1 200 OK
+``
+< Content-Length: 0
+``
+< Connection: close
+``
diff --git a/tests/gold_tests/session_sharing/session_match.test.py 
b/tests/gold_tests/session_sharing/session_match.test.py
new file mode 100644
index 000..2e619e5
--- /dev/null
+++ b/tests/gold_tests/session_sharing/session_match.test.py
@@ -0,0 +1,113 @@
+'''
+Test that a plugin can modify server session sharing.
+'''
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
+
+class SessionMatchTest:
+TestCounter = 0
+def __init__(self, TestSummary, sharingMatchValue):
+SessionMatchTest.TestCounter += 1
+self._MyTestCount = SessionMatchTest.TestCounter
+Test.Summary = TestSummary
+self._tr = Test.AddTestRun()
+self._sharingMatchValue = sharingMatchValue
+self.setupOriginServer()
+self.setupTS()
+
+def setupOriginServer(self):
+self._server = 
Test.MakeOriginServer("server{counter}".format(counter=self._MyTestCount))
+request_header = {"headers":
+  "GET /one HTTP/1.1\r\nHost: 
www.example.com\r\nContent-Length: 0\r\n\r\n",
+  "timestamp": "1469733493.993", "body": ""}
+response_header = {"headers": "HTTP/1.1 200 OK\r\nServer: 
microserver\r\n"
+   "Content-Length: 0\r\n\r\n",
+   "timestamp": "1469733493.993", "body": ""}
+self._server.addResponse("sessionlog.json", request_header, 
response_header)
+
+request_header2 = {"headers": "GET /two HTTP/1.1\r\nContent-Length: 
0\r\n"
+   "Host: www.example.com\r\n\r\n",
+   "timestamp": "1469733493.993", "body": 
"a\r\na\r\na\r\n\r\n"}
+response_header2 = {"headers": "HTTP/1.1 200 OK\r\nServer: 
microserver\r\n"
+"Content-Length: 0\r\n\r\n",
+"timestamp": "1469733493.993", "body": ""}
+self._server.addResponse("sessionlog.json", request_header2, 
response_header2)
+
+request_header3 = {"headers": "GET /three HTTP/1.1\r\nContent-Length: 
0\r\n"
+   "Host: www.example.com\r\nConnection: 
close\r\n\r\n",
+   "timestamp": "1469733493.993", 

[trafficserver] branch 9.0.x updated: Issue 4635: Address pipe reuse after configuration reload issues

2019-11-04 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 1305e70  Issue 4635: Address pipe reuse after configuration reload 
issues
1305e70 is described below

commit 1305e7000a50bb16dfa4d047636c2a0a460de09f
Author: bneradt 
AuthorDate: Fri Oct 25 22:49:31 2019 +

Issue 4635: Address pipe reuse after configuration reload issues

(cherry picked from commit 69a318f2cbb332edcdcfb6a58aec32b91e05f867)
---
 proxy/logging/LogFile.cc   |  6 ++
 proxy/logging/LogObject.cc | 19 +++
 2 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/proxy/logging/LogFile.cc b/proxy/logging/LogFile.cc
index 1d7d0a1..d0b95da 100644
--- a/proxy/logging/LogFile.cc
+++ b/proxy/logging/LogFile.cc
@@ -118,6 +118,12 @@ LogFile::LogFile(const LogFile )
 LogFile::~LogFile()
 {
   Debug("log-file", "entering LogFile destructor, this=%p", this);
+
+  // close_file() checks whether a file is open before attempting to close, so
+  // this is safe to call even if a file had not been opened. Further, calling
+  // close_file() here ensures that we do not leak file descriptors.
+  close_file();
+
   delete m_log;
   ats_free(m_header);
   ats_free(m_name);
diff --git a/proxy/logging/LogObject.cc b/proxy/logging/LogObject.cc
index f1c2337..040c73d 100644
--- a/proxy/logging/LogObject.cc
+++ b/proxy/logging/LogObject.cc
@@ -961,24 +961,20 @@ LogObjectManager::_solve_filename_conflicts(LogObject 
*log_object, int maxConfli
 LogUtils::manager_alarm(LogUtils::LOG_ALARM_ERROR, msg, filename);
 retVal = CANNOT_SOLVE_FILENAME_CONFLICTS;
   } else {
-// either the meta file could not be read, or the new object's
-// signature and the metafile signature do not match ==>
-// roll old filename so the new object can use the filename
+// Either the meta file could not be read, or the new object's
+// signature and the metafile signature do not match.
+// Roll the old filename so the new object can use the filename
 // it requested (previously we used to rename the NEW file
-// but now we roll the OLD file), or if the log object writes
-// to a pipe, just remove the file if it was open as a pipe
+// but now we roll the OLD file). However, if the log object writes to
+// a pipe don't roll because rolling is not applicable to pipes.
 
 bool roll_file = true;
 
 if (log_object->writes_to_pipe()) {
-  // determine if existing file is a pipe, and remove it if
-  // that is the case so the right metadata for the new pipe
-  // is created later
-  //
+  // Verify whether the existing file is a pipe. If it is,
+  // disable the roll_file flag so we don't attempt rolling.
   struct stat s;
   if (stat(filename, ) < 0) {
-// an error happened while trying to get file info
-//
 const char *msg = "Cannot stat log file %s: %s";
 char *se= strerror(errno);
 
@@ -988,7 +984,6 @@ LogObjectManager::_solve_filename_conflicts(LogObject 
*log_object, int maxConfli
 roll_file = false;
   } else {
 if (S_ISFIFO(s.st_mode)) {
-  unlink(filename);
   roll_file = false;
 }
   }



[trafficserver] branch 9.0.x updated: Fixing log cleanup candidate selection and adding a test for it.

2019-11-04 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new da04f6d  Fixing log cleanup candidate selection and adding a test for 
it.
da04f6d is described below

commit da04f6da8205ee37e9c10a62787c713fff645ca7
Author: bneradt 
AuthorDate: Tue Oct 29 21:34:59 2019 +

Fixing log cleanup candidate selection and adding a test for it.

(cherry picked from commit c9c885505d54197b4fdd4e323b906a795e37390e)
---
 proxy/logging/LogConfig.cc |   9 ++-
 tests/gold_tests/logging/log_retention.test.py | 105 +
 2 files changed, 112 insertions(+), 2 deletions(-)

diff --git a/proxy/logging/LogConfig.cc b/proxy/logging/LogConfig.cc
index 41b0fcc..84236b7 100644
--- a/proxy/logging/LogConfig.cc
+++ b/proxy/logging/LogConfig.cc
@@ -617,12 +617,17 @@ LogConfig::update_space_used()
 // then check if the candidate belongs to any given log type
 //
 ts::TextView type_name(entry->d_name, strlen(entry->d_name));
+// A rolled log will look something like:
+// 
squid.log_some.hostname.com.20191029.18h15m02s-20191029.18h30m02s.old
+//
+// The following logic cuts things back to original unrolled file which
+// is the key into the deleting_info map (squid.log in the above 
example).
 auto suffix = type_name;
-type_name.remove_suffix(suffix.remove_prefix(suffix.find('.') + 
1).remove_prefix(suffix.find('.')).size());
+type_name.remove_suffix(suffix.remove_prefix(suffix.find('.') + 
1).remove_prefix(suffix.find('_')).size());
 auto iter = deleting_info.find(type_name);
 if (iter == deleting_info.end()) {
   // We won't delete the log if its name doesn't match any give type.
-  break;
+  continue;
 }
 
 auto  = iter->candidates;
diff --git a/tests/gold_tests/logging/log_retention.test.py 
b/tests/gold_tests/logging/log_retention.test.py
new file mode 100644
index 000..7ed68c2
--- /dev/null
+++ b/tests/gold_tests/logging/log_retention.test.py
@@ -0,0 +1,105 @@
+'''
+Verify correct log retention behavior.
+'''
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
+Test.Summary = '''
+Test the enforcment of proxy.config.log.max_space_mb_for_logs.
+'''
+
+# Create and configure the ATS process.
+ts = Test.MakeATSProcess("ts")
+
+ts.Disk.records_config.update({
+# Do not accept connections from clients until cache subsystem is 
operational.
+'proxy.config.http.wait_for_cache': 1,
+
+'proxy.config.diags.debug.enabled': 1,
+'proxy.config.diags.debug.tags': 'logspace',
+
+'proxy.config.log.rolling_enabled': 3,
+'proxy.config.log.auto_delete_rolled_files': 1,
+
+# 10 MB is the minimum rolling size.
+'proxy.config.log.rolling_size_mb': 10,
+'proxy.config.log.periodic_tasks_interval': 1,
+# The following configures a 12 MB log cap with a required 2 MB head room.
+# Thus the rotated log of just over 10 MB should be deleted because it
+# will not leave enough head room.
+'proxy.config.log.max_space_mb_headroom': 2,
+'proxy.config.log.max_space_mb_for_logs': 12,
+})
+
+
+# Configure approximately 5 KB entries.
+ts.Disk.logging_yaml.AddLines(
+'''
+logging:
+  formats:
+- name: long
+  format: "{prefix}: %"
+  logs:
+- filename: test_rotation
+  format: long
+'''.format(prefix="0123456789"*500).split("\n")
+)
+
+# Verify from traffic.out that the rotated log file was auto-deleted.
+ts.Streams.stderr = Testers.ContainsExpression(
+"logical space used.*space is not available",
+"It was detected that space was not available")
+ts.Streams.stderr += Testers.ContainsExpression(
+"auto-deleting.*test_rotation.log",
+"Verify the test log file got deleted")
+ts.Streams.stderr += Testers.ContainsExpression(
+"The rolled logfile.*was auto-deleted.*bytes were reclaimed",
+"Verify that space was reclaimed")
+
+# Create and configure microserver.
+server = Test.MakeOriginServer("server")
+request_header 

[trafficserver] branch 9.0.x updated: Cleanup: Ignore checkprograms of remap

2019-11-04 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 3085e02  Cleanup: Ignore checkprograms of remap
3085e02 is described below

commit 3085e02fbff634df186b5adb871804841be1d5aa
Author: Masaori Koshiba 
AuthorDate: Mon Oct 28 11:59:27 2019 +0900

Cleanup: Ignore checkprograms of remap

(cherry picked from commit f5c9a57423f4087ca846e53120321e4bc39ce209)
---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitignore b/.gitignore
index 9d79cbd..bccd632 100644
--- a/.gitignore
+++ b/.gitignore
@@ -107,6 +107,7 @@ proxy/hdrs/test_hdr_heap
 proxy/hdrs/test_Huffmancode
 proxy/hdrs/test_XPACK
 proxy/http/test_proxy_http
+proxy/http/remap/test_*
 proxy/http2/test_Http2DependencyTree
 proxy/http2/test_Http2FrequencyCounter
 proxy/http2/test_HPACK



[trafficserver] branch 9.0.x updated: Docs: clarify remap plugin inst init params

2019-11-04 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 17acf31  Docs: clarify remap plugin inst init params
17acf31 is described below

commit 17acf3121614142a01d69d45b035bf1c0313be36
Author: Gancho Tenev 
AuthorDate: Thu Oct 31 13:35:37 2019 -0700

Docs: clarify remap plugin inst init params

(cherry picked from commit 0d88806b31293552cccf70b8aefbc55d844a7da9)
---
 doc/developer-guide/plugins/remap-plugins.en.rst | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/doc/developer-guide/plugins/remap-plugins.en.rst 
b/doc/developer-guide/plugins/remap-plugins.en.rst
index 2446510..9884834 100644
--- a/doc/developer-guide/plugins/remap-plugins.en.rst
+++ b/doc/developer-guide/plugins/remap-plugins.en.rst
@@ -27,7 +27,9 @@ invoked when the rule is matched. For example, a rule such as
 
map http://example.one/ http://example.two/ @plugin=example.so 
@pparam=first_arg @pparm=second_arg
 
-will, if matched, cause the plugin "example.so" to be called with parameters 
"first_arg" and "second_arg".
+will, if matched, cause the plugin "example.so" to be called with parameters 
`http://example.one/`,
+`http://example.two/`, "first_arg" and "second_arg". Please keep in mind that 
"from" URL and "to" URL
+will be converted to their canonical view.
 
 A key difference between global and remap plugins is reconfiguration and 
reloading. If
 :file:`remap.config` is reloaded, then all remap plugins are reconfigured 
based on the new version



[trafficserver] branch 9.0.x updated: Docs: cachekey: fixed non-ascii table characters

2019-11-04 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 540bb1d  Docs: cachekey: fixed non-ascii table characters
540bb1d is described below

commit 540bb1d175b6a11c8a9201f7fc729c4d2faaa8cc
Author: Gancho Tenev 
AuthorDate: Thu Oct 31 14:06:22 2019 -0700

Docs: cachekey: fixed non-ascii table characters

(cherry picked from commit 1e6760e33290a908cbcbfee60398ba8335f87792)
---
 doc/admin-guide/plugins/cachekey.en.rst | 34 -
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/doc/admin-guide/plugins/cachekey.en.rst 
b/doc/admin-guide/plugins/cachekey.en.rst
index 5b6ba4c..ff8e435 100644
--- a/doc/admin-guide/plugins/cachekey.en.rst
+++ b/doc/admin-guide/plugins/cachekey.en.rst
@@ -83,21 +83,21 @@ Cache key structure and related plugin parameters
 
 ::
 
-  Optional components  | ┌─┬── 
───┬──┐
-  (included in this order) | │ --static-prefix | --capture-prefix │ 
--capture-prefix-uri │
+  Optional components  | 
┌─┬──┬──┐
+  (included in this order) | │ --static-prefix │ --capture-prefix │ 
--capture-prefix-uri │
| 
├─┴──┴──┤
-  Default values if no | │ /host/port or scheme://host:port (see the table 
below)|
+  Default values if no | │ /host/port or scheme://host:port (see the table 
below)│
   optional components  | 
└───┘
   configured   |
 
   ┌┬─┬──┐
-  │ --canonical-prefix |  default value if no│ input used for   │
-  │|  prefix parameters used │ --capture-prefix │
-  ├┴─┴──┤
-  │ false  | /host/port  | host:port|
-  ├┴─┴──┤
-  │ true   | scheme://host:port  | scheme://host:port   |
-  └──┴──┘
+  │ --canonical-prefix │  default value if no│ input used for   │
+  ││  prefix parameters used │ --capture-prefix │
+  ├┼─┼──┤
+  │ false  │ /host/port  │ host:port│
+  ├┼─┼──┤
+  │ true   │ scheme://host:port  │ scheme://host:port   │
+  └┴─┴──┘
 
 
 * ``--static-prefix=`` (default: empty string) - if specified and not 
an empty string the  will be added to the `cache key`.
@@ -114,9 +114,9 @@ Cache key structure and related plugin parameters
 ::
 
   Optional components  | ┌┬──┐
-  (included in this order) | │ --ua-class | --ua-capture │
+  (included in this order) | │ --ua-class │ --ua-capture │
| ├┴──┤
-  Default values if no | │ (empty)   |
+  Default values if no | │ (empty)   │
   optional components  | └───┘
   configured   |
 
@@ -135,8 +135,8 @@ Cache key structure and related plugin parameters
 
   Optional components  | ┌───┬───┐
| │ --include-headers │  --capture-header │
-   | ├───┤
-  Default values if no | │ (empty)   |  (empty)  |
+   | ├───┼───┤
+  Default values if no | │ (empty)   │  (empty)  │
   optional components  | └───┴───┘
   configured   |
 
@@ -152,7 +152,7 @@ Cache key structure and related plugin parameters
   Optional components  | ┌───┐
| │ --include-cookies │
| ├───┤
-  Default values if no | │ (empty)   |
+  Default values if no | │ (empty)   │
   optional components  | └───┘
   configured   |
 
@@ -164,9 +164,9 @@ Cache key structure and related plugin parameters
 ::
 
   Optional components  | ┌┬┐
-  (included in this order) | │ --capture-path-uri | --capture-path │
+  (included in this order) | │ --capture-path-uri │ --capture-path │
| ├┴┤
-  Default values if no | │ URI 

[trafficserver] branch 9.0.x updated: For remap_stats, removes configure time dependency on search.h

2019-11-04 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 57b9c3c  For remap_stats, removes configure time dependency on search.h
57b9c3c is described below

commit 57b9c3c1d4ba70e73a89f4b92de4c6d34d6c6283
Author: Randall Meyer 
AuthorDate: Tue Oct 29 10:50:10 2019 -0700

For remap_stats, removes configure time dependency on search.h

The plugin no longer depends on this header since moving to C++

(cherry picked from commit 4f569586f9889c91eab3f2f3fcd81bf0cab2549e)

 Conflicts:
plugins/Makefile.am
---
 configure.ac| 2 --
 plugins/Makefile.am | 5 +
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index 112afa4..68c3487 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2080,8 +2080,6 @@ AS_IF([test "x$enable_experimental_plugins" = "xyes"],
 AC_CHECK_FUNCS([hcreate_r hsearch_r])
   ])
   ])
-AM_CONDITIONAL([BUILD_REMAP_STATS_PLUGIN],
-  [ test "x$enable_experimental_plugins" = "xyes" -a "x$ac_cv_header_search_h" 
= "xyes" -a "x$ac_cv_type_struct_hsearch_data" = "xyes" -a 
"x$ac_cv_func_hcreate_r" = "xyes" -a "x$ac_cv_func_hsearch_r" = "xyes" ])
 
 AC_ARG_WITH([default-stack-size],
   [AS_HELP_STRING([--with-default-stack-size],[specify the default stack size 
in bytes [default=1048576]])],
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 9818f9c..5af6494 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -71,6 +71,7 @@ include experimental/memcache/Makefile.inc
 include experimental/metalink/Makefile.inc
 include experimental/money_trace/Makefile.inc
 include experimental/mp4/Makefile.inc
+include experimental/remap_stats/Makefile.inc
 include experimental/server_push_preload/Makefile.inc
 include experimental/slice/Makefile.inc
 include experimental/sslheaders/Makefile.inc
@@ -92,10 +93,6 @@ if BUILD_SSL_SESSION_REUSE_PLUGIN
 include experimental/ssl_session_reuse/Makefile.inc
 endif
 
-if BUILD_REMAP_STATS_PLUGIN
-include experimental/remap_stats/Makefile.inc
-endif
-
 if HAS_KYOTOCABINET
 include experimental/cache_key_genid/Makefile.inc
 endif



[trafficserver] branch 9.0.x updated: Fix null pointer dereference reported by clang-analyzer

2019-11-04 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 6b44697  Fix null pointer dereference reported by clang-analyzer
6b44697 is described below

commit 6b44697625296da6cb98889b949fc307a99dd3ed
Author: Masaori Koshiba 
AuthorDate: Fri Nov 1 14:45:52 2019 +0900

Fix null pointer dereference reported by clang-analyzer

(cherry picked from commit 33a5ebe303361076ef636d1590faf31c7f44cc57)
---
 proxy/http/HttpTunnel.cc | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/proxy/http/HttpTunnel.cc b/proxy/http/HttpTunnel.cc
index 882e1e5..97e3cc9 100644
--- a/proxy/http/HttpTunnel.cc
+++ b/proxy/http/HttpTunnel.cc
@@ -1182,8 +1182,12 @@ HttpTunnel::producer_handler(int event, 
HttpTunnelProducer *p)
   case VC_EVENT_INACTIVITY_TIMEOUT:
   case HTTP_TUNNEL_EVENT_CONSUMER_DETACH:
 if (p->alive) {
-  p->alive  = false;
-  p->bytes_read = p->read_vio->ndone;
+  p->alive = false;
+  if (p->read_vio) {
+p->bytes_read = p->read_vio->ndone;
+  } else {
+p->bytes_read = 0;
+  }
   // Clear any outstanding reads so they don't
   // collide with future tunnel IO's
   p->vc->do_io_read(nullptr, 0, nullptr);



[trafficserver] branch master updated (63ddd24 -> 33a5ebe)

2019-11-04 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


from 63ddd24  Add an appropriate warning where behavior has changed
 add 33a5ebe  Fix null pointer dereference reported by clang-analyzer

No new revisions were added by this update.

Summary of changes:
 proxy/http/HttpTunnel.cc | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)



[trafficserver] branch 9.0.x updated: Add an appropriate warning where behavior has changed

2019-11-04 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new e993a18  Add an appropriate warning where behavior has changed
e993a18 is described below

commit e993a1897d951a36335d7264073a5159b6478b36
Author: Leif Hedstrom 
AuthorDate: Tue Oct 29 08:58:39 2019 -0600

Add an appropriate warning where behavior has changed

(cherry picked from commit 63ddd24508aba6c501233f1ce7559a15fb73ee46)
---
 doc/admin-guide/plugins/header_rewrite.en.rst | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/doc/admin-guide/plugins/header_rewrite.en.rst 
b/doc/admin-guide/plugins/header_rewrite.en.rst
index e5951e7..217940a 100644
--- a/doc/admin-guide/plugins/header_rewrite.en.rst
+++ b/doc/admin-guide/plugins/header_rewrite.en.rst
@@ -822,7 +822,9 @@ Part Description
 HOST Full hostname.
 
 PATH URL substring beginning with (but not including) the first ``/`` after
- the hostname up to, but not including, the query string.
+ the hostname up to, but not including, the query string. **Note**: 
previous
+ versions of ATS had a `%{PATH}` directive, this will no longer work. 
Instead,
+ you want to use `%{CLIENT-URL:PATH}`.
 
 PORT Port number.
 



[trafficserver] branch master updated (6ef4db4 -> 63ddd24)

2019-11-04 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


from 6ef4db4  Fixes misc. spelling and whitespace
 add 63ddd24  Add an appropriate warning where behavior has changed

No new revisions were added by this update.

Summary of changes:
 doc/admin-guide/plugins/header_rewrite.en.rst | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)



[trafficserver] branch 9.0.x updated: Removes proxy.config.cache.storage_filename

2019-11-04 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 1b62835  Removes proxy.config.cache.storage_filename
1b62835 is described below

commit 1b62835bb55dd95b414c6d7d3a41ca21b043b191
Author: Leif Hedstrom 
AuthorDate: Thu Oct 31 11:43:11 2019 -0600

Removes proxy.config.cache.storage_filename

(cherry picked from commit 12d0b56bdc6dfe4c561baa85cf8f4ecf3028d141)
---
 include/tscore/Filenames.h| 26 ++
 iocore/cache/Cache.cc |  3 ++-
 iocore/cache/Store.cc | 14 +++---
 lib/perl/lib/Apache/TS/AdminClient.pm |  1 -
 mgmt/RecordsConfig.cc |  2 --
 src/traffic_layout/info.cc|  3 ++-
 src/traffic_manager/AddConfigFilesHere.cc |  3 ++-
 src/tscore/Filenames.cc   | 24 
 src/tscore/Makefile.am|  1 +
 9 files changed, 64 insertions(+), 13 deletions(-)

diff --git a/include/tscore/Filenames.h b/include/tscore/Filenames.h
new file mode 100644
index 000..67065fb
--- /dev/null
+++ b/include/tscore/Filenames.h
@@ -0,0 +1,26 @@
+/** @file
+
+  @section license License
+
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+ */
+
+#pragma once
+
+///
+// Configuration file names
+extern const char *STORAGE_CONF_FILENAME;
diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc
index ee7effe..83b33b5 100644
--- a/iocore/cache/Cache.cc
+++ b/iocore/cache/Cache.cc
@@ -28,6 +28,7 @@
 #include "StatPages.h"
 
 #include "tscore/I_Layout.h"
+#include "tscore/Filenames.h"
 
 #include "HttpTransactCache.h"
 #include "HttpSM.h"
@@ -3252,7 +3253,7 @@ ink_cache_init(ts::ModuleVersion v)
 
   Result result = theCacheStore.read_config();
   if (result.failed()) {
-Fatal("Failed to read cache storage configuration: %s", result.message());
+Fatal("Failed to read cache configuration %s: %s", STORAGE_CONF_FILENAME, 
result.message());
   }
 }
 
diff --git a/iocore/cache/Store.cc b/iocore/cache/Store.cc
index c5f009f..119206f 100644
--- a/iocore/cache/Store.cc
+++ b/iocore/cache/Store.cc
@@ -24,6 +24,7 @@
 #include "tscore/ink_platform.h"
 #include "P_Cache.h"
 #include "tscore/I_Layout.h"
+#include "tscore/Filenames.h"
 #include "tscore/ink_file.h"
 #include "tscore/Tokenizer.h"
 #include "tscore/SimpleTokenizer.h"
@@ -36,7 +37,6 @@
 //
 // Store
 //
-
 const char Store::VOLUME_KEY[]   = "volume";
 const char Store::HASH_BASE_STRING_KEY[] = "id";
 
@@ -325,13 +325,13 @@ Store::read_config()
   Span *sd = nullptr, *cur = nullptr;
   Span *ns;
   ats_scoped_fd fd;
-  ats_scoped_str 
storage_path(RecConfigReadConfigPath("proxy.config.cache.storage_filename", 
"storage.config"));
+  ats_scoped_str storage_path(RecConfigReadConfigPath(nullptr, 
STORAGE_CONF_FILENAME));
 
-  Note("storage.config loading ...");
+  Note("%s loading ...", STORAGE_CONF_FILENAME);
   Debug("cache_init", "Store::read_config, fd = -1, \"%s\"", (const char 
*)storage_path);
   fd = ::open(storage_path, O_RDONLY);
   if (fd < 0) {
-Error("storage.config failed to load");
+Error("%s failed to load", STORAGE_CONF_FILENAME);
 return Result::failure("open %s: %s", (const char *)storage_path, 
strerror(errno));
   }
 
@@ -372,7 +372,7 @@ Store::read_config()
 const char *end;
 if ((size = ink_atoi64(e, )) <= 0 || *end != '\0') {
   delete sd;
-  Error("storage.config failed to load");
+  Error("%s failed to load", STORAGE_CONF_FILENAME);
   return Result::failure("failed to parse size '%s'", e);
 }
   } else if (0 == strncasecmp(HASH_BASE_STRING_KEY, e, 
sizeof(HASH_BASE_STRING_KEY) - 1)) {
@@ -390,7 +390,7 @@ Store::read_config()
 }
 if (!*e || !ParseRules::is_digit(*e) || 0 >= (volume_num = 
ink_atoi(e))) {
   delete sd;
-  Error("storage.config failed to load");
+  Error("%s failed to load", STORAGE_CONF_FILENAME);
   return Result::failure("failed