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 2010/12/20 05:32:20 UTC
svn commit: r1050984 - in /trafficserver/traffic/trunk:
contrib/perl/AdminClient/lib/Apache/TS/ proxy/http2/ proxy/mgmt2/
Author: zwoop
Date: Mon Dec 20 04:32:20 2010
New Revision: 1050984
URL: http://svn.apache.org/viewvc?rev=1050984&view=rev
Log:
TS-601 Eliminate old traffic_net configurations
Modified:
trafficserver/traffic/trunk/contrib/perl/AdminClient/lib/Apache/TS/AdminClient.pm
trafficserver/traffic/trunk/proxy/http2/HttpBodyFactory.cc
trafficserver/traffic/trunk/proxy/http2/HttpConfig.cc
trafficserver/traffic/trunk/proxy/http2/HttpConfig.h
trafficserver/traffic/trunk/proxy/http2/HttpSM.cc
trafficserver/traffic/trunk/proxy/http2/HttpTransact.cc
trafficserver/traffic/trunk/proxy/http2/HttpTransact.h
trafficserver/traffic/trunk/proxy/mgmt2/Main.cc
trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.cc
Modified: trafficserver/traffic/trunk/contrib/perl/AdminClient/lib/Apache/TS/AdminClient.pm
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/contrib/perl/AdminClient/lib/Apache/TS/AdminClient.pm?rev=1050984&r1=1050983&r2=1050984&view=diff
==============================================================================
--- trafficserver/traffic/trunk/contrib/perl/AdminClient/lib/Apache/TS/AdminClient.pm (original)
+++ trafficserver/traffic/trunk/contrib/perl/AdminClient/lib/Apache/TS/AdminClient.pm Mon Dec 20 04:32:20 2010
@@ -663,14 +663,6 @@ The Apache Traffic Server Administration
proxy.config.system.mmap_max
proxy.config.temp_dir
proxy.config.thread.default.stacksize
- proxy.config.traffic_net.traffic_net_encryption
- proxy.config.traffic_net.traffic_net_frequency
- proxy.config.traffic_net.traffic_net_lid
- proxy.config.traffic_net.traffic_net_mode
- proxy.config.traffic_net.traffic_net_path
- proxy.config.traffic_net.traffic_net_port
- proxy.config.traffic_net.traffic_net_server
- proxy.config.traffic_net.traffic_net_uid
proxy.config.udp.free_cancelled_pkts_sec
proxy.config.udp.periodic_cleanup
proxy.config.udp.send_retries
Modified: trafficserver/traffic/trunk/proxy/http2/HttpBodyFactory.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/HttpBodyFactory.cc?rev=1050984&r1=1050983&r2=1050984&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/HttpBodyFactory.cc (original)
+++ trafficserver/traffic/trunk/proxy/http2/HttpBodyFactory.cc Mon Dec 20 04:32:20 2010
@@ -84,7 +84,7 @@ HttpBodyFactory::fabricate_with_old_api(
///////////////////////////////////////////////////////////////////
// if logging turned on, buffer up the URL string for simplicity //
///////////////////////////////////////////////////////////////////
- if (enable_logging && !context->traffic_net_req) {
+ if (enable_logging) {
url[0] = '\0';
URL *u = context->hdr_info.client_request.url_get();
@@ -102,7 +102,7 @@ HttpBodyFactory::fabricate_with_old_api(
// if suppressing this response, return NULL //
///////////////////////////////////////////////
if (is_response_suppressed(context)) {
- if (enable_logging && !context->traffic_net_req) {
+ if (enable_logging) {
Log::error("BODY_FACTORY: suppressing '%s' response for url '%s'", type, url);
}
unlock();
@@ -151,7 +151,7 @@ HttpBodyFactory::fabricate_with_old_api(
// enforce the max buffer length //
///////////////////////////////////
if (buffer && (*resulting_buffer_length > max_buffer_length)) {
- if (enable_logging && !context->traffic_net_req) {
+ if (enable_logging) {
Log::error(("BODY_FACTORY: template '%s/%s' consumed %d bytes, "
"exceeding %d byte limit, using internal default"),
set, type, *resulting_buffer_length, max_buffer_length);
@@ -164,37 +164,31 @@ HttpBodyFactory::fabricate_with_old_api(
// generate the content language and content type return values //
/////////////////////////////////////////////////////////////////////
- if (buffer) // got an instantiated template
- {
+ if (buffer) { // got an instantiated template
if (!plain_flag) {
snprintf(content_language_out_buf, content_language_buf_size, "%s", lang_ptr);
snprintf(content_type_out_buf, content_type_buf_size, "text/html; charset=%s", charset_ptr);
}
- if (enable_logging && !context->traffic_net_req) {
- if (found_requested_template) // got exact template
- {
+ if (enable_logging) {
+ if (found_requested_template) { // got exact template
Log::error(("BODY_FACTORY: using custom template "
"'%s/%s' for url '%s' (language '%s', charset '%s')"), set, type, url, lang_ptr, charset_ptr);
- } else // got default template
- {
+ } else { // got default template
Log::error(("BODY_FACTORY: can't find custom template "
"'%s/%s', using '%s/%s' for url '%s' (language '%s', charset '%s')"),
set, type, set, "default", url, lang_ptr, charset_ptr);
}
}
- } else // no template, using old style body
- {
+ } else { // no template, using old style body
buffer = HttpMessageBody::MakeErrorBodyVA(max_buffer_length, resulting_buffer_length,
context->http_config_param, status_code, reason_or_null, format, ap);
- if (enable_logging && !context->traffic_net_req) {
- if (enable_customizations) // we wanted a template
- {
+ if (enable_logging) {
+ if (enable_customizations) { // we wanted a template
Log::error(("BODY_FACTORY: customization enabled "
"but can't find templates '%s' or '%s', using hardcoded default body for url '%s'"),
type, "default", url);
- } else // we wanted an old-style body
- {
+ } else { // we wanted an old-style body
Log::error(("BODY_FACTORY: using hardcoded default '%s' body for url '%s'"), type, url);
}
}
Modified: trafficserver/traffic/trunk/proxy/http2/HttpConfig.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/HttpConfig.cc?rev=1050984&r1=1050983&r2=1050984&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/HttpConfig.cc (original)
+++ trafficserver/traffic/trunk/proxy/http2/HttpConfig.cc Mon Dec 20 04:32:20 2010
@@ -1353,26 +1353,6 @@ HttpConfig::startup()
HttpEstablishStaticConfigLongLong(c.record_tcp_mem_hit, "proxy.config.http.record_tcp_mem_hit");
- // Traffic Net configs
- HttpEstablishStaticConfigLongLong(c.tn_frequency, "proxy.config.traffic_net.traffic_net_frequency");
-
- HttpEstablishStaticConfigLongLong(c.tn_mode, "proxy.config.traffic_net.traffic_net_mode");
-
- HttpEstablishStaticConfigStringAlloc(c.tn_uid, "proxy.config.traffic_net.traffic_net_uid");
-
- HttpEstablishStaticConfigStringAlloc(c.tn_lid, "proxy.config.traffic_net.traffic_net_lid");
-
- HttpEstablishStaticConfigStringAlloc(c.tn_server, "proxy.config.traffic_net.traffic_net_server");
- c.tn_server_len = (c.tn_server ? strlen(c.tn_server) : 0);
-
- HttpEstablishStaticConfigLongLong(c.tn_port, "proxy.config.traffic_net.traffic_net_port");
-
- HttpEstablishStaticConfigStringAlloc(c.tn_path, "proxy.config.traffic_net.traffic_net_path");
-
- HttpEstablishStaticConfigLongLong(c.send_http11_requests, "proxy.config.http.send_http11_requests");
-
- HttpEstablishStaticConfigLongLong(c.doc_in_cache_skip_dns, "proxy.config.http.doc_in_cache_skip_dns");
-
if (!c.transparency_enabled) {
//By this time, we would have read Socks configuration.
c.transparency_enabled = netProcessor.socks_conf_stuff->accept_enabled;
@@ -1530,17 +1510,7 @@ HttpConfig::reconfigure()
params->parent_proxy_routing_enable = INT_TO_BOOL(m_master.parent_proxy_routing_enable);
- // Traffic Net
- params->tn_frequency = m_master.tn_frequency;
- params->tn_mode = m_master.tn_mode;
- params->tn_lid = xstrdup(m_master.tn_lid);
- params->tn_uid = xstrdup(m_master.tn_uid);
- params->tn_server = xstrdup(m_master.tn_server);
- params->tn_server_len = m_master.tn_server_len;
- params->tn_port = m_master.tn_port;
- params->tn_path = xstrdup(m_master.tn_path);
-
- params->fwd_proxy_auth_to_parent = 0;
+ params->fwd_proxy_auth_to_parent = 0;
params->enable_url_expandomatic = INT_TO_BOOL(m_master.enable_url_expandomatic);
@@ -1548,11 +1518,9 @@ HttpConfig::reconfigure()
params->insert_response_via_string = INT_TO_BOOL(m_master.insert_response_via_string);
params->verbose_via_string = m_master.verbose_via_string;
params->proxy_request_via_string = xstrdup(m_master.proxy_request_via_string);
- params->proxy_request_via_string_len =
- (params->proxy_request_via_string) ? (strlen(params->proxy_request_via_string)) : (0);
+ params->proxy_request_via_string_len = (params->proxy_request_via_string) ? (strlen(params->proxy_request_via_string)) : (0);
params->proxy_response_via_string = xstrdup(m_master.proxy_response_via_string);
- params->proxy_response_via_string_len =
- (params->proxy_response_via_string) ? (strlen(params->proxy_response_via_string)) : (0);
+ params->proxy_response_via_string_len = (params->proxy_response_via_string) ? (strlen(params->proxy_response_via_string)) : (0);
params->wuts_enabled = INT_TO_BOOL(m_master.wuts_enabled);
params->log_spider_codes = INT_TO_BOOL(m_master.log_spider_codes);
@@ -1747,11 +1715,8 @@ HttpConfig::reconfigure()
params->number_of_redirections = m_master.number_of_redirections;
params->post_copy_size = m_master.post_copy_size;
-
m_id = configProcessor.set(m_id, params);
-
-
#undef INT_TO_BOOL
// Connection collapsing debug statements
Modified: trafficserver/traffic/trunk/proxy/http2/HttpConfig.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/HttpConfig.h?rev=1050984&r1=1050983&r2=1050984&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/HttpConfig.h (original)
+++ trafficserver/traffic/trunk/proxy/http2/HttpConfig.h Mon Dec 20 04:32:20 2010
@@ -693,18 +693,6 @@ public:
////////////////////////
MgmtInt record_tcp_mem_hit;
- //////////////////
- // Traffic Net //
- //////////////////
- MgmtInt tn_frequency;
- MgmtInt tn_mode;
- char *tn_uid;
- char *tn_lid;
- char *tn_server;
- int tn_server_len;
- MgmtInt tn_port;
- char *tn_path;
-
/////////////////////
// Error Reporting //
/////////////////////
@@ -1000,14 +988,6 @@ router_ip(0),
router_port(0),
record_cop_page(0),
record_tcp_mem_hit(0),
-tn_frequency(0),
-tn_mode(0),
-tn_uid(0),
-tn_lid(0),
-tn_server(0),
-tn_server_len(0),
-tn_port(0),
-tn_path(0),
errors_log_error_pages(0),
send_http11_requests(SEND_HTTP11_IF_REQUEST_11_AND_HOSTDB),
doc_in_cache_skip_dns(1), // Added for SKIPPING DNS If DOC IN CACHE
Modified: trafficserver/traffic/trunk/proxy/http2/HttpSM.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/HttpSM.cc?rev=1050984&r1=1050983&r2=1050984&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/HttpSM.cc (original)
+++ trafficserver/traffic/trunk/proxy/http2/HttpSM.cc Mon Dec 20 04:32:20 2010
@@ -1162,9 +1162,7 @@ HttpSM::state_request_wait_for_transform
// sending a request message body. Change the event
// to an error and fall through
event = VC_EVENT_ERROR;
- if (!t_state.traffic_net_req) {
- Log::error("Request transformation failed to set content length");
- }
+ Log::error("Request transformation failed to set content length");
}
// FALLTHROUGH
default:
@@ -4494,21 +4492,19 @@ void
HttpSM::mark_host_failure(HostDBInfo * info, time_t time_down)
{
if (info->app.http_data.last_failure == 0) {
- if (!t_state.traffic_net_req) {
- int url_len;
- char *url_str;
-
- URL *url = t_state.hdr_info.client_request.url_get();
- url_str = url->string_get(&t_state.arena, &url_len);
- Log::error("CONNECT: could not connect to %u.%u.%u.%u "
- "for '%s' (setting last failure time)",
- ((unsigned char *) &t_state.current.server->ip)[0],
- ((unsigned char *) &t_state.current.server->ip)[1],
- ((unsigned char *) &t_state.current.server->ip)[2],
- ((unsigned char *) &t_state.current.server->ip)[3], url_str);
- if (url_str)
- t_state.arena.str_free(url_str);
- }
+ int url_len;
+ char *url_str;
+
+ URL *url = t_state.hdr_info.client_request.url_get();
+ url_str = url->string_get(&t_state.arena, &url_len);
+ Log::error("CONNECT: could not connect to %u.%u.%u.%u "
+ "for '%s' (setting last failure time)",
+ ((unsigned char *) &t_state.current.server->ip)[0],
+ ((unsigned char *) &t_state.current.server->ip)[1],
+ ((unsigned char *) &t_state.current.server->ip)[2],
+ ((unsigned char *) &t_state.current.server->ip)[3], url_str);
+ if (url_str)
+ t_state.arena.str_free(url_str);
}
info->app.http_data.last_failure = time_down;
@@ -6153,11 +6149,7 @@ HttpSM::update_stats()
Debug("http_seq", "Skipping cop heartbeat logging & stats due to config");
return;
}
- // Do not log phone home requests.
- if (t_state.traffic_net_req) {
- Debug("http_seq", "Skipping traffic_net logging & stats");
- return;
- }
+
//////////////
// Log Data //
//////////////
Modified: trafficserver/traffic/trunk/proxy/http2/HttpTransact.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/HttpTransact.cc?rev=1050984&r1=1050983&r2=1050984&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/HttpTransact.cc (original)
+++ trafficserver/traffic/trunk/proxy/http2/HttpTransact.cc Mon Dec 20 04:32:20 2010
@@ -777,7 +777,6 @@ HttpTransact::StartRemapRequest(State *
URL *url = incoming_request->url_get();
int host_len, path_len;
const char *host = url->host_get(&host_len);
- int port = url->port_get();
const char *path = url->path_get(&path_len);
const char syntxt[] = "synthetic.txt";
@@ -785,11 +784,6 @@ HttpTransact::StartRemapRequest(State *
s->cop_test_page = (ptr_len_cmp(host, host_len, local_host_ip_str, sizeof(local_host_ip_str) - 1) == 0) &&
(ptr_len_cmp(path, path_len, syntxt, sizeof(syntxt) - 1) == 0);
- // Determine whether the incoming request is a Traffic Net request.
- s->traffic_net_req = (incoming_request->method_get_wksidx() == HTTP_WKSIDX_POST)
- && (ptr_len_cmp(host, host_len, s->http_config_param->tn_server, s->http_config_param->tn_server_len) == 0)
- && (port == s->http_config_param->tn_port);
-
//////////////////////////////////////////////////////////////////
// FIX: this logic seems awfully convoluted and hard to follow; //
// seems like we could come up with a more elegant and //
@@ -926,7 +920,7 @@ HttpTransact::EndRemapRequest(State * s)
}
s->reverse_proxy = false;
goto done;
- } else if (s->http_config_param->url_remap_required && !s->cop_test_page && !s->traffic_net_req) {
+ } else if (s->http_config_param->url_remap_required && !s->cop_test_page) {
///////////////////////////////////////////////////////
// the url mapping failed, but mappings are strictly //
// required (except for synthetic cop accesses), so //
@@ -1706,7 +1700,7 @@ HttpTransact::OSDNSLookup(State * s)
void
HttpTransact::StartAccessControl(State * s)
{
- //if (s->cop_test_page || s->traffic_net_req || (s->state_machine->authAdapter.disabled() == true)) {
+ //if (s->cop_test_page || (s->state_machine->authAdapter.disabled() == true)) {
// Heartbeats should always be allowed.
// s->content_control.access = ACCESS_ALLOW;
HandleRequestAuthorized(s);
@@ -3795,12 +3789,9 @@ HttpTransact::retry_server_connection_no
// on the first connect attempt failure //
// record the failue //
//////////////////////////////////////////
-
- if (!s->traffic_net_req) {
- Log::error("CONNECT:[%d] could not connect [%s] to %u.%u.%u.%u for '%s'", s->current.attempts,
- HttpDebugNames::get_server_state_name(conn_state),
- PRINT_IP(s->current.server->ip), url_string ? url_string : "<none>");
- }
+ Log::error("CONNECT:[%d] could not connect [%s] to %u.%u.%u.%u for '%s'", s->current.attempts,
+ HttpDebugNames::get_server_state_name(conn_state),
+ PRINT_IP(s->current.server->ip), url_string ? url_string : "<none>");
if (url_string) {
s->arena.str_free(url_string);
@@ -5594,9 +5585,7 @@ HttpTransact::handle_trace_and_options_r
} else { /* max-forwards != 0 */
if ((max_forwards <= 0) || (max_forwards > INT_MAX)) {
- if (!s->traffic_net_req) {
- Log::error("HTTP: snapping invalid max-forwards value %d to %d", max_forwards, INT_MAX);
- }
+ Log::error("HTTP: snapping invalid max-forwards value %d to %d", max_forwards, INT_MAX);
max_forwards = INT_MAX;
}
@@ -8336,14 +8325,12 @@ HttpTransact::build_error_response(State
}
if (s->http_config_param->errors_log_error_pages) {
- if (!s->traffic_net_req) {
- char ip_string[128];
- unsigned char *p = (unsigned char *) &(s->client_info.ip);
-
- snprintf(ip_string, sizeof(ip_string), "%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
- Log::error("RESPONSE: sent %s status %d (%s) for '%s'", ip_string, status_code, reason_phrase,
- (url_string ? url_string : "<none>"));
- }
+ char ip_string[128];
+ unsigned char *p = (unsigned char *) &(s->client_info.ip);
+
+ snprintf(ip_string, sizeof(ip_string), "%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
+ Log::error("RESPONSE: sent %s status %d (%s) for '%s'", ip_string, status_code, reason_phrase,
+ (url_string ? url_string : "<none>"));
}
if (url_string) {
Modified: trafficserver/traffic/trunk/proxy/http2/HttpTransact.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/HttpTransact.h?rev=1050984&r1=1050983&r2=1050984&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/HttpTransact.h (original)
+++ trafficserver/traffic/trunk/proxy/http2/HttpTransact.h Mon Dec 20 04:32:20 2010
@@ -951,7 +951,6 @@ public:
// FilterResult content_control;
bool backdoor_request; // internal
bool cop_test_page; // internal
- bool traffic_net_req; // internal
char *unmapped_request_url; // in
StateMachineAction_t next_action; // out
@@ -1085,7 +1084,6 @@ public:
cache_lookup_result(CACHE_LOOKUP_NONE),
backdoor_request(false),
cop_test_page(false),
- traffic_net_req(false),
unmapped_request_url(0),
next_action(STATE_MACHINE_ACTION_UNDEFINED),
api_next_action(STATE_MACHINE_ACTION_UNDEFINED),
Modified: trafficserver/traffic/trunk/proxy/mgmt2/Main.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/Main.cc?rev=1050984&r1=1050983&r2=1050984&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/Main.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/Main.cc Mon Dec 20 04:32:20 2010
@@ -54,10 +54,6 @@
// Needs LibRecordsConfigInit()
#include "RecordsConfig.h"
-#if defined(TRAFFIC_NET)
-#include "traffic_net/tn_Thread.h"
-#endif
-
#if defined(MGMT_API)
#include "TSControlMain.h"
#endif
@@ -864,15 +860,6 @@ main(int argc, char **argv)
webThrId = ink_thread_create(webIntr_main, NULL); /* Spin web agent thread */
lmgmt->listenForProxy();
-
-#if defined(TRAFFIC_NET)
- // Traffic Net Thread
- ink_thread tnThrId;
- tnThrId = ink_thread_create(tn_mgmt_main, NULL); /* Spin Traffic Net thread */
- mgmt_log("[TrafficManager] Traffic Net thread created\n");
-#endif
-
-
/* Check the permissions on vip_config */
if (lmgmt->virt_map->enabled) {
char absolute_vipconf_binary[1024];
Modified: trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.cc?rev=1050984&r1=1050983&r2=1050984&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.cc Mon Dec 20 04:32:20 2010
@@ -392,28 +392,6 @@ RecordElement RecordsConfig[] = {
//##############################################################################
//#
- //# Traffic Net
- //#
- //##############################################################################
- {RECT_CONFIG, "proxy.config.traffic_net.traffic_net_mode", RECD_INT, "3", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-3]", RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.traffic_net.traffic_net_frequency", RECD_INT, "86400", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.traffic_net.traffic_net_uid", RECD_STRING, NULL, RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.traffic_net.traffic_net_lid", RECD_STRING, NULL, RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.traffic_net.traffic_net_server", RECD_STRING, "sm-linux-1.example.com", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.traffic_net.traffic_net_port", RECD_INT, "80", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.traffic_net.traffic_net_path", RECD_STRING, "/traffic-net", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.traffic_net.traffic_net_encryption", RECD_INT, "1", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
- ,
-
- //##############################################################################
- //#
//# Inktoswitch Configuration(NOT USED)
//#
//##############################################################################