mitchell852 commented on a change in pull request #2158: modifies ORT to 
correctly parse api 1.3 for revalidation.  
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2158#discussion_r184059460
 
 

 ##########
 File path: traffic_ops/bin/traffic_ops_ort.pl
 ##########
 @@ -783,6 +771,32 @@ sub get_print_current_client_connections {
        ( $log_level >> $DEBUG ) && print "DEBUG There are currently 
$current_connections connections.\n";
 }
 
+sub get_update_status {
+       my $uri     = "/api/1.3/servers/$hostname_short/update_status";
+       my $upd_ref = &lwp_get($uri);
+       if ($upd_ref eq '404') {
+               ( $log_level >> $ERROR ) && printf("ERROR ORT version 
incompatible with current version of Traffic Ops. Please upgrade to Traffic Ops 
2.2.\n");
+               exit 1;
+       }
+
+       if ( $upd_ref =~ m/^\d{3}$/ ) {
+               ( $log_level >> $ERROR ) && print "ERROR Update URL: $uri 
returned $upd_ref. Exiting, not sure what else to do.\n";
+               exit 1;
+       }
+
 
 Review comment:
   i 500 will get snagged here, no? so this looks right to me.

----------------------------------------------------------------
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