trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpe...@apache.org
Subject git commit: TS-2628: traffic_line: print restart status after setting a value
Date Tue, 11 Mar 2014 20:01:53 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/master 93fb1bbfd -> 07720dc20


TS-2628: traffic_line: print restart status after setting a value

The API that sets configuration values reports whether Traffic
Server needs to be restarted or reconfigured. Print this information
to the user so that it is clearer what the next step should be.


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

Branch: refs/heads/master
Commit: 07720dc20cb00de31b3e3f0e8fbe6209809253a0
Parents: 93fb1bb
Author: James Peach <jpeach@apache.org>
Authored: Mon Mar 10 11:21:23 2014 -0700
Committer: James Peach <jpeach@apache.org>
Committed: Tue Mar 11 13:01:11 2014 -0700

----------------------------------------------------------------------
 CHANGES                          |  2 ++
 cmd/traffic_line/traffic_line.cc | 21 ++++++++++++++++++++-
 2 files changed, 22 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/07720dc2/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 3a87b9d..0675250 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 5.0.0
 
+  *) [TS-2628] traffic_line should tell you when a reload is needed.
+
   *) [TS-2627] Reduce management socket code duplication.
 
   *) [TS-2625] trafficserver.in doesn't use TS_BASE

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/07720dc2/cmd/traffic_line/traffic_line.cc
----------------------------------------------------------------------
diff --git a/cmd/traffic_line/traffic_line.cc b/cmd/traffic_line/traffic_line.cc
index 0e25105..7169ce9 100644
--- a/cmd/traffic_line/traffic_line.cc
+++ b/cmd/traffic_line/traffic_line.cc
@@ -213,8 +213,27 @@ handleArgInvocation()
       TSError err;
       TSActionNeedT action;
 
-      if ((err = TSRecordSet(SetVar, VarValue, &action)) != TS_ERR_OKAY)
+      if ((err = TSRecordSet(SetVar, VarValue, &action)) != TS_ERR_OKAY) {
         fprintf(stderr, "%s: Please correct your variable name and|or value\n", programName);
+        return err;
+      }
+
+      switch (action) {
+      case TS_ACTION_SHUTDOWN:
+        printf("Set %s, full shutdown required\n", SetVar);
+        break;
+      case TS_ACTION_RESTART:
+        printf("Set %s, restart required\n", SetVar);
+        break;
+      case TS_ACTION_RECONFIGURE:
+        printf("Set %s, reconfiguration required\n", SetVar);
+        break;
+      case TS_ACTION_DYNAMIC:
+      default:
+        printf("Set %s\n", SetVar);
+        break;
+      }
+
       return err;
     }
   } else if (*VarValue != '\0') {       // We have a value but no variable to set


Mime
View raw message