smalenfant closed pull request #813: [TC-353] Can't use CNAME hostname with 
"ccr" prefix
URL: https://github.com/apache/incubator-trafficcontrol/pull/813
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm 
b/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm
index e3a9c60e04..60611eff74 100644
--- a/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm
+++ b/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm
@@ -650,7 +650,7 @@ sub profile_ds_data {
                                my $re = $host_re;
                                $re =~ s/\\//g;
                                $re =~ s/\.\*//g;
-                               my $hname    = $ds_type =~ /^DNS/ ? "edge" : 
"ccr";
+                               my $hname    = $ds_type =~ /^DNS/ ? "edge" : 
"http_routing";
                                my $portstr  = ":" . "__SERVER_TCP_PORT__";
                                my $map_from = "http://"; . $hname . $re . 
$ds_domain . $portstr . "/";
                                if ( $protocol == HTTP ) {
@@ -772,7 +772,7 @@ sub cdn_ds_data {
                                my $re = $host_re;
                                $re =~ s/\\//g;
                                $re =~ s/\.\*//g;
-                               my $hname    = $ds_type =~ /^DNS/ ? "edge" : 
"ccr";
+                               my $hname    = $ds_type =~ /^DNS/ ? "edge" : 
"http_routing";
                                my $portstr  = ":" . "SERVER_TCP_PORT";
                                my $map_from = "http://"; . $hname . $re . 
$ds_domain . $portstr . "/";
                                if ( $protocol == HTTP ) {
@@ -901,9 +901,9 @@ sub ds_data {
                                my $re = $host_re;
                                $re =~ s/\\//g;
                                $re =~ s/\.\*//g;
-                               my $hname = $ds_type =~ /^DNS/ ? "edge" : "ccr";
+                               my $hname = $ds_type =~ /^DNS/ ? "edge" : 
"http_routing";
                                my $portstr = "";
-                               if ( $hname eq "ccr" && $server_obj->tcp_port > 
0 && $server_obj->tcp_port != 80 ) {
+                               if ( $hname eq "http_routing" && 
$server_obj->tcp_port > 0 && $server_obj->tcp_port != 80 ) {
                                        $portstr = ":" . $server_obj->tcp_port;
                                }
                                my $map_from = "http://"; . $hname . $re . 
$ds_domain . $portstr . "/";
@@ -1133,9 +1133,9 @@ sub remap_ds_data {
                                        my $re = $host_re;
                                        $re =~ s/\\//g;
                                        $re =~ s/\.\*//g;
-                                       my $hname = $ds_type =~ /^DNS/ ? "edge" 
: "ccr";
+                                       my $hname = $ds_type =~ /^DNS/ ? "edge" 
: "http_routing";
                                        my $portstr = "";
-                                       if ( $hname eq "ccr" && 
$server_obj->tcp_port > 0 && $server_obj->tcp_port != 80 ) {
+                                       if ( $hname eq "http_routing" && 
$server_obj->tcp_port > 0 && $server_obj->tcp_port != 80 ) {
                                                $portstr = ":" . 
$server_obj->tcp_port;
                                        }
                                        my $map_from = "http://"; . $hname . $re 
. $ds_domain . $portstr . "/";
@@ -2479,7 +2479,7 @@ sub build_remap_line {
        my $dscp      = $remap->{dscp};
        my $hostname  = $server_obj->host_name;
 
-       $map_from =~ s/ccr/$hostname/;
+       $map_from =~ s/http_routing/$hostname/;
 
        if ( defined( $pdata->{'dscp_remap'} ) ) {
                $text .= "map   " . $map_from . "     " . $map_to . " 
\@plugin=dscp_remap.so \@pparam=" . $dscp;
diff --git a/traffic_ops/app/lib/UI/ConfigFiles.pm 
b/traffic_ops/app/lib/UI/ConfigFiles.pm
index ac59d95434..e52f92c9e3 100644
--- a/traffic_ops/app/lib/UI/ConfigFiles.pm
+++ b/traffic_ops/app/lib/UI/ConfigFiles.pm
@@ -219,9 +219,9 @@ sub ds_data {
                                my $re = $host_re;
                                $re =~ s/\\//g;
                                $re =~ s/\.\*//g;
-                               my $hname = $ds_type =~ /^DNS/ ? "edge" : "ccr";
+                               my $hname = $ds_type =~ /^DNS/ ? "edge" : 
"http_routing";
                                my $portstr = "";
-                               if ( $hname eq "ccr" && $server->tcp_port > 0 
&& $server->tcp_port != 80 ) {
+                               if ( $hname eq "http_routing" && 
$server->tcp_port > 0 && $server->tcp_port != 80 ) {
                                        $portstr = ":" . $server->tcp_port;
                                }
                                my $map_from = "http://"; . $hname . $re . 
$ds_domain . $portstr . "/";
@@ -1017,7 +1017,7 @@ sub build_remap_line {
        my $host_name = $data->{host_name};
        my $dscp      = $remap->{dscp};
 
-       $map_from =~ s/ccr/$host_name/;
+       $map_from =~ s/http_routing/$host_name/;
 
        if ( defined( $pdata->{'dscp_remap'} ) ) {
                $text .= "map   " . $map_from . "     " . $map_to . " 
\@plugin=dscp_remap.so \@pparam=" . $dscp;


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to