You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2013/08/16 18:51:45 UTC

git commit: TS-2127 Move hostdb.config to var/trafficserver

Updated Branches:
  refs/heads/master cd1f40a5f -> dfba93de1


TS-2127 Move hostdb.config to var/trafficserver

This eliminates the entire etc/internal directory, and moves the
hostdb.config to the var/trafficserver (depending on configure option
of course). This means hostdb.config and host.db are now in the same
directory, together with all other "state" files:

-rw-r--r-- 1 nobody nobody        71 Aug 16 09:51 hostdb.config
-rw-r--r-- 1 nobody nobody 268435456 Aug 16 09:52 cache.db
-rw-r--r-- 1 root   root           6 Aug 16 10:47 cop.lock
-rw-r--r-- 1 nobody nobody         6 Aug 16 10:47 manager.lock
srwxr-xr-x 1 nobody nobody         0 Aug 16 10:47 process_server
srwxr-xr-x 1 nobody nobody         0 Aug 16 10:47 mgmtapisocket
srwxr-xr-x 1 nobody nobody         0 Aug 16 10:47 eventapisocket
-rw-r--r-- 1 nobody nobody         6 Aug 16 10:47 server.lock
-rw-r--r-- 1 nobody nobody      1068 Aug 16 10:50 stats.snap
-rw-r--r-- 1 nobody nobody  25935872 Aug 16 10:50 host.db
-rw------- 1 nobody nobody     64208 Aug 16 10:50 records.snap


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/dfba93de
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/dfba93de
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/dfba93de

Branch: refs/heads/master
Commit: dfba93de1f02204f8f8d15cff398243d75be2e8c
Parents: cd1f40a
Author: Leif Hedstrom <zw...@apache.org>
Authored: Sat Aug 10 14:35:14 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Fri Aug 16 10:49:34 2013 -0600

----------------------------------------------------------------------
 CHANGES                     | 11 +++++++----
 cop/TrafficCop.cc           |  2 +-
 doc/admin/faqs.en.rst       |  4 ++--
 iocore/hostdb/HostDB.cc     |  2 +-
 iocore/hostdb/MultiCache.cc |  8 ++------
 proxy/Main.cc               |  3 +--
 proxy/Makefile.am           |  5 ++---
 7 files changed, 16 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dfba93de/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index c613f00..435b321 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,7 +2,10 @@
 Changes with Apache Traffic Server 3.5.0
 
 
-  *) TS-2089: introduce configurable collation preproc threads
+  *) [TS-2127] Move hostdb.config to var/trafficserver, together with with the
+   host.db itself.
+
+  *) [TS-2089] Introduce configurable collation preproc threads.
 
   *) [TS-2132, TS-2131] ${libexecdir} and $(localstatedir} chowned
    needlessly chowned to to ATS' user.
@@ -12,11 +15,11 @@ Changes with Apache Traffic Server 3.5.0
 
   *) [TS-2130] pthread_setname_np() detection fails on various platforms.
 
-  *)[ TS-2096] improve SSL certificate loading error messages
+  *)[ TS-2096] Improve SSL certificate loading error messages.
 
   *) [TS-2129] Check for existence of ExtUtils::MakeMaker.
 
-  *) [TS-2128] Don't link libGeoIP.so.1 into binaries
+  *) [TS-2128] Don't link libGeoIP.so.1 into binaries.
 
   *) [TS-2122] Enlarge the 64KB limitation of log buffer size.
 
@@ -25,7 +28,7 @@ Changes with Apache Traffic Server 3.5.0
 
   *) [TS-2123] Remove useless max_entries_per_buffer option.
 
-  *) [TS-2112] make libloader build by default.
+  *) [TS-2112] Make libloader build by default.
 
   *) [TS-2111] configure check in boost falsely requires 1.50. Reducing it to
    v1.33, which is what RHEL5 ships with.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dfba93de/cop/TrafficCop.cc
----------------------------------------------------------------------
diff --git a/cop/TrafficCop.cc b/cop/TrafficCop.cc
index 8cf97ee..0b03c31 100644
--- a/cop/TrafficCop.cc
+++ b/cop/TrafficCop.cc
@@ -1521,7 +1521,7 @@ check_no_run()
   int err;
 
   cop_log_trace("Entering check_no_run()\n");
-  snprintf(path, sizeof(path), "%s/internal/no_cop", config_dir);
+  snprintf(path, sizeof(path), "%s/no_cop", runtime_dir);
 
   do {
     err = stat(path, &info);

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dfba93de/doc/admin/faqs.en.rst
----------------------------------------------------------------------
diff --git a/doc/admin/faqs.en.rst b/doc/admin/faqs.en.rst
index e3e9bbd..28ab7fa 100644
--- a/doc/admin/faqs.en.rst
+++ b/doc/admin/faqs.en.rst
@@ -296,9 +296,9 @@ client machines have no access to the cluster ports.
 The following message appears repeatedly in the system log file:
 
 ::
-     traffic_cop[16056]: encountered "config/internal/no_cop" file...exiting
+     traffic_cop[16056]: encountered "var/trafficserver/no_cop" file...exiting
 
-The file ``config/internal/no_cop`` acts as an administrative control
+The file ``var/trafficserver/no_cop`` acts as an administrative control
 that instructs the ``traffic_cop`` process to exit immediately without
 starting ``traffic_manager`` or performing any health checks. The
 ``no_cop`` file prevents Traffic Server from starting automatically when

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dfba93de/iocore/hostdb/HostDB.cc
----------------------------------------------------------------------
diff --git a/iocore/hostdb/HostDB.cc b/iocore/hostdb/HostDB.cc
index f7cd00a..0b114b4 100644
--- a/iocore/hostdb/HostDB.cc
+++ b/iocore/hostdb/HostDB.cc
@@ -414,7 +414,7 @@ HostDBCache::start(int flags)
     Note("reconfiguring host database");
 
     char p[PATH_NAME_MAX + 1];
-    Layout::relative_to(p, PATH_NAME_MAX, system_config_directory, "internal/hostdb.config");
+    Layout::relative_to(p, PATH_NAME_MAX, system_runtime_dir, "hostdb.config");
     if (unlink(p) < 0)
       Debug("hostdb", "unable to unlink %s", p);
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dfba93de/iocore/hostdb/MultiCache.cc
----------------------------------------------------------------------
diff --git a/iocore/hostdb/MultiCache.cc b/iocore/hostdb/MultiCache.cc
index ebdea6c..a9a6ceb 100644
--- a/iocore/hostdb/MultiCache.cc
+++ b/iocore/hostdb/MultiCache.cc
@@ -501,10 +501,8 @@ MultiCacheBase::read_config(const char *config_filename, Store & s, char *fn, in
 {
   int scratch;
   char p[PATH_NAME_MAX + 1], buf[256];
-  char i[PATH_NAME_MAX + 1];
 
-  ink_filepath_make(i, sizeof(i), system_config_directory, "internal/");
-  Layout::relative_to(p, sizeof(p), i, config_filename);
+  Layout::relative_to(p, sizeof(p), system_runtime_dir, config_filename);
 
   int fd =::open(p, O_RDONLY);
   if (fd < 0)
@@ -539,11 +537,9 @@ int
 MultiCacheBase::write_config(const char *config_filename, int nominal_size, int abuckets)
 {
   char p[PATH_NAME_MAX + 1], buf[256];
-  char i[PATH_NAME_MAX + 1];
   int fd, retcode = -1;
 
-  ink_filepath_make(i, sizeof(i), system_config_directory, "internal/");
-  Layout::relative_to(p, sizeof(p), i, config_filename);
+  Layout::relative_to(p, sizeof(p), system_runtime_dir, config_filename);
 
   // XXX: Shouldn't that be 0664?
   //

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dfba93de/proxy/Main.cc
----------------------------------------------------------------------
diff --git a/proxy/Main.cc b/proxy/Main.cc
index a13633f..be52f0a 100644
--- a/proxy/Main.cc
+++ b/proxy/Main.cc
@@ -584,8 +584,7 @@ cmd_clear(char *cmd)
   char p[PATH_NAME_MAX];
   if (c_all || c_hdb) {
     Note("Clearing Configuration");
-    Layout::relative_to(p, sizeof(p), system_config_directory,
-                        "internal/hostdb.config");
+    Layout::relative_to(p, sizeof(p), system_runtime_dir, "hostdb.config");
     if (unlink(p) < 0)
       Note("unable to unlink %s", p);
   }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dfba93de/proxy/Makefile.am
----------------------------------------------------------------------
diff --git a/proxy/Makefile.am b/proxy/Makefile.am
index 7e25e34..d26227e 100644
--- a/proxy/Makefile.am
+++ b/proxy/Makefile.am
@@ -293,13 +293,12 @@ versiondir = $(pkgsysconfdir)
 install-data-local:
 	if [ `id -un` != "root" ]; then \
 		$(INSTALL) -d $(DESTDIR)$(pkglocalstatedir) $(DESTDIR)$(pkglogdir) $(DESTDIR)$(pkgruntimedir) \
-				$(DESTDIR)$(pkgsysconfdir) $(DESTDIR)$(pkgsysconfdir)/internal $(DESTDIR)$(pkgdatadir) \
-				$(DESTDIR)$(pkgcachedir); \
+				$(DESTDIR)$(pkgsysconfdir) $(DESTDIR)$(pkgdatadir) $(DESTDIR)$(pkgcachedir); \
 	else \
 		 $(INSTALL) -d $(DESTDIR)$(pkglocalstatedir); \
 		 $(INSTALL) -d -o $(pkgsysuser) -g $(pkgsysgroup) $(DESTDIR)$(pkglogdir) \
 				$(DESTDIR)$(pkgruntimedir) $(DESTDIR)$(pkgsysconfdir) \
-				$(DESTDIR)$(pkgsysconfdir)/internal $(DESTDIR)$(pkgdatadir) $(DESTDIR)$(pkgcachedir); \
+				$(DESTDIR)$(pkgdatadir) $(DESTDIR)$(pkgcachedir); \
 	fi
 
 install-data-hook: