dg4prez commented on a change in pull request #1898: prevents parent.config 
failure when no delivery services assinged
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/1898#discussion_r170095508
 
 

 ##########
 File path: traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm
 ##########
 @@ -2465,40 +2465,43 @@ sub parent_dot_config { #fix qstring - should be 
ignore for quika
                if ( !defined($data) ) {
                        $data = $self->parent_ds_data($server_obj);
                }
-               foreach my $ds ( sort @{ $data->{dslist} } ) {
-                       my $text;
-                       my $org = $ds->{org};
-                       next if !defined $org || $org eq "";
-                       next if $done{$org};
-                       my $org_uri = URI->new($org);
-                       if ( $ds->{type} eq "HTTP_NO_CACHE" || $ds->{type} eq 
"HTTP_LIVE" || $ds->{type} eq "DNS_LIVE" ) {
-                               $text .= "dest_domain=" . $org_uri->host . " 
port=" . $org_uri->port . " go_direct=true\n";
-                       }
-                       else {
-                               # check for profile psel.qstring_handling.  If 
this parameter is assigned to the server profile,
-                               # then edges will use the qstring handling 
value specified in the parameter for all profiles.
-
-                               # If there is no defined parameter in the 
profile, then check the delivery service profile.
-                               # If psel.qstring_handling exists in the DS 
profile, then we use that value for the specified DS only.
-                               # This is used only if not overridden by a 
server profile qstring handling parameter.
-                               my $ds_qsh = $qsh;
-                               if (!defined($qsh)) {
-                                       $ds_qsh = 
$ds->{'param'}->{'parent.config'}->{'psel.qstring_handling'};
-                               }
-                               my $parent_qstring = defined($ds_qsh) ? $ds_qsh 
: "ignore";
 
-                               if ( $ds->{qstring_ignore} == 0 && 
!defined($ds_qsh) ) {
-                                       $parent_qstring = "consider";
+               unless (!defined($data->{dslist})) {
 
 Review comment:
   Can't really argue with that.  Updated.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to