trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bc...@apache.org
Subject [trafficserver] branch 8.0.x updated: Runroot: Fix storage.config and host.db issues when using runroot
Date Wed, 10 Oct 2018 23:19:52 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/8.0.x by this push:
     new b3e517f  Runroot: Fix storage.config and host.db issues when using runroot
b3e517f is described below

commit b3e517fc3a6e4e7357912186125681282f75bf62
Author: Xavier Chi <chitianhaoxp@gmail.com>
AuthorDate: Tue Sep 4 13:31:52 2018 -0500

    Runroot: Fix storage.config and host.db issues when using runroot
    
    (cherry picked from commit 56000f975d5cb277aaef6b10590c2868e3e6d357)
    
     Conflicts:
    	iocore/cache/Store.cc
---
 iocore/cache/Store.cc         | 8 +++++++-
 lib/records/RecConfigParse.cc | 4 +++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/iocore/cache/Store.cc b/iocore/cache/Store.cc
index 1c4c396..4ee9a44 100644
--- a/iocore/cache/Store.cc
+++ b/iocore/cache/Store.cc
@@ -27,6 +27,7 @@
 #include "tscore/ink_file.h"
 #include "tscore/Tokenizer.h"
 #include "tscore/SimpleTokenizer.h"
+#include "tscore/runroot.h"
 
 #if HAVE_LINUX_MAJOR_H
 #include <linux/major.h>
@@ -390,7 +391,12 @@ Store::read_config()
       }
     }
 
-    std::string pp = Layout::get()->relative(path);
+    std::string pp;
+    if (get_runroot().empty()) {
+      pp = Layout::get()->relative(path);
+    } else {
+      pp = Layout::get()->cachedir;
+    }
 
     ns = new Span;
     Debug("cache_init", "Store::read_config - ns = new Span; ns->init(\"%s\",%" PRId64
"), forced volume=%d%s%s", pp.c_str(), size,
diff --git a/lib/records/RecConfigParse.cc b/lib/records/RecConfigParse.cc
index db26961..809eb72 100644
--- a/lib/records/RecConfigParse.cc
+++ b/lib/records/RecConfigParse.cc
@@ -91,8 +91,10 @@ RecConfigOverrideFromRunroot(const char *name)
 {
   if (!get_runroot().empty()) {
     if (!strcmp(name, "proxy.config.bin_path") || !strcmp(name, "proxy.config.local_state_dir")
||
-        !strcmp(name, "proxy.config.log.logfile_dir") || !strcmp(name, "proxy.config.plugin.plugin_dir"))
+        !strcmp(name, "proxy.config.log.logfile_dir") || !strcmp(name, "proxy.config.plugin.plugin_dir")
||
+        !strcmp(name, "proxy.config.hostdb.storage_path")) {
       return true;
+    }
   }
   return false;
 }


Mime
View raw message