[GitHub] incubator-trafficcontrol pull request #786: Fix TO ORT for missing Content-L...

2017-08-08 Thread mtorluemke
Github user mtorluemke commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/786#discussion_r131968364
  
--- Diff: traffic_ops/bin/traffic_ops_ort.pl ---
@@ -1623,9 +1623,7 @@ sub check_lwp_response_content_length {
my $url   = $lwp_response->request->uri;
 
if ( !defined($lwp_response->header('Content-Length')) ) {
-   ( $log_level >> $panic_level ) && print $log_level_str . " $url 
did not return a Content-Length header!\n";
-   exit;
-   return 1;
+   return 0; # Content-Length MAY be omitted per HTTP/1.1 RFC 
7230, and in fact MUST NOT be included with a 'Transfer-Encoding: Chunked' 
header, which MUST be accepted by clients.
--- End diff --

At one point in time, Traffic Ops was happily serving incomplete files 
(potential myriad of errors causing this), and ORT was happily writing them to 
disk, and telling ATS to apply this partial config. Most of the time, ATS would 
reject this partial config, as it was invalid, and keep running with the old 
config. At some point later, ATS would crash and be forced to load the config 
from disk, and would not start with this invalid config. So, this check was 
crucial in the stability of our overall CDN.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafficcontrol pull request #785: [TC-502] ORT now skips file chec...

2017-08-08 Thread mtorluemke
Github user mtorluemke commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/785#discussion_r131964778
  
--- Diff: traffic_ops/bin/traffic_ops_ort.pl ---
@@ -1266,15 +1266,19 @@ sub check_plugins {
( my @parts ) = split( /\@plugin\=/, $liner );
foreach my $i ( 1..$#parts ) {
( my $plugin_name, my $plugin_config_file ) = 
split( /\@pparam\=/, $parts[$i] );
-   if (defined( $plugin_config_file ) ) {
+   if (defined( $plugin_config_file ) ) {{
--- End diff --

potentially more clear if the braces for the new block are moved to 
separate lines (with indentation)...


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafficcontrol pull request #772: Fix Traffic Monitor to startup w...

2017-08-03 Thread mtorluemke
Github user mtorluemke commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/772#discussion_r131261159
  
--- Diff: traffic_monitor_golang/traffic_monitor/threadsafe/polledcaches.go 
---
@@ -103,11 +116,22 @@ func copyCaches(a map[enum.CacheName]struct{}) 
map[enum.CacheName]struct{} {
return b
 }
 
+func copyCachesTime(a map[enum.CacheName]time.Time) 
map[enum.CacheName]time.Time {
+   b := map[enum.CacheName]time.Time{}
+   for k, v := range a {
+   b[k] = v
+   }
+   return b
+}
+
+const PolledBytesPerSecTimeout = time.Second * 60
--- End diff --

"Trouble communicating with a cache" should, by itself, mark the cache as 
unhealthy.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafficcontrol pull request #772: Fix Traffic Monitor to startup w...

2017-08-03 Thread mtorluemke
Github user mtorluemke commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/772#discussion_r131169393
  
--- Diff: traffic_monitor_golang/traffic_monitor/threadsafe/polledcaches.go 
---
@@ -103,11 +116,22 @@ func copyCaches(a map[enum.CacheName]struct{}) 
map[enum.CacheName]struct{} {
return b
 }
 
+func copyCachesTime(a map[enum.CacheName]time.Time) 
map[enum.CacheName]time.Time {
+   b := map[enum.CacheName]time.Time{}
+   for k, v := range a {
+   b[k] = v
+   }
+   return b
+}
+
+const PolledBytesPerSecTimeout = time.Second * 60
--- End diff --

Good concept -- I would pick something closer to 10 seconds, though.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafficcontrol pull request #552: [TC-272] Remove ccr and steering...

2017-05-08 Thread mtorluemke
Github user mtorluemke commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/552#discussion_r115272927
  
--- Diff: traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm ---
@@ -1470,6 +1473,9 @@ sub ssl_multicert_dot_config {
 
#first one is the one we want
my $hostname = $example_urls[0];
+   if ( $hostname =~ /ccr/ ) {
--- End diff --

default string for open source builds is 'tr'


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafficcontrol issue #423: move server scope files to cdn scope fo...

2017-04-04 Thread mtorluemke
Github user mtorluemke commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/423
  
Looks good to me.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafficcontrol pull request #416: skip regex_revalidate, parent ch...

2017-03-31 Thread mtorluemke
Github user mtorluemke commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/416#discussion_r109228127
  
--- Diff: traffic_ops/bin/traffic_ops_ort.pl ---
@@ -1770,6 +1735,11 @@ sub get_cfg_file_list {
}
}
else {
+   printf( "INFO Reval in use status: $reval_in_use \n" );
+   if ( $reval_in_use == 1 ) {
+   printf( "INFO Instant Invalidate is in use.  Skipping 
regex_revalidate.config. \n" );
--- End diff --

Wrap these in the log_level jazz..


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafficcontrol pull request #299: WIP - Instant Invalidate

2017-02-23 Thread mtorluemke
Github user mtorluemke commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/299#discussion_r102822502
  
--- Diff: traffic_ops/app/lib/UI/Server.pm ---
@@ -977,7 +1017,16 @@ sub postupdate {
 
my $update_server =
$self->db->resultset('Server')->search( { id => $serverid } );
-   if ( defined $updated ) {
+
+   my $use_reval_pending = $self->db->resultset('Parameter')->search( { 
-and => [ 'name' => 'use_reval_pending', 'config_file' => 'global' ] } 
)->get_column('value')->single;
+
+   if ( defined($use_reval_pending) && $use_reval_pending == 1 ) {
+   print STDERR "updating upd_pending and reval_pending\n";
--- End diff --

Here too..


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafficcontrol pull request #299: WIP - Instant Invalidate

2017-02-23 Thread mtorluemke
Github user mtorluemke commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/299#discussion_r102822448
  
--- Diff: traffic_ops/app/lib/UI/Server.pm ---
@@ -949,7 +985,11 @@ sub postupdate {
 
my $self  = shift;
my $updated   = $self->param("updated");
+   my $reval_updated = $self->param("reval_updated");
my $host_name = $self->param("host_name");
+   print STDERR Dumper($updated);
--- End diff --

Should take these out, yea?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafficcontrol issue #157: [TC-84] compiles goose from source; ins...

2017-01-04 Thread mtorluemke
Github user mtorluemke commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/157
  
Yeah, 715 files and almost 390k lines seems excessive. On the other hand, 
"go get" requires more babysitting over time. Feels like we should choose 
either of the two evils in the short-term, and add a longer-term item to 
revisit our schema migration strategy.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---