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/06/24 16:10:37 UTC

[1/2] git commit: TS-1959 Make traffic_manager honor a few more records.config configs

Updated Branches:
  refs/heads/master ba025f8b2 -> b3fd17694


TS-1959 Make traffic_manager honor a few more records.config configs


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

Branch: refs/heads/master
Commit: 6a8ef797a08de1d81251d365c9d82a2b4be435d1
Parents: ba025f8
Author: Leif Hedstrom <zw...@apache.org>
Authored: Tue Jun 18 00:16:20 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Mon Jun 24 08:04:00 2013 -0600

----------------------------------------------------------------------
 mgmt/Main.cc | 62 ++++++++++++++++++++-----------------------------------
 1 file changed, 22 insertions(+), 40 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6a8ef797/mgmt/Main.cc
----------------------------------------------------------------------
diff --git a/mgmt/Main.cc b/mgmt/Main.cc
index ae2e757..776838c 100644
--- a/mgmt/Main.cc
+++ b/mgmt/Main.cc
@@ -271,54 +271,35 @@ setup_coredump()
 }
 
 static void
-init_dirs(bool use_librecords = true)
+init_dirs()
 {
   char buf[PATH_NAME_MAX + 1];
 
-  ink_strlcpy(system_config_directory, Layout::get()->sysconfdir, sizeof(system_config_directory));
-  ink_strlcpy(system_runtime_dir, Layout::get()->runtimedir, sizeof(system_runtime_dir));
-  ink_strlcpy(system_log_dir, Layout::get()->logdir, sizeof(system_log_dir));
-
+  REC_ReadConfigString(buf, "proxy.config.config_dir", PATH_NAME_MAX);
+  Layout::get()->relative(system_config_directory, PATH_NAME_MAX, buf);
   if (access(system_config_directory, R_OK) == -1) {
-    if (use_librecords) {
-      REC_ReadConfigString(buf, "proxy.config.config_dir", PATH_NAME_MAX);
-      Layout::get()->relative(system_config_directory, PATH_NAME_MAX, buf);
-    }
-    if (access(system_config_directory, R_OK) == -1) {
-      mgmt_elog("unable to access() config dir '%s': %d, %s\n",
-              system_config_directory, errno, strerror(errno));
-      mgmt_elog("please set config path via 'proxy.config.config_dir' \n");
-      _exit(1);
-    }
+    mgmt_elog("unable to access() config dir '%s': %d, %s\n", system_config_directory, errno, strerror(errno));
+    mgmt_elog("please set config path via 'proxy.config.config_dir' \n");
+    _exit(1);
   }
+
   ink_strlcpy(mgmt_path, system_config_directory, sizeof(mgmt_path));
 
-  if (access(system_runtime_dir, W_OK) == -1) {
-    if (use_librecords) {
-      REC_ReadConfigString(buf, "proxy.config.local_state_dir", PATH_NAME_MAX);
-      Layout::get()->relative(system_runtime_dir, PATH_NAME_MAX, buf);
-    }
-    if (access(system_runtime_dir, R_OK) == -1) {
-      mgmt_elog("unable to access() local state dir '%s': %d, %s\n",
-              system_runtime_dir, errno, strerror(errno));
-      mgmt_elog("please set 'proxy.config.local_state_dir'\n");
-      _exit(1);
-    }
+  REC_ReadConfigString(buf, "proxy.config.local_state_dir", PATH_NAME_MAX);
+  Layout::get()->relative(system_runtime_dir, PATH_NAME_MAX, buf);
+  if (access(system_runtime_dir, R_OK) == -1) {
+    mgmt_elog("unable to access() local state dir '%s': %d, %s\n", system_runtime_dir, errno, strerror(errno));
+    mgmt_elog("please set 'proxy.config.local_state_dir'\n");
+    _exit(1);
   }
 
+  REC_ReadConfigString(buf, "proxy.config.log.logfile_dir", PATH_NAME_MAX);
+  Layout::get()->relative(system_log_dir, PATH_NAME_MAX, buf);
   if (access(system_log_dir, W_OK) == -1) {
-    if (use_librecords) {
-      REC_ReadConfigString(buf, "proxy.config.log.logfile_dir", PATH_NAME_MAX);
-      Layout::get()->relative(system_log_dir, PATH_NAME_MAX, buf);
-    }
-    if (access(system_log_dir, W_OK) == -1) {
-      mgmt_elog("unable to access() log dir'%s': %d, %s\n",
-              system_log_dir, errno, strerror(errno));
-      mgmt_elog("please set 'proxy.config.log.logfile_dir'\n");
-      _exit(1);
-    }
+    mgmt_elog("unable to access() log dir'%s': %d, %s\n", system_log_dir, errno, strerror(errno));
+    mgmt_elog("please set 'proxy.config.log.logfile_dir'\n");
+    _exit(1);
   }
-
 }
 
 static void
@@ -576,7 +557,10 @@ main(int argc, char **argv)
   diags = diagsConfig->diags;
   diags->prefix_str = "Manager ";
 
-  init_dirs(false);// setup directories
+  RecLocalInit();
+  LibRecordsConfigInit();
+
+  init_dirs();// setup critical directories, needs LibRecords
 
   // Get the config info we need while we are still root
   extractConfigInfo(mgmt_path, recs_conf, userToRunAs, &fds_throttle);
@@ -600,8 +584,6 @@ main(int argc, char **argv)
 
 #endif
 
-  RecLocalInit();
-  LibRecordsConfigInit();
 #if TS_HAS_WCCP
   Init_Errata_Logging();
 #endif


[2/2] git commit: Added Ts-1959.

Posted by zw...@apache.org.
Added Ts-1959.


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

Branch: refs/heads/master
Commit: b3fd1769463eedf4d43039a83faf4fb118d955b0
Parents: 6a8ef79
Author: Leif Hedstrom <zw...@apache.org>
Authored: Mon Jun 24 08:10:29 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Mon Jun 24 08:10:29 2013 -0600

----------------------------------------------------------------------
 CHANGES | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b3fd1769/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index b8ae256..454e079 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,10 @@
                                                          -*- coding: utf-8 -*-
   Changes with Apache Traffic Server 3.3.5
 
+
+  *) [TS-1959] traffic_manager not honoring some records.config settings
+   necessary for e.g. logging.
+
   *) [TS-745] support interim caching in storage
    to eanble, use '--enable-interim-cache' configure option.