[jira] [Closed] (TC-415) traffic_ops unit test fails: api/1.1/deliveryservice/ssl_keys.t

2017-08-08 Thread Dan Kirkwood (JIRA)

 [ 
https://issues.apache.org/jira/browse/TC-415?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dan Kirkwood closed TC-415.
---
Resolution: Fixed

> traffic_ops unit test fails: api/1.1/deliveryservice/ssl_keys.t
> ---
>
> Key: TC-415
> URL: https://issues.apache.org/jira/browse/TC-415
> Project: Traffic Control
>  Issue Type: Bug
>  Components: Traffic Ops
>Affects Versions: 2.1.0
>Reporter: Dan Kirkwood
>  Labels: test
> Fix For: 2.1.0
>
>
> This test script is showing 2 failures:  api/1.1/deliveryservice/ssl_keys.t
> It's unknown when this started,  since unit tests haven't been watched for a 
> while.   Console log from Apache Jenkins (current build log is 
> https://builds.apache.org/view/S-Z/view/TrafficControl/job/incubator-trafficcontrol-traffic_ops-test/3/consoleFull)
>  shows the error: 
> {quote}
> unit_1  | writing RSA key
> unit_1  | Signature ok
> unit_1  | 
> subject=/C=US/ST=Colorado/L=Denver/O=KableTown/OU=CDN_Eng/CN=foober.com
> unit_1  | Getting Private key
> unit_1  | DBIx::Class::Storage::DBI::select_single(): Query returned more 
> than one row.  SQL that returns multiple rows is DEPRECATED for ->find and 
> ->single at /opt/traffic_ops/app/lib/API/DeliveryService/SslKeys.pm line 159
> unit_1  | Use of uninitialized value $host_regex in concatenation (.) or 
> string at /opt/traffic_ops/app/lib/API/DeliveryService/SslKeys.pm line 151.
> unit_1  | Use of uninitialized value $cdn_id in string at 
> /opt/traffic_ops/app/lib/API/DeliveryService/SslKeys.pm line 159.
> db_1| ERROR:  invalid input syntax for integer: ""
> db_1| STATEMENT:  SELECT me.id, me.xml_id, me.active, me.dscp, me.signed, 
> me.qstring_ignore, me.geo_limit, me.http_bypass_fqdn, me.dns_bypass_ip, 
> me.dns_bypass_ip6, me.dns_bypass_ttl, me.org_server_fqdn, me.type, 
> me.profile, me.cdn_id, me.ccr_dns_ttl, me.global_max_mbps, me.global_max_tps, 
> me.long_desc, me.long_desc_1, me.long_desc_2, me.max_dns_answers, 
> me.info_url, me.miss_lat, me.miss_long, me.check_path, me.last_updated, 
> me.protocol, me.ssl_key_version, me.ipv6_routing_enabled, 
> me.range_request_handling, me.edge_header_rewrite, me.origin_shield, 
> me.mid_header_rewrite, me.regex_remap, me.cacheurl, me.remap_text, 
> me.multi_site_origin, me.display_name, me.tr_response_headers, 
> me.initial_dispersion, me.dns_bypass_cname, me.tr_request_headers, 
> me.regional_geo_blocking, me.geo_provider, me.geo_limit_countries, 
> me.logs_enabled, me.multi_site_origin_algorithm, me.geolimit_redirect_url, 
> me.tenant_id FROM deliveryservice me LEFT JOIN deliveryservice_regex 
> deliveryservice_regexes ON deliveryservice_regexes.deliveryservice = me.id 
> LEFT JOIN regex regex ON regex.id = deliveryservice_regexes.regex WHERE ( ( 
> cdn_id = $1 AND regex.pattern = $2 ) )
> unit_1  | Warning: Log message argument #1 undefined at 
> /opt/traffic_ops/app/local/lib/perl5/Mojolicious.pm line 199.
> unit_1  | Use of uninitialized value in join or string at 
> /opt/traffic_ops/app/local/lib/perl5/Log/Log4perl/Appender.pm line 182.
> unit_1  | 
> unit_1  | #   Failed test '400 Bad Request'
> unit_1  | #   at /opt/traffic_ops/app/t/api/1.1/deliveryservice/ssl_keys.t 
> line 208.
> unit_1  | #  got: '500'
> unit_1  | # expected: '400'
> unit_1  | Use of uninitialized value $cdn_id in string at 
> /opt/traffic_ops/app/lib/API/DeliveryService/SslKeys.pm line 159.
> db_1| ERROR:  invalid input syntax for integer: ""
> db_1| STATEMENT:  SELECT me.id, me.xml_id, me.active, me.dscp, me.signed, 
> me.qstring_ignore, me.geo_limit, me.http_bypass_fqdn, me.dns_bypass_ip, 
> me.dns_bypass_ip6, me.dns_bypass_ttl, me.org_server_fqdn, me.type, 
> me.profile, me.cdn_id, me.ccr_dns_ttl, me.global_max_mbps, me.global_max_tps, 
> me.long_desc, me.long_desc_1, me.long_desc_2, me.max_dns_answers, 
> me.info_url, me.miss_lat, me.miss_long, me.check_path, me.last_updated, 
> me.protocol, me.ssl_key_version, me.ipv6_routing_enabled, 
> me.range_request_handling, me.edge_header_rewrite, me.origin_shield, 
> me.mid_header_rewrite, me.regex_remap, me.cacheurl, me.remap_text, 
> me.multi_site_origin, me.display_name, me.tr_response_headers, 
> me.initial_dispersion, me.dns_bypass_cname, me.tr_request_headers, 
> me.regional_geo_blocking, me.geo_provider, me.geo_limit_countries, 
> me.logs_enabled, me.multi_site_origin_algorithm, me.geolimit_redirect_url, 
> me.tenant_id FROM deliveryservice me LEFT JOIN deliveryservice_regex 
> deliveryservice_regexes ON deliveryservice_regexes.deliveryservice = me.id 
> LEFT JOIN regex regex ON regex.id = deliveryservice_regexes.regex WHERE ( ( 
> cdn_id = $1 AND regex.pattern = $2 ) )
> unit_1  | Warning: Log message argument #1 undefined at 
> /opt/traffic_ops/app/local/lib/perl5/Mojolicious.pm line 199.
> unit_1  | Use 

[jira] [Commented] (TC-415) traffic_ops unit test fails: api/1.1/deliveryservice/ssl_keys.t

2017-08-08 Thread Dan Kirkwood (JIRA)

[ 
https://issues.apache.org/jira/browse/TC-415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16119387#comment-16119387
 ] 

Dan Kirkwood commented on TC-415:
-

fixed by https://github.com/apache/incubator-trafficcontrol/pull/737

> traffic_ops unit test fails: api/1.1/deliveryservice/ssl_keys.t
> ---
>
> Key: TC-415
> URL: https://issues.apache.org/jira/browse/TC-415
> Project: Traffic Control
>  Issue Type: Bug
>  Components: Traffic Ops
>Affects Versions: 2.1.0
>Reporter: Dan Kirkwood
>  Labels: test
> Fix For: 2.1.0
>
>
> This test script is showing 2 failures:  api/1.1/deliveryservice/ssl_keys.t
> It's unknown when this started,  since unit tests haven't been watched for a 
> while.   Console log from Apache Jenkins (current build log is 
> https://builds.apache.org/view/S-Z/view/TrafficControl/job/incubator-trafficcontrol-traffic_ops-test/3/consoleFull)
>  shows the error: 
> {quote}
> unit_1  | writing RSA key
> unit_1  | Signature ok
> unit_1  | 
> subject=/C=US/ST=Colorado/L=Denver/O=KableTown/OU=CDN_Eng/CN=foober.com
> unit_1  | Getting Private key
> unit_1  | DBIx::Class::Storage::DBI::select_single(): Query returned more 
> than one row.  SQL that returns multiple rows is DEPRECATED for ->find and 
> ->single at /opt/traffic_ops/app/lib/API/DeliveryService/SslKeys.pm line 159
> unit_1  | Use of uninitialized value $host_regex in concatenation (.) or 
> string at /opt/traffic_ops/app/lib/API/DeliveryService/SslKeys.pm line 151.
> unit_1  | Use of uninitialized value $cdn_id in string at 
> /opt/traffic_ops/app/lib/API/DeliveryService/SslKeys.pm line 159.
> db_1| ERROR:  invalid input syntax for integer: ""
> db_1| STATEMENT:  SELECT me.id, me.xml_id, me.active, me.dscp, me.signed, 
> me.qstring_ignore, me.geo_limit, me.http_bypass_fqdn, me.dns_bypass_ip, 
> me.dns_bypass_ip6, me.dns_bypass_ttl, me.org_server_fqdn, me.type, 
> me.profile, me.cdn_id, me.ccr_dns_ttl, me.global_max_mbps, me.global_max_tps, 
> me.long_desc, me.long_desc_1, me.long_desc_2, me.max_dns_answers, 
> me.info_url, me.miss_lat, me.miss_long, me.check_path, me.last_updated, 
> me.protocol, me.ssl_key_version, me.ipv6_routing_enabled, 
> me.range_request_handling, me.edge_header_rewrite, me.origin_shield, 
> me.mid_header_rewrite, me.regex_remap, me.cacheurl, me.remap_text, 
> me.multi_site_origin, me.display_name, me.tr_response_headers, 
> me.initial_dispersion, me.dns_bypass_cname, me.tr_request_headers, 
> me.regional_geo_blocking, me.geo_provider, me.geo_limit_countries, 
> me.logs_enabled, me.multi_site_origin_algorithm, me.geolimit_redirect_url, 
> me.tenant_id FROM deliveryservice me LEFT JOIN deliveryservice_regex 
> deliveryservice_regexes ON deliveryservice_regexes.deliveryservice = me.id 
> LEFT JOIN regex regex ON regex.id = deliveryservice_regexes.regex WHERE ( ( 
> cdn_id = $1 AND regex.pattern = $2 ) )
> unit_1  | Warning: Log message argument #1 undefined at 
> /opt/traffic_ops/app/local/lib/perl5/Mojolicious.pm line 199.
> unit_1  | Use of uninitialized value in join or string at 
> /opt/traffic_ops/app/local/lib/perl5/Log/Log4perl/Appender.pm line 182.
> unit_1  | 
> unit_1  | #   Failed test '400 Bad Request'
> unit_1  | #   at /opt/traffic_ops/app/t/api/1.1/deliveryservice/ssl_keys.t 
> line 208.
> unit_1  | #  got: '500'
> unit_1  | # expected: '400'
> unit_1  | Use of uninitialized value $cdn_id in string at 
> /opt/traffic_ops/app/lib/API/DeliveryService/SslKeys.pm line 159.
> db_1| ERROR:  invalid input syntax for integer: ""
> db_1| STATEMENT:  SELECT me.id, me.xml_id, me.active, me.dscp, me.signed, 
> me.qstring_ignore, me.geo_limit, me.http_bypass_fqdn, me.dns_bypass_ip, 
> me.dns_bypass_ip6, me.dns_bypass_ttl, me.org_server_fqdn, me.type, 
> me.profile, me.cdn_id, me.ccr_dns_ttl, me.global_max_mbps, me.global_max_tps, 
> me.long_desc, me.long_desc_1, me.long_desc_2, me.max_dns_answers, 
> me.info_url, me.miss_lat, me.miss_long, me.check_path, me.last_updated, 
> me.protocol, me.ssl_key_version, me.ipv6_routing_enabled, 
> me.range_request_handling, me.edge_header_rewrite, me.origin_shield, 
> me.mid_header_rewrite, me.regex_remap, me.cacheurl, me.remap_text, 
> me.multi_site_origin, me.display_name, me.tr_response_headers, 
> me.initial_dispersion, me.dns_bypass_cname, me.tr_request_headers, 
> me.regional_geo_blocking, me.geo_provider, me.geo_limit_countries, 
> me.logs_enabled, me.multi_site_origin_algorithm, me.geolimit_redirect_url, 
> me.tenant_id FROM deliveryservice me LEFT JOIN deliveryservice_regex 
> deliveryservice_regexes ON deliveryservice_regexes.deliveryservice = me.id 
> LEFT JOIN regex regex ON regex.id = deliveryservice_regexes.regex WHERE ( ( 
> cdn_id = $1 AND regex.pattern = $2 ) )
> unit_1  | Warning: Log message argument #1 

[GitHub] incubator-trafficcontrol issue #360: [TC-187] fix HTTPs bugs

2017-08-08 Thread asfgit
Github user asfgit commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/360
  

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/incubator-trafficcontrol-PR/26/



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


[jira] [Commented] (TC-187) Update delivery service makes SSL keys invalid

2017-08-08 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TC-187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16119297#comment-16119297
 ] 

ASF GitHub Bot commented on TC-187:
---

Github user asfgit commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/360
  

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/incubator-trafficcontrol-PR/26/



> Update delivery service makes SSL keys invalid
> --
>
> Key: TC-187
> URL: https://issues.apache.org/jira/browse/TC-187
> Project: Traffic Control
>  Issue Type: Bug
>  Components: Traffic Ops
>Reporter: Zhilin Huang
>Assignee: Zhilin Huang
>  Labels: ssl, xml-id
>
> Modify xml-id or subdomain in a https delivery service will make existing SSL 
> keys invalid.
> And there is problem to generate keys if using "http and https" together with 
> 1 host_regex, and 1 path_regex.
> BTW, the certificate returned by RESTful API is not consistent with that GUI.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TC-187) Update delivery service makes SSL keys invalid

2017-08-08 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TC-187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16119289#comment-16119289
 ] 

ASF GitHub Bot commented on TC-187:
---

Github user zhilhuan commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/360#discussion_r132073405
  
--- Diff: traffic_ops/app/lib/UI/DeliveryService.pm ---
@@ -846,8 +842,11 @@ sub update {
$hash{http_bypass_fqdn} = 
$self->param('ds.http_bypass_fqdn');
}
 
+   my $upd_ssl = 0;
#print Dumper( \%hash );
my $update = $self->db->resultset('Deliveryservice')->find( { 
id => $id } );
+   $upd_ssl = 1 if $update->xml_id ne $hash{xml_id};
--- End diff --

OK, will remove this line


> Update delivery service makes SSL keys invalid
> --
>
> Key: TC-187
> URL: https://issues.apache.org/jira/browse/TC-187
> Project: Traffic Control
>  Issue Type: Bug
>  Components: Traffic Ops
>Reporter: Zhilin Huang
>Assignee: Zhilin Huang
>  Labels: ssl, xml-id
>
> Modify xml-id or subdomain in a https delivery service will make existing SSL 
> keys invalid.
> And there is problem to generate keys if using "http and https" together with 
> 1 host_regex, and 1 path_regex.
> BTW, the certificate returned by RESTful API is not consistent with that GUI.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] incubator-trafficcontrol pull request #360: [TC-187] fix HTTPs bugs

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


https://github.com/apache/incubator-trafficcontrol/pull/360#discussion_r132073405
  
--- Diff: traffic_ops/app/lib/UI/DeliveryService.pm ---
@@ -846,8 +842,11 @@ sub update {
$hash{http_bypass_fqdn} = 
$self->param('ds.http_bypass_fqdn');
}
 
+   my $upd_ssl = 0;
#print Dumper( \%hash );
my $update = $self->db->resultset('Deliveryservice')->find( { 
id => $id } );
+   $upd_ssl = 1 if $update->xml_id ne $hash{xml_id};
--- End diff --

OK, will remove this line


---
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 #789: adds docs/ prefix to hrefs on versions;...

2017-08-08 Thread asfgit
Github user asfgit commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/789
  

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/incubator-trafficcontrol-PR/24/



---
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 #790: [CDN-240] build ui for managing ...

2017-08-08 Thread DylanVolz
GitHub user DylanVolz opened a pull request:

https://github.com/apache/incubator-trafficcontrol/pull/790

[CDN-240] build ui for managing url sig keys,

this also adds a view by id route for url sig keys
and adds auditing to the copy keys api route

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/DylanVolz/incubator-trafficcontrol 
url-sig-key-ui

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-trafficcontrol/pull/790.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #790


commit 28aeeb62adf09a97e2e9db59da978f9c33865e7f
Author: Dylan Volz 
Date:   2017-08-04T16:35:17Z

[CDN-240] build ui for managing url sig keys,
this also adds a view by id route for url sig keys
and adds auditing to the copy keys api route




---
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 #789: adds docs/ prefix to hrefs on ve...

2017-08-08 Thread dangogh
GitHub user dangogh opened a pull request:

https://github.com/apache/incubator-trafficcontrol/pull/789

adds docs/ prefix to hrefs on versions; use master for latest

previous PR got the links wrong..   This fixes that issue and uses the 
"master" dir for "latest"

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/dangogh/incubator-trafficcontrol 
updated-doc-links

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-trafficcontrol/pull/789.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #789


commit 9233f2c49b6dbee5e4e2ace5a12d988763a77a92
Author: Dan Kirkwood 
Date:   2017-08-08T22:51:21Z

adds docs/ prefix to hrefs on versions; use master for latest




---
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 #729: Traffic Ops Golang Incremental Rewrite ...

2017-08-08 Thread asfgit
Github user asfgit commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/729
  

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/incubator-trafficcontrol-PR/23/



---
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 #729: Traffic Ops Golang Incremental Rewrite ...

2017-08-08 Thread asfgit
Github user asfgit commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/729
  

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/incubator-trafficcontrol-PR/22/



---
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 #788: adds versions dropdown to docume...

2017-08-08 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-trafficcontrol/pull/788


---
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 #788: WIP - adds versions dropdown to ...

2017-08-08 Thread dangogh
GitHub user dangogh opened a pull request:

https://github.com/apache/incubator-trafficcontrol/pull/788

WIP - adds versions dropdown to documentation

still testing..   This adds version selection to documentation web pages

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/dangogh/incubator-trafficcontrol docs-versions

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-trafficcontrol/pull/788.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #788


commit 70ac7a181f28b6eb4960a070236fd17709d437b7
Author: Dan Kirkwood 
Date:   2017-08-08T21:28:01Z

adds versions dropdown to documentation




---
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 #729: Traffic Ops Golang Incremental Rewrite ...

2017-08-08 Thread dewrich
Github user dewrich commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/729
  
Test cases failed:
```
--- FAIL: TestGetCDNConf (0.00s)
perlconfig_test.go:84: expected {HTTPPort:443 DBUser: DBPass: DBServer: 
DBDB: DBSSL:false TOSecret:walrus TOURLStr:https://127.0.0.1:60443 
TOURL:https://127.0.0.1:60443 Insecure:false 
CertPath:/etc/pki/tls/certs/localhost.crt 
KeyPath:/etc/pki/tls/private/localhost.key MaxDBConnections:0 LogLocationError: 
LogLocationWarning: LogLocationInfo: LogLocationDebug: LogLocationEvent:} 
actual {HTTPPort:443 DBUser: DBPass: DBServer: DBDB: DBSSL:false 
TOSecret:walrus TOURLStr:https://127.0.0.1:60443 TOURL:https://127.0.0.1:60443 
Insecure:false CertPath:/etc/pki/tls/certs/localhost.crt 
KeyPath:/etc/pki/tls/private/localhost.key MaxDBConnections:50 
LogLocationError: LogLocationWarning: LogLocationInfo: LogLocationDebug: 
LogLocationEvent:}```


---
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 #729: Traffic Ops Golang Incremental Rewrite ...

2017-08-08 Thread dewrich
Github user dewrich commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/729
  
This Mojo HTTP Header is also coming back and I don't see it in the Golang 
HTTP header

`Connection: keep-alive`


---
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 #729: Traffic Ops Golang Incremental Rewrite ...

2017-08-08 Thread dewrich
Github user dewrich commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/729
  
Per our discussion: 

Mojo HTTP Header is sending this back when the Golang proxy does not.

`Cache-Control: no-cache, no-store, max-age=0, must-revalidate`


---
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 #729: Traffic Ops Golang Incremental Rewrite ...

2017-08-08 Thread dewrich
Github user dewrich commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/729
  
Just ran a JSON comparison tool against the Golang v. Perl response format 
and found that they are different.  Unfortunately, this can't change until we 
rev the API.

Golang
+   hashId: ""
+   hostName: ""
+   interfaceName: ""

Perl
-hashid: ""
-hostname: ""
-interfacename: ""


---
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 #785: [TC-502] ORT now skips file checks for ...

2017-08-08 Thread asfgit
Github user asfgit commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/785
  

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/incubator-trafficcontrol-PR/19/



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


[jira] [Commented] (TC-502) ORT fails to handle non-file arguments

2017-08-08 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TC-502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16118905#comment-16118905
 ] 

ASF GitHub Bot commented on TC-502:
---

Github user asfgit commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/785
  

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/incubator-trafficcontrol-PR/19/



> ORT fails to handle non-file arguments
> --
>
> Key: TC-502
> URL: https://issues.apache.org/jira/browse/TC-502
> Project: Traffic Control
>  Issue Type: Bug
>  Components: Traffic Ops ORT
>Reporter: Chris Lemmons
>
> ORT currently processes the parameters of all plugins on the remap.config 
> line as though they were files. However, parameters to `cachekey.config` are 
> parsed as parameters directly on the remap line. So, for example, if you have 
> a remap line that contains something like this:
> {{@plugin=cachekey.so @pparam=--remove-path=true}}
> That will cause ORT to attempt to load a config file named 
> {{--remove-path=true}}. ORT fails to accomplish this in several ways and 
> produces a variety of errors:
> DEBUG Starting processing of config file: --remove-path=true
> WARN --remove-path=true is being processed with an unknown service
> {code:none}
> INFO:  Start processing config file: --remove-path=true 
> Use of uninitialized value in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 2515.
> Use of uninitialized value $dir in -d at /opt/ort/traffic_ops_ort.pl line 645.
> Use of uninitialized value $dir in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 648.
> /bin/mkdir: missing operand
> Try '/bin/mkdir --help' for more information.
> Use of uninitialized value $dir in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 649.
> Use of uninitialized value $dir in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 653.
> Use of uninitialized value $dir in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 657.
> DEBUG Directory created: .
> Use of uninitialized value $result in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 2482.
> Use of uninitialized value $size in numeric eq (==) at 
> /opt/ort/traffic_ops_ort.pl line 2488.
> Use of uninitialized value $url in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 2489.
> ERROR URL:  returned empty!
> {code}
> ORT should probably skip "files" that start with {{-}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TC-502) ORT fails to handle non-file arguments

2017-08-08 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TC-502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16118906#comment-16118906
 ] 

ASF GitHub Bot commented on TC-502:
---

Github user asfgit commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/785
  

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/incubator-trafficcontrol-PR/20/



> ORT fails to handle non-file arguments
> --
>
> Key: TC-502
> URL: https://issues.apache.org/jira/browse/TC-502
> Project: Traffic Control
>  Issue Type: Bug
>  Components: Traffic Ops ORT
>Reporter: Chris Lemmons
>
> ORT currently processes the parameters of all plugins on the remap.config 
> line as though they were files. However, parameters to `cachekey.config` are 
> parsed as parameters directly on the remap line. So, for example, if you have 
> a remap line that contains something like this:
> {{@plugin=cachekey.so @pparam=--remove-path=true}}
> That will cause ORT to attempt to load a config file named 
> {{--remove-path=true}}. ORT fails to accomplish this in several ways and 
> produces a variety of errors:
> DEBUG Starting processing of config file: --remove-path=true
> WARN --remove-path=true is being processed with an unknown service
> {code:none}
> INFO:  Start processing config file: --remove-path=true 
> Use of uninitialized value in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 2515.
> Use of uninitialized value $dir in -d at /opt/ort/traffic_ops_ort.pl line 645.
> Use of uninitialized value $dir in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 648.
> /bin/mkdir: missing operand
> Try '/bin/mkdir --help' for more information.
> Use of uninitialized value $dir in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 649.
> Use of uninitialized value $dir in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 653.
> Use of uninitialized value $dir in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 657.
> DEBUG Directory created: .
> Use of uninitialized value $result in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 2482.
> Use of uninitialized value $size in numeric eq (==) at 
> /opt/ort/traffic_ops_ort.pl line 2488.
> Use of uninitialized value $url in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 2489.
> ERROR URL:  returned empty!
> {code}
> ORT should probably skip "files" that start with {{-}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] incubator-trafficcontrol issue #785: [TC-502] ORT now skips file checks for ...

2017-08-08 Thread asfgit
Github user asfgit commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/785
  

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/incubator-trafficcontrol-PR/20/



---
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 #787: TPv2 - adds unique query param v...

2017-08-08 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-trafficcontrol/pull/787


---
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 #787: TPv2 - adds unique query param value on...

2017-08-08 Thread asfgit
Github user asfgit commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/787
  

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/incubator-trafficcontrol-PR/18/



---
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 #787: TPv2 - adds unique query param value on...

2017-08-08 Thread asfgit
Github user asfgit commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/787
  

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/incubator-trafficcontrol-PR/17/



---
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 #787: TPv2 - adds unique query param v...

2017-08-08 Thread mitchell852
GitHub user mitchell852 opened a pull request:

https://github.com/apache/incubator-trafficcontrol/pull/787

TPv2 - adds unique query param value on build to force invalidation of 
assets



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/mitchell852/incubator-trafficcontrol 
tp-query-params-to-assets

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-trafficcontrol/pull/787.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #787


commit 498387f78bcde23a68aa08e61bbd95f4372d151b
Author: Jeremy Mitchell 
Date:   2017-08-08T18:03:08Z

adds unique query param value on build to force invalidation of TP assets




---
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 #785: [TC-502] ORT now skips file checks for ...

2017-08-08 Thread asfgit
Github user asfgit commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/785
  

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/incubator-trafficcontrol-PR/16/



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


[jira] [Commented] (TC-502) ORT fails to handle non-file arguments

2017-08-08 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TC-502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16118733#comment-16118733
 ] 

ASF GitHub Bot commented on TC-502:
---

Github user asfgit commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/785
  

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/incubator-trafficcontrol-PR/16/



> ORT fails to handle non-file arguments
> --
>
> Key: TC-502
> URL: https://issues.apache.org/jira/browse/TC-502
> Project: Traffic Control
>  Issue Type: Bug
>  Components: Traffic Ops ORT
>Reporter: Chris Lemmons
>
> ORT currently processes the parameters of all plugins on the remap.config 
> line as though they were files. However, parameters to `cachekey.config` are 
> parsed as parameters directly on the remap line. So, for example, if you have 
> a remap line that contains something like this:
> {{@plugin=cachekey.so @pparam=--remove-path=true}}
> That will cause ORT to attempt to load a config file named 
> {{--remove-path=true}}. ORT fails to accomplish this in several ways and 
> produces a variety of errors:
> DEBUG Starting processing of config file: --remove-path=true
> WARN --remove-path=true is being processed with an unknown service
> {code:none}
> INFO:  Start processing config file: --remove-path=true 
> Use of uninitialized value in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 2515.
> Use of uninitialized value $dir in -d at /opt/ort/traffic_ops_ort.pl line 645.
> Use of uninitialized value $dir in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 648.
> /bin/mkdir: missing operand
> Try '/bin/mkdir --help' for more information.
> Use of uninitialized value $dir in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 649.
> Use of uninitialized value $dir in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 653.
> Use of uninitialized value $dir in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 657.
> DEBUG Directory created: .
> Use of uninitialized value $result in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 2482.
> Use of uninitialized value $size in numeric eq (==) at 
> /opt/ort/traffic_ops_ort.pl line 2488.
> Use of uninitialized value $url in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 2489.
> ERROR URL:  returned empty!
> {code}
> ORT should probably skip "files" that start with {{-}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


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

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


https://github.com/apache/incubator-trafficcontrol/pull/786#discussion_r131973278
  
--- 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 --

Ah, `Content-MD5` was removed from HTTP/1.1 in 
https://tools.ietf.org/html/rfc7231#appendix-B . It's still legal to use, 
though, or we could use a custom `X-Content-MD5`.


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


[jira] [Commented] (TC-502) ORT fails to handle non-file arguments

2017-08-08 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TC-502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16118641#comment-16118641
 ] 

ASF GitHub Bot commented on TC-502:
---

Github user dangogh commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/785#discussion_r131972340
  
--- 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 --

looking again -- that block isn't necessary -- the `last` will exit the 
nearest enclosing loop,  which is the `foreach ... $#parts)`



> ORT fails to handle non-file arguments
> --
>
> Key: TC-502
> URL: https://issues.apache.org/jira/browse/TC-502
> Project: Traffic Control
>  Issue Type: Bug
>  Components: Traffic Ops ORT
>Reporter: Chris Lemmons
>
> ORT currently processes the parameters of all plugins on the remap.config 
> line as though they were files. However, parameters to `cachekey.config` are 
> parsed as parameters directly on the remap line. So, for example, if you have 
> a remap line that contains something like this:
> {{@plugin=cachekey.so @pparam=--remove-path=true}}
> That will cause ORT to attempt to load a config file named 
> {{--remove-path=true}}. ORT fails to accomplish this in several ways and 
> produces a variety of errors:
> DEBUG Starting processing of config file: --remove-path=true
> WARN --remove-path=true is being processed with an unknown service
> {code:none}
> INFO:  Start processing config file: --remove-path=true 
> Use of uninitialized value in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 2515.
> Use of uninitialized value $dir in -d at /opt/ort/traffic_ops_ort.pl line 645.
> Use of uninitialized value $dir in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 648.
> /bin/mkdir: missing operand
> Try '/bin/mkdir --help' for more information.
> Use of uninitialized value $dir in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 649.
> Use of uninitialized value $dir in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 653.
> Use of uninitialized value $dir in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 657.
> DEBUG Directory created: .
> Use of uninitialized value $result in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 2482.
> Use of uninitialized value $size in numeric eq (==) at 
> /opt/ort/traffic_ops_ort.pl line 2488.
> Use of uninitialized value $url in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 2489.
> ERROR URL:  returned empty!
> {code}
> ORT should probably skip "files" that start with {{-}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


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

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


https://github.com/apache/incubator-trafficcontrol/pull/785#discussion_r131972340
  
--- 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 --

looking again -- that block isn't necessary -- the `last` will exit the 
nearest enclosing loop,  which is the `foreach ... $#parts)`



---
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 #786: Fix TO ORT for missing Content-L...

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


https://github.com/apache/incubator-trafficcontrol/pull/786#discussion_r131970799
  
--- 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 --

If we still require that check. I don't think there's a way to be 
compliant, while still requiring an integrity check via `Content-Length`.

It looks like the proper way to do that is via a `Content-MD5` header: 
https://tools.ietf.org/html/rfc2616#section-14.15


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


[jira] [Commented] (TC-502) ORT fails to handle non-file arguments

2017-08-08 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TC-502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16118618#comment-16118618
 ] 

ASF GitHub Bot commented on TC-502:
---

Github user alficles commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/785#discussion_r131968755
  
--- 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 --

Do we have a standard perl indentation tool?


> ORT fails to handle non-file arguments
> --
>
> Key: TC-502
> URL: https://issues.apache.org/jira/browse/TC-502
> Project: Traffic Control
>  Issue Type: Bug
>  Components: Traffic Ops ORT
>Reporter: Chris Lemmons
>
> ORT currently processes the parameters of all plugins on the remap.config 
> line as though they were files. However, parameters to `cachekey.config` are 
> parsed as parameters directly on the remap line. So, for example, if you have 
> a remap line that contains something like this:
> {{@plugin=cachekey.so @pparam=--remove-path=true}}
> That will cause ORT to attempt to load a config file named 
> {{--remove-path=true}}. ORT fails to accomplish this in several ways and 
> produces a variety of errors:
> DEBUG Starting processing of config file: --remove-path=true
> WARN --remove-path=true is being processed with an unknown service
> {code:none}
> INFO:  Start processing config file: --remove-path=true 
> Use of uninitialized value in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 2515.
> Use of uninitialized value $dir in -d at /opt/ort/traffic_ops_ort.pl line 645.
> Use of uninitialized value $dir in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 648.
> /bin/mkdir: missing operand
> Try '/bin/mkdir --help' for more information.
> Use of uninitialized value $dir in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 649.
> Use of uninitialized value $dir in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 653.
> Use of uninitialized value $dir in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 657.
> DEBUG Directory created: .
> Use of uninitialized value $result in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 2482.
> Use of uninitialized value $size in numeric eq (==) at 
> /opt/ort/traffic_ops_ort.pl line 2488.
> Use of uninitialized value $url in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 2489.
> ERROR URL:  returned empty!
> {code}
> ORT should probably skip "files" that start with {{-}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


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

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


https://github.com/apache/incubator-trafficcontrol/pull/785#discussion_r131968755
  
--- 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 --

Do we have a standard perl indentation tool?


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


[jira] [Commented] (TC-502) ORT fails to handle non-file arguments

2017-08-08 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TC-502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16118609#comment-16118609
 ] 

ASF GitHub Bot commented on TC-502:
---

Github user dangogh commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/785#discussion_r131967719
  
--- 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 --

then please reformat that section and indent appropriately.


> ORT fails to handle non-file arguments
> --
>
> Key: TC-502
> URL: https://issues.apache.org/jira/browse/TC-502
> Project: Traffic Control
>  Issue Type: Bug
>  Components: Traffic Ops ORT
>Reporter: Chris Lemmons
>
> ORT currently processes the parameters of all plugins on the remap.config 
> line as though they were files. However, parameters to `cachekey.config` are 
> parsed as parameters directly on the remap line. So, for example, if you have 
> a remap line that contains something like this:
> {{@plugin=cachekey.so @pparam=--remove-path=true}}
> That will cause ORT to attempt to load a config file named 
> {{--remove-path=true}}. ORT fails to accomplish this in several ways and 
> produces a variety of errors:
> DEBUG Starting processing of config file: --remove-path=true
> WARN --remove-path=true is being processed with an unknown service
> {code:none}
> INFO:  Start processing config file: --remove-path=true 
> Use of uninitialized value in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 2515.
> Use of uninitialized value $dir in -d at /opt/ort/traffic_ops_ort.pl line 645.
> Use of uninitialized value $dir in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 648.
> /bin/mkdir: missing operand
> Try '/bin/mkdir --help' for more information.
> Use of uninitialized value $dir in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 649.
> Use of uninitialized value $dir in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 653.
> Use of uninitialized value $dir in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 657.
> DEBUG Directory created: .
> Use of uninitialized value $result in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 2482.
> Use of uninitialized value $size in numeric eq (==) at 
> /opt/ort/traffic_ops_ort.pl line 2488.
> Use of uninitialized value $url in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 2489.
> ERROR URL:  returned empty!
> {code}
> ORT should probably skip "files" that start with {{-}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


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

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


https://github.com/apache/incubator-trafficcontrol/pull/785#discussion_r131967719
  
--- 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 --

then please reformat that section and indent appropriately.


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


[jira] [Commented] (TC-502) ORT fails to handle non-file arguments

2017-08-08 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TC-502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16118586#comment-16118586
 ] 

ASF GitHub Bot commented on TC-502:
---

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


> ORT fails to handle non-file arguments
> --
>
> Key: TC-502
> URL: https://issues.apache.org/jira/browse/TC-502
> Project: Traffic Control
>  Issue Type: Bug
>  Components: Traffic Ops ORT
>Reporter: Chris Lemmons
>
> ORT currently processes the parameters of all plugins on the remap.config 
> line as though they were files. However, parameters to `cachekey.config` are 
> parsed as parameters directly on the remap line. So, for example, if you have 
> a remap line that contains something like this:
> {{@plugin=cachekey.so @pparam=--remove-path=true}}
> That will cause ORT to attempt to load a config file named 
> {{--remove-path=true}}. ORT fails to accomplish this in several ways and 
> produces a variety of errors:
> DEBUG Starting processing of config file: --remove-path=true
> WARN --remove-path=true is being processed with an unknown service
> {code:none}
> INFO:  Start processing config file: --remove-path=true 
> Use of uninitialized value in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 2515.
> Use of uninitialized value $dir in -d at /opt/ort/traffic_ops_ort.pl line 645.
> Use of uninitialized value $dir in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 648.
> /bin/mkdir: missing operand
> Try '/bin/mkdir --help' for more information.
> Use of uninitialized value $dir in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 649.
> Use of uninitialized value $dir in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 653.
> Use of uninitialized value $dir in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 657.
> DEBUG Directory created: .
> Use of uninitialized value $result in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 2482.
> Use of uninitialized value $size in numeric eq (==) at 
> /opt/ort/traffic_ops_ort.pl line 2488.
> Use of uninitialized value $url in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 2489.
> ERROR URL:  returned empty!
> {code}
> ORT should probably skip "files" that start with {{-}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[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 issue #786: Fix TO ORT for missing Content-Length, ...

2017-08-08 Thread asfgit
Github user asfgit commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/786
  

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/incubator-trafficcontrol-PR/15/



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


[jira] [Commented] (TC-187) Update delivery service makes SSL keys invalid

2017-08-08 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TC-187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16118578#comment-16118578
 ] 

ASF GitHub Bot commented on TC-187:
---

Github user DylanVolz commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/360#discussion_r131963435
  
--- Diff: traffic_ops/app/lib/UI/DeliveryService.pm ---
@@ -846,8 +842,11 @@ sub update {
$hash{http_bypass_fqdn} = 
$self->param('ds.http_bypass_fqdn');
}
 
+   my $upd_ssl = 0;
#print Dumper( \%hash );
my $update = $self->db->resultset('Deliveryservice')->find( { 
id => $id } );
+   $upd_ssl = 1 if $update->xml_id ne $hash{xml_id};
--- End diff --

This line is may be  unnecessary now that [TC-402] was merged.


> Update delivery service makes SSL keys invalid
> --
>
> Key: TC-187
> URL: https://issues.apache.org/jira/browse/TC-187
> Project: Traffic Control
>  Issue Type: Bug
>  Components: Traffic Ops
>Reporter: Zhilin Huang
>Assignee: Zhilin Huang
>  Labels: ssl, xml-id
>
> Modify xml-id or subdomain in a https delivery service will make existing SSL 
> keys invalid.
> And there is problem to generate keys if using "http and https" together with 
> 1 host_regex, and 1 path_regex.
> BTW, the certificate returned by RESTful API is not consistent with that GUI.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] incubator-trafficcontrol pull request #360: [TC-187] fix HTTPs bugs

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


https://github.com/apache/incubator-trafficcontrol/pull/360#discussion_r131963435
  
--- Diff: traffic_ops/app/lib/UI/DeliveryService.pm ---
@@ -846,8 +842,11 @@ sub update {
$hash{http_bypass_fqdn} = 
$self->param('ds.http_bypass_fqdn');
}
 
+   my $upd_ssl = 0;
#print Dumper( \%hash );
my $update = $self->db->resultset('Deliveryservice')->find( { 
id => $id } );
+   $upd_ssl = 1 if $update->xml_id ne $hash{xml_id};
--- End diff --

This line is may be  unnecessary now that [TC-402] was merged.


---
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 #729: Traffic Ops Golang Incremental Rewrite ...

2017-08-08 Thread rob05c
Github user rob05c commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/729
  
Must be merged after #786 which fixes an ORT bug this exposes.


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


[jira] [Commented] (TC-502) ORT fails to handle non-file arguments

2017-08-08 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TC-502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16118568#comment-16118568
 ] 

ASF GitHub Bot commented on TC-502:
---

Github user alficles commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/785#discussion_r131962210
  
--- 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 --

It's perl. :/ Creates the mandatory block for the early exit.


> ORT fails to handle non-file arguments
> --
>
> Key: TC-502
> URL: https://issues.apache.org/jira/browse/TC-502
> Project: Traffic Control
>  Issue Type: Bug
>  Components: Traffic Ops ORT
>Reporter: Chris Lemmons
>
> ORT currently processes the parameters of all plugins on the remap.config 
> line as though they were files. However, parameters to `cachekey.config` are 
> parsed as parameters directly on the remap line. So, for example, if you have 
> a remap line that contains something like this:
> {{@plugin=cachekey.so @pparam=--remove-path=true}}
> That will cause ORT to attempt to load a config file named 
> {{--remove-path=true}}. ORT fails to accomplish this in several ways and 
> produces a variety of errors:
> DEBUG Starting processing of config file: --remove-path=true
> WARN --remove-path=true is being processed with an unknown service
> {code:none}
> INFO:  Start processing config file: --remove-path=true 
> Use of uninitialized value in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 2515.
> Use of uninitialized value $dir in -d at /opt/ort/traffic_ops_ort.pl line 645.
> Use of uninitialized value $dir in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 648.
> /bin/mkdir: missing operand
> Try '/bin/mkdir --help' for more information.
> Use of uninitialized value $dir in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 649.
> Use of uninitialized value $dir in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 653.
> Use of uninitialized value $dir in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 657.
> DEBUG Directory created: .
> Use of uninitialized value $result in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 2482.
> Use of uninitialized value $size in numeric eq (==) at 
> /opt/ort/traffic_ops_ort.pl line 2488.
> Use of uninitialized value $url in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 2489.
> ERROR URL:  returned empty!
> {code}
> ORT should probably skip "files" that start with {{-}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (TC-503) Traffic Ops ORT Fails with Chunked Encoding

2017-08-08 Thread Robert Butts (JIRA)

 [ 
https://issues.apache.org/jira/browse/TC-503?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Butts updated TC-503:


Fixed in https://github.com/apache/incubator-trafficcontrol/pull/786

> Traffic Ops ORT Fails with Chunked Encoding
> ---
>
> Key: TC-503
> URL: https://issues.apache.org/jira/browse/TC-503
> Project: Traffic Control
>  Issue Type: Bug
>  Components: Traffic Ops ORT
>Reporter: Robert Butts
>Assignee: Robert Butts
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> ORT fails if no 'Content-Length' header exists.
> 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.
> So far, we've just been lucky Perl/Mojolicious Traffic Ops doesn't happen to 
> send Chunked encodings to ORT. But the spec requires clients accept it, ORT 
> is in violation of HTTP/1.1. 
> Further, the upcoming Golang Traffic Ops sends Chunked encoding, and there's 
> no reasonable way in Go to prevent it. There's no HTTP-compliant way to 
> instruct the server not to send Chunked encoding either, since clients are 
> required to accept it. The right solution here is to fix ORT to accept 
> Chunked encoding, without Content-Length.
> It appears ORT only refuses it as a safety check, and doesn't actually need 
> it for anything. Should be a simple fix.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


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

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


https://github.com/apache/incubator-trafficcontrol/pull/785#discussion_r131962210
  
--- 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 --

It's perl. :/ Creates the mandatory block for the early exit.


---
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 #786: Fix TO ORT for missing Content-L...

2017-08-08 Thread rob05c
GitHub user rob05c opened a pull request:

https://github.com/apache/incubator-trafficcontrol/pull/786

Fix TO ORT for missing Content-Length, per RFC

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.

Fixes TC-503

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/rob05c/incubator-trafficcontrol 
to-ortcontentlengthfix

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-trafficcontrol/pull/786.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #786


commit a4815d639a46e72c8236077a28a29677c9f14c8a
Author: Robert Butts 
Date:   2017-08-08T16:21:00Z

Fix TO ORT for missing Content-Length, per RFC

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.

Fixes TC-503




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


[jira] [Commented] (TC-503) Traffic Ops ORT Fails with Chunked Encoding

2017-08-08 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TC-503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16118566#comment-16118566
 ] 

ASF GitHub Bot commented on TC-503:
---

GitHub user rob05c opened a pull request:

https://github.com/apache/incubator-trafficcontrol/pull/786

Fix TO ORT for missing Content-Length, per RFC

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.

Fixes TC-503

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/rob05c/incubator-trafficcontrol 
to-ortcontentlengthfix

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-trafficcontrol/pull/786.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #786


commit a4815d639a46e72c8236077a28a29677c9f14c8a
Author: Robert Butts 
Date:   2017-08-08T16:21:00Z

Fix TO ORT for missing Content-Length, per RFC

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.

Fixes TC-503




> Traffic Ops ORT Fails with Chunked Encoding
> ---
>
> Key: TC-503
> URL: https://issues.apache.org/jira/browse/TC-503
> Project: Traffic Control
>  Issue Type: Bug
>  Components: Traffic Ops ORT
>Reporter: Robert Butts
>Assignee: Robert Butts
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> ORT fails if no 'Content-Length' header exists.
> 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.
> So far, we've just been lucky Perl/Mojolicious Traffic Ops doesn't happen to 
> send Chunked encodings to ORT. But the spec requires clients accept it, ORT 
> is in violation of HTTP/1.1. 
> Further, the upcoming Golang Traffic Ops sends Chunked encoding, and there's 
> no reasonable way in Go to prevent it. There's no HTTP-compliant way to 
> instruct the server not to send Chunked encoding either, since clients are 
> required to accept it. The right solution here is to fix ORT to accept 
> Chunked encoding, without Content-Length.
> It appears ORT only refuses it as a safety check, and doesn't actually need 
> it for anything. Should be a simple fix.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (TC-503) Traffic Ops ORT Fails with Chunked Encoding

2017-08-08 Thread Robert Butts (JIRA)
Robert Butts created TC-503:
---

 Summary: Traffic Ops ORT Fails with Chunked Encoding
 Key: TC-503
 URL: https://issues.apache.org/jira/browse/TC-503
 Project: Traffic Control
  Issue Type: Bug
  Components: Traffic Ops ORT
Reporter: Robert Butts
Assignee: Robert Butts


ORT fails if no 'Content-Length' header exists.

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.

So far, we've just been lucky Perl/Mojolicious Traffic Ops doesn't happen to 
send Chunked encodings to ORT. But the spec requires clients accept it, ORT is 
in violation of HTTP/1.1. 

Further, the upcoming Golang Traffic Ops sends Chunked encoding, and there's no 
reasonable way in Go to prevent it. There's no HTTP-compliant way to instruct 
the server not to send Chunked encoding either, since clients are required to 
accept it. The right solution here is to fix ORT to accept Chunked encoding, 
without Content-Length.

It appears ORT only refuses it as a safety check, and doesn't actually need it 
for anything. Should be a simple fix.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TC-502) ORT fails to handle non-file arguments

2017-08-08 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TC-502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16118546#comment-16118546
 ] 

ASF GitHub Bot commented on TC-502:
---

Github user dangogh commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/785#discussion_r131959659
  
--- 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 --

`{{` ???



> ORT fails to handle non-file arguments
> --
>
> Key: TC-502
> URL: https://issues.apache.org/jira/browse/TC-502
> Project: Traffic Control
>  Issue Type: Bug
>  Components: Traffic Ops ORT
>Reporter: Chris Lemmons
>
> ORT currently processes the parameters of all plugins on the remap.config 
> line as though they were files. However, parameters to `cachekey.config` are 
> parsed as parameters directly on the remap line. So, for example, if you have 
> a remap line that contains something like this:
> {{@plugin=cachekey.so @pparam=--remove-path=true}}
> That will cause ORT to attempt to load a config file named 
> {{--remove-path=true}}. ORT fails to accomplish this in several ways and 
> produces a variety of errors:
> DEBUG Starting processing of config file: --remove-path=true
> WARN --remove-path=true is being processed with an unknown service
> {code:none}
> INFO:  Start processing config file: --remove-path=true 
> Use of uninitialized value in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 2515.
> Use of uninitialized value $dir in -d at /opt/ort/traffic_ops_ort.pl line 645.
> Use of uninitialized value $dir in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 648.
> /bin/mkdir: missing operand
> Try '/bin/mkdir --help' for more information.
> Use of uninitialized value $dir in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 649.
> Use of uninitialized value $dir in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 653.
> Use of uninitialized value $dir in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 657.
> DEBUG Directory created: .
> Use of uninitialized value $result in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 2482.
> Use of uninitialized value $size in numeric eq (==) at 
> /opt/ort/traffic_ops_ort.pl line 2488.
> Use of uninitialized value $url in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 2489.
> ERROR URL:  returned empty!
> {code}
> ORT should probably skip "files" that start with {{-}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


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

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


https://github.com/apache/incubator-trafficcontrol/pull/785#discussion_r131959659
  
--- 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 --

`{{` ???



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


[jira] [Commented] (TC-502) ORT fails to handle non-file arguments

2017-08-08 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TC-502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16118536#comment-16118536
 ] 

ASF GitHub Bot commented on TC-502:
---

Github user asfgit commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/785
  

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/incubator-trafficcontrol-PR/14/



> ORT fails to handle non-file arguments
> --
>
> Key: TC-502
> URL: https://issues.apache.org/jira/browse/TC-502
> Project: Traffic Control
>  Issue Type: Bug
>  Components: Traffic Ops ORT
>Reporter: Chris Lemmons
>
> ORT currently processes the parameters of all plugins on the remap.config 
> line as though they were files. However, parameters to `cachekey.config` are 
> parsed as parameters directly on the remap line. So, for example, if you have 
> a remap line that contains something like this:
> {{@plugin=cachekey.so @pparam=--remove-path=true}}
> That will cause ORT to attempt to load a config file named 
> {{--remove-path=true}}. ORT fails to accomplish this in several ways and 
> produces a variety of errors:
> DEBUG Starting processing of config file: --remove-path=true
> WARN --remove-path=true is being processed with an unknown service
> {code:none}
> INFO:  Start processing config file: --remove-path=true 
> Use of uninitialized value in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 2515.
> Use of uninitialized value $dir in -d at /opt/ort/traffic_ops_ort.pl line 645.
> Use of uninitialized value $dir in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 648.
> /bin/mkdir: missing operand
> Try '/bin/mkdir --help' for more information.
> Use of uninitialized value $dir in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 649.
> Use of uninitialized value $dir in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 653.
> Use of uninitialized value $dir in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 657.
> DEBUG Directory created: .
> Use of uninitialized value $result in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 2482.
> Use of uninitialized value $size in numeric eq (==) at 
> /opt/ort/traffic_ops_ort.pl line 2488.
> Use of uninitialized value $url in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 2489.
> ERROR URL:  returned empty!
> {code}
> ORT should probably skip "files" that start with {{-}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] incubator-trafficcontrol issue #785: [TC-502] ORT now skips file checks for ...

2017-08-08 Thread asfgit
Github user asfgit commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/785
  

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/incubator-trafficcontrol-PR/14/



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


[jira] [Commented] (TC-502) ORT fails to handle non-file arguments

2017-08-08 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TC-502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16118519#comment-16118519
 ] 

ASF GitHub Bot commented on TC-502:
---

GitHub user alficles opened a pull request:

https://github.com/apache/incubator-trafficcontrol/pull/785

[TC-502] ORT now skips file checks for remap plugin arguments that start 
with '-'.

ORT parses the remap.config file to find dependent files to update.
Since parameters to plugins aren't easily distinguished from options
to those plugins, this distinguishes based on the first character.
It's not ideal, but it works well in practice.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/alficles/incubator-trafficcontrol 
tc-502-ort-param-args

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-trafficcontrol/pull/785.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #785


commit e47b02afa238a22411b7824bc79dcbae110cb718
Author: Chris Lemmons 
Date:   2017-08-08T15:44:08Z

[TC-502] ORT now skips file checks for remap plugin arguments that start 
with '-'.

ORT parses the remap.config file to find dependent files to update.
Since parameters to plugins aren't easily distinguished from options
to those plugins, this distinguishes based on the first character.
It's not ideal, but it works well in practice.




> ORT fails to handle non-file arguments
> --
>
> Key: TC-502
> URL: https://issues.apache.org/jira/browse/TC-502
> Project: Traffic Control
>  Issue Type: Bug
>  Components: Traffic Ops ORT
>Reporter: Chris Lemmons
>
> ORT currently processes the parameters of all plugins on the remap.config 
> line as though they were files. However, parameters to `cachekey.config` are 
> parsed as parameters directly on the remap line. So, for example, if you have 
> a remap line that contains something like this:
> {{@plugin=cachekey.so @pparam=--remove-path=true}}
> That will cause ORT to attempt to load a config file named 
> {{--remove-path=true}}. ORT fails to accomplish this in several ways and 
> produces a variety of errors:
> DEBUG Starting processing of config file: --remove-path=true
> WARN --remove-path=true is being processed with an unknown service
> {code:none}
> INFO:  Start processing config file: --remove-path=true 
> Use of uninitialized value in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 2515.
> Use of uninitialized value $dir in -d at /opt/ort/traffic_ops_ort.pl line 645.
> Use of uninitialized value $dir in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 648.
> /bin/mkdir: missing operand
> Try '/bin/mkdir --help' for more information.
> Use of uninitialized value $dir in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 649.
> Use of uninitialized value $dir in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 653.
> Use of uninitialized value $dir in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 657.
> DEBUG Directory created: .
> Use of uninitialized value $result in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 2482.
> Use of uninitialized value $size in numeric eq (==) at 
> /opt/ort/traffic_ops_ort.pl line 2488.
> Use of uninitialized value $url in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 2489.
> ERROR URL:  returned empty!
> {code}
> ORT should probably skip "files" that start with {{-}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


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

2017-08-08 Thread alficles
GitHub user alficles opened a pull request:

https://github.com/apache/incubator-trafficcontrol/pull/785

[TC-502] ORT now skips file checks for remap plugin arguments that start 
with '-'.

ORT parses the remap.config file to find dependent files to update.
Since parameters to plugins aren't easily distinguished from options
to those plugins, this distinguishes based on the first character.
It's not ideal, but it works well in practice.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/alficles/incubator-trafficcontrol 
tc-502-ort-param-args

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-trafficcontrol/pull/785.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #785


commit e47b02afa238a22411b7824bc79dcbae110cb718
Author: Chris Lemmons 
Date:   2017-08-08T15:44:08Z

[TC-502] ORT now skips file checks for remap plugin arguments that start 
with '-'.

ORT parses the remap.config file to find dependent files to update.
Since parameters to plugins aren't easily distinguished from options
to those plugins, this distinguishes based on the first character.
It's not ideal, but it works well in practice.




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


[jira] [Commented] (TC-423) TPv2 - add the ability to copy profiles

2017-08-08 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TC-423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16118454#comment-16118454
 ] 

ASF GitHub Bot commented on TC-423:
---

Github user asfgit commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/784
  

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/incubator-trafficcontrol-PR/13/



> TPv2 - add the ability to copy profiles
> ---
>
> Key: TC-423
> URL: https://issues.apache.org/jira/browse/TC-423
> Project: Traffic Control
>  Issue Type: Improvement
>  Components: Traffic Portal
>Reporter: Jeremy Mitchell
>Priority: Minor
>
> In order to achieve feature parity with the existing TO UI, the ability to 
> copy profiles needs to be added to TP. This involves making a new profile 
> where you can define the name, description, cdn and type of the profile but 
> use the parameters of an existing profile.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] incubator-trafficcontrol issue #784: [TC-423] - adds clone profile to TPv2 a...

2017-08-08 Thread asfgit
Github user asfgit commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/784
  

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/incubator-trafficcontrol-PR/13/



---
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 #784: [TC-423] - adds clone profile to TPv2 a...

2017-08-08 Thread asfgit
Github user asfgit commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/784
  

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/incubator-trafficcontrol-PR/12/



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


[jira] [Commented] (TC-423) TPv2 - add the ability to copy profiles

2017-08-08 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TC-423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16118404#comment-16118404
 ] 

ASF GitHub Bot commented on TC-423:
---

Github user asfgit commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/784
  

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/incubator-trafficcontrol-PR/12/



> TPv2 - add the ability to copy profiles
> ---
>
> Key: TC-423
> URL: https://issues.apache.org/jira/browse/TC-423
> Project: Traffic Control
>  Issue Type: Improvement
>  Components: Traffic Portal
>Reporter: Jeremy Mitchell
>Priority: Minor
>
> In order to achieve feature parity with the existing TO UI, the ability to 
> copy profiles needs to be added to TP. This involves making a new profile 
> where you can define the name, description, cdn and type of the profile but 
> use the parameters of an existing profile.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TC-423) TPv2 - add the ability to copy profiles

2017-08-08 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TC-423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16118394#comment-16118394
 ] 

ASF GitHub Bot commented on TC-423:
---

GitHub user mitchell852 opened a pull request:

https://github.com/apache/incubator-trafficcontrol/pull/784

[TC-423] - adds clone profile to TPv2 and adds a few missing change log 
statements



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/mitchell852/incubator-trafficcontrol 
tc-423-copy-profile

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-trafficcontrol/pull/784.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #784


commit 3844e9e450a63e6bcd891d26e2f55787a2e80a1a
Author: Jeremy Mitchell 
Date:   2017-08-08T14:35:33Z

adds clone profile to TPv2 and adds a few missing change log statements




> TPv2 - add the ability to copy profiles
> ---
>
> Key: TC-423
> URL: https://issues.apache.org/jira/browse/TC-423
> Project: Traffic Control
>  Issue Type: Improvement
>  Components: Traffic Portal
>Reporter: Jeremy Mitchell
>Priority: Minor
>
> In order to achieve feature parity with the existing TO UI, the ability to 
> copy profiles needs to be added to TP. This involves making a new profile 
> where you can define the name, description, cdn and type of the profile but 
> use the parameters of an existing profile.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] incubator-trafficcontrol pull request #784: [TC-423] - adds clone profile to...

2017-08-08 Thread mitchell852
GitHub user mitchell852 opened a pull request:

https://github.com/apache/incubator-trafficcontrol/pull/784

[TC-423] - adds clone profile to TPv2 and adds a few missing change log 
statements



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/mitchell852/incubator-trafficcontrol 
tc-423-copy-profile

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-trafficcontrol/pull/784.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #784


commit 3844e9e450a63e6bcd891d26e2f55787a2e80a1a
Author: Jeremy Mitchell 
Date:   2017-08-08T14:35:33Z

adds clone profile to TPv2 and adds a few missing change log statements




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