You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2018/12/12 20:54:25 UTC

[GitHub] ocket8888 commented on a change in pull request #3091: Fixed bad default parent.config line generation

ocket8888 commented on a change in pull request #3091: Fixed bad default parent.config line generation
URL: https://github.com/apache/trafficcontrol/pull/3091#discussion_r241181540
 
 

 ##########
 File path: traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm
 ##########
 @@ -2601,16 +2601,14 @@ sub parent_dot_config { #fix qstring - should be ignore for quika
 
 		my $default_dest_text;
 		my $parent_select_alg = $self->profile_param_value( $server_obj->profile->id, 'parent.config', 'algorithm', undef );
+		$default_dest_text .= "dest_domain=. ";
 		if ( defined($parent_select_alg) && $parent_select_alg eq 'consistent_hash' ) {
-			$default_dest_text .= "dest_domain=. ";
 			$default_dest_text .= $parents . $secparents;
-			$default_dest_text .= " round_robin=consistent_hash go_direct=false";
 		}
 		else {    # default to old situation.
-			$default_dest_text .= "dest_domain=. ";
 			$default_dest_text .= $parents;
-			$default_dest_text .= " round_robin=urlhash go_direct=false";
 		}
+		$default_dest_text .= " round_robin=consistent_hash go_direct=false";
 
 Review comment:
   Couldn't tell you. The original code appears to ignore the value of the parent selection algorithm entirely. It was just hard-coded to use `consistent_hash` whenever the algorithm was defined and the erroneous `urlhash` in all other cases.

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


With regards,
Apache Git Services