This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new 6d1535b  Clean up: Remove redundant 
proxy.config.http.parent_proxy_routing_enable variable
6d1535b is described below

commit 6d1535b193a4ec34ad0b50c5b14da12fba13ef7b
Author: Vijay Mamidi <vijayabhaskar_mam...@yahoo.com>
AuthorDate: Thu May 23 15:03:25 2019 -0700

    Clean up: Remove redundant proxy.config.http.parent_proxy_routing_enable 
variable
---
 configs/records.config.default.in                  |  1 -
 .../configuration/hierarchical-caching.en.rst      |  6 ------
 doc/admin-guide/files/records.config.en.rst        |  5 -----
 .../configuration/hierachical-caching.en.po        |  6 ------
 lib/perl/lib/Apache/TS/AdminClient.pm              |  1 -
 mgmt/RecordsConfig.cc                              |  2 --
 proxy/ParentSelection.cc                           | 24 ++--------------------
 src/traffic_server/InkAPITest.cc                   | 14 -------------
 8 files changed, 2 insertions(+), 57 deletions(-)

diff --git a/configs/records.config.default.in 
b/configs/records.config.default.in
index 8fd6c0d..bbd5c82 100644
--- a/configs/records.config.default.in
+++ b/configs/records.config.default.in
@@ -34,7 +34,6 @@ CONFIG proxy.config.http.insert_response_via_str INT 0
 #    
https://docs.trafficserver.apache.org/records.config#parent-proxy-configuration
 #    
https://docs.trafficserver.apache.org/en/latest/admin-guide/files/parent.config.en.html
 ##############################################################################
-CONFIG proxy.config.http.parent_proxy_routing_enable INT 0
 CONFIG proxy.config.http.parent_proxy.retry_time INT 300
 CONFIG proxy.config.http.parent_proxy.connect_attempts_timeout INT 30
 CONFIG proxy.config.http.forward.proxy_auth_to_parent INT 0
diff --git a/doc/admin-guide/configuration/hierarchical-caching.en.rst 
b/doc/admin-guide/configuration/hierarchical-caching.en.rst
index f2202c1..81faf2f 100644
--- a/doc/admin-guide/configuration/hierarchical-caching.en.rst
+++ b/doc/admin-guide/configuration/hierarchical-caching.en.rst
@@ -159,12 +159,6 @@ the configuration adjustments detailed below.
     configured to serve the child's origin server, no additional configuration 
is
     needed for the nodes acting as Traffic Server parent caches.
 
-#. Enable the parent caching option by adjusting
-   :ts:cv:`proxy.config.http.parent_proxy_routing_enable` in
-   :file:`records.config`. ::
-
-        CONFIG proxy.config.http.parent_proxy_routing_enable INT 1
-
 #. Identify the parent cache you want to use to service missed requests. To
    use parent failover, you must identify more than one parent cache so that
    when a parent cache is unavailable, requests are sent to another parent
diff --git a/doc/admin-guide/files/records.config.en.rst 
b/doc/admin-guide/files/records.config.en.rst
index d7dfd6d..b8653e2 100644
--- a/doc/admin-guide/files/records.config.en.rst
+++ b/doc/admin-guide/files/records.config.en.rst
@@ -1098,11 +1098,6 @@ mptcp
 Parent Proxy Configuration
 ==========================
 
-.. ts:cv:: CONFIG proxy.config.http.parent_proxy_routing_enable INT 0
-   :reloadable:
-
-   Enables (``1``) or disables (``0``) the parent caching option. Refer to 
:ref:`admin-hierarchical-caching`.
-
 .. ts:cv:: CONFIG proxy.config.http.parent_proxy.retry_time INT 300
    :reloadable:
    :overridable:
diff --git 
a/doc/locale/ja/LC_MESSAGES/admin-guide/configuration/hierachical-caching.en.po 
b/doc/locale/ja/LC_MESSAGES/admin-guide/configuration/hierachical-caching.en.po
index 50452ac..a69cfc2 100644
--- 
a/doc/locale/ja/LC_MESSAGES/admin-guide/configuration/hierachical-caching.en.po
+++ 
b/doc/locale/ja/LC_MESSAGES/admin-guide/configuration/hierachical-caching.en.po
@@ -124,12 +124,6 @@ msgid ""
 "proxy."
 msgstr ""
 
-#: ../../admin-guide/configuration/hierachical-caching.en.rst:143
-msgid ""
-"Enable the parent caching option by adjusting :ts:cv:`proxy.config.http."
-"parent_proxy_routing_enable` in :file:`records.config`. ::"
-msgstr ""
-
 #: ../../admin-guide/configuration/hierachical-caching.en.rst:57
 msgid ""
 "The figure below illustrates a simple cache hierarchy with a Traffic Server "
diff --git a/lib/perl/lib/Apache/TS/AdminClient.pm 
b/lib/perl/lib/Apache/TS/AdminClient.pm
index e53e357..85d937e 100644
--- a/lib/perl/lib/Apache/TS/AdminClient.pm
+++ b/lib/perl/lib/Apache/TS/AdminClient.pm
@@ -485,7 +485,6 @@ The Apache Traffic Server Administration Manual will 
explain what these strings
  proxy.config.http.parent_proxy.file
  proxy.config.http.parent_proxy.per_parent_connect_attempts
  proxy.config.http.parent_proxy.retry_time
- proxy.config.http.parent_proxy_routing_enable
  proxy.config.http.parent_proxy.total_connect_attempts
  proxy.config.http.post_connect_attempts_timeout
  proxy.config.http.post_copy_size
diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc
index 777ccfa..8e29a89 100644
--- a/mgmt/RecordsConfig.cc
+++ b/mgmt/RecordsConfig.cc
@@ -416,8 +416,6 @@ static const RecordElement RecordsConfig[] =
   //        ##############################
   //        # parent proxy configuration #
   //        ##############################
-  {RECT_CONFIG, "proxy.config.http.parent_proxy_routing_enable", RECD_INT, 
"0", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
-  ,
   {RECT_CONFIG, "proxy.config.http.parent_proxies", RECD_STRING, nullptr, 
RECU_DYNAMIC, RR_NULL, RECC_STR, ".*", RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.http.parent_proxy.file", RECD_STRING, 
"parent.config", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
diff --git a/proxy/ParentSelection.cc b/proxy/ParentSelection.cc
index c9527c6..d3d9bb0 100644
--- a/proxy/ParentSelection.cc
+++ b/proxy/ParentSelection.cc
@@ -45,7 +45,6 @@ static int self_detect                                       
= 2;
 static const char *file_var      = "proxy.config.http.parent_proxy.file";
 static const char *default_var   = "proxy.config.http.parent_proxies";
 static const char *retry_var     = "proxy.config.http.parent_proxy.retry_time";
-static const char *enable_var    = 
"proxy.config.http.parent_proxy_routing_enable";
 static const char *threshold_var = 
"proxy.config.http.parent_proxy.fail_threshold";
 
 static const char *ParentResultStr[] = {"PARENT_UNDEFINED", "PARENT_DIRECT", 
"PARENT_SPECIFIED", "PARENT_AGENT", "PARENT_FAIL"};
@@ -64,7 +63,6 @@ enum ParentCB_t {
 
 ParentSelectionPolicy::ParentSelectionPolicy()
 {
-  bool enable            = false;
   int32_t retry_time     = 0;
   int32_t fail_threshold = 0;
 
@@ -72,10 +70,6 @@ ParentSelectionPolicy::ParentSelectionPolicy()
   REC_ReadConfigInteger(retry_time, retry_var);
   ParentRetryTime = retry_time;
 
-  // Handle parent enable
-  REC_ReadConfigInteger(enable, enable_var);
-  ParentEnable = enable;
-
   // Handle the fail threshold
   REC_ReadConfigInteger(fail_threshold, threshold_var);
   FailThreshold = fail_threshold;
@@ -116,12 +110,6 @@ ParentConfigParams::findParent(HttpRequestData *rdata, 
ParentResult *result, uns
   Debug("parent_select", "In ParentConfigParams::findParent(): parent_table: 
%p.", parent_table);
   ink_assert(result->result == PARENT_UNDEFINED);
 
-  // Check to see if we are enabled
-  Debug("parent_select", "policy.ParentEnable: %d", policy.ParentEnable);
-  if (policy.ParentEnable == 0) {
-    result->result = PARENT_DIRECT;
-    return;
-  }
   // Initialize the result structure
   result->reset();
 
@@ -269,9 +257,6 @@ ParentConfig::startup()
   parentConfigUpdate->attach(default_var);
   //   Retry time
   parentConfigUpdate->attach(retry_var);
-  //   Enable
-  parentConfigUpdate->attach(enable_var);
-
   //   Fail Threshold
   parentConfigUpdate->attach(threshold_var);
 }
@@ -308,7 +293,7 @@ ParentConfig::print()
   ParentConfigParams *params = ParentConfig::acquire();
 
   printf("Parent Selection Config\n");
-  printf("\tEnabled %d\tRetryTime %d\n", params->policy.ParentEnable, 
params->policy.ParentRetryTime);
+  printf("\tRetryTime %d\n", params->policy.ParentRetryTime);
   if (params->DefaultParent == nullptr) {
     printf("\tNo Default Parent\n");
   } else {
@@ -931,10 +916,6 @@ SocksServerConfig::reconfigure()
   REC_ReadConfigInteger(retry_time, "proxy.config.socks.server_retry_time");
   params->policy.ParentRetryTime = retry_time;
 
-  // Handle parent enable
-  // enable is always true for use. We will come here only if socks is enabled
-  params->policy.ParentEnable = 1;
-
   // Handle the fail threshold
   REC_ReadConfigInteger(fail_threshold, 
"proxy.config.socks.server_fail_threshold");
   params->policy.FailThreshold = fail_threshold;
@@ -954,7 +935,7 @@ SocksServerConfig::print()
   ParentConfigParams *params = SocksServerConfig::acquire();
 
   printf("Parent Selection Config for Socks Server\n");
-  printf("\tEnabled %d\tRetryTime %d\n", params->policy.ParentEnable, 
params->policy.ParentRetryTime);
+  printf("\tRetryTime %d\n", params->policy.ParentRetryTime);
   if (params->DefaultParent == nullptr) {
     printf("\tNo Default Parent\n");
   } else {
@@ -1024,7 +1005,6 @@ EXCLUSIVE_REGRESSION_TEST(PARENTSELECTION)(RegressionTest 
* /* t ATS_UNUSED */,
     ParentTable->BuildTableFromString(tbl);                                    
                                            \
     RecSetRecordInt("proxy.config.http.parent_proxy.fail_threshold", 
fail_threshold, REC_SOURCE_DEFAULT);                  \
     RecSetRecordInt("proxy.config.http.parent_proxy.retry_time", retry_time, 
REC_SOURCE_DEFAULT);                          \
-    RecSetRecordInt("proxy.config.http.parent_proxy_routing_enable", 1, 
REC_SOURCE_DEFAULT);                               \
     params = new ParentConfigParams(ParentTable);                              
                                            \
   } while (0)
 
diff --git a/src/traffic_server/InkAPITest.cc b/src/traffic_server/InkAPITest.cc
index 09b31e0..9380890 100644
--- a/src/traffic_server/InkAPITest.cc
+++ b/src/traffic_server/InkAPITest.cc
@@ -7093,16 +7093,6 @@ struct ParentTest {
     this->magic      = MAGIC_ALIVE;
     this->configured = false;
     this->browser    = synclient_txn_create();
-
-    /* If parent proxy routing is not enabled, enable it for the life of the 
test. */
-    RecGetRecordBool("proxy.config.http.parent_proxy_routing_enable", 
&this->parent_proxy_routing_enable);
-    if (!this->parent_proxy_routing_enable) {
-      rprintf(this->regtest, "enabling 
proxy.config.http.parent_proxy_routing_enable\n");
-      RecSetRecordInt("proxy.config.http.parent_proxy_routing_enable", 1, 
REC_SOURCE_EXPLICIT);
-
-      // Force the config change to sync.
-      RecExecConfigUpdateCbs(REC_UPDATE_REQUIRED);
-    }
   }
 
   ~ParentTest()
@@ -7135,7 +7125,6 @@ struct ParentTest {
   ClientTxn *browser;
   TSEventFunc handler;
 
-  RecBool parent_proxy_routing_enable;
   unsigned int magic;
 };
 
@@ -7259,8 +7248,6 @@ parent_proxy_handler(TSCont contp, TSEvent event, void 
*edata)
 
     } else {
       // Otherwise the test completed so clean up.
-      RecSetRecordInt("proxy.config.http.parent_proxy_routing_enable", 
ptest->parent_proxy_routing_enable, REC_SOURCE_EXPLICIT);
-
       TSContDataSet(contp, nullptr);
       delete ptest;
     }
@@ -7282,7 +7269,6 @@ parent_proxy_handler(TSCont contp, TSEvent event, void 
*edata)
     if (status != REGRESSION_TEST_INPROGRESS) {
       int *pstatus = ptest->pstatus;
 
-      RecSetRecordInt("proxy.config.http.parent_proxy_routing_enable", 
ptest->parent_proxy_routing_enable, REC_SOURCE_EXPLICIT);
       TSContDataSet(contp, nullptr);
       delete ptest;
 

Reply via email to