limited closed pull request #1942: ORT update for fq_pacing plugin prereqs
URL: https://github.com/apache/trafficcontrol/pull/1942
 
 
   

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/bin/traffic_ops_ort.pl 
b/traffic_ops/bin/traffic_ops_ort.pl
index 2ba600679..0b6d51b71 100755
--- a/traffic_ops/bin/traffic_ops_ort.pl
+++ b/traffic_ops/bin/traffic_ops_ort.pl
@@ -407,6 +407,9 @@ sub process_cfg_file {
        elsif ( $cfg_file eq "ssl_multicert.config" ) {
                &adv_processing_ssl( \@db_file_lines );
        }
+        elsif ( $cfg_file eq "remap.config") {
+                &adv_processing_remap( \@db_file_lines );
+        }
 
        ( $log_level >> $INFO )
                && print "INFO: ======== End processing config file: $cfg_file 
for service: " . $cfg_file_tracker->{$cfg_file}->{'service'} . " ========\n";
@@ -2959,6 +2962,29 @@ sub adv_processing_ssl {
        return 0;
 }
 
+
+# If fast_revalidation plugin is enabled, check that sysctl
+# net.core.default_qdisc is set to "fq" or exit.
+sub adv_processing_remap {
+
+       my @db_file_lines = @{ $_[0] };
+
+       ( $log_level >> $DEBUG ) && print "DEBUG Entering advanced processing 
for remap.config\n";
+       foreach my $remap_line (@db_file_lines) {
+           if ( $remap_line =~ /^map.*\@plugin=fq_pacing\.so/) {
+               my $default_qdisc = `sysctl -n net.core.default_qdisc`;
+               chomp($default_qdisc);
+               if ( $default_qdisc eq "fq" ){
+                   return 0;
+               } else {
+                   ( $log_level >> $FATAL ) && print "FQ Pacing plugin 
enabled, set 'net.core.default_qdisc=fq' in /etc/sysctl.conf and REBOOT! 
Exiting\n";
+                   exit 1;
+               }
+           }
+       }
+       return 0;
+}
+
 sub setup_lwp {
        my $browser = LWP::UserAgent->new( keep_alive => 100, ssl_opts => { 
verify_hostname => 0, SSL_verify_mode => 0x00 } );
 


 

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