[GitHub] asfgit commented on issue #2307: Add TO Go cdns/routing

2018-05-23 Thread GitBox
asfgit commented on issue #2307: Add TO Go cdns/routing
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2307#issuecomment-391542848
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/incubator-trafficcontrol-PR/1665/
   Test FAILed.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] asfgit commented on issue #2324: correct login status codes and enhance ldap logging

2018-05-23 Thread GitBox
asfgit commented on issue #2324: correct login status codes and enhance ldap 
logging
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2324#issuecomment-391528681
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/incubator-trafficcontrol-PR/1664/
   Test FAILed.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] asfgit commented on issue #2324: correct login status codes and enhance ldap logging

2018-05-23 Thread GitBox
asfgit commented on issue #2324: correct login status codes and enhance ldap 
logging
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2324#issuecomment-391511496
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/incubator-trafficcontrol-PR/1663/
   Test FAILed.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jhg03a commented on issue #2156: When renaming a host in TC, the hashId retains the value of the previous hostname

2018-05-23 Thread GitBox
jhg03a commented on issue #2156: When renaming a host in TC, the hashId retains 
the value of the previous hostname
URL: 
https://github.com/apache/incubator-trafficcontrol/issues/2156#issuecomment-391505904
 
 
   An alternative solution might be write once change never on server 
hostname/domain


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] mitchell852 closed issue #977: [TC-113] Add support for ATS 6.x config file format

2018-05-23 Thread GitBox
mitchell852 closed issue #977: [TC-113] Add support for ATS 6.x config file 
format
URL: https://github.com/apache/incubator-trafficcontrol/issues/977
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] mitchell852 closed issue #2255: Traffic Ops API endpoint for generating SSL keys needs validation

2018-05-23 Thread GitBox
mitchell852 closed issue #2255: Traffic Ops API endpoint for generating SSL 
keys needs validation
URL: https://github.com/apache/incubator-trafficcontrol/issues/2255
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] mitchell852 commented on issue #2255: Traffic Ops API endpoint for generating SSL keys needs validation

2018-05-23 Thread GitBox
mitchell852 commented on issue #2255: Traffic Ops API endpoint for generating 
SSL keys needs validation
URL: 
https://github.com/apache/incubator-trafficcontrol/issues/2255#issuecomment-391501164
 
 
   duplicate of #2267 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] asfgit commented on issue #2325: Updated fixtures to contain anonymous_blocking_enabled field

2018-05-23 Thread GitBox
asfgit commented on issue #2325: Updated fixtures to contain 
anonymous_blocking_enabled field
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2325#issuecomment-391497624
 
 
   Can one of the admins verify this patch?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] asfgit commented on issue #2325: Updated fixtures to contain anonymous_blocking_enabled field

2018-05-23 Thread GitBox
asfgit commented on issue #2325: Updated fixtures to contain 
anonymous_blocking_enabled field
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2325#issuecomment-391497366
 
 
   Can one of the admins verify this patch?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rivasj opened a new pull request #2325: Updated fixtures to contain anonymous_blocking_enabled field

2018-05-23 Thread GitBox
rivasj opened a new pull request #2325: Updated fixtures to contain 
anonymous_blocking_enabled field
URL: https://github.com/apache/incubator-trafficcontrol/pull/2325
 
 
   Updated fixtures to contain anonymous_blocking_enabled field to fix failing 
perl tests


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] DylanVolz opened a new pull request #2324: correct login status codes and enhance ldap logging

2018-05-23 Thread GitBox
DylanVolz opened a new pull request #2324: correct login status codes and 
enhance ldap logging
URL: https://github.com/apache/incubator-trafficcontrol/pull/2324
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dewrich commented on issue #2289: Foundation for Java Api Client

2018-05-23 Thread GitBox
dewrich commented on issue #2289: Foundation for Java Api Client
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2289#issuecomment-391494558
 
 
   @nerdynick Be sure all your files have the Apache License header in them


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jhg03a commented on issue #1104: [TC-196] API endpoint for Traffic Ops version

2018-05-23 Thread GitBox
jhg03a commented on issue #1104: [TC-196] API endpoint for Traffic Ops version
URL: 
https://github.com/apache/incubator-trafficcontrol/issues/1104#issuecomment-391493322
 
 
   I think this is done @dangogh 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


Jenkins build is back to normal : incubator-trafficcontrol-PR-rat #941

2018-05-23 Thread Apache Jenkins Server
See 




[GitHub] mitchell852 commented on issue #2053: TO goose migration fails with "permission denied"

2018-05-23 Thread GitBox
mitchell852 commented on issue #2053: TO goose migration fails with "permission 
denied"
URL: 
https://github.com/apache/incubator-trafficcontrol/issues/2053#issuecomment-391492996
 
 
   can this be closed @dangogh ?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] asfgit commented on issue #2322: remove incorrect quotes from insecure boolean field

2018-05-23 Thread GitBox
asfgit commented on issue #2322: remove incorrect quotes from insecure boolean 
field
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2322#issuecomment-391492884
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/incubator-trafficcontrol-PR/1662/
   Test PASSed.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rob05c closed issue #2308: missing snapshot notification in change logs on TO, TP notifications

2018-05-23 Thread GitBox
rob05c closed issue #2308: missing snapshot notification in change logs on TO, 
TP notifications
URL: https://github.com/apache/incubator-trafficcontrol/issues/2308
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rob05c commented on issue #2308: missing snapshot notification in change logs on TO, TP notifications

2018-05-23 Thread GitBox
rob05c commented on issue #2308: missing snapshot notification in change logs 
on TO, TP notifications
URL: 
https://github.com/apache/incubator-trafficcontrol/issues/2308#issuecomment-391492335
 
 
   Fixed in master, cb671dfd3dc0fc5db47acd55726419badde6d6d5


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


Build failed in Jenkins: incubator-trafficcontrol-traffic_ops-test #649

2018-05-23 Thread Apache Jenkins Server
See 


Changes:

[rob05c] remove incorrect quotes from insecure boolean field

--
[...truncated 96.85 KB...]
unit_golang_1  | --- PASS: TestFuncs (0.00s)
unit_golang_1  | === RUN   TestInterfaces
unit_golang_1  | --- PASS: TestInterfaces (0.00s)
unit_golang_1  | === RUN   TestValidate
unit_golang_1  | --- PASS: TestValidate (0.00s)
unit_golang_1  | PASS
unit_golang_1  | coverage: 19.0% of statements
unit_golang_1  | ok 
github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/cdn   
0.008s  coverage: 19.0% of statements
unit_golang_1  | === RUN   TestLogLocation
unit_golang_1  | --- PASS: TestLogLocation (0.00s)
unit_golang_1  | === RUN   TestLoadConfig
unit_golang_1  | --- PASS: TestLoadConfig (0.00s)
unit_golang_1  | PASS
unit_golang_1  | coverage: 64.2% of statements
unit_golang_1  | ok 
github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/config
0.022s  coverage: 64.2% of statements
unit_golang_1  | === RUN   TestReadCoordinates
unit_golang_1  | --- PASS: TestReadCoordinates (0.00s)
unit_golang_1  | === RUN   TestFuncs
unit_golang_1  | --- PASS: TestFuncs (0.00s)
unit_golang_1  | === RUN   TestInterfaces
unit_golang_1  | --- PASS: TestInterfaces (0.00s)
unit_golang_1  | === RUN   TestValidate
unit_golang_1  | --- PASS: TestValidate (0.00s)
unit_golang_1  | PASS
unit_golang_1  | coverage: 23.7% of statements
unit_golang_1  | ok 
github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/coordinate
0.027s  coverage: 23.7% of statements
unit_golang_1  | === RUN   TestGetConfigParams
unit_golang_1  | --- PASS: TestGetConfigParams (0.00s)
unit_golang_1  | === RUN   TestMakeCRConfigConfig
unit_golang_1  | --- PASS: TestMakeCRConfigConfig (0.00s)
unit_golang_1  | === RUN   TestMakeDSes
unit_golang_1  | --- PASS: TestMakeDSes (0.00s)
unit_golang_1  | === RUN   TestGetServerProfileParams
unit_golang_1  | --- PASS: TestGetServerProfileParams (0.00s)
unit_golang_1  | === RUN   TestGetDSRegexesDomains
unit_golang_1  | --- PASS: TestGetDSRegexesDomains (0.00s)
unit_golang_1  | === RUN   TestGetStaticDNSEntries
unit_golang_1  | --- PASS: TestGetStaticDNSEntries (0.00s)
unit_golang_1  | === RUN   TestMakeLocations
unit_golang_1  | --- PASS: TestMakeLocations (0.00s)
unit_golang_1  | === RUN   TestGetServerParams
unit_golang_1  | --- PASS: TestGetServerParams (0.00s)
unit_golang_1  | === RUN   TestGetAllServers
unit_golang_1  | --- PASS: TestGetAllServers (0.00s)
unit_golang_1  | === RUN   TestGetServerDSNames
unit_golang_1  | --- PASS: TestGetServerDSNames (0.00s)
unit_golang_1  | === RUN   TestGetServerDSes
unit_golang_1  | --- PASS: TestGetServerDSes (0.00s)
unit_golang_1  | === RUN   TestGetCDNInfo
unit_golang_1  | --- PASS: TestGetCDNInfo (0.00s)
unit_golang_1  | === RUN   TestGetCDNNameFromID
unit_golang_1  | --- PASS: TestGetCDNNameFromID (0.00s)
unit_golang_1  | === RUN   TestGetSnapshot
unit_golang_1  | --- PASS: TestGetSnapshot (0.00s)
unit_golang_1  | === RUN   TestSnapshot
unit_golang_1  | --- PASS: TestSnapshot (0.00s)
unit_golang_1  | === RUN   TestMakeStats
unit_golang_1  | --- PASS: TestMakeStats (0.00s)
unit_golang_1  | PASS
unit_golang_1  | coverage: 50.6% of statements
unit_golang_1  | ok 
github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/crconfig
  0.013s  coverage: 50.6% of statements
unit_golang_1  | === RUN   TestBuildQuery
unit_golang_1  | --- PASS: TestBuildQuery (0.00s)
unit_golang_1  | PASS
unit_golang_1  | coverage: 59.6% of statements
unit_golang_1  | ok 
github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/dbhelpers
 0.049s  coverage: 59.6% of statements
unit_golang_1  | === RUN   TestInterfaces
unit_golang_1  | --- PASS: TestInterfaces (0.00s)
unit_golang_1  | === RUN   TestValidateErrors
unit_golang_1  | --- PASS: TestValidateErrors (0.00s)
unit_golang_1  | PASS
unit_golang_1  | coverage: 3.8% of statements
unit_golang_1  | ok 
github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/deliveryservice
   0.025s  coverage: 3.8% of statements
unit_golang_1  | === RUN   TestInterfaces
unit_golang_1  | --- PASS: TestInterfaces (0.00s)
unit_golang_1  | === RUN   TestGetDeliveryServiceRequest
unit_golang_1  | --- PASS: TestGetDeliveryServiceRequest (0.00s)
unit_golang_1  | PASS
unit_golang_1  | coverage: 2.3% of statements
unit_golang_1  | ok 
github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/deliveryservice/request
   0.013s  coverage: 2.3% of statements
unit_golang_1  | === RUN   TestFuncs
unit_golang_1  | --- PASS: TestFuncs (0.00s)
unit_golang_1  | === RUN   TestInterfaces
unit_golang_1  | --- PASS: TestInterfaces (0.00s)
unit_golang_1  | === RUN   TestValidate
unit_golang_1  | --- PASS: TestValidate (0.00s)
unit_golang_1  | PASS
unit_golang_1  | coverage

[GitHub] jhg03a commented on issue #1412: TP - ability to open DS/Server configs in separate window

2018-05-23 Thread GitBox
jhg03a commented on issue #1412: TP - ability to open DS/Server configs in 
separate window
URL: 
https://github.com/apache/incubator-trafficcontrol/issues/1412#issuecomment-391490662
 
 
   I think there is a link now in TP Delivery services that opens a new 
window/tab for profiles


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rob05c closed pull request #2322: remove incorrect quotes from insecure boolean field

2018-05-23 Thread GitBox
rob05c closed pull request #2322: remove incorrect quotes from insecure boolean 
field
URL: https://github.com/apache/incubator-trafficcontrol/pull/2322
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/traffic_ops/app/conf/example-ldap.conf 
b/traffic_ops/app/conf/example-ldap.conf
index 34ce4b624..00be7b8de 100644
--- a/traffic_ops/app/conf/example-ldap.conf
+++ b/traffic_ops/app/conf/example-ldap.conf
@@ -4,6 +4,6 @@
"admin_dn" : "user@prefix.domain.suffix",
"host" : "ldaps://host:[port]",
"search_query" : 
"(&(objectCategory=person)(objectClass=user)(userName=%s))",
-   "insecure" : "false",
+   "insecure" : false,
"ldap_timeout_secs" : 20
 }


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jhg03a opened a new issue #2323: Feature Request: Show delivery services associated with MSO "Server"

2018-05-23 Thread GitBox
jhg03a opened a new issue #2323: Feature Request: Show delivery services 
associated with MSO "Server"
URL: https://github.com/apache/incubator-trafficcontrol/issues/2323
 
 
   On a normal cache server you have the option to see what delivery services 
are attached to a server.  However if the "server" is actually an MSO origin, 
this option is missing.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] DylanVolz opened a new pull request #2322: remove incorrect quotes from insecure boolean field

2018-05-23 Thread GitBox
DylanVolz opened a new pull request #2322: remove incorrect quotes from 
insecure boolean field
URL: https://github.com/apache/incubator-trafficcontrol/pull/2322
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jhg03a opened a new issue #2321: Feature Request: Custom token interpolation

2018-05-23 Thread GitBox
jhg03a opened a new issue #2321: Feature Request: Custom token interpolation
URL: https://github.com/apache/incubator-trafficcontrol/issues/2321
 
 
   As an administrator I want to write and maintain a string containing IP ACL 
rules once then just provide a token to replace in normal raw remap rules.  
This should be generic enough for any kind of string replacement in order to 
generally reduce copy/paste errors and maintenance overhead.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


Build failed in Jenkins: incubator-trafficcontrol-PR-rat #940

2018-05-23 Thread Apache Jenkins Server
See 


--
Started by upstream project "incubator-trafficcontrol-PR" build number 1661
originally caused by:
 GitHub pull request #2124 of commit f83d027a3e9dac93599ce132fd06a23eb0b9d353, 
no merge conflicts.
[EnvInject] - Loading node environment variables.
Building remotely on H35 (ubuntu xenial) in workspace 

[incubator-trafficcontrol-PR-rat] $ /bin/bash -xe 
/tmp/jenkins2924650785115684514.sh
+ rm -rf 

 

 '
[operations-center-context] Requesting copy of artifacts matching '**/*.tar.gz' 
from 'Last successful build (either stable or unstable)' of 
incubator-trafficcontrol-PR
[operations-center-context] Copied 1 artifacts matching '**/*.tar.gz' from 
'Last successful build (either stable or unstable)' of 
incubator-trafficcontrol-PR:
[operations-center-context]   apache-trafficcontrol-2.3.0-incubating.tar.gz
[incubator-trafficcontrol-PR-rat] $ /bin/bash -xe 
/tmp/jenkins3118150441465761410.sh
+ set -exu
++ ls apache-trafficcontrol-2.3.0-incubating.tar.gz
+ tarball=apache-trafficcontrol-2.3.0-incubating.tar.gz
+ tar xzf apache-trafficcontrol-2.3.0-incubating.tar.gz
++ pwd
++ basename apache-trafficcontrol-2.3.0-incubating.tar.gz .tar.gz
+ 
tcdir=
+ cd 

++ date +%Y
+ egrep 'Copyright .*-?2018 The Apache Software Foundation' NOTICE
Copyright 2016-2018 The Apache Software Foundation
+ set +x
Searching for class files:
PASSED: No class files found.
Searching for jar files:
PASSED: No jar files found.
Searching for tar files:
PASSED: No tar files found.
Searching for tgz files:
PASSED: No tgz files found.
Searching for zip files:
PASSED: No zip files found.
++ curl 
https://repository.apache.org/content/repositories/snapshots/org/apache/rat/apache-rat/0.13-SNAPSHOT/
 -sN
++ grep jar
++ grep -ve md5 -e sha1
++ awk -F '"' '{print $2}'
++ sort -r
++ head -n 1
++ cut -d / -f 12
+ ratver=apache-rat-0.13-20180329.151017-101.jar
++ mktemp -d
+ ratdir=/tmp/tmp.ahmbOZnuTV
+ ratjar=/tmp/tmp.ahmbOZnuTV/apache-rat-0.13.SNAPSHOT.jar
+ curl -L -o /tmp/tmp.ahmbOZnuTV/apache-rat-0.13.SNAPSHOT.jar 
https://repository.apache.org/content/repositories/snapshots/org/apache/rat/apache-rat/0.13-SNAPSHOT/apache-rat-0.13-20180329.151017-101.jar
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0  
6 1587k6 975360 0   133k  0  0:00:11 --:--:--  0:00:11  133k100 
1587k  100 1587k0 0  1556k  0  0:00:01  0:00:01 --:--:-- 1557k
+ curl -L -o /tmp/tmp.ahmbOZnuTV/apache-rat-0.13.SNAPSHOT.jar.sha1 
https://repository.apache.org/content/repositories/snapshots/org/apache/rat/apache-rat/0.13-SNAPSHOT/apache-rat-0.13-20180329.151017-101.jar.sha1
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 
010040  100400 0 72  0 --:--:-- --:--:-- --:--:--72
++ sha1sum /tmp/tmp.ahmbOZnuTV/apache-rat-0.13.SNAPSHOT.jar
++ awk '{print $1}'
++ cat /tmp/tmp.ahmbOZnuTV/apache-rat-0.13.SNAPSHOT.jar.sha1
+ [[ 635c5eccad31cff1d713c12144eaae7fc9f10cf4 == 
635c5eccad31cff1d713c12144eaae7fc9f10cf4 ]]
++ pwd
++ pwd
+ java -jar /tmp/tmp.ahmbOZnuTV/apache-rat-0.13.SNAPSHOT.jar -E 

 -d 

+ rm -rf /tmp/tmp.ahmbOZnuTV
++ perl -lne 'print $1 if /(\d+) Unknown Licenses/' ratreport.txt
+ unknown=77
+ [[ 77 != 0 ]]
+ echo '77 Unknown Licenses'
77 Unknown Licenses
+ perl -lne 'print if /Files with unapproved licenses:/ .. /^\*\*\*/' 
ratreport.txt
+ sed s:::
Files with unapproved licenses:

  
apache-trafficcontrol-2.3.0-incubating/traffic_ops/traffic_ops_golang/vendor/github.com/miekg/dns/CONTRIBUTORS
  
apache-trafficcontrol-2.3.0-incubating/traffic_ops/traffic_ops_golang/vendor/github.com/miekg/dns/Gopkg.lock
  
apache-trafficcontrol-2.3.0-incubating/traffic_ops/traffic_ops_golang/vendor/github.

[GitHub] asfgit commented on issue #2124: Add TO Go deliveryservices routes

2018-05-23 Thread GitBox
asfgit commented on issue #2124: Add TO Go deliveryservices routes
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2124#issuecomment-391478251
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/incubator-trafficcontrol-PR/1661/
   Test PASSed.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rob05c commented on a change in pull request #2124: Add TO Go deliveryservices routes

2018-05-23 Thread GitBox
rob05c commented on a change in pull request #2124: Add TO Go deliveryservices 
routes
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2124#discussion_r190379804
 
 

 ##
 File path: 
traffic_ops/traffic_ops_golang/deliveryservice/deliveryservicesv13.go
 ##
 @@ -0,0 +1,1109 @@
+package deliveryservice
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import (
+   "database/sql"
+   "encoding/json"
+   "errors"
+   "fmt"
+   "strings"
+
+   "github.com/apache/incubator-trafficcontrol/lib/go-log"
+   "github.com/apache/incubator-trafficcontrol/lib/go-tc"
+   
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/api"
+   
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/auth"
+   
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/config"
+   
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/dbhelpers"
+   
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/riaksvc"
+   
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/tenant"
+   
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/tovalidate"
+
+   "github.com/go-ozzo/ozzo-validation"
+   "github.com/jmoiron/sqlx"
+   "github.com/lib/pq"
+)
+
+//we need a type alias to define functions on
+type TODeliveryServiceV13 struct {
+   DS  *tc.DeliveryServiceNullableV13
+   Cfg config.Config
+   DB  *sqlx.DB
+}
+
+func (tods *TODeliveryServiceV13) V12() *TODeliveryServiceV12 {
+   return &TODeliveryServiceV12{DS: &tods.DS.DeliveryServiceNullableV12, 
DB: tods.DB, Cfg: tods.Cfg}
+}
+
+func (tods TODeliveryServiceV13) MarshalJSON() ([]byte, error) { return 
json.Marshal(tods.DS) }
+func (tods *TODeliveryServiceV13) UnmarshalJSON(data []byte) error {
+   return json.Unmarshal(data, tods.DS)
+}
+
+func GetRefTypeV13(cfg config.Config, db *sqlx.DB) *TODeliveryServiceV13 {
+   return &TODeliveryServiceV13{Cfg: cfg, DB: db, DS: 
&tc.DeliveryServiceNullableV13{}}
+}
+
+func (ds TODeliveryServiceV13) GetKeyFieldsInfo() []api.KeyFieldInfo {
+   return ds.V12().GetKeyFieldsInfo()
+}
+
+//Implementation of the Identifier, Validator interface functions
+func (ds TODeliveryServiceV13) GetKeys() (map[string]interface{}, bool) {
+   return ds.V12().GetKeys()
+}
+
+func (tods *TODeliveryServiceV13) SetKeys(keys map[string]interface{}) {
+   tods.V12().SetKeys(keys)
+}
+
+func (ds *TODeliveryServiceV13) GetAuditName() string {
+   return ds.V12().GetAuditName()
+}
+
+func (ds *TODeliveryServiceV13) GetType() string {
+   return ds.V12().GetType()
+}
+
+func ValidateV13(db *sqlx.DB, ds *tc.DeliveryServiceNullableV13) []error {
+   if ds == nil {
+   return []error{}
+   }
+   tods := TODeliveryServiceV13{DS: ds, DB: db} // TODO set Cfg?
+   return tods.Validate(db)
+}
+
+func (tods *TODeliveryServiceV13) Sanitize(db *sqlx.DB) {
+   v12 := tods.V12()
+   v12.Sanitize(db)
+   tods.DS.DeliveryServiceNullableV12 = 
tc.DeliveryServiceNullableV12(*v12.DS) // TODO avoid copy
+   signedAlgorithm := "url_sig"
+   if tods.DS.Signed && (tods.DS.SigningAlgorithm == nil || 
*tods.DS.SigningAlgorithm == "") {
+   tods.DS.SigningAlgorithm = &signedAlgorithm
+   }
+   if !tods.DS.Signed && tods.DS.SigningAlgorithm != nil && 
*tods.DS.SigningAlgorithm == signedAlgorithm {
+   tods.DS.Signed = true
+   }
+   if tods.DS.DeepCachingType == nil {
+   s := tc.DeepCachingType("")
+   tods.DS.DeepCachingType = &s
+   }
+   *tods.DS.DeepCachingType = 
tc.DeepCachingTypeFromString(string(*tods.DS.DeepCachingType))
+}
+
+func (tods *TODeliveryServiceV13) Validate(db *sqlx.DB) []error {
+   tods.Sanitize(db)
+   ds := tods.DS
+   neverOrAlways := 
validation.NewStringRule(tovalidate.IsOneOfStringICase("NEVER", "ALWAYS"),
+   "must be one of 'NEVER' or 'ALWAYS'")
+   errs := tovalidate.ToErrors(validation.Errors{
+   "deepCachingType": validation.Validate(ds.DeepCachingType, 
neverO

Build failed in Jenkins: incubator-trafficcontrol-PR-rat #939

2018-05-23 Thread Apache Jenkins Server
See 


--
Started by upstream project "incubator-trafficcontrol-PR" build number 1660
originally caused by:
 GitHub pull request #2124 of commit 8cc4cfaad64533751bd118a61d7acbf2ac125de6, 
no merge conflicts.
[EnvInject] - Loading node environment variables.
Building remotely on H28 (ubuntu xenial) in workspace 

[incubator-trafficcontrol-PR-rat] $ /bin/bash -xe 
/tmp/jenkins6973339009945153753.sh
+ rm -rf 

 

 '
[operations-center-context] Requesting copy of artifacts matching '**/*.tar.gz' 
from 'Last successful build (either stable or unstable)' of 
incubator-trafficcontrol-PR
[operations-center-context] Copied 1 artifacts matching '**/*.tar.gz' from 
'Last successful build (either stable or unstable)' of 
incubator-trafficcontrol-PR:
[operations-center-context]   apache-trafficcontrol-2.3.0-incubating.tar.gz
[incubator-trafficcontrol-PR-rat] $ /bin/bash -xe 
/tmp/jenkins5740310229295879763.sh
+ set -exu
++ ls apache-trafficcontrol-2.3.0-incubating.tar.gz
+ tarball=apache-trafficcontrol-2.3.0-incubating.tar.gz
+ tar xzf apache-trafficcontrol-2.3.0-incubating.tar.gz
++ pwd
++ basename apache-trafficcontrol-2.3.0-incubating.tar.gz .tar.gz
+ 
tcdir=
+ cd 

++ date +%Y
+ egrep 'Copyright .*-?2018 The Apache Software Foundation' NOTICE
Copyright 2016-2018 The Apache Software Foundation
+ set +x
Searching for class files:
PASSED: No class files found.
Searching for jar files:
PASSED: No jar files found.
Searching for tar files:
PASSED: No tar files found.
Searching for tgz files:
PASSED: No tgz files found.
Searching for zip files:
PASSED: No zip files found.
++ curl 
https://repository.apache.org/content/repositories/snapshots/org/apache/rat/apache-rat/0.13-SNAPSHOT/
 -sN
++ grep jar
/tmp/jenkins5740310229295879763.sh: fork: retry: Resource temporarily 
unavailable
/tmp/jenkins5740310229295879763.sh: fork: retry: No child processes
++ grep -ve md5 -e sha1
/tmp/jenkins5740310229295879763.sh: fork: retry: Resource temporarily 
unavailable
++ awk -F '"' '{print $2}'
/tmp/jenkins5740310229295879763.sh: fork: retry: No child processes
++ sort -r
++ head -n 1
++ cut -d / -f 12
+ ratver=apache-rat-0.13-20180329.151017-101.jar
++ mktemp -d
+ ratdir=/tmp/tmp.hJ6ZxBhi5Z
+ ratjar=/tmp/tmp.hJ6ZxBhi5Z/apache-rat-0.13.SNAPSHOT.jar
+ curl -L -o /tmp/tmp.hJ6ZxBhi5Z/apache-rat-0.13.SNAPSHOT.jar 
https://repository.apache.org/content/repositories/snapshots/org/apache/rat/apache-rat/0.13-SNAPSHOT/apache-rat-0.13-20180329.151017-101.jar
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0  
0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0100 
1587k  100 1587k0 0  1631k  0 --:--:-- --:--:-- --:--:-- 1629k
+ curl -L -o /tmp/tmp.hJ6ZxBhi5Z/apache-rat-0.13.SNAPSHOT.jar.sha1 
https://repository.apache.org/content/repositories/snapshots/org/apache/rat/apache-rat/0.13-SNAPSHOT/apache-rat-0.13-20180329.151017-101.jar.sha1
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0  
0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0100 
   40  100400 0 78  0 --:--:-- --:--:-- --:--:--77
++ sha1sum /tmp/tmp.hJ6ZxBhi5Z/apache-rat-0.13.SNAPSHOT.jar
++ awk '{print $1}'
++ cat /tmp/tmp.hJ6ZxBhi5Z/apache-rat-0.13.SNAPSHOT.jar.sha1
+ [[ 635c5eccad31cff1d713c12144eaae7fc9f10cf4 == 
635c5eccad31cff1d713c12144eaae7fc9f10cf4 ]]
++ pwd
++ pwd
+ java -jar /tmp/tmp.hJ6ZxBhi5Z/apache-rat-0.13.SNAPSHOT.jar -E 

 -d 

/tmp/jenkins5740310229295879763.sh: line 84: 28723 Aborted java 
-jar "${ratjar}" -E "$(pwd)/.rat-excludes" -d "$(pwd)" > ratreport.txt
Build step 'Execute shell' marked build as failure
Archiving artifacts


[GitHub] asfgit commented on issue #2124: Add TO Go deliveryservices routes

2018-05-23 Thread GitBox
asfgit commented on issue #2124: Add TO Go deliveryservices routes
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2124#issuecomment-391472652
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/incubator-trafficcontrol-PR/1660/
   Test PASSed.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rob05c commented on a change in pull request #2124: Add TO Go deliveryservices routes

2018-05-23 Thread GitBox
rob05c commented on a change in pull request #2124: Add TO Go deliveryservices 
routes
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2124#discussion_r190374794
 
 

 ##
 File path: 
traffic_ops/traffic_ops_golang/deliveryservice/deliveryservicesv12.go
 ##
 @@ -0,0 +1,326 @@
+package deliveryservice
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import (
+   "database/sql"
+   "errors"
+   "fmt"
+   "regexp"
+   "strings"
+
+   "github.com/apache/incubator-trafficcontrol/lib/go-tc"
+   "github.com/apache/incubator-trafficcontrol/lib/go-log"
+   
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/api"
+   
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/auth"
+   
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/config"
+   
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/tenant"
+   
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/tovalidate"
+
+   "github.com/asaskevich/govalidator"
+   "github.com/go-ozzo/ozzo-validation"
+   "github.com/jmoiron/sqlx"
+)
+
+type TODeliveryServiceV12 struct {
+   DS  *tc.DeliveryServiceNullableV12
+   Cfg config.Config
+   DB  *sqlx.DB
+}
+
+func GetRefTypeV12(cfg config.Config, db *sqlx.DB) *TODeliveryServiceV12 {
+   return &TODeliveryServiceV12{Cfg: cfg, DB: db, DS: 
&tc.DeliveryServiceNullableV12{}}
+}
+
+func (ds TODeliveryServiceV12) GetKeyFieldsInfo() []api.KeyFieldInfo {
+   return []api.KeyFieldInfo{{"id", api.GetIntKey}}
+}
+
+func (tods TODeliveryServiceV12) GetKeys() (map[string]interface{}, bool) {
+   if tods.DS.ID == nil {
+   return map[string]interface{}{"id": 0}, false
+   }
+   return map[string]interface{}{"id": *tods.DS.ID}, true
+}
+
+func (tods *TODeliveryServiceV12) SetKeys(keys map[string]interface{}) {
+   i, _ := keys["id"].(int) //this utilizes the non panicking type 
assertion, if the thrown away ok variable is false i will be the zero of the 
type, 0 here.
+   tods.DS.ID = &i
+}
+
+func (tods *TODeliveryServiceV12) GetAuditName() string {
+   if tods.DS != nil && tods.DS.XMLID != nil {
+   return *tods.DS.XMLID
+   }
+   return ""
+}
+
+func (tods *TODeliveryServiceV12) GetType() string {
+   return "ds"
+}
+
+func ValidateV12(db *sqlx.DB, ds *tc.DeliveryServiceNullableV12) []error {
+   if ds == nil {
+   return []error{}
+   }
+   tods := TODeliveryServiceV12{DS: ds, DB: db} // TODO pass config?
+   return tods.Validate(db)
+}
+
+func (tods *TODeliveryServiceV12) Sanitize(db *sqlx.DB) {
+   ds := tods.DS
+   if ds.GeoLimitCountries != nil {
+   *ds.GeoLimitCountries = 
strings.ToUpper(strings.Replace(*ds.GeoLimitCountries, " ", "", -1))
+   }
+   if ds.ProfileID != nil && *ds.ProfileID == -1 {
+   ds.ProfileID = nil
+   }
+   if ds.EdgeHeaderRewrite != nil && 
strings.TrimSpace(*ds.EdgeHeaderRewrite) == "" {
+   ds.EdgeHeaderRewrite = nil
+   }
+   if ds.MidHeaderRewrite != nil && 
strings.TrimSpace(*ds.MidHeaderRewrite) == "" {
+   ds.MidHeaderRewrite = nil
+   }
+}
+
+// LoadTenantID loads the DeliveryService's tenant ID from the database, using 
the DS ID or XMLID if either exists. Sets tods.DS.TenantID on success, and 
returns whether the delivery service was found, and any error.
+func (tods *TODeliveryServiceV12) LoadTenantID(db *sqlx.DB) (bool, error) {
+   if tods.DS.ID != nil {
+   tenantID := 0
+   if err := db.QueryRow(`SELECT tenant_id FROM deliveryservice 
where id = $1`, tods.DS.ID).Scan(&tenantID); err != nil {
+   if err == sql.ErrNoRows {
+   return false, nil
+   }
+   return false, fmt.Errorf("querying tenant ID for 
delivery service ID '%v': %v", *tods.DS.ID, err)
+   }
+   tods.DS.TenantID = &tenantID
+   return true, nil
+   }
+   if tods.DS.XMLID != nil {
+   tenantID := 0
+

Build failed in Jenkins: incubator-trafficcontrol-PR-rat #938

2018-05-23 Thread Apache Jenkins Server
See 


--
Started by upstream project "incubator-trafficcontrol-PR" build number 1659
originally caused by:
 GitHub pull request #2320 of commit dbe6b5362e80a0915366ce57f83ef50f0c995b03, 
no merge conflicts.
[EnvInject] - Loading node environment variables.
Building remotely on H28 (ubuntu xenial) in workspace 

[incubator-trafficcontrol-PR-rat] $ /bin/bash -xe 
/tmp/jenkins8318506614510898571.sh
+ rm -rf 

 

 '
[operations-center-context] Requesting copy of artifacts matching '**/*.tar.gz' 
from 'Last successful build (either stable or unstable)' of 
incubator-trafficcontrol-PR
[operations-center-context] Copied 1 artifacts matching '**/*.tar.gz' from 
'Last successful build (either stable or unstable)' of 
incubator-trafficcontrol-PR:
[operations-center-context]   apache-trafficcontrol-2.3.0-incubating.tar.gz
[incubator-trafficcontrol-PR-rat] $ /bin/bash -xe 
/tmp/jenkins5251028481529692856.sh
+ set -exu
/tmp/jenkins5251028481529692856.sh: fork: retry: No child processes
/tmp/jenkins5251028481529692856.sh: fork: retry: No child processes
/tmp/jenkins5251028481529692856.sh: fork: retry: No child processes
++ ls apache-trafficcontrol-2.3.0-incubating.tar.gz
+ tarball=apache-trafficcontrol-2.3.0-incubating.tar.gz
+ tar xzf apache-trafficcontrol-2.3.0-incubating.tar.gz
++ pwd
++ basename apache-trafficcontrol-2.3.0-incubating.tar.gz .tar.gz
+ 
tcdir=
+ cd 

++ date +%Y
+ egrep 'Copyright .*-?2018 The Apache Software Foundation' NOTICE
Copyright 2016-2018 The Apache Software Foundation
+ set +x
Searching for class files:
PASSED: No class files found.
Searching for jar files:
PASSED: No jar files found.
Searching for tar files:
PASSED: No tar files found.
Searching for tgz files:
PASSED: No tgz files found.
Searching for zip files:
PASSED: No zip files found.
++ curl 
https://repository.apache.org/content/repositories/snapshots/org/apache/rat/apache-rat/0.13-SNAPSHOT/
 -sN
/tmp/jenkins5251028481529692856.sh: fork: retry: Resource temporarily 
unavailable
++ grep jar
/tmp/jenkins5251028481529692856.sh: fork: retry: No child processes
/tmp/jenkins5251028481529692856.sh: fork: retry: Resource temporarily 
unavailable
++ grep -ve md5 -e sha1
++ awk -F '"' '{print $2}'
/tmp/jenkins5251028481529692856.sh: fork: retry: No child processes
/tmp/jenkins5251028481529692856.sh: fork: retry: Resource temporarily 
unavailable
++ sort -r
++ head -n 1
/tmp/jenkins5251028481529692856.sh: fork: retry: No child processes
++ cut -d / -f 12
+ ratver=apache-rat-0.13-20180329.151017-101.jar
++ mktemp -d
+ ratdir=/tmp/tmp.wnmNvjLhL7
+ ratjar=/tmp/tmp.wnmNvjLhL7/apache-rat-0.13.SNAPSHOT.jar
+ curl -L -o /tmp/tmp.wnmNvjLhL7/apache-rat-0.13.SNAPSHOT.jar 
https://repository.apache.org/content/repositories/snapshots/org/apache/rat/apache-rat/0.13-SNAPSHOT/apache-rat-0.13-20180329.151017-101.jar
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0  
0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0100 
1587k  100 1587k0 0  1634k  0 --:--:-- --:--:-- --:--:-- 1634k
+ curl -L -o /tmp/tmp.wnmNvjLhL7/apache-rat-0.13.SNAPSHOT.jar.sha1 
https://repository.apache.org/content/repositories/snapshots/org/apache/rat/apache-rat/0.13-SNAPSHOT/apache-rat-0.13-20180329.151017-101.jar.sha1
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0  
0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0100 
   40  100400 0 76  0 --:--:-- --:--:-- --:--:--76
++ sha1sum /tmp/tmp.wnmNvjLhL7/apache-rat-0.13.SNAPSHOT.jar
++ awk '{print $1}'
++ cat /tmp/tmp.wnmNvjLhL7/apache-rat-0.13.SNAPSHOT.jar.sha1
+ [[ 635c5eccad31cff1d713c12144eaae7fc9f10cf4 == 
635c5eccad31cff1d713c12144eaae7fc9f10cf4 ]]
++ pwd
++ pwd
+ java -jar /tmp/tmp.wnmNvjLhL7/apache-rat-0.13.SNAPSHOT.jar -E 

 -d 


[GitHub] asfgit commented on issue #2320: Start of integration tests for Grove

2018-05-23 Thread GitBox
asfgit commented on issue #2320: Start of integration tests for Grove
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2320#issuecomment-391459530
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/incubator-trafficcontrol-PR/1659/
   Test PASSed.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] knutsel opened a new pull request #2320: Start of integration tests for Grove

2018-05-23 Thread GitBox
knutsel opened a new pull request #2320: Start of integration tests for Grove
URL: https://github.com/apache/incubator-trafficcontrol/pull/2320
 
 
   See #2201 - A simple dockerized thingie to do testing. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] knutsel commented on issue #2202: Add Grove Range Request handling

2018-05-23 Thread GitBox
knutsel commented on issue #2202: Add Grove Range Request handling
URL: 
https://github.com/apache/incubator-trafficcontrol/issues/2202#issuecomment-391449960
 
 
   partially done through #2262 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] mitchell852 closed pull request #2303: Add TO Go delete cdns/name

2018-05-23 Thread GitBox
mitchell852 closed pull request #2303: Add TO Go delete cdns/name
URL: https://github.com/apache/incubator-trafficcontrol/pull/2303
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/traffic_ops/traffic_ops_golang/api/shared_handlers.go 
b/traffic_ops/traffic_ops_golang/api/shared_handlers.go
index b10e958a2..c4b520f70 100644
--- a/traffic_ops/traffic_ops_golang/api/shared_handlers.go
+++ b/traffic_ops/traffic_ops_golang/api/shared_handlers.go
@@ -465,6 +465,19 @@ func RespWriter(w http.ResponseWriter, r *http.Request) 
func(v interface{}, err
}
 }
 
+// WriteRespAlert creates an alert, serializes it as JSON, and writes that to 
w. Any errors are logged and written to w via tc.GetHandleErrorsFunc.
+// This is a helper for the common case; not using this in unusual cases is 
perfectly acceptable.
+func WriteRespAlert(w http.ResponseWriter, r *http.Request, level 
tc.AlertLevel, msg string) {
+   resp := struct{ tc.Alerts }{tc.CreateAlerts(level, msg)}
+   respBts, err := json.Marshal(resp)
+   if err != nil {
+   HandleErr(w, r, http.StatusInternalServerError, nil, 
errors.New("marshalling JSON: "+err.Error()))
+   return
+   }
+   w.Header().Set(tc.ContentType, tc.ApplicationJson)
+   w.Write(respBts)
+}
+
 // IntParams parses integer parameters, and returns map of the given params, 
or an error. This guarantees if error is nil, all requested parameters 
successfully parsed and exist in the returned map, hence if error is nil 
there's no need to check for existence. The intParams may be nil if no integer 
parameters are required.
 // This is a helper for the common case; not using this in unusual cases is 
perfectly acceptable.
 func IntParams(params map[string]string, intParamNames []string) 
(map[string]int, error) {
diff --git a/traffic_ops/traffic_ops_golang/cdn/namedelete.go 
b/traffic_ops/traffic_ops_golang/cdn/namedelete.go
new file mode 100644
index 0..6fb438947
--- /dev/null
+++ b/traffic_ops/traffic_ops_golang/cdn/namedelete.go
@@ -0,0 +1,95 @@
+package cdn
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import (
+   "database/sql"
+   "errors"
+   "net/http"
+
+   "github.com/apache/incubator-trafficcontrol/lib/go-tc"
+   
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/api"
+)
+
+func DeleteName(db *sql.DB) http.HandlerFunc {
+   return func(w http.ResponseWriter, r *http.Request) {
+   params, _, userErr, sysErr, errCode := api.AllParams(r, nil)
+   if userErr != nil || sysErr != nil {
+   api.HandleErr(w, r, errCode, userErr, sysErr)
+   return
+   }
+   cdnName := tc.CDNName(params["name"])
+   if ok, err := cdnExists(db, cdnName); err != nil {
+   api.HandleErr(w, r, http.StatusInternalServerError, 
nil, errors.New("checking CDN existence: "+err.Error()))
+   return
+   } else if !ok {
+   api.HandleErr(w, r, http.StatusNotFound, nil, nil)
+   return
+   }
+   if ok, err := cdnUnused(db, cdnName); err != nil {
+   api.HandleErr(w, r, http.StatusInternalServerError, 
nil, errors.New("checking CDN usage: "+err.Error()))
+   return
+   } else if !ok {
+   api.HandleErr(w, r, http.StatusBadRequest, 
errors.New("Failed to delete cdn name = "+string(cdnName)+" has delivery 
services or servers"), nil)
+   return
+   }
+   if err := deleteCDNByName(db, tc.CDNName(cdnName)); err != nil {
+   api.HandleErr(w, r, http.StatusInternalServerError, 
nil, errors.New("deleting CDN: "+err.Error()))
+   return
+   }
+   api.WriteRespAlert(w, r, tc.SuccessLevel, "cdn was deleted.")
+   }
+}
+
+func del

[GitHub] rob05c closed pull request #2262: Part 1 of Range Request handling

2018-05-23 Thread GitBox
rob05c closed pull request #2262: Part 1 of Range Request handling
URL: https://github.com/apache/incubator-trafficcontrol/pull/2262
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/grove/cache/handler.go b/grove/cache/handler.go
index a7a7f4a16..1e602918d 100644
--- a/grove/cache/handler.go
+++ b/grove/cache/handler.go
@@ -222,6 +222,10 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r 
*http.Request) {
log.Debugf("Serve got Cache-Control %+v (reqid %v)\n", reqCacheControl, 
reqID)
 
connectionClose := h.connectionClose || 
remappingProducer.ConnectionClose()
+
+   beforeCacheLookUpData := plugin.BeforeCacheLookUpData{Req: r, 
DefaultCacheKey: remappingProducer.CacheKey(), CacheKeyOverrideFunc: 
remappingProducer.OverrideCacheKey}
+   h.plugins.OnBeforeCacheLookup(remappingProducer.PluginCfg(), 
pluginContext, beforeCacheLookUpData)
+
cacheKey := remappingProducer.CacheKey()
retrier := NewRetrier(h, reqHeader, reqTime, reqCacheControl, 
remappingProducer, reqID)
 
diff --git a/grove/plugin/README.md b/grove/plugin/README.md
index 8dec9be29..ec390d77d 100644
--- a/grove/plugin/README.md
+++ b/grove/plugin/README.md
@@ -31,6 +31,8 @@ The `Funcs` object contains functions for each hook, as well 
as a load function
 
 * `onRequest` is called immediately when a request is received. It returns a 
boolean indicating whether to stop processing. Examples are IP blocking, or 
serving custom endpoints for statistics or to invalidate a cache entry.
 
+* `beforeCacheLookUp` is called immedidiately before looking the object up in 
the cache. It can be used to modify the cacheKey to be used to for this object 
using the passed `CacheKeyOverrideFunc` func. Once set using that function 
Grove will keep using that cacheKey throughout the life of the object in the 
cache.
+
 * `beforeParentRequest` is called immediately before making a request to a 
parent. It may manipulate the request being made to the parent. Examples are 
removing headers in the client request such as `Range`.
 
 * `beforeRespond` is called immediately before responding to a client. It may 
manipulate the code, headers, and body being returned. Examples are header 
modifications, or handling if-modified-since requests.
diff --git a/grove/plugin/plugin.go b/grove/plugin/plugin.go
index ec425c7bd..140c4e4f8 100644
--- a/grove/plugin/plugin.go
+++ b/grove/plugin/plugin.go
@@ -47,6 +47,7 @@ type Funcs struct {
loadLoadFunc
startup StartupFunc
onRequest   OnRequestFunc
+   beforeCacheLookUp   BeforeCacheLookupFunc
beforeParentRequest BeforeParentRequestFunc
beforeRespond   BeforeRespondFunc
afterRespondAfterRespondFunc
@@ -91,6 +92,13 @@ type BeforeRespondData struct {
Context   *interface{}
 }
 
+type BeforeCacheLookUpData struct {
+   Req  *http.Request
+   CacheKeyOverrideFunc func(string)
+   DefaultCacheKey  string
+   Context  *interface{}
+}
+
 type AfterRespondData struct {
W http.ResponseWriter
Stats stat.Stats
@@ -105,6 +113,7 @@ type AfterRespondData struct {
 type LoadFunc func(json.RawMessage) interface{}
 type StartupFunc func(icfg interface{}, d StartupData)
 type OnRequestFunc func(icfg interface{}, d OnRequestData) bool
+type BeforeCacheLookupFunc func(icfg interface{}, d BeforeCacheLookUpData)
 type BeforeParentRequestFunc func(icfg interface{}, d BeforeParentRequestData)
 type BeforeRespondFunc func(icfg interface{}, d BeforeRespondData)
 type AfterRespondFunc func(icfg interface{}, d AfterRespondData)
@@ -132,6 +141,7 @@ type Plugins interface {
LoadFuncs() map[string]LoadFunc
OnStartup(cfgs map[string]interface{}, context map[string]*interface{}, 
d StartupData)
OnRequest(cfgs map[string]interface{}, context map[string]*interface{}, 
d OnRequestData) bool
+   OnBeforeCacheLookup(cfgs map[string]interface{}, context 
map[string]*interface{}, d BeforeCacheLookUpData)
OnBeforeParentRequest(cfgs map[string]interface{}, context 
map[string]*interface{}, d BeforeParentRequestData)
OnBeforeRespond(cfgs map[string]interface{}, context 
map[string]*interface{}, d BeforeRespondData)
OnAfterRespond(cfgs map[string]interface{}, context 
map[string]*interface{}, d AfterRespondData)
@@ -175,6 +185,16 @@ func (ps pluginsSlice) OnRequest(cfgs 
map[string]interface{}, context map[string
return false
 }
 
+func (ps pluginsSlice) OnBeforeCacheLookup(cfgs map[string]interface{}, 
context map[string]*interface{}, d BeforeCacheLookUpData) {
+   for _, p := range ps {
+   if p.funcs.beforeCacheLookUp == nil {
+ 

[GitHub] rob05c closed pull request #2246: Add HitCount and FreshFor

2018-05-23 Thread GitBox
rob05c closed pull request #2246: Add HitCount and FreshFor
URL: https://github.com/apache/incubator-trafficcontrol/pull/2246
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/grove/cache/handler.go b/grove/cache/handler.go
index a7a7f4a16..216378c18 100644
--- a/grove/cache/handler.go
+++ b/grove/cache/handler.go
@@ -27,6 +27,7 @@ import (
 
"github.com/apache/incubator-trafficcontrol/grove/remap"
"github.com/apache/incubator-trafficcontrol/grove/remapdata"
+   "github.com/apache/incubator-trafficcontrol/grove/rfc"
"github.com/apache/incubator-trafficcontrol/grove/stat"
"github.com/apache/incubator-trafficcontrol/grove/thread"
"github.com/apache/incubator-trafficcontrol/grove/web"
@@ -261,7 +262,7 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r 
*http.Request) {
}
 
reqHeaders := r.Header
-   canReuseStored := remap.CanReuseStored(reqHeaders, 
cacheObj.RespHeaders, reqCacheControl, cacheObj.RespCacheControl, 
cacheObj.ReqHeaders, cacheObj.ReqRespTime, cacheObj.RespRespTime, h.strictRFC)
+   canReuseStored := rfc.CanReuseStored(reqHeaders, cacheObj.RespHeaders, 
reqCacheControl, cacheObj.RespCacheControl, cacheObj.ReqHeaders, 
cacheObj.ReqRespTime, cacheObj.RespRespTime, h.strictRFC)
 
if canReuseStored != remapdata.ReuseCan { // run the 
BeforeParentRequest hook for revalidations / ReuseCannot
beforeParentRequestData := plugin.BeforeParentRequestData{Req: 
r, RemapRule: remappingProducer.Name()}
diff --git a/grove/cache/retryinggetter.go b/grove/cache/retryinggetter.go
index 12a0cf817..b70a6d48d 100644
--- a/grove/cache/retryinggetter.go
+++ b/grove/cache/retryinggetter.go
@@ -23,6 +23,7 @@ import (
"github.com/apache/incubator-trafficcontrol/grove/cacheobj"
"github.com/apache/incubator-trafficcontrol/grove/icache"
"github.com/apache/incubator-trafficcontrol/grove/remap"
+   "github.com/apache/incubator-trafficcontrol/grove/rfc"
"github.com/apache/incubator-trafficcontrol/grove/thread"
"github.com/apache/incubator-trafficcontrol/grove/web"
 
@@ -56,7 +57,7 @@ func (r *Retrier) Get(req *http.Request, obj 
*cacheobj.CacheObj) (*cacheobj.Cach
retryGetFunc := func(remapping remap.Remapping, retryFailures bool, obj 
*cacheobj.CacheObj) *cacheobj.CacheObj {
// return true for Revalidate, and issue revalidate requests 
separately.
canReuse := func(cacheObj *cacheobj.CacheObj) bool {
-   return remap.CanReuse(r.ReqHdr, r.ReqCacheControl, 
cacheObj, r.H.strictRFC, true)
+   return rfc.CanReuse(r.ReqHdr, r.ReqCacheControl, 
cacheObj, r.H.strictRFC, true)
}
getAndCache := func() *cacheobj.CacheObj {
return GetAndCache(remapping.Request, 
remapping.ProxyURL, remapping.CacheKey, remapping.Name, 
remapping.Request.Header, r.ReqTime, r.H.strictRFC, remapping.Cache, 
r.H.ruleThrottlers[remapping.Name], obj, remapping.Timeout, retryFailures, 
remapping.RetryNum, remapping.RetryCodes, remapping.Transport, r.ReqID)
@@ -166,7 +167,7 @@ func GetAndCache(
if revalidateObj == nil || respCode != http.StatusNotModified {
log.Debugf("GetAndCache new %v (reqid %v)\n", cacheKey, 
reqID)
obj = cacheobj.New(reqHeader, respBody, respCode, 
respCode, proxyURLStr, respHeader, reqTime, reqRespTime, respRespTime, 
lastModified)
-   if !remap.CanCache(req.Method, reqHeader, respCode, 
respHeader, strictRFC) {
+   if !rfc.CanCache(req.Method, reqHeader, respCode, 
respHeader, strictRFC) {
return obj // return without caching
}
} else {
@@ -187,6 +188,7 @@ func GetAndCache(
RespRespTime: respRespTime,
LastModified: revalidateObj.LastModified,
Size: revalidateObj.Size,
+   HitCount: revalidateObj.HitCount, // no 
need to +1 here, the cache Get did that
}
}
cache.Add(cacheKey, obj) // TODO store pointer?
diff --git a/grove/cacheobj/cacheobj.go b/grove/cacheobj/cacheobj.go
index 3e6b27f51..c05888fb9 100644
--- a/grove/cacheobj/cacheobj.go
+++ b/grove/cacheobj/cacheobj.go
@@ -34,6 +34,7 @@ type CacheObj struct {
RespRespTime time.Time // the origin server's Date time when the 
object was sent
LastModified time.Time // the origin LastModified if it exists, or 
Date if it doesn't
Size uint64
+   HitCount ui

Build failed in Jenkins: incubator-trafficcontrol-PR-rat #937

2018-05-23 Thread Apache Jenkins Server
See 


--
Started by upstream project "incubator-trafficcontrol-PR" build number 1658
originally caused by:
 GitHub pull request #2124 of commit 7a4f565d76ebff8af6d1ad5e50f9015cb29a3739, 
no merge conflicts.
[EnvInject] - Loading node environment variables.
Building remotely on H28 (ubuntu xenial) in workspace 

[incubator-trafficcontrol-PR-rat] $ /bin/bash -xe 
/tmp/jenkins4428751860839667547.sh
+ rm -rf 

 

 '
[operations-center-context] Requesting copy of artifacts matching '**/*.tar.gz' 
from 'Last successful build (either stable or unstable)' of 
incubator-trafficcontrol-PR
[operations-center-context] Copied 1 artifacts matching '**/*.tar.gz' from 
'Last successful build (either stable or unstable)' of 
incubator-trafficcontrol-PR:
[operations-center-context]   apache-trafficcontrol-2.3.0-incubating.tar.gz
[incubator-trafficcontrol-PR-rat] $ /bin/bash -xe 
/tmp/jenkins6412363922116171031.sh
+ set -exu
++ ls apache-trafficcontrol-2.3.0-incubating.tar.gz
+ tarball=apache-trafficcontrol-2.3.0-incubating.tar.gz
+ tar xzf apache-trafficcontrol-2.3.0-incubating.tar.gz
++ pwd
++ basename apache-trafficcontrol-2.3.0-incubating.tar.gz .tar.gz
+ 
tcdir=
+ cd 

++ date +%Y
+ egrep 'Copyright .*-?2018 The Apache Software Foundation' NOTICE
Copyright 2016-2018 The Apache Software Foundation
+ set +x
Searching for class files:
PASSED: No class files found.
Searching for jar files:
PASSED: No jar files found.
Searching for tar files:
PASSED: No tar files found.
Searching for tgz files:
PASSED: No tgz files found.
Searching for zip files:
PASSED: No zip files found.
++ curl 
https://repository.apache.org/content/repositories/snapshots/org/apache/rat/apache-rat/0.13-SNAPSHOT/
 -sN
++ grep jar
++ grep -ve md5 -e sha1
++ awk -F '"' '{print $2}'
++ sort -r
++ cut -d / -f 12
++ head -n 1
+ ratver=apache-rat-0.13-20180329.151017-101.jar
++ mktemp -d
+ ratdir=/tmp/tmp.d57JyIvBYi
+ ratjar=/tmp/tmp.d57JyIvBYi/apache-rat-0.13.SNAPSHOT.jar
+ curl -L -o /tmp/tmp.d57JyIvBYi/apache-rat-0.13.SNAPSHOT.jar 
https://repository.apache.org/content/repositories/snapshots/org/apache/rat/apache-rat/0.13-SNAPSHOT/apache-rat-0.13-20180329.151017-101.jar
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0 
25 1587k   25  408k0 0   483k  0  0:00:03 --:--:--  0:00:03  
482k100 1587k  100 1587k0 0  1678k  0 --:--:-- --:--:-- --:--:-- 
1677k
+ curl -L -o /tmp/tmp.d57JyIvBYi/apache-rat-0.13.SNAPSHOT.jar.sha1 
https://repository.apache.org/content/repositories/snapshots/org/apache/rat/apache-rat/0.13-SNAPSHOT/apache-rat-0.13-20180329.151017-101.jar.sha1
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 
010040  100400 0 76  0 --:--:-- --:--:-- --:--:--76
++ sha1sum /tmp/tmp.d57JyIvBYi/apache-rat-0.13.SNAPSHOT.jar
++ awk '{print $1}'
++ cat /tmp/tmp.d57JyIvBYi/apache-rat-0.13.SNAPSHOT.jar.sha1
+ [[ 635c5eccad31cff1d713c12144eaae7fc9f10cf4 == 
635c5eccad31cff1d713c12144eaae7fc9f10cf4 ]]
++ pwd
++ pwd
+ java -jar /tmp/tmp.d57JyIvBYi/apache-rat-0.13.SNAPSHOT.jar -E 

 -d 

+ rm -rf /tmp/tmp.d57JyIvBYi
++ perl -lne 'print $1 if /(\d+) Unknown Licenses/' ratreport.txt
+ unknown=77
+ [[ 77 != 0 ]]
+ echo '77 Unknown Licenses'
77 Unknown Licenses
+ perl -lne 'print if /Files with unapproved licenses:/ .. /^\*\*\*/' 
ratreport.txt
+ sed s:::
Files with unapproved licenses:

  
apache-trafficcontrol-2.3.0-incubating/traffic_ops/traffic_ops_golang/vendor/github.com/miekg/dns/CONTRIBUTORS
  
apache-trafficcontrol-2.3.0-incubating/traffic_ops/traffic_ops_golang/vendor/github.com/miekg/dns/Gopkg.lock
  
apache-trafficcontrol-2.3.0-incubating/traffic_ops/traffic_ops_golang/vendor/github

[GitHub] asfgit commented on issue #2124: Add TO Go deliveryservices routes

2018-05-23 Thread GitBox
asfgit commented on issue #2124: Add TO Go deliveryservices routes
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2124#issuecomment-391401251
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/incubator-trafficcontrol-PR/1658/
   Test PASSed.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


Build failed in Jenkins: incubator-trafficcontrol-PR-rat #936

2018-05-23 Thread Apache Jenkins Server
See 


--
Started by upstream project "incubator-trafficcontrol-PR" build number 1657
originally caused by:
 GitHub pull request #2124 of commit 312bd479c0ae62de4a255b25262f86c25d79b1bb, 
no merge conflicts.
[EnvInject] - Loading node environment variables.
Building remotely on H28 (ubuntu xenial) in workspace 

[incubator-trafficcontrol-PR-rat] $ /bin/bash -xe 
/tmp/jenkins5780583739267232859.sh
+ rm -rf 

 

 '
[operations-center-context] Requesting copy of artifacts matching '**/*.tar.gz' 
from 'Last successful build (either stable or unstable)' of 
incubator-trafficcontrol-PR
[operations-center-context] Copied 1 artifacts matching '**/*.tar.gz' from 
'Last successful build (either stable or unstable)' of 
incubator-trafficcontrol-PR:
[operations-center-context]   apache-trafficcontrol-2.3.0-incubating.tar.gz
[incubator-trafficcontrol-PR-rat] $ /bin/bash -xe 
/tmp/jenkins7509537373517994775.sh
+ set -exu
++ ls apache-trafficcontrol-2.3.0-incubating.tar.gz
+ tarball=apache-trafficcontrol-2.3.0-incubating.tar.gz
+ tar xzf apache-trafficcontrol-2.3.0-incubating.tar.gz
++ pwd
++ basename apache-trafficcontrol-2.3.0-incubating.tar.gz .tar.gz
+ 
tcdir=
+ cd 

++ date +%Y
+ egrep 'Copyright .*-?2018 The Apache Software Foundation' NOTICE
Copyright 2016-2018 The Apache Software Foundation
+ set +x
Searching for class files:
PASSED: No class files found.
Searching for jar files:
PASSED: No jar files found.
Searching for tar files:
PASSED: No tar files found.
Searching for tgz files:
PASSED: No tgz files found.
Searching for zip files:
PASSED: No zip files found.
++ curl 
https://repository.apache.org/content/repositories/snapshots/org/apache/rat/apache-rat/0.13-SNAPSHOT/
 -sN
++ grep jar
++ grep -ve md5 -e sha1
++ awk -F '"' '{print $2}'
++ sort -r
++ head -n 1
++ cut -d / -f 12
+ ratver=apache-rat-0.13-20180329.151017-101.jar
++ mktemp -d
+ ratdir=/tmp/tmp.9pTZMRCdsv
+ ratjar=/tmp/tmp.9pTZMRCdsv/apache-rat-0.13.SNAPSHOT.jar
+ curl -L -o /tmp/tmp.9pTZMRCdsv/apache-rat-0.13.SNAPSHOT.jar 
https://repository.apache.org/content/repositories/snapshots/org/apache/rat/apache-rat/0.13-SNAPSHOT/apache-rat-0.13-20180329.151017-101.jar
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0 
13 1587k   13  208k0 0   261k  0  0:00:06 --:--:--  0:00:06  
261k100 1587k  100 1587k0 0  1687k  0 --:--:-- --:--:-- --:--:-- 
1686k
+ curl -L -o /tmp/tmp.9pTZMRCdsv/apache-rat-0.13.SNAPSHOT.jar.sha1 
https://repository.apache.org/content/repositories/snapshots/org/apache/rat/apache-rat/0.13-SNAPSHOT/apache-rat-0.13-20180329.151017-101.jar.sha1
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 
010040  100400 0 72  0 --:--:-- --:--:-- --:--:--72
++ sha1sum /tmp/tmp.9pTZMRCdsv/apache-rat-0.13.SNAPSHOT.jar
++ awk '{print $1}'
++ cat /tmp/tmp.9pTZMRCdsv/apache-rat-0.13.SNAPSHOT.jar.sha1
+ [[ 635c5eccad31cff1d713c12144eaae7fc9f10cf4 == 
635c5eccad31cff1d713c12144eaae7fc9f10cf4 ]]
++ pwd
++ pwd
+ java -jar /tmp/tmp.9pTZMRCdsv/apache-rat-0.13.SNAPSHOT.jar -E 

 -d 

+ rm -rf /tmp/tmp.9pTZMRCdsv
++ perl -lne 'print $1 if /(\d+) Unknown Licenses/' ratreport.txt
+ unknown=77
+ [[ 77 != 0 ]]
+ echo '77 Unknown Licenses'
77 Unknown Licenses
+ perl -lne 'print if /Files with unapproved licenses:/ .. /^\*\*\*/' 
ratreport.txt
+ sed s:::
Files with unapproved licenses:

  
apache-trafficcontrol-2.3.0-incubating/traffic_ops/traffic_ops_golang/vendor/github.com/miekg/dns/CONTRIBUTORS
  
apache-trafficcontrol-2.3.0-incubating/traffic_ops/traffic_ops_golang/vendor/github.com/miekg/dns/Gopkg.lock
  
apache-trafficcontrol-2.3.0-incubating/traffic_ops/traffic_ops_golang/vendor/github

[GitHub] asfgit commented on issue #2124: Add TO Go deliveryservices routes

2018-05-23 Thread GitBox
asfgit commented on issue #2124: Add TO Go deliveryservices routes
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2124#issuecomment-391399537
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/incubator-trafficcontrol-PR/1657/
   Test PASSed.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rob05c commented on a change in pull request #2124: Add TO Go deliveryservices routes

2018-05-23 Thread GitBox
rob05c commented on a change in pull request #2124: Add TO Go deliveryservices 
routes
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2124#discussion_r190302405
 
 

 ##
 File path: 
traffic_ops/traffic_ops_golang/deliveryservice/deliveryservicesv12.go
 ##
 @@ -0,0 +1,326 @@
+package deliveryservice
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import (
+   "database/sql"
+   "errors"
+   "fmt"
+   "regexp"
+   "strings"
+
+   "github.com/apache/incubator-trafficcontrol/lib/go-tc"
+   "github.com/apache/incubator-trafficcontrol/lib/go-log"
+   
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/api"
+   
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/auth"
+   
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/config"
+   
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/tenant"
+   
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/tovalidate"
+
+   "github.com/asaskevich/govalidator"
+   "github.com/go-ozzo/ozzo-validation"
+   "github.com/jmoiron/sqlx"
+)
+
+type TODeliveryServiceV12 struct {
+   DS  *tc.DeliveryServiceNullableV12
+   Cfg config.Config
+   DB  *sqlx.DB
+}
+
+func GetRefTypeV12(cfg config.Config, db *sqlx.DB) *TODeliveryServiceV12 {
+   return &TODeliveryServiceV12{Cfg: cfg, DB: db, DS: 
&tc.DeliveryServiceNullableV12{}}
+}
+
+func (ds TODeliveryServiceV12) GetKeyFieldsInfo() []api.KeyFieldInfo {
+   return []api.KeyFieldInfo{{"id", api.GetIntKey}}
+}
+
+func (tods TODeliveryServiceV12) GetKeys() (map[string]interface{}, bool) {
+   if tods.DS.ID == nil {
+   return map[string]interface{}{"id": 0}, false
+   }
+   return map[string]interface{}{"id": *tods.DS.ID}, true
+}
+
+func (tods *TODeliveryServiceV12) SetKeys(keys map[string]interface{}) {
+   i, _ := keys["id"].(int) //this utilizes the non panicking type 
assertion, if the thrown away ok variable is false i will be the zero of the 
type, 0 here.
+   tods.DS.ID = &i
+}
+
+func (tods *TODeliveryServiceV12) GetAuditName() string {
+   if tods.DS != nil && tods.DS.XMLID != nil {
+   return *tods.DS.XMLID
+   }
+   return ""
+}
+
+func (tods *TODeliveryServiceV12) GetType() string {
+   return "ds"
+}
+
+func ValidateV12(db *sqlx.DB, ds *tc.DeliveryServiceNullableV12) []error {
+   if ds == nil {
+   return []error{}
+   }
+   tods := TODeliveryServiceV12{DS: ds, DB: db} // TODO pass config?
+   return tods.Validate(db)
+}
+
+func (tods *TODeliveryServiceV12) Sanitize(db *sqlx.DB) {
+   ds := tods.DS
+   if ds.GeoLimitCountries != nil {
+   *ds.GeoLimitCountries = 
strings.ToUpper(strings.Replace(*ds.GeoLimitCountries, " ", "", -1))
+   }
+   if ds.ProfileID != nil && *ds.ProfileID == -1 {
+   ds.ProfileID = nil
+   }
+   if ds.EdgeHeaderRewrite != nil && 
strings.TrimSpace(*ds.EdgeHeaderRewrite) == "" {
+   ds.EdgeHeaderRewrite = nil
+   }
+   if ds.MidHeaderRewrite != nil && 
strings.TrimSpace(*ds.MidHeaderRewrite) == "" {
+   ds.MidHeaderRewrite = nil
+   }
+}
+
+// LoadTenantID loads the DeliveryService's tenant ID from the database, using 
the DS ID or XMLID if either exists. Sets tods.DS.TenantID on success, and 
returns whether the delivery service was found, and any error.
+func (tods *TODeliveryServiceV12) LoadTenantID(db *sqlx.DB) (bool, error) {
+   if tods.DS.ID != nil {
+   tenantID := 0
 
 Review comment:
   Fixed.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


Jenkins build is back to normal : incubator-trafficcontrol-PR-rat #935

2018-05-23 Thread Apache Jenkins Server
See 




[GitHub] asfgit commented on issue #2319: Fix ldap conf load

2018-05-23 Thread GitBox
asfgit commented on issue #2319: Fix ldap conf load
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2319#issuecomment-391392395
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/incubator-trafficcontrol-PR/1656/
   Test PASSed.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rob05c closed pull request #2319: Fix ldap conf load

2018-05-23 Thread GitBox
rob05c closed pull request #2319: Fix ldap conf load
URL: https://github.com/apache/incubator-trafficcontrol/pull/2319
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/traffic_ops/app/conf/example-ldap.conf 
b/traffic_ops/app/conf/example-ldap.conf
index 9224ae2c8..34ce4b624 100644
--- a/traffic_ops/app/conf/example-ldap.conf
+++ b/traffic_ops/app/conf/example-ldap.conf
@@ -4,6 +4,6 @@
"admin_dn" : "user@prefix.domain.suffix",
"host" : "ldaps://host:[port]",
"search_query" : 
"(&(objectCategory=person)(objectClass=user)(userName=%s))",
-   "verify_tls" : "true",
+   "insecure" : "false",
"ldap_timeout_secs" : 20
 }
diff --git a/traffic_ops/traffic_ops_golang/config/config.go 
b/traffic_ops/traffic_ops_golang/config/config.go
index 17248cf38..25f2188b5 100644
--- a/traffic_ops/traffic_ops_golang/config/config.go
+++ b/traffic_ops/traffic_ops_golang/config/config.go
@@ -171,7 +171,7 @@ func LoadConfig(cdnConfPath string, dbConfPath string, 
riakConfPath string, appV
}
} else { // ldap config location not specified in cdn.conf, check in 
directory with cdn.conf for backwards compatibility with perl.
confDir := filepath.Dir(cdnConfPath)
-   genericLDAPConfPath := filepath.Join(confDir, "cdn.conf")
+   genericLDAPConfPath := filepath.Join(confDir, "ldap.conf")
if _, err := os.Stat(genericLDAPConfPath); !os.IsNotExist(err) 
{ // ldap.conf exists and we should error if it is not readable/parseable.
cfg.LDAPEnabled, cfg.ConfigLDAP, err = 
GetLDAPConfig(genericLDAPConfPath)
if err != nil { // no config or unparseable, do not 
enable LDAP


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] DylanVolz opened a new pull request #2319: Fix ldap conf load

2018-05-23 Thread GitBox
DylanVolz opened a new pull request #2319: Fix ldap conf load
URL: https://github.com/apache/incubator-trafficcontrol/pull/2319
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


Build failed in Jenkins: incubator-trafficcontrol-PR-rat #934

2018-05-23 Thread Apache Jenkins Server
See 


--
Started by upstream project "incubator-trafficcontrol-PR" build number 1655
originally caused by:
 GitHub pull request #2124 of commit 193d512fa3b627e75cd6e2fe821490195895d1cb, 
no merge conflicts.
[EnvInject] - Loading node environment variables.
Building remotely on H28 (ubuntu xenial) in workspace 

[incubator-trafficcontrol-PR-rat] $ /bin/bash -xe 
/tmp/jenkins6800345515347884962.sh
+ rm -rf 

 

 '
[operations-center-context] Requesting copy of artifacts matching '**/*.tar.gz' 
from 'Last successful build (either stable or unstable)' of 
incubator-trafficcontrol-PR
[operations-center-context] Copied 1 artifacts matching '**/*.tar.gz' from 
'Last successful build (either stable or unstable)' of 
incubator-trafficcontrol-PR:
[operations-center-context]   apache-trafficcontrol-2.3.0-incubating.tar.gz
[incubator-trafficcontrol-PR-rat] $ /bin/bash -xe 
/tmp/jenkins5880485844303026720.sh
+ set -exu
++ ls apache-trafficcontrol-2.3.0-incubating.tar.gz
+ tarball=apache-trafficcontrol-2.3.0-incubating.tar.gz
+ tar xzf apache-trafficcontrol-2.3.0-incubating.tar.gz
++ pwd
++ basename apache-trafficcontrol-2.3.0-incubating.tar.gz .tar.gz
+ 
tcdir=
+ cd 

++ date +%Y
+ egrep 'Copyright .*-?2018 The Apache Software Foundation' NOTICE
Copyright 2016-2018 The Apache Software Foundation
+ set +x
Searching for class files:
PASSED: No class files found.
Searching for jar files:
PASSED: No jar files found.
Searching for tar files:
PASSED: No tar files found.
Searching for tgz files:
PASSED: No tgz files found.
Searching for zip files:
PASSED: No zip files found.
++ curl 
https://repository.apache.org/content/repositories/snapshots/org/apache/rat/apache-rat/0.13-SNAPSHOT/
 -sN
++ grep jar
++ awk -F '"' '{print $2}'
++ sort -r
++ cut -d / -f 12
++ grep -ve md5 -e sha1
++ head -n 1
+ ratver=apache-rat-0.13-20180329.151017-101.jar
++ mktemp -d
+ ratdir=/tmp/tmp.LRlBki9c0x
+ ratjar=/tmp/tmp.LRlBki9c0x/apache-rat-0.13.SNAPSHOT.jar
+ curl -L -o /tmp/tmp.LRlBki9c0x/apache-rat-0.13.SNAPSHOT.jar 
https://repository.apache.org/content/repositories/snapshots/org/apache/rat/apache-rat/0.13-SNAPSHOT/apache-rat-0.13-20180329.151017-101.jar
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0  
0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0100 
1587k  100 1587k0 0  1682k  0 --:--:-- --:--:-- --:--:-- 1681k
+ curl -L -o /tmp/tmp.LRlBki9c0x/apache-rat-0.13.SNAPSHOT.jar.sha1 
https://repository.apache.org/content/repositories/snapshots/org/apache/rat/apache-rat/0.13-SNAPSHOT/apache-rat-0.13-20180329.151017-101.jar.sha1
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0  
0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0100 
   40  100400 0 76  0 --:--:-- --:--:-- --:--:--76
++ sha1sum /tmp/tmp.LRlBki9c0x/apache-rat-0.13.SNAPSHOT.jar
++ awk '{print $1}'
++ cat /tmp/tmp.LRlBki9c0x/apache-rat-0.13.SNAPSHOT.jar.sha1
+ [[ 635c5eccad31cff1d713c12144eaae7fc9f10cf4 == 
635c5eccad31cff1d713c12144eaae7fc9f10cf4 ]]
++ pwd
++ pwd
+ java -jar /tmp/tmp.LRlBki9c0x/apache-rat-0.13.SNAPSHOT.jar -E 

 -d 

+ rm -rf /tmp/tmp.LRlBki9c0x
++ perl -lne 'print $1 if /(\d+) Unknown Licenses/' ratreport.txt
+ unknown=77
+ [[ 77 != 0 ]]
+ echo '77 Unknown Licenses'
77 Unknown Licenses
+ perl -lne 'print if /Files with unapproved licenses:/ .. /^\*\*\*/' 
ratreport.txt
+ sed s:::
Files with unapproved licenses:

  
apache-trafficcontrol-2.3.0-incubating/traffic_ops/traffic_ops_golang/vendor/github.com/miekg/dns/CONTRIBUTORS
  
apache-trafficcontrol-2.3.0-incubating/traffic_ops/traffic_ops_golang/vendor/github.com/miekg/dns/Gopkg.lock
  
apach

[GitHub] asfgit commented on issue #2124: Add TO Go deliveryservices routes

2018-05-23 Thread GitBox
asfgit commented on issue #2124: Add TO Go deliveryservices routes
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2124#issuecomment-391388974
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/incubator-trafficcontrol-PR/1655/
   Test PASSed.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


Build failed in Jenkins: incubator-trafficcontrol-traffic_ops-test #645

2018-05-23 Thread Apache Jenkins Server
See 


Changes:

[neuman] only show ds form field tooltip when label is clicked

[rob05c] in rpm build, set permissions of conf files to not be world-readable

[rob05c] add changelog note

--
[...truncated 97.06 KB...]
unit_golang_1  | --- PASS: TestFuncs (0.00s)
unit_golang_1  | === RUN   TestInterfaces
unit_golang_1  | --- PASS: TestInterfaces (0.00s)
unit_golang_1  | === RUN   TestValidate
unit_golang_1  | --- PASS: TestValidate (0.00s)
unit_golang_1  | PASS
unit_golang_1  | coverage: 23.0% of statements
unit_golang_1  | ok 
github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/cdn   
0.018s  coverage: 23.0% of statements
unit_golang_1  | === RUN   TestLogLocation
unit_golang_1  | --- PASS: TestLogLocation (0.00s)
unit_golang_1  | === RUN   TestLoadConfig
unit_golang_1  | --- PASS: TestLoadConfig (0.00s)
unit_golang_1  | PASS
unit_golang_1  | coverage: 64.2% of statements
unit_golang_1  | ok 
github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/config
0.020s  coverage: 64.2% of statements
unit_golang_1  | === RUN   TestReadCoordinates
unit_golang_1  | --- PASS: TestReadCoordinates (0.00s)
unit_golang_1  | === RUN   TestFuncs
unit_golang_1  | --- PASS: TestFuncs (0.00s)
unit_golang_1  | === RUN   TestInterfaces
unit_golang_1  | --- PASS: TestInterfaces (0.00s)
unit_golang_1  | === RUN   TestValidate
unit_golang_1  | --- PASS: TestValidate (0.00s)
unit_golang_1  | PASS
unit_golang_1  | coverage: 23.7% of statements
unit_golang_1  | ok 
github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/coordinate
0.041s  coverage: 23.7% of statements
unit_golang_1  | === RUN   TestGetConfigParams
unit_golang_1  | --- PASS: TestGetConfigParams (0.00s)
unit_golang_1  | === RUN   TestMakeCRConfigConfig
unit_golang_1  | --- PASS: TestMakeCRConfigConfig (0.00s)
unit_golang_1  | === RUN   TestMakeDSes
unit_golang_1  | --- PASS: TestMakeDSes (0.00s)
unit_golang_1  | === RUN   TestGetServerProfileParams
unit_golang_1  | --- PASS: TestGetServerProfileParams (0.00s)
unit_golang_1  | === RUN   TestGetDSRegexesDomains
unit_golang_1  | --- PASS: TestGetDSRegexesDomains (0.00s)
unit_golang_1  | === RUN   TestGetStaticDNSEntries
unit_golang_1  | --- PASS: TestGetStaticDNSEntries (0.00s)
unit_golang_1  | === RUN   TestMakeLocations
unit_golang_1  | --- PASS: TestMakeLocations (0.00s)
unit_golang_1  | === RUN   TestGetServerParams
unit_golang_1  | --- PASS: TestGetServerParams (0.00s)
unit_golang_1  | === RUN   TestGetAllServers
unit_golang_1  | --- PASS: TestGetAllServers (0.00s)
unit_golang_1  | === RUN   TestGetServerDSNames
unit_golang_1  | --- PASS: TestGetServerDSNames (0.00s)
unit_golang_1  | === RUN   TestGetServerDSes
unit_golang_1  | --- PASS: TestGetServerDSes (0.00s)
unit_golang_1  | === RUN   TestGetCDNInfo
unit_golang_1  | --- PASS: TestGetCDNInfo (0.00s)
unit_golang_1  | === RUN   TestGetCDNNameFromID
unit_golang_1  | --- PASS: TestGetCDNNameFromID (0.00s)
unit_golang_1  | === RUN   TestGetSnapshot
unit_golang_1  | --- PASS: TestGetSnapshot (0.00s)
unit_golang_1  | === RUN   TestSnapshot
unit_golang_1  | --- PASS: TestSnapshot (0.00s)
unit_golang_1  | === RUN   TestMakeStats
unit_golang_1  | --- PASS: TestMakeStats (0.00s)
unit_golang_1  | PASS
unit_golang_1  | coverage: 50.6% of statements
unit_golang_1  | ok 
github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/crconfig
  0.014s  coverage: 50.6% of statements
unit_golang_1  | === RUN   TestBuildQuery
unit_golang_1  | --- PASS: TestBuildQuery (0.00s)
unit_golang_1  | PASS
unit_golang_1  | coverage: 59.6% of statements
unit_golang_1  | ok 
github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/dbhelpers
 0.019s  coverage: 59.6% of statements
unit_golang_1  | === RUN   TestInterfaces
unit_golang_1  | --- PASS: TestInterfaces (0.00s)
unit_golang_1  | === RUN   TestValidateErrors
unit_golang_1  | --- PASS: TestValidateErrors (0.00s)
unit_golang_1  | PASS
unit_golang_1  | coverage: 3.8% of statements
unit_golang_1  | ok 
github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/deliveryservice
   0.022s  coverage: 3.8% of statements
unit_golang_1  | === RUN   TestInterfaces
unit_golang_1  | --- PASS: TestInterfaces (0.00s)
unit_golang_1  | === RUN   TestGetDeliveryServiceRequest
unit_golang_1  | --- PASS: TestGetDeliveryServiceRequest (0.00s)
unit_golang_1  | PASS
unit_golang_1  | coverage: 2.3% of statements
unit_golang_1  | ok 
github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/deliveryservice/request
   0.010s  coverage: 2.3% of statements
unit_golang_1  | === RUN   TestFuncs
unit_golang_1  | --- PASS: TestFuncs (0.00s)
unit_golang_1  | === RUN   TestInterfaces
unit_golang_1  | --- PASS: TestInterfaces (0.00s)
unit_golang_1  | === RUN 

[GitHub] rob05c commented on a change in pull request #2282: Deliveryservice_Server API conversion to Go - formerly #2269

2018-05-23 Thread GitBox
rob05c commented on a change in pull request #2282: Deliveryservice_Server API 
conversion to Go - formerly #2269
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2282#discussion_r190276662
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/deliveryservice/servers/servers.go
 ##
 @@ -263,7 +243,447 @@ func (dss *TODeliveryServiceServer) Delete(db *sqlx.DB, 
user auth.CurrentUser) (
rollbackTransaction = false
return nil, tc.NoError
 }
-func selectQuery() string {
+
+func selectQuery(orderBy string, limit string, offset string) (string, error) {
+
+   selectStmt := `SELECT
+   s.deliveryService,
+   s.server,
+   s.last_updated
+   FROM deliveryservice_server s`
+
+   allowedOrderByCols := map[string]string{
+   "":"",
+   "deliveryservice": "s.deliveryService",
+   "server":  "s.server",
+   "lastupdated": "s.last_updated",
+   "deliveryService": "s.deliveryService",
+   "lastUpdated": "s.last_updated",
+   "last_updated":"s.last_updated",
+   }
+   orderBy, ok := allowedOrderByCols[orderBy]
+   if !ok {
+   return "", errors.New("orderBy '" + orderBy + "' not permitted")
+   }
+
+   if orderBy != "" {
+   selectStmt += ` ORDER BY ` + orderBy
+   }
+
+   selectStmt += ` LIMIT ` + limit + ` OFFSET ` + offset + ` ROWS`
+   return selectStmt, nil
+}
+
+func deleteQuery() string {
+   query := `DELETE FROM deliveryservice_server
+   WHERE deliveryservice=:deliveryservice and server=:server`
+   return query
+}
+
+type DSServers struct {
+   DsId*int  `json:"dsId" db:"deliveryservice"`
+   Servers []int `json:"servers"`
+   Replace *bool `json:"replace"`
+}
+
+type TODSServers DSServers
+
+
+func createServersForDsIdRef() *TODSServers {
+   var dsserversRef = TODSServers(DSServers{})
+   return &dsserversRef
+}
+
+func GetReplaceHandler(db *sqlx.DB) http.HandlerFunc {
+   return func(w http.ResponseWriter, r *http.Request) {
+   defer r.Body.Close()
+   handleErrs := tc.GetHandleErrorsFunc(w, r)
+   ctx := r.Context()
+   user, err := auth.GetCurrentUser(ctx)
+   if err != nil {
+   log.Errorf("unable to retrieve current user from 
context: %s", err)
+   handleErrs(http.StatusInternalServerError, err)
+   return
+   }
+
+   // get list of server Ids to insert
+   payload :=  createServersForDsIdRef() 
+
+   if err := json.NewDecoder(r.Body).Decode(payload); err != nil {
+   log.Errorf("Error trying to decode the request body: 
%s", err)
+   handleErrs(http.StatusInternalServerError, err)
+   return
+   }
+
+   servers := payload.Servers
+   dsId := payload.DsId
+
+   if servers == nil {
+   log.Error.Printf("no servers sent in POST; could not 
begin transaction: %v", err)
+   handleErrs(http.StatusBadRequest, err)
 
 Review comment:
   This `err` is coming from above, `user, err := auth.GetCurrentUser(ctx)`, 
and will always be `nil`, but only by coincidence.
   
   Can you change all 3 of these to `api.HandleErr(w, r, http.StatusBadRequest, 
errors.New("servers must exist"), nil)`, `"dsId must exist"`, `"replace must 
exist"`?
   
   Incidentally, `handleErrs := tc.GetHandleErrorsFunc(w, r)` is a poor system 
(that's my fault), because it doesn't allow you to distinguish between server 
and user errors, and reply versus log appropriately. We need to move to 
`api.HandleErr`, which lets you distinguish and specify both in a single line.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] asfgit commented on issue #2306: Add TO Go cdns/capacity

2018-05-23 Thread GitBox
asfgit commented on issue #2306: Add TO Go cdns/capacity
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2306#issuecomment-39137
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/incubator-trafficcontrol-PR/1654/
   Test PASSed.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rob05c closed issue #1107: TO conf files are installed world readable.

2018-05-23 Thread GitBox
rob05c closed issue #1107: TO conf files are installed world readable.
URL: https://github.com/apache/incubator-trafficcontrol/issues/1107
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rob05c closed pull request #1955: TO: in rpm build, set permissions of conf files to not be world-readable

2018-05-23 Thread GitBox
rob05c closed pull request #1955: TO: in rpm build, set permissions of conf 
files to not be world-readable
URL: https://github.com/apache/incubator-trafficcontrol/pull/1955
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2a694fdd4..17fd452b6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -34,6 +34,7 @@ The format is based on [Keep a 
Changelog](http://keepachangelog.com/en/1.0.0/).
   - /api/1.3/system/info
   - /api/1.3/types (R)
 - Fair Queuing Pacing: Using the FQ Pacing Rate parameter in Delivery Services 
allows operators to limit the rate of individual sessions to the edge cache. 
This feature requires a Trafficserver RPM containing the fq_pacing experimental 
plugin AND setting 'fq' as the default Linux qdisc in sysctl. 
+- Traffic Ops rpm changed to remove world-read permission from configuration 
files.
 
 ### Changed
 - Reformatted this CHANGELOG file to the keep-a-changelog format
diff --git a/traffic_ops/build/traffic_ops.spec 
b/traffic_ops/build/traffic_ops.spec
index ded298dc3..151d9532b 100644
--- a/traffic_ops/build/traffic_ops.spec
+++ b/traffic_ops/build/traffic_ops.spec
@@ -217,10 +217,11 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%attr(755,root,root) %{PACKAGEDIR}/app/bin/*
-%attr(755,root,root) %{PACKAGEDIR}/app/script/*
-%attr(755,root,root) %{PACKAGEDIR}/app/db/*.pl
-%config(noreplace)/opt/traffic_ops/app/conf/*
+%attr(755,%{TRAFFIC_OPS_USER},%{TRAFFIC_OPS_GROUP}) %{PACKAGEDIR}/app/bin/*
+%attr(755,%{TRAFFIC_OPS_USER},%{TRAFFIC_OPS_GROUP}) %{PACKAGEDIR}/app/script/*
+%attr(755,%{TRAFFIC_OPS_USER},%{TRAFFIC_OPS_GROUP}) %{PACKAGEDIR}/app/db/*.pl
+%config(noreplace) %attr(750,%{TRAFFIC_OPS_USER},%{TRAFFIC_OPS_GROUP}) 
/opt/traffic_ops/app/conf
+%config(noreplace) %attr(750,%{TRAFFIC_OPS_USER},%{TRAFFIC_OPS_GROUP}) 
/opt/traffic_ops/app/db/dbconf.yml
 %config(noreplace)/var/www/files/osversions.cfg
 %{PACKAGEDIR}/app/cpanfile
 %{PACKAGEDIR}/app/db


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dneuman64 closed pull request #2318: only show ds form field tooltip when label is clicked

2018-05-23 Thread GitBox
dneuman64 closed pull request #2318: only show ds form field tooltip when label 
is clicked
URL: https://github.com/apache/incubator-trafficcontrol/pull/2318
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/traffic_portal/app/src/common/modules/form/_form.scss 
b/traffic_portal/app/src/common/modules/form/_form.scss
index a35b3c5a1..0869e2f66 100644
--- a/traffic_portal/app/src/common/modules/form/_form.scss
+++ b/traffic_portal/app/src/common/modules/form/_form.scss
@@ -18,4 +18,8 @@
 .btn-link.request-status {
   font-size: 20px;
   color: #cd1323;
+}
+
+form .control-label > span:hover {
+  text-decoration: underline;
 }
\ No newline at end of file
diff --git 
a/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.DNS.tpl.html
 
b/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.DNS.tpl.html
index cca6e392e..5725970e6 100644
--- 
a/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.DNS.tpl.html
+++ 
b/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.DNS.tpl.html
@@ -66,7 +66,7 @@
 
 
 
-* {{label('active', 
'title')}}
+{{label('active', 'title')}} *
 
 
 
@@ -79,7 +79,7 @@
 
 
 
-* {{label('typeId', 
'title')}}
+{{label('typeId', 'title')}} *
 
 
 
@@ -93,7 +93,7 @@
 
 
 
-* {{label('xmlId', 
'title')}}
+{{label('xmlId', 'title')}} *
 
 
 
@@ -107,7 +107,7 @@
 
 
 
-* 
{{label('displayName', 'title')}}
+{{label('displayName', 'title')}} *
 
 
 
@@ -120,7 +120,7 @@
 
 
 
-* 
{{label('tenantId', 'title')}}
+{{label('tenantId', 'title')}} *
 
 
 
@@ -134,7 +134,7 @@
 
 
 
-* {{label('cdnId', 
'title')}}
+{{label('cdnId', 'title')}} *
 
 
 
@@ -148,7 +148,7 @@
 
 
 
-* 
{{label('orgServerFqdn', 'title')}}
+{{label('orgServerFqdn', 'title')}} *
 
 
 
@@ -161,7 +161,7 @@
 
 
 
-* 
{{label('protocol', 'title')}}
+{{label('protocol', 'title')}} *
 
 
 
@@ -174,7 +174,7 @@
 
 
 
-* 
{{label('longDesc', 'title')}}
+{{label('longDesc', 'title')}} *
 
 
 
@@ -196,7 +196,7 @@
 
 
 
-* 
{{label('routingName', 'title')}}
+{{label('routingName', 'title')}} *
 
 
 Warning: Changing the routing name 
may require SSL certificates to be updated.
@@ -211,7 +211,7 @@
 
 
 
-* {{label('dscp', 
'title')}}
+{{label('dscp', 'title')}} *
 
 
 
@@ -224,7 +224,7 @@
 
 
 
-* 
{{label('ipv6RoutingEnabled', 'title')}}
+{{label('ipv6RoutingEnabled', 'title')}} *
 
 
 
@@ -237,7 +237,7 @@
 
 
 
-* 
{{label('rangeRequestHandling', 'title')}}
+{{label('rangeRequestHandling', 'title')}} 
*
 
 
 
@@ -250,7 +250,7 @@
 
 
 
-* 
{{label('qstringIgnore', 'title')}}
+{{label('qstringIgnore', 'title')}} *
 
 
 
@@ -263,7 +263,7 @@
 
 
 
-* 
{{label('multiSiteOrigin', 'title')}}
+{{label('multiSiteOrigin', 'title')}} *
 
 
 
@@ -276,7 +276,7 @@
 
 
 

[GitHub] dneuman64 closed issue #2196: Links in TP help hover text are unclickable

2018-05-23 Thread GitBox
dneuman64 closed issue #2196: Links in TP help hover text are unclickable
URL: https://github.com/apache/incubator-trafficcontrol/issues/2196
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] mitchell852 closed pull request #2310: Add TO Go cdns/metric_types route 501

2018-05-23 Thread GitBox
mitchell852 closed pull request #2310: Add TO Go cdns/metric_types route 501
URL: https://github.com/apache/incubator-trafficcontrol/pull/2310
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/docs/source/api/v11/cdn.rst b/docs/source/api/v11/cdn.rst
index d2f742e42..91c926cc1 100644
--- a/docs/source/api/v11/cdn.rst
+++ b/docs/source/api/v11/cdn.rst
@@ -384,6 +384,8 @@ Metrics
 
 **GET /api/1.1/cdns/metric_types/:metric/start_date/:start/end_date/:end**
 
+*Note: this route is not currently implemented in Traffic Ops. See 
https://github.com/apache/incubator-trafficcontrol/issues/2309*
+
   Retrieves edge metrics of one or all locations (cache groups).
 
   Authentication Required: Yes
diff --git a/docs/source/api/v12/cdn.rst b/docs/source/api/v12/cdn.rst
index 650b0a97a..7cdf9b084 100644
--- a/docs/source/api/v12/cdn.rst
+++ b/docs/source/api/v12/cdn.rst
@@ -639,8 +639,11 @@ Routing
 Metrics
 +++
 
+
 **GET /api/1.2/cdns/metric_types/:metric/start_date/:start/end_date/:end**
 
+*Note: this route is not currently implemented in Traffic Ops. See 
https://github.com/apache/incubator-trafficcontrol/issues/2309*
+
   Retrieves edge metrics of one or all locations (cache groups).
 
   Authentication Required: Yes
diff --git a/traffic_ops/traffic_ops_golang/routes.go 
b/traffic_ops/traffic_ops_golang/routes.go
index 8858c327c..25dcee32b 100644
--- a/traffic_ops/traffic_ops_golang/routes.go
+++ b/traffic_ops/traffic_ops_golang/routes.go
@@ -95,6 +95,7 @@ func Routes(d ServerData) ([]Route, []RawRoute, http.Handler, 
error) {
{1.1, http.MethodDelete, `cachegroups/{id}$`, 
api.DeleteHandler(cachegroup.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
 
//CDN
+   {1.1, http.MethodGet, `cdns/metric_types`, 
notImplementedHandler, 0, NoAuth, nil}, // MUST NOT end in $, because the 1.x 
route is longer
{1.1, http.MethodGet, `cdns/capacity$`, 
handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},
{1.1, http.MethodGet, `cdns/configs$`, 
handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},
{1.1, http.MethodGet, `cdns/domains$`, 
handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},
@@ -316,6 +317,13 @@ func rootHandler(d ServerData) http.Handler {
return managerHandler
 }
 
+// notImplementedHandler returns a 501 Not Implemented to the client. This 
should be used very rarely, and primarily for old API Perl routes which were 
broken long ago, which we don't have the resources to rewrite in Go for the 
time being.
+func notImplementedHandler(w http.ResponseWriter, r *http.Request) {
+   code := http.StatusNotImplemented
+   w.WriteHeader(code)
+   w.Write([]byte(http.StatusText(code)))
+}
+
 //CreateThrottledHandler takes a handler, and a max and uses a channel to 
insure the handler is used concurrently by only max number of routines
 func CreateThrottledHandler(handler http.Handler, maxConcurrentCalls int) 
ThrottledHandler {
return ThrottledHandler{handler, make(chan struct{}, 
maxConcurrentCalls)}


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] Vijay-1 commented on issue #2029: [Issue 1907] TO API for backup edge cachegroup

2018-05-23 Thread GitBox
Vijay-1 commented on issue #2029: [Issue 1907] TO API for backup edge cachegroup
URL: 
https://github.com/apache/incubator-trafficcontrol/pull/2029#issuecomment-391306197
 
 
   @mitchell852 
   Ok. Have to get the required GoLang code inside leaving the API (GoLang) 
part for now. Will try to get this done. 
   
   @rawlinp 
   I will address this and let you know.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services