Build failed in Jenkins: trafficcontrol-PR #4660

2019-10-28 Thread Apache Jenkins Server
See 


Changes:

[ocket] Add top-level vendor dir to TO-Go and TM unit test containers 
(#4009)

[ocket] accounts for null arrays (#4008)

[mitchell852] Rewrote /user/reset_password to Go (#3929)

[mitchell852] Removed restangular from ChangeLogService (#3608)

[ocket] Fix TO API test failure when starting from a fresh `db/admin reset`

[ocket] Implement GET /api/1.1/roles handler (#4011)

[mitchell852] Removed restangular from CacheGroupService (#3604)

[ocket] Add deliveryservice server capability docs (#4018)

[ocket] Add TO Go ATS CDN configs (#3875)

[ocket] TP: Ability to manager capabilities of servers (#3998)

[ocket] Fix missed files in PR (#4024)

[ocket] Rewrite federation user GET/POST/DELETE (#4014)

[ocket] Fix endpoint name in docs (#4027)

[ocket] Add TO-Go /api/1.1/servers/status GET handler (#4013)

[ocket] Feature/add deliveryservice required capability (#4026)

[ocket] Fix query parameter name (#4031)


--
GitHub pull request #4010 of commit 08e418014452a85c99061b67d04290554fe2c898, 
no merge conflicts.
Running as SYSTEM
Setting status of 08e418014452a85c99061b67d04290554fe2c898 to PENDING with url 
https://builds.apache.org/job/trafficcontrol-PR/4660/ and message: 'Build 
started for merge commit.'
Using context: default
[EnvInject] - Loading node environment variables.
Building remotely on H39 (ubuntu xenial) in workspace 

[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
using credential b205a645-1ea7-4dfd-973d-c14ac43cab07
Cloning the remote Git repository
Cloning repository git://github.com/apache/trafficcontrol.git
 > git init  # timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # 
 > timeout=10
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/pull/*:refs/remotes/origin/pr/*
 > git rev-parse 08e418014452a85c99061b67d04290554fe2c898^{commit} # timeout=10
Checking out Revision 08e418014452a85c99061b67d04290554fe2c898 (detached)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 08e418014452a85c99061b67d04290554fe2c898
Commit message: "Merge branch 'master' into to-checks-go"
 > git rev-list --no-walk bd9de1903d8d0e58949476fba6782053201c97d1 # timeout=10
[trafficcontrol-PR] $ /bin/bash /tmp/jenkins6021356349341327087.sh
++ echo jenkins-trafficcontrol-PR-4660
++ sed s/-//g
++ sed s/jenkins//
+ proj=trafficcontrolPR4660
+ yml=infrastructure/docker/build/docker-compose.yml
++ mktemp /tmp/docker-compose-
+ dc=/tmp/docker-compose-moYo
++ mktemp /tmp/tc-status-
+ st=/tmp/tc-status-YsPc
+ trap finish EXIT
++ uname -s
++ uname -m
+ curl -o /tmp/docker-compose-moYo -L 
https://github.com/docker/compose/releases/download/1.13.0/docker-compose-Linux-x86_64
  % 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 
  6170   6170 0   1037  0 --:--:-- --:--:-- --:--:--  1036
  0 8079k0 507300 0  41639  0  0:03:18  0:00:01  0:03:17 
41639100 8079k  100 8079k0 0  4700k  0  0:00:01  0:00:01 --:--:-- 
15.6M
+ chmod +x /tmp/docker-compose-moYo
+ rm -rf dist
+ /tmp/docker-compose-moYo -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4660 up
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ exit 1
+ finish
+ /tmp/docker-compose-moYo -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4660 down -v
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ /tmp/docker-compose-moYo -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4660 rm -v -f
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard 

[GitHub] [trafficcontrol] asf-ci commented on issue #4010: Port legacy perl TO extension checks from perl to go

2019-10-28 Thread GitBox
asf-ci commented on issue #4010: Port legacy perl TO extension checks from perl 
to go
URL: https://github.com/apache/trafficcontrol/pull/4010#issuecomment-547208476
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4660/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] guzzijason commented on issue #4010: Port legacy perl TO extension checks from perl to go

2019-10-28 Thread GitBox
guzzijason commented on issue #4010: Port legacy perl TO extension checks from 
perl to go
URL: https://github.com/apache/trafficcontrol/pull/4010#issuecomment-547207926
 
 
   I'm satisfied that the code in this PR is now building and running 
satisfactorily with the go client library version that are in currently 
`master`.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] asf-ci commented on issue #4010: Port legacy perl TO extension checks from perl to go

2019-10-28 Thread GitBox
asf-ci commented on issue #4010: Port legacy perl TO extension checks from perl 
to go
URL: https://github.com/apache/trafficcontrol/pull/4010#issuecomment-547206547
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4659/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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: trafficcontrol-PR #4659

2019-10-28 Thread Apache Jenkins Server
See 


Changes:

[Jason_Tucker] Port TO Extension Checks from perl to go

[Jason_Tucker] update extension check doc

[Jason_Tucker] Update CHANGELOG.md

[Jason_Tucker] change UpdateCheckStatus() to InsertServerCheckStatus()

[Jason_Tucker] Fix go checks to support changes to underlying library

[Jason_Tucker] Decoder was missing TLS layer

[Jason_Tucker] go fmt

[Jason_Tucker] Correct offset of TLS handshake packets


--
GitHub pull request #4010 of commit bd9de1903d8d0e58949476fba6782053201c97d1, 
has merge conflicts.
Running as SYSTEM
Setting status of bd9de1903d8d0e58949476fba6782053201c97d1 to PENDING with url 
https://builds.apache.org/job/trafficcontrol-PR/4659/ and message: 'Build 
started for original commit.'
Using context: default
[EnvInject] - Loading node environment variables.
Building remotely on H39 (ubuntu xenial) in workspace 

[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
using credential b205a645-1ea7-4dfd-973d-c14ac43cab07
Cloning the remote Git repository
Cloning repository git://github.com/apache/trafficcontrol.git
 > git init  # timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # 
 > timeout=10
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/pull/*:refs/remotes/origin/pr/*
 > git rev-parse bd9de1903d8d0e58949476fba6782053201c97d1^{commit} # timeout=10
Checking out Revision bd9de1903d8d0e58949476fba6782053201c97d1 (detached)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f bd9de1903d8d0e58949476fba6782053201c97d1
Commit message: "Correct offset of TLS handshake packets"
 > git rev-list --no-walk 06e3d4889119ff5420122182227203e00acfa1c5 # timeout=10
[trafficcontrol-PR] $ /bin/bash /tmp/jenkins8649588866073294712.sh
++ echo jenkins-trafficcontrol-PR-4659
++ sed s/-//g
++ sed s/jenkins//
+ proj=trafficcontrolPR4659
+ yml=infrastructure/docker/build/docker-compose.yml
++ mktemp /tmp/docker-compose-
+ dc=/tmp/docker-compose-HNxP
++ mktemp /tmp/tc-status-
+ st=/tmp/tc-status-11Zd
+ trap finish EXIT
++ uname -s
++ uname -m
+ curl -o /tmp/docker-compose-HNxP -L 
https://github.com/docker/compose/releases/download/1.13.0/docker-compose-Linux-x86_64
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 
0100   6170   6170 0   1103  0 --:--:-- --:--:-- --:--:--  1103
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 
0100 8079k  100 8079k0 0  4722k  0  0:00:01  0:00:01 --:--:-- 10.1M
+ chmod +x /tmp/docker-compose-HNxP
+ rm -rf dist
+ /tmp/docker-compose-HNxP -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4659 up
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ exit 1
+ finish
+ /tmp/docker-compose-HNxP -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4659 down -v
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ /tmp/docker-compose-HNxP -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4659 rm -v -f
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ rm -f /tmp/docker-compose-HNxP
Build step 'Execute shell' marked build as failure
Skipped archiving because build is not successful


Build failed in Jenkins: trafficcontrol-PR #4658

2019-10-28 Thread Apache Jenkins Server
See 


Changes:

[ocket] Moved some images, unset executable bit and shebang on 
non-executable

[ocket] Fixed some documentation warnings generated from Python files

[ocket] Added kickstart setup QHT

[ocket] Added cache group / region /division overview

[ocket] Moved traffic ops administration into a single sub-section

[ocket] Fix Influx config defaulting to secure


--
GitHub pull request #4037 of commit 06e3d4889119ff5420122182227203e00acfa1c5, 
no merge conflicts.
Running as SYSTEM
Setting status of 06e3d4889119ff5420122182227203e00acfa1c5 to PENDING with url 
https://builds.apache.org/job/trafficcontrol-PR/4658/ and message: 'Build 
started for merge commit.'
Using context: default
[EnvInject] - Loading node environment variables.
Building remotely on H39 (ubuntu xenial) in workspace 

[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
using credential b205a645-1ea7-4dfd-973d-c14ac43cab07
Cloning the remote Git repository
Cloning repository git://github.com/apache/trafficcontrol.git
 > git init  # timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # 
 > timeout=10
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/pull/*:refs/remotes/origin/pr/*
 > git rev-parse 06e3d4889119ff5420122182227203e00acfa1c5^{commit} # timeout=10
Checking out Revision 06e3d4889119ff5420122182227203e00acfa1c5 (detached)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 06e3d4889119ff5420122182227203e00acfa1c5
Commit message: "Fix Influx config defaulting to secure"
 > git rev-list --no-walk 727e6d61f8d9319668e089c780a559adb92f3569 # timeout=10
[trafficcontrol-PR] $ /bin/bash /tmp/jenkins1517636421942012168.sh
++ echo jenkins-trafficcontrol-PR-4658
++ sed s/-//g
++ sed s/jenkins//
+ proj=trafficcontrolPR4658
+ yml=infrastructure/docker/build/docker-compose.yml
++ mktemp /tmp/docker-compose-
+ dc=/tmp/docker-compose-jCUd
++ mktemp /tmp/tc-status-
+ st=/tmp/tc-status-V4al
+ trap finish EXIT
++ uname -s
++ uname -m
+ curl -o /tmp/docker-compose-jCUd -L 
https://github.com/docker/compose/releases/download/1.13.0/docker-compose-Linux-x86_64
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 
0100   6170   6170 0   1127  0 --:--:-- --:--:-- --:--:--  1130
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 
0100 8079k  100 8079k0 0  4949k  0  0:00:01  0:00:01 --:--:-- 8781k
+ chmod +x /tmp/docker-compose-jCUd
+ rm -rf dist
+ /tmp/docker-compose-jCUd -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4658 up
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ exit 1
+ finish
+ /tmp/docker-compose-jCUd -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4658 down -v
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ /tmp/docker-compose-jCUd -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4658 rm -v -f
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ rm -f /tmp/docker-compose-jCUd
Build step 'Execute shell' marked build as failure
Skipped archiving because build is not successful


[GitHub] [trafficcontrol] asf-ci commented on issue #4037: Docs/influx fix

2019-10-28 Thread GitBox
asf-ci commented on issue #4037: Docs/influx fix
URL: https://github.com/apache/trafficcontrol/pull/4037#issuecomment-547200062
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4658/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] ocket8888 opened a new pull request #4037: Docs/influx fix

2019-10-28 Thread GitBox
ocket opened a new pull request #4037: Docs/influx fix
URL: https://github.com/apache/trafficcontrol/pull/4037
 
 
   ## What does this PR (Pull Request) do?
   
   - [x] This PR is not related to any Issue
   
   This fixes an issue where Influx connections were defaulting to secure, 
breaking existing installs. It also properly documents the various Traffic Ops 
configuration files (to the best of my knowledge) to make their behavior 
explicit and clear.
   
   ## Which Traffic Control components are affected by this PR?
   - Documentation
   - Traffic Ops
   
   ## What is the best way to verify this PR?
   Mostly just build and read documentation. Also build an ATC environment with 
minimally Traffic Ops and Traffic Stats - specifically Traffic Stats's InfluxDB 
clusters should not be configured to use SSL -, request `deliveryservice_stats` 
(properly) and observe that it works
   
   ## The following criteria are ALL met by this PR
   - [x] Tests are unnecessary
   - [x] This PR includes documentation
   - [x] An update to CHANGELOG.md is not necessary
   - [x] This PR includes any and all required license headers
   - [x] This PR does not include a database migration
   - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY**


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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: trafficcontrol-PR #4657

2019-10-28 Thread Apache Jenkins Server
See 


Changes:

[ocket] Add top-level vendor dir to TO-Go and TM unit test containers 
(#4009)

[ocket] accounts for null arrays (#4008)

[mitchell852] Rewrote /user/reset_password to Go (#3929)

[mitchell852] Removed restangular from ChangeLogService (#3608)

[ocket] Fix TO API test failure when starting from a fresh `db/admin reset`

[ocket] Implement GET /api/1.1/roles handler (#4011)

[mitchell852] Removed restangular from CacheGroupService (#3604)

[ocket] Add deliveryservice server capability docs (#4018)

[ocket] Add TO Go ATS CDN configs (#3875)

[ocket] TP: Ability to manager capabilities of servers (#3998)

[ocket] Fix missed files in PR (#4024)

[ocket] Rewrite federation user GET/POST/DELETE (#4014)

[ocket] Fix endpoint name in docs (#4027)

[ocket] Add TO-Go /api/1.1/servers/status GET handler (#4013)

[ocket] Feature/add deliveryservice required capability (#4026)

[ocket] Fix query parameter name (#4031)

[ocket] Rewrote /federations to Go - POST handler

[ocket] Rewrote /federations to Go - DELETE handler

[ocket] Rewrote /federations to Go - PUT handler

[ocket] Added unit tests

[ocket] go fmt

[ocket] Update documentation

[ocket] Add Go client methods

[ocket] Add Go client integration tests

[ocket] fix shared handler test

[ocket] Remove unused query


--
GitHub pull request #4015 of commit 727e6d61f8d9319668e089c780a559adb92f3569, 
no merge conflicts.
Running as SYSTEM
Setting status of 727e6d61f8d9319668e089c780a559adb92f3569 to PENDING with url 
https://builds.apache.org/job/trafficcontrol-PR/4657/ and message: 'Build 
started for merge commit.'
Using context: default
[EnvInject] - Loading node environment variables.
Building remotely on H39 (ubuntu xenial) in workspace 

[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
using credential b205a645-1ea7-4dfd-973d-c14ac43cab07
Cloning the remote Git repository
Cloning repository git://github.com/apache/trafficcontrol.git
 > git init  # timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # 
 > timeout=10
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/pull/*:refs/remotes/origin/pr/*
 > git rev-parse 727e6d61f8d9319668e089c780a559adb92f3569^{commit} # timeout=10
Checking out Revision 727e6d61f8d9319668e089c780a559adb92f3569 (detached)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 727e6d61f8d9319668e089c780a559adb92f3569
Commit message: "Remove unused query"
 > git rev-list --no-walk 28d9d9b8acaf8d059485bd427608a08a583f45cb # timeout=10
[trafficcontrol-PR] $ /bin/bash /tmp/jenkins330285714771278620.sh
++ echo jenkins-trafficcontrol-PR-4657
++ sed s/-//g
++ sed s/jenkins//
+ proj=trafficcontrolPR4657
+ yml=infrastructure/docker/build/docker-compose.yml
++ mktemp /tmp/docker-compose-
+ dc=/tmp/docker-compose-89pr
++ mktemp /tmp/tc-status-
+ st=/tmp/tc-status-dmGQ
+ trap finish EXIT
++ uname -s
++ uname -m
+ curl -o /tmp/docker-compose-89pr -L 
https://github.com/docker/compose/releases/download/1.13.0/docker-compose-Linux-x86_64
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 
0100   6170   6170 0   1012  0 --:--:-- --:--:-- --:--:--  1013
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 
0100 8079k  100 8079k0 0  4718k  0  0:00:01  0:00:01 --:--:-- 8849k
+ chmod +x /tmp/docker-compose-89pr
+ rm -rf dist
+ /tmp/docker-compose-89pr -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4657 up
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ exit 1
+ finish
+ /tmp/docker-compose-89pr -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4657 down -v
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a 

[GitHub] [trafficcontrol] asf-ci commented on issue #4015: Rewrite /federations to Go - POST/PUT/DELETE

2019-10-28 Thread GitBox
asf-ci commented on issue #4015: Rewrite /federations to Go - POST/PUT/DELETE
URL: https://github.com/apache/trafficcontrol/pull/4015#issuecomment-547198250
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4657/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] asf-ci commented on issue #4010: Port legacy perl TO extension checks from perl to go

2019-10-28 Thread GitBox
asf-ci commented on issue #4010: Port legacy perl TO extension checks from perl 
to go
URL: https://github.com/apache/trafficcontrol/pull/4010#issuecomment-547198110
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4656/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] asf-ci commented on issue #4015: Rewrite /federations to Go - POST/PUT/DELETE

2019-10-28 Thread GitBox
asf-ci commented on issue #4015: Rewrite /federations to Go - POST/PUT/DELETE
URL: https://github.com/apache/trafficcontrol/pull/4015#issuecomment-547196925
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4655/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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 : trafficcontrol-PR #4655

2019-10-28 Thread Apache Jenkins Server
See 




[GitHub] [trafficcontrol] ocket8888 commented on a change in pull request #4015: Rewrite /federations to Go - POST/PUT/DELETE

2019-10-28 Thread GitBox
ocket commented on a change in pull request #4015: Rewrite /federations to 
Go - POST/PUT/DELETE
URL: https://github.com/apache/trafficcontrol/pull/4015#discussion_r339835934
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/api/api.go
 ##
 @@ -86,7 +86,7 @@ func WriteRespRaw(w http.ResponseWriter, r *http.Request, v 
interface{}) {
return
}
w.Header().Set("Content-Type", "application/json")
-   w.Write(bts)
+   w.Write(append(bts, '\n'))
 
 Review comment:
   whoops :P


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] ocket8888 commented on a change in pull request #4015: Rewrite /federations to Go - POST/PUT/DELETE

2019-10-28 Thread GitBox
ocket commented on a change in pull request #4015: Rewrite /federations to 
Go - POST/PUT/DELETE
URL: https://github.com/apache/trafficcontrol/pull/4015#discussion_r339835857
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/federations/federations.go
 ##
 @@ -167,3 +206,296 @@ ORDER BY
}
return feds, nil
 }
+
+// AddFederationResorverMappingsForCurrentUser is the handler for a POST 
request to /federations.
+// Confusingly, it does not create a federation, but is instead used to 
manipulate the resolvers
+// used by one or more particular Delivery Services for one or more particular 
Federations.
+func AddFederationResolverMappingsForCurrentUser(w http.ResponseWriter, r 
*http.Request) {
+   inf, userErr, sysErr, errCode := api.NewInfo(r, nil, nil)
+   tx := inf.Tx.Tx
+   if userErr != nil || sysErr != nil {
+   api.HandleErr(w, r, tx, errCode, userErr, sysErr)
+   return
+   }
+   defer inf.Close()
+
+   mappings, userErr, sysErr := getMappingsFromRequestBody(*inf.Version, 
r.Body)
+   if userErr != nil || sysErr != nil {
+   api.HandleErr(w, r, tx, http.StatusBadRequest, userErr, sysErr)
+   return
+   }
+
+   if err := mappings.Validate(tx); err != nil {
+   errCode = http.StatusBadRequest
+   userErr = fmt.Errorf("validating request: %v", err)
+   api.HandleErr(w, r, tx, errCode, userErr, nil)
+   return
+   }
+
+   userErr, sysErr, errCode = 
addFederationResolverMappingsForCurrentUser(inf.User, tx, mappings)
+   if userErr != nil || sysErr != nil {
+   api.HandleErr(w, r, tx, errCode, userErr, sysErr)
+   return
+   }
+
+   msg := fmt.Sprintf("%s successfully created federation resolvers.", 
inf.User.UserName)
+   if inf.Version.Minor <= 3 {
+   api.WriteResp(w, r, msg)
+   } else {
+   api.WriteRespAlertObj(w, r, tc.SuccessLevel, msg, msg)
+   }
+}
+
+// handles the main logic of the POST handler, separated out for convenience
+func addFederationResolverMappingsForCurrentUser(u *auth.CurrentUser, tx 
*sql.Tx, mappings []tc.DeliveryServiceFederationResolverMapping) (error, error, 
int) {
+   for _, fed := range mappings {
+   dsTenant, ok, err := dbhelpers.GetDSTenantIDFromXMLID(tx, 
fed.DeliveryService)
+   if err != nil {
+   return nil, err, http.StatusInternalServerError
+   } else if !ok {
+   return fmt.Errorf("'%s' - no such Delivery Service", 
fed.DeliveryService), nil, http.StatusConflict
+   }
+
+   if ok, err = tenant.IsResourceAuthorizedToUserTx(dsTenant, u, 
tx); err != nil {
+   err = fmt.Errorf("Checking user #%d tenancy permissions 
on DS '%s' (tenant #%d)", u.ID, fed.DeliveryService, dsTenant)
+   return nil, err, http.StatusInternalServerError
+   } else if !ok {
+   userErr := fmt.Errorf("'%s' - no such Delivery 
Service", fed.DeliveryService)
+   sysErr := fmt.Errorf("User '%s' requested unauthorized 
federation resolver mapping modification on the '%s' Delivery Service", 
u.UserName, fed.DeliveryService)
+   return userErr, sysErr, http.StatusConflict
+   }
+
+   fedID, ok, err := dbhelpers.GetFederationIDForUserIDByXMLID(tx, 
u.ID, fed.DeliveryService)
+   if err != nil {
+   return nil, fmt.Errorf("Getting Federation ID: %v", 
err), http.StatusInternalServerError
+   } else if !ok {
+   err = fmt.Errorf("No federation(s) found for user %s on 
delivery service '%s'.", u.UserName, fed.DeliveryService)
+   return err, nil, http.StatusConflict
+   }
+
+   inserted, err := 
addFederationResolverMappingsToFederation(fed.Mappings, fed.DeliveryService, 
fedID, tx)
+   if err != nil {
+   err = fmt.Errorf("Adding federation resolver mapping(s) 
to federation: %v", err)
+   return nil, err, http.StatusInternalServerError
+   }
+
+   changelogMsg := "FEDERATION DELIVERY SERVICE: %s, ID: %d, 
ACTION: User %s successfully added federation resolvers [ %s ]"
+   changelogMsg = fmt.Sprintf(changelogMsg, fed.DeliveryService, 
fedID, u.UserName, inserted)
+   api.CreateChangeLogRawTx(api.ApiChange, changelogMsg, u, tx)
+   }
+   return nil, nil, http.StatusOK
+}
+
+// adds federation resolver mappings for a particular delivery service to a 
given federation, creating said resolvers if
+// they don't already exist.
+func addFederationResolverMappingsToFederation(res tc.ResolverMapping, xmlid 
string, fed uint, tx *sql.Tx) (string, error) {
+   var resp string
+   if len(res.Resolve4) > 0 {
+

[GitHub] [trafficcontrol] ocket8888 commented on a change in pull request #4015: Rewrite /federations to Go - POST/PUT/DELETE

2019-10-28 Thread GitBox
ocket commented on a change in pull request #4015: Rewrite /federations to 
Go - POST/PUT/DELETE
URL: https://github.com/apache/trafficcontrol/pull/4015#discussion_r339835100
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/dbhelpers/db_helpers.go
 ##
 @@ -346,3 +430,17 @@ func GetCacheGroupNameFromID(tx *sql.Tx, id int64) 
(tc.CacheGroupName, bool, err
}
return tc.CacheGroupName(name), true, nil
 }
+
+// GetFederationIDForUserIDByXMLID retrieves the ID of the Federation assigned 
to the user defined by
+// userID on the Delivery Service identified by xmlid. If no such federation 
exists, the boolean
+// returned will be 'false', while the error indicates unexpected errors that 
occurred when querying.
+func GetFederationIDForUserIDByXMLID(tx *sql.Tx, userID int, xmlid string) 
(uint, bool, error) {
+   var id uint
 
 Review comment:
   because IDs can't be negative, and that's about it.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] ocket8888 commented on a change in pull request #4015: Rewrite /federations to Go - POST/PUT/DELETE

2019-10-28 Thread GitBox
ocket commented on a change in pull request #4015: Rewrite /federations to 
Go - POST/PUT/DELETE
URL: https://github.com/apache/trafficcontrol/pull/4015#discussion_r339834865
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/dbhelpers/db_helpers.go
 ##
 @@ -42,6 +42,75 @@ const BaseOrderBy = "\nORDER BY"
 const BaseLimit = "\nLIMIT"
 const BaseOffset = "\nOFFSET"
 
+const UserIDHasAccessToDeliveryServiceXMLIDQuery = `
 
 Review comment:
   You know it might not. I think that's a remnant from the old way I wanted to 
do it, but I couldn't figure out the query for it (that one doesn't work). I'll 
remove it.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] ocket8888 commented on a change in pull request #4015: Rewrite /federations to Go - POST/PUT/DELETE

2019-10-28 Thread GitBox
ocket commented on a change in pull request #4015: Rewrite /federations to 
Go - POST/PUT/DELETE
URL: https://github.com/apache/trafficcontrol/pull/4015#discussion_r339834661
 
 

 ##
 File path: lib/go-tc/federation.go
 ##
 @@ -67,36 +80,85 @@ type FederationMapping struct {
TTL   int`json:"ttl"`
 }
 
-// AllFederation is the JSON object returned by /api/1.x/federations?all
-type AllFederation struct {
-   Mappings[]AllFederationMapping `json:"mappings"`
-   DeliveryService DeliveryServiceName`json:"deliveryService"`
+// AllDeliveryServiceFederationsMapping is a structure that contains 
identifying information for a
+// Delivery Service as well as any and all Federation Resolver mapping 
assigned to it (or all those
+// getting assigned to it).
+type AllDeliveryServiceFederationsMapping struct {
+   Mappings[]FederationResolverMapping `json:"mappings"`
+   DeliveryService DeliveryServiceName `json:"deliveryService"`
 }
 
-func (a AllFederation) IsAllFederations() bool { return true }
+// IsAllFederations implements the IAllFederation interface. Always returns 
true.
+func (a AllDeliveryServiceFederationsMapping) IsAllFederations() bool { return 
true }
 
 // AllFederation is the JSON object returned by 
/api/1.x/federations?all=my-cdn-name
 type AllFederationCDN struct {
CDNName *CDNName `json:"cdnName"`
 }
 
+// IsAllFederations implements the IAllFederation interface. Always returns 
true.
 func (a AllFederationCDN) IsAllFederations() bool { return true }
 
-type AllFederationMapping struct {
-   TTL  *int `json:"ttl"`
-   CName*string  `json:"cname"`
+type ResolverMapping struct {
Resolve4 []string `json:"resolve4,omitempty"`
Resolve6 []string `json:"resolve6,omitempty"`
 }
 
+func (r *ResolverMapping) Validate(tx *sql.Tx) error {
+   errs := []error{}
+   for _, res := range r.Resolve4 {
 
 Review comment:
   They do but it doesn't cover CIDRs


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] zrhoffman commented on issue #3965: Traffic Router inconsistent behavior on HTTP HEAD requests

2019-10-28 Thread GitBox
zrhoffman commented on issue #3965: Traffic Router inconsistent behavior on 
HTTP HEAD requests
URL: https://github.com/apache/trafficcontrol/issues/3965#issuecomment-547179715
 
 
   Most of the API's mappings return a ResponseEntity, which guarantees setting 
`Content-Length` for any status code. The exceptions are in LocationController, 
StatsController, ZonesController (which return `Content-Length` for HEAD but 
not GET), but it looks like we can just use ResponseEntity for those, too. The 
object order in the response seems different, but the structure is the same and 
LocationsTest, and StatsTest, ZonesTest still pass.
   
   The documentation will need to be updated to reflect the change in response 
headers.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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: trafficcontrol-PR #4654

2019-10-28 Thread Apache Jenkins Server
See 


Changes:

[Jason_Tucker] Port TO Extension Checks from perl to go

[Jason_Tucker] update extension check doc

[Jason_Tucker] Update CHANGELOG.md

[Jason_Tucker] change UpdateCheckStatus() to InsertServerCheckStatus()

[Jason_Tucker] Fix go checks to support changes to underlying library


--
GitHub pull request #4010 of commit 7026b67e6531208ad2b0dd81559e6970e0e83ff8, 
has merge conflicts.
Running as SYSTEM
Setting status of 7026b67e6531208ad2b0dd81559e6970e0e83ff8 to PENDING with url 
https://builds.apache.org/job/trafficcontrol-PR/4654/ and message: 'Build 
started for original commit.'
Using context: default
[EnvInject] - Loading node environment variables.
Building remotely on H42 (ubuntu xenial) in workspace 

[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
using credential b205a645-1ea7-4dfd-973d-c14ac43cab07
Cloning the remote Git repository
Cloning repository git://github.com/apache/trafficcontrol.git
 > git init  # timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # 
 > timeout=10
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/pull/*:refs/remotes/origin/pr/*
 > git rev-parse 7026b67e6531208ad2b0dd81559e6970e0e83ff8^{commit} # timeout=10
Checking out Revision 7026b67e6531208ad2b0dd81559e6970e0e83ff8 (detached)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 7026b67e6531208ad2b0dd81559e6970e0e83ff8
Commit message: "Fix go checks to support changes to underlying library"
 > git rev-list --no-walk 44e2ac3a4bb45b3fef0cf7172412ef3b175038e3 # timeout=10
[trafficcontrol-PR] $ /bin/bash /tmp/jenkins3437334506899164256.sh
++ echo jenkins-trafficcontrol-PR-4654
++ sed s/-//g
++ sed s/jenkins//
+ proj=trafficcontrolPR4654
+ yml=infrastructure/docker/build/docker-compose.yml
++ mktemp /tmp/docker-compose-
+ dc=/tmp/docker-compose-nZUt
++ mktemp /tmp/tc-status-
+ st=/tmp/tc-status-JiKu
+ trap finish EXIT
++ uname -s
++ uname -m
+ curl -o /tmp/docker-compose-nZUt -L 
https://github.com/docker/compose/releases/download/1.13.0/docker-compose-Linux-x86_64
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 
0100   6170   6170 0991  0 --:--:-- --:--:-- --:--:--   993
  0 00 00 0  0  0 --:--:--  0:00:01 --:--:-- 
0100 8079k  100 8079k0 0  4558k  0  0:00:01  0:00:01 --:--:-- 10.3M
+ chmod +x /tmp/docker-compose-nZUt
+ rm -rf dist
+ /tmp/docker-compose-nZUt -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4654 up
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ exit 1
+ finish
+ /tmp/docker-compose-nZUt -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4654 down -v
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ /tmp/docker-compose-nZUt -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4654 rm -v -f
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ rm -f /tmp/docker-compose-nZUt
Build step 'Execute shell' marked build as failure
Skipped archiving because build is not successful


[GitHub] [trafficcontrol] asf-ci commented on issue #4010: Port legacy perl TO extension checks from perl to go

2019-10-28 Thread GitBox
asf-ci commented on issue #4010: Port legacy perl TO extension checks from perl 
to go
URL: https://github.com/apache/trafficcontrol/pull/4010#issuecomment-547177039
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4654/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mhoppa commented on a change in pull request #4015: Rewrite /federations to Go - POST/PUT/DELETE

2019-10-28 Thread GitBox
mhoppa commented on a change in pull request #4015: Rewrite /federations to Go 
- POST/PUT/DELETE
URL: https://github.com/apache/trafficcontrol/pull/4015#discussion_r339822218
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/api/api.go
 ##
 @@ -86,7 +86,7 @@ func WriteRespRaw(w http.ResponseWriter, r *http.Request, v 
interface{}) {
return
}
w.Header().Set("Content-Type", "application/json")
-   w.Write(bts)
+   w.Write(append(bts, '\n'))
 
 Review comment:
   I believe this is causing a unit test to fail in this package ->
   
   ```
   --- FAIL: TestReadHandler (0.00s)
   
/Users/mhoppa509/go/src/github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/api/shared_handlers_test.go:187:
 Expected body {"response":[{"ID":1}]} got {"response":[{"ID":1}]}
   ```


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mhoppa commented on a change in pull request #4015: Rewrite /federations to Go - POST/PUT/DELETE

2019-10-28 Thread GitBox
mhoppa commented on a change in pull request #4015: Rewrite /federations to Go 
- POST/PUT/DELETE
URL: https://github.com/apache/trafficcontrol/pull/4015#discussion_r339808566
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/federations/federations.go
 ##
 @@ -167,3 +206,296 @@ ORDER BY
}
return feds, nil
 }
+
+// AddFederationResorverMappingsForCurrentUser is the handler for a POST 
request to /federations.
+// Confusingly, it does not create a federation, but is instead used to 
manipulate the resolvers
+// used by one or more particular Delivery Services for one or more particular 
Federations.
+func AddFederationResolverMappingsForCurrentUser(w http.ResponseWriter, r 
*http.Request) {
+   inf, userErr, sysErr, errCode := api.NewInfo(r, nil, nil)
+   tx := inf.Tx.Tx
+   if userErr != nil || sysErr != nil {
+   api.HandleErr(w, r, tx, errCode, userErr, sysErr)
+   return
+   }
+   defer inf.Close()
+
+   mappings, userErr, sysErr := getMappingsFromRequestBody(*inf.Version, 
r.Body)
+   if userErr != nil || sysErr != nil {
+   api.HandleErr(w, r, tx, http.StatusBadRequest, userErr, sysErr)
+   return
+   }
+
+   if err := mappings.Validate(tx); err != nil {
+   errCode = http.StatusBadRequest
+   userErr = fmt.Errorf("validating request: %v", err)
+   api.HandleErr(w, r, tx, errCode, userErr, nil)
+   return
+   }
+
+   userErr, sysErr, errCode = 
addFederationResolverMappingsForCurrentUser(inf.User, tx, mappings)
+   if userErr != nil || sysErr != nil {
+   api.HandleErr(w, r, tx, errCode, userErr, sysErr)
+   return
+   }
+
+   msg := fmt.Sprintf("%s successfully created federation resolvers.", 
inf.User.UserName)
+   if inf.Version.Minor <= 3 {
+   api.WriteResp(w, r, msg)
+   } else {
+   api.WriteRespAlertObj(w, r, tc.SuccessLevel, msg, msg)
+   }
+}
+
+// handles the main logic of the POST handler, separated out for convenience
+func addFederationResolverMappingsForCurrentUser(u *auth.CurrentUser, tx 
*sql.Tx, mappings []tc.DeliveryServiceFederationResolverMapping) (error, error, 
int) {
+   for _, fed := range mappings {
+   dsTenant, ok, err := dbhelpers.GetDSTenantIDFromXMLID(tx, 
fed.DeliveryService)
+   if err != nil {
+   return nil, err, http.StatusInternalServerError
+   } else if !ok {
+   return fmt.Errorf("'%s' - no such Delivery Service", 
fed.DeliveryService), nil, http.StatusConflict
+   }
+
+   if ok, err = tenant.IsResourceAuthorizedToUserTx(dsTenant, u, 
tx); err != nil {
+   err = fmt.Errorf("Checking user #%d tenancy permissions 
on DS '%s' (tenant #%d)", u.ID, fed.DeliveryService, dsTenant)
+   return nil, err, http.StatusInternalServerError
+   } else if !ok {
+   userErr := fmt.Errorf("'%s' - no such Delivery 
Service", fed.DeliveryService)
+   sysErr := fmt.Errorf("User '%s' requested unauthorized 
federation resolver mapping modification on the '%s' Delivery Service", 
u.UserName, fed.DeliveryService)
+   return userErr, sysErr, http.StatusConflict
+   }
+
+   fedID, ok, err := dbhelpers.GetFederationIDForUserIDByXMLID(tx, 
u.ID, fed.DeliveryService)
+   if err != nil {
+   return nil, fmt.Errorf("Getting Federation ID: %v", 
err), http.StatusInternalServerError
+   } else if !ok {
+   err = fmt.Errorf("No federation(s) found for user %s on 
delivery service '%s'.", u.UserName, fed.DeliveryService)
+   return err, nil, http.StatusConflict
+   }
+
+   inserted, err := 
addFederationResolverMappingsToFederation(fed.Mappings, fed.DeliveryService, 
fedID, tx)
+   if err != nil {
+   err = fmt.Errorf("Adding federation resolver mapping(s) 
to federation: %v", err)
+   return nil, err, http.StatusInternalServerError
+   }
+
+   changelogMsg := "FEDERATION DELIVERY SERVICE: %s, ID: %d, 
ACTION: User %s successfully added federation resolvers [ %s ]"
+   changelogMsg = fmt.Sprintf(changelogMsg, fed.DeliveryService, 
fedID, u.UserName, inserted)
+   api.CreateChangeLogRawTx(api.ApiChange, changelogMsg, u, tx)
+   }
+   return nil, nil, http.StatusOK
+}
+
+// adds federation resolver mappings for a particular delivery service to a 
given federation, creating said resolvers if
+// they don't already exist.
+func addFederationResolverMappingsToFederation(res tc.ResolverMapping, xmlid 
string, fed uint, tx *sql.Tx) (string, error) {
+   var resp string
+   if len(res.Resolve4) > 0 {
+   

[GitHub] [trafficcontrol] mhoppa commented on a change in pull request #4015: Rewrite /federations to Go - POST/PUT/DELETE

2019-10-28 Thread GitBox
mhoppa commented on a change in pull request #4015: Rewrite /federations to Go 
- POST/PUT/DELETE
URL: https://github.com/apache/trafficcontrol/pull/4015#discussion_r339600297
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/dbhelpers/db_helpers.go
 ##
 @@ -346,3 +430,17 @@ func GetCacheGroupNameFromID(tx *sql.Tx, id int64) 
(tc.CacheGroupName, bool, err
}
return tc.CacheGroupName(name), true, nil
 }
+
+// GetFederationIDForUserIDByXMLID retrieves the ID of the Federation assigned 
to the user defined by
+// userID on the Delivery Service identified by xmlid. If no such federation 
exists, the boolean
+// returned will be 'false', while the error indicates unexpected errors that 
occurred when querying.
+func GetFederationIDForUserIDByXMLID(tx *sql.Tx, userID int, xmlid string) 
(uint, bool, error) {
+   var id uint
 
 Review comment:
   I am curious why a uint here?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mhoppa commented on a change in pull request #4015: Rewrite /federations to Go - POST/PUT/DELETE

2019-10-28 Thread GitBox
mhoppa commented on a change in pull request #4015: Rewrite /federations to Go 
- POST/PUT/DELETE
URL: https://github.com/apache/trafficcontrol/pull/4015#discussion_r339566176
 
 

 ##
 File path: lib/go-tc/federation.go
 ##
 @@ -67,36 +80,85 @@ type FederationMapping struct {
TTL   int`json:"ttl"`
 }
 
-// AllFederation is the JSON object returned by /api/1.x/federations?all
-type AllFederation struct {
-   Mappings[]AllFederationMapping `json:"mappings"`
-   DeliveryService DeliveryServiceName`json:"deliveryService"`
+// AllDeliveryServiceFederationsMapping is a structure that contains 
identifying information for a
+// Delivery Service as well as any and all Federation Resolver mapping 
assigned to it (or all those
+// getting assigned to it).
+type AllDeliveryServiceFederationsMapping struct {
+   Mappings[]FederationResolverMapping `json:"mappings"`
+   DeliveryService DeliveryServiceName `json:"deliveryService"`
 }
 
-func (a AllFederation) IsAllFederations() bool { return true }
+// IsAllFederations implements the IAllFederation interface. Always returns 
true.
+func (a AllDeliveryServiceFederationsMapping) IsAllFederations() bool { return 
true }
 
 // AllFederation is the JSON object returned by 
/api/1.x/federations?all=my-cdn-name
 type AllFederationCDN struct {
CDNName *CDNName `json:"cdnName"`
 }
 
+// IsAllFederations implements the IAllFederation interface. Always returns 
true.
 func (a AllFederationCDN) IsAllFederations() bool { return true }
 
-type AllFederationMapping struct {
-   TTL  *int `json:"ttl"`
-   CName*string  `json:"cname"`
+type ResolverMapping struct {
Resolve4 []string `json:"resolve4,omitempty"`
Resolve6 []string `json:"resolve6,omitempty"`
 }
 
+func (r *ResolverMapping) Validate(tx *sql.Tx) error {
+   errs := []error{}
+   for _, res := range r.Resolve4 {
 
 Review comment:
   This looks good but anyway we could leverage 
https://github.com/go-ozzo/ozzo-validation#built-in-validation-rules to 
accomplish this? I see they have validation for ipv4/ipv6.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mhoppa commented on a change in pull request #4015: Rewrite /federations to Go - POST/PUT/DELETE

2019-10-28 Thread GitBox
mhoppa commented on a change in pull request #4015: Rewrite /federations to Go 
- POST/PUT/DELETE
URL: https://github.com/apache/trafficcontrol/pull/4015#discussion_r339599291
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/dbhelpers/db_helpers.go
 ##
 @@ -42,6 +42,75 @@ const BaseOrderBy = "\nORDER BY"
 const BaseLimit = "\nLIMIT"
 const BaseOffset = "\nOFFSET"
 
+const UserIDHasAccessToDeliveryServiceXMLIDQuery = `
 
 Review comment:
   is this used anywhere?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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: trafficcontrol-traffic_ops-test #1610

2019-10-28 Thread Apache Jenkins Server
See 


Changes:

[ocket] Fix query parameter name (#4031)


--
Started by an SCM change
Running as SYSTEM
[EnvInject] - Loading node environment variables.
Building remotely on H38 (ubuntu xenial) in workspace 

using credential b205a645-1ea7-4dfd-973d-c14ac43cab07
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision d55dd6dadb6bdad9b7f3905af8411f5d8865c8b2 
(refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f d55dd6dadb6bdad9b7f3905af8411f5d8865c8b2
Commit message: "Fix query parameter name (#4031)"
 > git rev-list --no-walk 490bf00dc4e0b00da7f788d0340aeec22b5b03da # timeout=10
[trafficcontrol-traffic_ops-test] $ /bin/bash /tmp/jenkins1090819688803935879.sh
docker-compose version 1.24.1, build 4667896
docker-py version: 3.7.2
CPython version: 2.7.12
OpenSSL version: OpenSSL 1.0.2g  1 Mar 2016
+ trap finish EXIT
+ proj=jenkins-trafficcontrol-traffic_ops-test-1610
++ pwd
+ 
compose=
+ cfile=traffic_ops/app/bin/tests/docker-compose.yml
+ [[ -z 

 ]]
+ [[ ! -x 

 ]]
+ 

 -p jenkins-trafficcontrol-traffic_ops-test-1610 -f 
traffic_ops/app/bin/tests/docker-compose.yml up --build --exit-code-from 
unit_golang unit_golang
using --exit-code-from implies --abort-on-container-exit
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ exit 1
+ finish
+ local st=1
+ [[ 1 -ne 0 ]]
+ echo 'Exiting with status 1'
Exiting with status 1
+ 

 -p jenkins-trafficcontrol-traffic_ops-test-1610 -f 
traffic_ops/app/bin/tests/docker-compose.yml down -v
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
Build step 'Execute shell' marked build as failure


Build failed in Jenkins: trafficcontrol-master-build #1567

2019-10-28 Thread Apache Jenkins Server
See 


Changes:

[ocket] Fix query parameter name (#4031)


--
Started by an SCM change
Running as SYSTEM
[EnvInject] - Loading node environment variables.
Building remotely on H42 (ubuntu xenial) in workspace 

[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
[WS-CLEANUP] Done
using credential b205a645-1ea7-4dfd-973d-c14ac43cab07
Cloning the remote Git repository
Cloning repository git://github.com/apache/trafficcontrol.git
 > git init  # 
 > timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # 
 > timeout=10
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision d55dd6dadb6bdad9b7f3905af8411f5d8865c8b2 
(refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f d55dd6dadb6bdad9b7f3905af8411f5d8865c8b2
Commit message: "Fix query parameter name (#4031)"
 > git rev-list --no-walk 490bf00dc4e0b00da7f788d0340aeec22b5b03da # timeout=10
[trafficcontrol-master-build] $ /bin/bash /tmp/jenkins1851230893628180156.sh
++ echo jenkins-trafficcontrol-master-build-1567
++ sed s/-//g
++ sed s/jenkins//
+ proj=trafficcontrolmasterbuild1567
+ yml=infrastructure/docker/build/docker-compose.yml
++ mktemp /tmp/docker-compose-
+ dc=/tmp/docker-compose-Fbqj
++ mktemp /tmp/tc-status-
+ st=/tmp/tc-status-f3Db
++ uname -s
++ uname -m
+ curl -o /tmp/docker-compose-Fbqj -L 
https://github.com/docker/compose/releases/download/1.13.0/docker-compose-Linux-x86_64
  % 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 
  6170   6170 0   1035  0 --:--:-- --:--:-- --:--:--  1035
 13 8079k   13 1052k0 0   689k  0  0:00:11  0:00:01  0:00:10  
689k100 8079k  100 8079k0 0  4660k  0  0:00:01  0:00:01 --:--:-- 
33.1M
+ chmod +x /tmp/docker-compose-Fbqj
+ rm -rf dist
+ /tmp/docker-compose-Fbqj -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolmasterbuild1567 up
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ exit 1
Build step 'Execute shell' marked build as failure
Archiving artifacts


[GitHub] [trafficcontrol] ocket8888 merged pull request #4031: Fix query parameter name

2019-10-28 Thread GitBox
ocket merged pull request #4031: Fix query parameter name
URL: https://github.com/apache/trafficcontrol/pull/4031
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mhoppa commented on a change in pull request #4029: Rewrite cache_stats to Golang

2019-10-28 Thread GitBox
mhoppa commented on a change in pull request #4029: Rewrite cache_stats to 
Golang
URL: https://github.com/apache/trafficcontrol/pull/4029#discussion_r339806416
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/trafficstats/cache.go
 ##
 @@ -0,0 +1,207 @@
+package trafficstats
+
+/*
+ * 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 (
+   "encoding/json"
+   "errors"
+   "fmt"
+   "net/http"
+
+   
"github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/dbhelpers"
+
+   "github.com/apache/trafficcontrol/lib/go-tc"
+   "github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/api"
+   influx "github.com/influxdata/influxdb/client/v2"
 
 Review comment:
   yep!


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] ocket8888 commented on a change in pull request #4029: Rewrite cache_stats to Golang

2019-10-28 Thread GitBox
ocket commented on a change in pull request #4029: Rewrite cache_stats to 
Golang
URL: https://github.com/apache/trafficcontrol/pull/4029#discussion_r339803463
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/trafficstats/cache.go
 ##
 @@ -0,0 +1,207 @@
+package trafficstats
+
+/*
+ * 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 (
+   "encoding/json"
+   "errors"
+   "fmt"
+   "net/http"
+
+   
"github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/dbhelpers"
+
+   "github.com/apache/trafficcontrol/lib/go-tc"
+   "github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/api"
+   influx "github.com/influxdata/influxdb/client/v2"
 
 Review comment:
   Just want to be sure because idk when you started this rewrite, but this is 
the "vendored" client and not the one that actually exists on the Internet, 
right?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mattjackson220 commented on a change in pull request #3534: TP Delivery Service Generate SSL update, new letsencrypt generate and…

2019-10-28 Thread GitBox
mattjackson220 commented on a change in pull request #3534: TP Delivery Service 
Generate SSL update, new letsencrypt generate and…
URL: https://github.com/apache/trafficcontrol/pull/3534#discussion_r339798927
 
 

 ##
 File path: traffic_portal/app/src/common/api/DeliveryServiceSslKeysService.js
 ##
 @@ -17,75 +17,80 @@
  * under the License.
  */
 
-var DeliveryServiceSslKeysService = function($http, $q, locationUtils, 
messageModel, ENV) {
+var DeliveryServiceSslKeysService = function($http, locationUtils, 
messageModel, ENV) {
+this.successMessage = 'SSL Keys generated and updated for ';
+this.letsEncryptSuccessMessage = 'Call to Lets Encrypt has been made 
successfully. This may take a few minutes. Please watch for a notification in 
the Change Log. Delivery Service = ';
+
this.generateSslKeys = function(deliveryService, sslKeys, 
generateSslKeyForm) {
-   if (sslKeys.hasOwnProperty('version')){
-   generateSslKeyForm.version = parseInt(sslKeys.version) 
+ 1;
-   } else {
-   generateSslKeyForm.version = 1;
-   }
+return this.generateSslKeysBase(deliveryService, sslKeys, 
generateSslKeyForm, 'deliveryservices/sslkeys/generate', this.successMessage);
+   };
 
-   generateSslKeyForm.cdn = deliveryService.cdnName;
-   generateSslKeyForm.deliveryservice = deliveryService.xmlId;
-   generateSslKeyForm.key = deliveryService.xmlId;
+this.generateSslKeysWithLetsEncrypt = function(deliveryService, sslKeys, 
generateSslKeyForm) {
+return this.generateSslKeysBase(deliveryService, sslKeys, 
generateSslKeyForm, 'deliveryservices/sslkeys/generate/letsencrypt', 
this.letsEncryptSuccessMessage);
+};
 
-   var request = $q.defer();
-$http.post(ENV.api['root'] + "deliveryservices/sslkeys/generate", 
generateSslKeyForm)
-.then(
-function(result) {
-   messageModel.setMessages([ { level: 'success', text: 'SSL Keys 
generated and updated for ' + deliveryService.xmlId } ], true);
-request.resolve(result.data.response);
-},
-function(fault) {
-   messageModel.setMessages(fault.data.alerts, false);
-request.reject(fault);
-}
-);
-return request.promise;
-   };
+   this.generateSslKeysBase = function(deliveryService, sslKeys, 
generateSslKeyForm, endpoint, message) {
+if (sslKeys.hasOwnProperty('version')){
+generateSslKeyForm.version = parseInt(sslKeys.version, 10) + 1;
+} else {
+generateSslKeyForm.version = 1;
+}
+
+generateSslKeyForm.cdn = deliveryService.cdnName;
+generateSslKeyForm.deliveryservice = deliveryService.xmlId;
+generateSslKeyForm.key = deliveryService.xmlId;
+
+return $http.post(ENV.api['root'] + endpoint, generateSslKeyForm)
+.then(
+function(result) {
+messageModel.setMessages([ { level: 'success', text: 
message + deliveryService.xmlId } ], true);
 
 Review comment:
   i did it this way so that i could change which message it shows based on if 
it called LE or not.  and it does redirect after


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mattjackson220 commented on a change in pull request #3534: TP Delivery Service Generate SSL update, new letsencrypt generate and…

2019-10-28 Thread GitBox
mattjackson220 commented on a change in pull request #3534: TP Delivery Service 
Generate SSL update, new letsencrypt generate and…
URL: https://github.com/apache/trafficcontrol/pull/3534#discussion_r339796187
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/routing/routes.go
 ##
 @@ -479,11 +479,18 @@ func Routes(d ServerData) ([]Route, []RawRoute, 
http.Handler, error) {
 
{1.1, http.MethodGet, 
`deliveryservices/{id}/servers/eligible/?(\.json)?$`, 
deliveryservice.GetServersEligible, auth.PrivLevelReadOnly, Authenticated, nil},
 
+   {1.4, http.MethodGet, 
`deliveryservices/xmlId/{xmlid}/sslkeys$`, 
deliveryservice.GetSSLKeysByXMLIDV14, auth.PrivLevelAdmin, Authenticated, nil},
{1.1, http.MethodGet, 
`deliveryservices/xmlId/{xmlid}/sslkeys$`, deliveryservice.GetSSLKeysByXMLID, 
auth.PrivLevelAdmin, Authenticated, nil},
{1.1, http.MethodGet, 
`deliveryservices/hostname/{hostname}/sslkeys$`, 
deliveryservice.GetSSLKeysByHostName, auth.PrivLevelAdmin, Authenticated, nil},
{1.1, http.MethodPost, `deliveryservices/sslkeys/add$`, 
deliveryservice.AddSSLKeys, auth.PrivLevelAdmin, Authenticated, nil},
{1.1, http.MethodGet, 
`deliveryservices/xmlId/{xmlid}/sslkeys/delete$`, 
deliveryservice.DeleteSSLKeys, auth.PrivLevelOperations, Authenticated, nil},
{1.1, http.MethodPost, 
`deliveryservices/sslkeys/generate/?(\.json)?$`, 
deliveryservice.GenerateSSLKeys, auth.PrivLevelOperations, Authenticated, nil},
+
+   //Delivery service LetsEncrypt
+   {1.4, http.MethodPost, 
`deliveryservices/sslkeys/generate/letsencrypt/?(\.json)?$`, 
deliveryservice.GenerateLetsEncryptCertificates, auth.PrivLevelReadOnly, 
Authenticated, nil},
+   {1.4, http.MethodGet, `letsencrypt/dnsrecords/?(\.json)?$`, 
deliveryservice.GetDnsChallengeRecords, auth.PrivLevelReadOnly, Authenticated, 
nil},
+   {1.4, http.MethodPost, `letsencrypt/autorenew/?(\.json)?$`, 
deliveryservice.RenewCertificates, auth.PrivLevelReadOnly, Authenticated, nil},
 
 Review comment:
   done


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mattjackson220 commented on a change in pull request #3534: TP Delivery Service Generate SSL update, new letsencrypt generate and…

2019-10-28 Thread GitBox
mattjackson220 commented on a change in pull request #3534: TP Delivery Service 
Generate SSL update, new letsencrypt generate and…
URL: https://github.com/apache/trafficcontrol/pull/3534#discussion_r339794527
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/deliveryservice/letsencryptcert.go
 ##
 @@ -0,0 +1,305 @@
+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 (
+   "bytes"
+   "context"
+   "crypto"
+   "crypto/rand"
+   "crypto/rsa"
+   "crypto/x509"
+   "encoding/pem"
+   "errors"
+   "net/http"
+   "strconv"
+   "strings"
+   "time"
+
+   "github.com/apache/trafficcontrol/lib/go-log"
+   "github.com/apache/trafficcontrol/lib/go-tc"
+   "github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/api"
+   "github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/auth"
+   "github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/config"
+   
"github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/riaksvc"
+   "github.com/go-acme/lego/certcrypto"
+   "github.com/go-acme/lego/certificate"
+   "github.com/go-acme/lego/challenge"
+   "github.com/go-acme/lego/challenge/dns01"
+   "github.com/go-acme/lego/lego"
+   "github.com/go-acme/lego/registration"
+   "github.com/jmoiron/sqlx"
+)
+
+type MyUser struct {
+   Emailstring
+   Registration *registration.Resource
+   key  crypto.PrivateKey
+}
+
+const LetsEncryptTimeout = time.Minute * 10
+
+func (u *MyUser) GetEmail() string {
+   return u.Email
+}
+
+func (u MyUser) GetRegistration() *registration.Resource {
+   return u.Registration
+}
+
+func (u *MyUser) GetPrivateKey() crypto.PrivateKey {
+   return u.key
+}
+
+type DNSProviderTrafficRouter struct {
+   db *sqlx.DB
+}
+
+func NewDNSProviderTrafficRouter() *DNSProviderTrafficRouter {
+   return {}
+}
+
+func (d *DNSProviderTrafficRouter) Timeout() (timeout, interval time.Duration) 
{
+   return LetsEncryptTimeout, time.Second * 30
+}
+
+func (d *DNSProviderTrafficRouter) Present(domain, token, keyAuth string) 
error {
+   tx, err := d.db.Begin()
+   fqdn, value := dns01.GetRecord(domain, keyAuth)
+
+   q := `INSERT INTO dnschallenges (fqdn, record) VALUES ($1, $2)`
+   response, err := tx.Exec(q, fqdn, value)
+   tx.Commit()
+   if err != nil {
+   log.Errorf("Inserting dns txt record for fqdn '" + fqdn + "' 
record '" + value + "': " + err.Error())
+   return errors.New("Inserting dns txt record for fqdn '" + fqdn 
+ "' record '" + value + "': " + err.Error())
+   } else {
+   rows, err := response.RowsAffected()
+   if err != nil {
+   log.Errorf("Determining rows affected dns txt record 
for fqdn '" + fqdn + "' record '" + value + "': " + err.Error())
+   return errors.New("Determining rows affected dns txt 
record for fqdn '" + fqdn + "' record '" + value + "': " + err.Error())
+   }
+   if rows == 0 {
+   log.Errorf("Zero rows affected when inserting dns txt 
record for fqdn '" + fqdn + "' record '" + value + "': " + err.Error())
+   return errors.New("Zero rows affected when inserting 
dns txt record for fqdn '" + fqdn + "' record '" + value + "': " + err.Error())
+   }
+   }
+
+   return nil
+}
+
+func (d *DNSProviderTrafficRouter) CleanUp(domain, token, keyAuth string) 
error {
+   fqdn, value := dns01.GetRecord(domain, keyAuth)
+   tx, err := d.db.Begin()
+
+   q := `DELETE FROM dnschallenges WHERE fqdn = $1 and record = $2`
+   response, err := tx.Exec(q, fqdn, value)
+   tx.Commit()
+   if err != nil {
+   log.Errorf("Deleting dns txt record for fqdn '" + fqdn + "' 
record '" + value + "': " + err.Error())
+   return errors.New("Deleting dns txt record for fqdn '" + fqdn + 
"' record '" + value + "': " + err.Error())
+   } else {
+   rows, err := response.RowsAffected()
+   if err != nil {
+   

[GitHub] [trafficcontrol] asf-ci commented on issue #3980: Add atscfg logic for Server Capabilities

2019-10-28 Thread GitBox
asf-ci commented on issue #3980: Add atscfg logic for Server Capabilities
URL: https://github.com/apache/trafficcontrol/pull/3980#issuecomment-547144411
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4653/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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: trafficcontrol-PR #4653

2019-10-28 Thread Apache Jenkins Server
See 


Changes:

[rob] Add atscfg logic for Server Capabilities.


--
GitHub pull request #3980 of commit 44e2ac3a4bb45b3fef0cf7172412ef3b175038e3, 
no merge conflicts.
Running as SYSTEM
Setting status of 44e2ac3a4bb45b3fef0cf7172412ef3b175038e3 to PENDING with url 
https://builds.apache.org/job/trafficcontrol-PR/4653/ and message: 'Build 
started for merge commit.'
Using context: default
[EnvInject] - Loading node environment variables.
Building remotely on H39 (ubuntu xenial) in workspace 

[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
using credential b205a645-1ea7-4dfd-973d-c14ac43cab07
Cloning the remote Git repository
Cloning repository git://github.com/apache/trafficcontrol.git
 > git init  # timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # 
 > timeout=10
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/pull/*:refs/remotes/origin/pr/*
 > git rev-parse 44e2ac3a4bb45b3fef0cf7172412ef3b175038e3^{commit} # timeout=10
Checking out Revision 44e2ac3a4bb45b3fef0cf7172412ef3b175038e3 (detached)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 44e2ac3a4bb45b3fef0cf7172412ef3b175038e3
Commit message: "Add atscfg logic for Server Capabilities."
 > git rev-list --no-walk 4bc7f3e026fff26379842067e3c40a73ff1a8bb6 # timeout=10
[trafficcontrol-PR] $ /bin/bash /tmp/jenkins9117805004937608480.sh
++ echo jenkins-trafficcontrol-PR-4653
++ sed s/jenkins//
++ sed s/-//g
+ proj=trafficcontrolPR4653
+ yml=infrastructure/docker/build/docker-compose.yml
++ mktemp /tmp/docker-compose-
+ dc=/tmp/docker-compose-uWD0
++ mktemp /tmp/tc-status-
+ st=/tmp/tc-status-UCie
+ trap finish EXIT
++ uname -s
++ uname -m
+ curl -o /tmp/docker-compose-uWD0 -L 
https://github.com/docker/compose/releases/download/1.13.0/docker-compose-Linux-x86_64
  % 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 
  6170   6170 0937  0 --:--:-- --:--:-- --:--:--   937
  2 8079k2  237k0 0   169k  0  0:00:47  0:00:01  0:00:46  
169k100 8079k  100 8079k0 0  4462k  0  0:00:01  0:00:01 --:--:-- 
18.7M
+ chmod +x /tmp/docker-compose-uWD0
+ rm -rf dist
+ /tmp/docker-compose-uWD0 -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4653 up
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ exit 1
+ finish
+ /tmp/docker-compose-uWD0 -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4653 down -v
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ /tmp/docker-compose-uWD0 -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4653 rm -v -f
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ rm -f /tmp/docker-compose-uWD0
Build step 'Execute shell' marked build as failure
Skipped archiving because build is not successful


[GitHub] [trafficcontrol] asf-ci commented on issue #4029: Rewrite cache_stats to Golang

2019-10-28 Thread GitBox
asf-ci commented on issue #4029: Rewrite cache_stats to Golang
URL: https://github.com/apache/trafficcontrol/pull/4029#issuecomment-547144224
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4652/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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: trafficcontrol-PR #4652

2019-10-28 Thread Apache Jenkins Server
See 

Changes:


--
GitHub pull request #4029 of commit 4bc7f3e026fff26379842067e3c40a73ff1a8bb6, 
no merge conflicts.
Running as SYSTEM
Setting status of 4bc7f3e026fff26379842067e3c40a73ff1a8bb6 to PENDING with url 
https://builds.apache.org/job/trafficcontrol-PR/4652/ and message: 'Build 
started for merge commit.'
Using context: default
[EnvInject] - Loading node environment variables.
Building remotely on H39 (ubuntu xenial) in workspace 

[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
using credential b205a645-1ea7-4dfd-973d-c14ac43cab07
Cloning the remote Git repository
Cloning repository git://github.com/apache/trafficcontrol.git
 > git init  # timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # 
 > timeout=10
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/pull/*:refs/remotes/origin/pr/*
 > git rev-parse 4bc7f3e026fff26379842067e3c40a73ff1a8bb6^{commit} # timeout=10
Checking out Revision 4bc7f3e026fff26379842067e3c40a73ff1a8bb6 (detached)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 4bc7f3e026fff26379842067e3c40a73ff1a8bb6
Commit message: "Update cache_stats documenation"
 > git rev-list --no-walk b3adc06c1c8a5f25846ec178087ed05cbdd62ec9 # timeout=10
First time build. Skipping changelog.
[trafficcontrol-PR] $ /bin/bash /tmp/jenkins722808122086831793.sh
++ echo jenkins-trafficcontrol-PR-4652
++ sed s/-//g
++ sed s/jenkins//
+ proj=trafficcontrolPR4652
+ yml=infrastructure/docker/build/docker-compose.yml
++ mktemp /tmp/docker-compose-
+ dc=/tmp/docker-compose-HLpb
++ mktemp /tmp/tc-status-
+ st=/tmp/tc-status-9hnc
+ trap finish EXIT
++ uname -s
++ uname -m
+ curl -o /tmp/docker-compose-HLpb -L 
https://github.com/docker/compose/releases/download/1.13.0/docker-compose-Linux-x86_64
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 
0100   6170   6170 0   1004  0 --:--:-- --:--:-- --:--:--  1004
  0 00 00 0  0  0 --:--:--  0:00:01 --:--:-- 
0100 8079k  100 8079k0 0  4516k  0  0:00:01  0:00:01 --:--:-- 10.2M
+ chmod +x /tmp/docker-compose-HLpb
+ rm -rf dist
+ /tmp/docker-compose-HLpb -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4652 up
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ exit 1
+ finish
+ /tmp/docker-compose-HLpb -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4652 down -v
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ /tmp/docker-compose-HLpb -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4652 rm -v -f
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ rm -f /tmp/docker-compose-HLpb
Build step 'Execute shell' marked build as failure
Skipped archiving because build is not successful


[GitHub] [trafficcontrol] mattjackson220 commented on a change in pull request #3534: TP Delivery Service Generate SSL update, new letsencrypt generate and…

2019-10-28 Thread GitBox
mattjackson220 commented on a change in pull request #3534: TP Delivery Service 
Generate SSL update, new letsencrypt generate and…
URL: https://github.com/apache/trafficcontrol/pull/3534#discussion_r339790033
 
 

 ##
 File path: 
traffic_ops/traffic_ops_golang/deliveryservice/letsencrypt_dns_challenge.go
 ##
 @@ -0,0 +1,73 @@
+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"
+   "net/http"
+
+   "github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/api"
+)
+
+type DnsRecord struct {
+   Fqdn   *string `json:"fqdn" db:"fqdn"`
+   Record *string `json:"record" db:"record"`
+}
+
+func GetDnsChallengeRecords(w http.ResponseWriter, r *http.Request) {
+   inf, userErr, sysErr, errCode := api.NewInfo(r, nil, nil)
+   if userErr != nil || sysErr != nil {
+   api.HandleErr(w, r, inf.Tx.Tx, errCode, userErr, sysErr)
+   return
+   }
+   defer inf.Close()
+
+   getQuery := `SELECT fqdn, record FROM dnschallenges`
+
+   if inf.Params["fqdn"] != "" {
+   getQuery += ` where fqdn = '` + inf.Params["fqdn"] + `'`
 
 Review comment:
   done


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mattjackson220 commented on a change in pull request #3534: TP Delivery Service Generate SSL update, new letsencrypt generate and…

2019-10-28 Thread GitBox
mattjackson220 commented on a change in pull request #3534: TP Delivery Service 
Generate SSL update, new letsencrypt generate and…
URL: https://github.com/apache/trafficcontrol/pull/3534#discussion_r339789893
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/deliveryservice/autorenewcerts.go
 ##
 @@ -0,0 +1,190 @@
+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 (
+   "context"
+   "database/sql"
+   "errors"
+   "net/http"
+   "strconv"
+   "strings"
+   "time"
+
+   "github.com/apache/trafficcontrol/lib/go-log"
+   "github.com/apache/trafficcontrol/lib/go-tc"
+   "github.com/apache/trafficcontrol/lib/go-util"
+   "github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/api"
+   "github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/config"
+   
"github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/riaksvc"
+)
+
+type DsKey struct {
+   XmlId   string
+   Version sql.NullInt64
+}
+
+type DsExpirationInfo struct {
+   XmlId  string
+   Versionutil.JSONIntStr
+   Expiration time.Time
+   AuthType   string
+   Error  error
+}
+
+type ExpirationSummary struct {
+   LetsEncryptExpirations []DsExpirationInfo
+   SelfSignedExpirations  []DsExpirationInfo
+   OtherExpirations   []DsExpirationInfo
+}
+
+const emailTemplateFile = 
"/opt/traffic_ops/app/templates/send_mail/autorenewcerts_mail.html"
+
+func RenewCertificates(w http.ResponseWriter, r *http.Request) {
+   inf, userErr, sysErr, errCode := api.NewInfo(r, nil, nil)
+   if userErr != nil || sysErr != nil {
+   api.HandleErr(w, r, inf.Tx.Tx, errCode, userErr, sysErr)
+   return
+   }
+   defer inf.Close()
+
+   if inf.Config.RiakEnabled == false {
+   api.HandleErr(w, r, inf.Tx.Tx, http.StatusInternalServerError, 
errors.New("the Riak service is unavailable"), errors.New("getting SSL keys 
from Riak by xml id: Riak is not configured"))
+   return
+   }
+
+   rows, err := inf.Tx.Tx.Query(`SELECT xml_id, ssl_key_version FROM 
deliveryservice`)
+   if err != nil {
+   api.HandleErr(w, r, inf.Tx.Tx, http.StatusInternalServerError, 
nil, err)
+   return
+   }
+   defer rows.Close()
+
+   keysFound := ExpirationSummary{}
+   for rows.Next() {
+   ds := DsKey{}
+   err := rows.Scan(, )
+   if err != nil {
+   log.Errorf("getting delivery services: %v", err)
+   continue
+   }
+   if ds.Version.Valid && int(ds.Version.Int64) != 0 {
+   continue
+   }
+
+   dsExpInfo := DsExpirationInfo{}
+   keyObj, ok, err := 
riaksvc.GetDeliveryServiceSSLKeysObj(ds.XmlId, 
strconv.Itoa(int(ds.Version.Int64)), inf.Tx.Tx, inf.Config.RiakAuthOptions, 
inf.Config.RiakPort)
+   if err != nil {
+   log.Errorf("getting ssl keys for xmlId: " + ds.XmlId + 
" and version: " + strconv.Itoa(int(ds.Version.Int64)) + " :" + err.Error())
+   dsExpInfo.XmlId = ds.XmlId
+   dsExpInfo.Version = 
util.JSONIntStr(int(ds.Version.Int64))
+   dsExpInfo.Error = errors.New("getting ssl keys for 
xmlId: " + ds.XmlId + " and version: " + strconv.Itoa(int(ds.Version.Int64)) + 
" :" + err.Error())
+   continue
+   }
+   if !ok {
+   log.Errorf("no object found for the specified key with 
xmlId: " + ds.XmlId + " and version: " + strconv.Itoa(int(ds.Version.Int64)))
+   dsExpInfo.XmlId = ds.XmlId
+   dsExpInfo.Version = 
util.JSONIntStr(int(ds.Version.Int64))
+   dsExpInfo.Error = errors.New("no object found for the 
specified key with xmlId: " + ds.XmlId + " and version: " + 
strconv.Itoa(int(ds.Version.Int64)))
+   continue
+   }
+
+   err = base64DecodeCertificate()
+   if err != nil {
+   

[GitHub] [trafficcontrol] mattjackson220 commented on a change in pull request #3534: TP Delivery Service Generate SSL update, new letsencrypt generate and…

2019-10-28 Thread GitBox
mattjackson220 commented on a change in pull request #3534: TP Delivery Service 
Generate SSL update, new letsencrypt generate and…
URL: https://github.com/apache/trafficcontrol/pull/3534#discussion_r339789856
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/deliveryservice/autorenewcerts.go
 ##
 @@ -0,0 +1,190 @@
+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 (
+   "context"
+   "database/sql"
+   "errors"
+   "net/http"
+   "strconv"
+   "strings"
+   "time"
+
+   "github.com/apache/trafficcontrol/lib/go-log"
+   "github.com/apache/trafficcontrol/lib/go-tc"
+   "github.com/apache/trafficcontrol/lib/go-util"
+   "github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/api"
+   "github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/config"
+   
"github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/riaksvc"
+)
+
+type DsKey struct {
+   XmlId   string
+   Version sql.NullInt64
+}
+
+type DsExpirationInfo struct {
+   XmlId  string
+   Versionutil.JSONIntStr
+   Expiration time.Time
+   AuthType   string
+   Error  error
+}
+
+type ExpirationSummary struct {
+   LetsEncryptExpirations []DsExpirationInfo
+   SelfSignedExpirations  []DsExpirationInfo
+   OtherExpirations   []DsExpirationInfo
+}
+
+const emailTemplateFile = 
"/opt/traffic_ops/app/templates/send_mail/autorenewcerts_mail.html"
+
+func RenewCertificates(w http.ResponseWriter, r *http.Request) {
+   inf, userErr, sysErr, errCode := api.NewInfo(r, nil, nil)
+   if userErr != nil || sysErr != nil {
+   api.HandleErr(w, r, inf.Tx.Tx, errCode, userErr, sysErr)
+   return
+   }
+   defer inf.Close()
+
+   if inf.Config.RiakEnabled == false {
+   api.HandleErr(w, r, inf.Tx.Tx, http.StatusInternalServerError, 
errors.New("the Riak service is unavailable"), errors.New("getting SSL keys 
from Riak by xml id: Riak is not configured"))
+   return
+   }
+
+   rows, err := inf.Tx.Tx.Query(`SELECT xml_id, ssl_key_version FROM 
deliveryservice`)
+   if err != nil {
+   api.HandleErr(w, r, inf.Tx.Tx, http.StatusInternalServerError, 
nil, err)
+   return
+   }
+   defer rows.Close()
+
+   keysFound := ExpirationSummary{}
+   for rows.Next() {
+   ds := DsKey{}
+   err := rows.Scan(, )
+   if err != nil {
+   log.Errorf("getting delivery services: %v", err)
+   continue
+   }
+   if ds.Version.Valid && int(ds.Version.Int64) != 0 {
+   continue
+   }
+
+   dsExpInfo := DsExpirationInfo{}
+   keyObj, ok, err := 
riaksvc.GetDeliveryServiceSSLKeysObj(ds.XmlId, 
strconv.Itoa(int(ds.Version.Int64)), inf.Tx.Tx, inf.Config.RiakAuthOptions, 
inf.Config.RiakPort)
+   if err != nil {
+   log.Errorf("getting ssl keys for xmlId: " + ds.XmlId + 
" and version: " + strconv.Itoa(int(ds.Version.Int64)) + " :" + err.Error())
+   dsExpInfo.XmlId = ds.XmlId
+   dsExpInfo.Version = 
util.JSONIntStr(int(ds.Version.Int64))
+   dsExpInfo.Error = errors.New("getting ssl keys for 
xmlId: " + ds.XmlId + " and version: " + strconv.Itoa(int(ds.Version.Int64)) + 
" :" + err.Error())
+   continue
+   }
+   if !ok {
+   log.Errorf("no object found for the specified key with 
xmlId: " + ds.XmlId + " and version: " + strconv.Itoa(int(ds.Version.Int64)))
+   dsExpInfo.XmlId = ds.XmlId
+   dsExpInfo.Version = 
util.JSONIntStr(int(ds.Version.Int64))
+   dsExpInfo.Error = errors.New("no object found for the 
specified key with xmlId: " + ds.XmlId + " and version: " + 
strconv.Itoa(int(ds.Version.Int64)))
+   continue
+   }
+
+   err = base64DecodeCertificate()
+   if err != nil {
+   

Build failed in Jenkins: trafficcontrol-PR #4651

2019-10-28 Thread Apache Jenkins Server
See 


Changes:

[rob] Add atscfg logic for Server Capabilities.


--
GitHub pull request #3980 of commit b3adc06c1c8a5f25846ec178087ed05cbdd62ec9, 
no merge conflicts.
Running as SYSTEM
Setting status of b3adc06c1c8a5f25846ec178087ed05cbdd62ec9 to PENDING with url 
https://builds.apache.org/job/trafficcontrol-PR/4651/ and message: 'Build 
started for merge commit.'
Using context: default
[EnvInject] - Loading node environment variables.
Building remotely on H39 (ubuntu xenial) in workspace 

[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
using credential b205a645-1ea7-4dfd-973d-c14ac43cab07
Cloning the remote Git repository
Cloning repository git://github.com/apache/trafficcontrol.git
 > git init  # timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # 
 > timeout=10
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/pull/*:refs/remotes/origin/pr/*
 > git rev-parse b3adc06c1c8a5f25846ec178087ed05cbdd62ec9^{commit} # timeout=10
Checking out Revision b3adc06c1c8a5f25846ec178087ed05cbdd62ec9 (detached)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f b3adc06c1c8a5f25846ec178087ed05cbdd62ec9
Commit message: "Add atscfg logic for Server Capabilities."
 > git rev-list --no-walk 8bd336df432939593de9fe1ced7c72233f22a4d2 # timeout=10
[trafficcontrol-PR] $ /bin/bash /tmp/jenkins2503299323861547683.sh
++ echo jenkins-trafficcontrol-PR-4651
++ sed s/-//g
++ sed s/jenkins//
+ proj=trafficcontrolPR4651
+ yml=infrastructure/docker/build/docker-compose.yml
++ mktemp /tmp/docker-compose-
+ dc=/tmp/docker-compose-4zlf
++ mktemp /tmp/tc-status-
+ st=/tmp/tc-status-omNL
+ trap finish EXIT
++ uname -s
++ uname -m
+ curl -o /tmp/docker-compose-4zlf -L 
https://github.com/docker/compose/releases/download/1.13.0/docker-compose-Linux-x86_64
  % 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 
  6170   6170 0   1001  0 --:--:-- --:--:-- --:--:--  1000
  1 8079k1  117k0 0  90952  0  0:01:30  0:00:01  0:01:29 
90952100 8079k  100 8079k0 0  4602k  0  0:00:01  0:00:01 --:--:-- 
17.9M
+ chmod +x /tmp/docker-compose-4zlf
+ rm -rf dist
+ /tmp/docker-compose-4zlf -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4651 up
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ exit 1
+ finish
+ /tmp/docker-compose-4zlf -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4651 down -v
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ /tmp/docker-compose-4zlf -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4651 rm -v -f
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ rm -f /tmp/docker-compose-4zlf
Build step 'Execute shell' marked build as failure
Skipped archiving because build is not successful


[GitHub] [trafficcontrol] asf-ci commented on issue #3980: Add atscfg logic for Server Capabilities

2019-10-28 Thread GitBox
asf-ci commented on issue #3980: Add atscfg logic for Server Capabilities
URL: https://github.com/apache/trafficcontrol/pull/3980#issuecomment-547142612
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4651/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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: trafficcontrol-PR #4650

2019-10-28 Thread Apache Jenkins Server
See 

Changes:


--
GitHub pull request #4029 of commit 8bd336df432939593de9fe1ced7c72233f22a4d2, 
no merge conflicts.
Running as SYSTEM
Setting status of 8bd336df432939593de9fe1ced7c72233f22a4d2 to PENDING with url 
https://builds.apache.org/job/trafficcontrol-PR/4650/ and message: 'Build 
started for merge commit.'
Using context: default
[EnvInject] - Loading node environment variables.
Building remotely on H39 (ubuntu xenial) in workspace 

[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
using credential b205a645-1ea7-4dfd-973d-c14ac43cab07
Cloning the remote Git repository
Cloning repository git://github.com/apache/trafficcontrol.git
 > git init  # timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # 
 > timeout=10
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/pull/*:refs/remotes/origin/pr/*
 > git rev-parse 8bd336df432939593de9fe1ced7c72233f22a4d2^{commit} # timeout=10
Checking out Revision 8bd336df432939593de9fe1ced7c72233f22a4d2 (detached)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 8bd336df432939593de9fe1ced7c72233f22a4d2
Commit message: "Update cache_stats documenation"
 > git rev-list --no-walk ac8668b5bf3984b7f9c1bc57a7c43cb56db0485e # timeout=10
First time build. Skipping changelog.
[trafficcontrol-PR] $ /bin/bash /tmp/jenkins3588704066208981114.sh
++ echo jenkins-trafficcontrol-PR-4650
++ sed s/-//g
++ sed s/jenkins//
+ proj=trafficcontrolPR4650
+ yml=infrastructure/docker/build/docker-compose.yml
++ mktemp /tmp/docker-compose-
+ dc=/tmp/docker-compose-ikFE
++ mktemp /tmp/tc-status-
+ st=/tmp/tc-status-phBx
+ trap finish EXIT
++ uname -s
++ uname -m
+ curl -o /tmp/docker-compose-ikFE -L 
https://github.com/docker/compose/releases/download/1.13.0/docker-compose-Linux-x86_64
  % 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 
  6170   6170 0   1041  0 --:--:-- --:--:-- --:--:--  1040
  0 8079k0 00 0  0  0 --:--:--  0:00:01 --:--:-- 
0100 8079k  100 8079k0 0  3900k  0  0:00:02  0:00:02 --:--:-- 10.7M
+ chmod +x /tmp/docker-compose-ikFE
+ rm -rf dist
+ /tmp/docker-compose-ikFE -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4650 up
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ exit 1
+ finish
+ /tmp/docker-compose-ikFE -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4650 down -v
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ /tmp/docker-compose-ikFE -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4650 rm -v -f
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ rm -f /tmp/docker-compose-ikFE
Build step 'Execute shell' marked build as failure
Skipped archiving because build is not successful


[GitHub] [trafficcontrol] asf-ci commented on issue #4029: Rewrite cache_stats to Golang

2019-10-28 Thread GitBox
asf-ci commented on issue #4029: Rewrite cache_stats to Golang
URL: https://github.com/apache/trafficcontrol/pull/4029#issuecomment-547142437
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4650/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] ocket8888 commented on issue #4033: To: INternal server error when server capability associated with Server is deleted

2019-10-28 Thread GitBox
ocket commented on issue #4033: To: INternal server error when server 
capability associated with Server is deleted
URL: https://github.com/apache/trafficcontrol/issues/4033#issuecomment-547140878
 
 
   Error code should be `409 Conflict` IMO.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] ocket8888 commented on issue #4036: TO: alert message on create server should be fixed.

2019-10-28 Thread GitBox
ocket commented on issue #4036: TO: alert message on create server should 
be fixed. 
URL: https://github.com/apache/trafficcontrol/issues/4036#issuecomment-547140418
 
 
   Could be further improved using names not IDs, IMO. Though the IDs are what 
the request specifies, so maybe can't be changed without changing that.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] ocket8888 commented on issue #4034: TO API: Message returned from API in Server server capabilities should be corrected

2019-10-28 Thread GitBox
ocket commented on issue #4034: TO API: Message returned from API in Server 
server capabilities should be corrected
URL: https://github.com/apache/trafficcontrol/issues/4034#issuecomment-547140117
 
 
   I believe that's a limitation of the "CRUDer", and probably manifests in 
many endpoints.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] ocket8888 commented on a change in pull request #3534: TP Delivery Service Generate SSL update, new letsencrypt generate and…

2019-10-28 Thread GitBox
ocket commented on a change in pull request #3534: TP Delivery Service 
Generate SSL update, new letsencrypt generate and…
URL: https://github.com/apache/trafficcontrol/pull/3534#discussion_r339784309
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/deliveryservice/autorenewcerts.go
 ##
 @@ -0,0 +1,190 @@
+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 (
+   "context"
+   "database/sql"
+   "errors"
+   "net/http"
+   "strconv"
+   "strings"
+   "time"
+
+   "github.com/apache/trafficcontrol/lib/go-log"
+   "github.com/apache/trafficcontrol/lib/go-tc"
+   "github.com/apache/trafficcontrol/lib/go-util"
+   "github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/api"
+   "github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/config"
+   
"github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/riaksvc"
+)
+
+type DsKey struct {
+   XmlId   string
+   Version sql.NullInt64
+}
+
+type DsExpirationInfo struct {
+   XmlId  string
+   Versionutil.JSONIntStr
+   Expiration time.Time
+   AuthType   string
+   Error  error
+}
+
+type ExpirationSummary struct {
+   LetsEncryptExpirations []DsExpirationInfo
+   SelfSignedExpirations  []DsExpirationInfo
+   OtherExpirations   []DsExpirationInfo
+}
+
+const emailTemplateFile = 
"/opt/traffic_ops/app/templates/send_mail/autorenewcerts_mail.html"
+
+func RenewCertificates(w http.ResponseWriter, r *http.Request) {
+   inf, userErr, sysErr, errCode := api.NewInfo(r, nil, nil)
+   if userErr != nil || sysErr != nil {
+   api.HandleErr(w, r, inf.Tx.Tx, errCode, userErr, sysErr)
+   return
+   }
+   defer inf.Close()
+
+   if inf.Config.RiakEnabled == false {
+   api.HandleErr(w, r, inf.Tx.Tx, http.StatusInternalServerError, 
errors.New("the Riak service is unavailable"), errors.New("getting SSL keys 
from Riak by xml id: Riak is not configured"))
+   return
+   }
+
+   rows, err := inf.Tx.Tx.Query(`SELECT xml_id, ssl_key_version FROM 
deliveryservice`)
+   if err != nil {
+   api.HandleErr(w, r, inf.Tx.Tx, http.StatusInternalServerError, 
nil, err)
+   return
+   }
+   defer rows.Close()
+
+   keysFound := ExpirationSummary{}
+   for rows.Next() {
+   ds := DsKey{}
+   err := rows.Scan(, )
+   if err != nil {
+   log.Errorf("getting delivery services: %v", err)
+   continue
+   }
+   if ds.Version.Valid && int(ds.Version.Int64) != 0 {
+   continue
+   }
+
+   dsExpInfo := DsExpirationInfo{}
+   keyObj, ok, err := 
riaksvc.GetDeliveryServiceSSLKeysObj(ds.XmlId, 
strconv.Itoa(int(ds.Version.Int64)), inf.Tx.Tx, inf.Config.RiakAuthOptions, 
inf.Config.RiakPort)
+   if err != nil {
+   log.Errorf("getting ssl keys for xmlId: " + ds.XmlId + 
" and version: " + strconv.Itoa(int(ds.Version.Int64)) + " :" + err.Error())
+   dsExpInfo.XmlId = ds.XmlId
+   dsExpInfo.Version = 
util.JSONIntStr(int(ds.Version.Int64))
+   dsExpInfo.Error = errors.New("getting ssl keys for 
xmlId: " + ds.XmlId + " and version: " + strconv.Itoa(int(ds.Version.Int64)) + 
" :" + err.Error())
+   continue
+   }
+   if !ok {
+   log.Errorf("no object found for the specified key with 
xmlId: " + ds.XmlId + " and version: " + strconv.Itoa(int(ds.Version.Int64)))
+   dsExpInfo.XmlId = ds.XmlId
+   dsExpInfo.Version = 
util.JSONIntStr(int(ds.Version.Int64))
+   dsExpInfo.Error = errors.New("no object found for the 
specified key with xmlId: " + ds.XmlId + " and version: " + 
strconv.Itoa(int(ds.Version.Int64)))
+   continue
+   }
+
+   err = base64DecodeCertificate()
+   if err != nil {
+   

[GitHub] [trafficcontrol] asf-ci commented on issue #3980: WIP Add atscfg logic for Server Capabilities.

2019-10-28 Thread GitBox
asf-ci commented on issue #3980: WIP Add atscfg logic for Server Capabilities.
URL: https://github.com/apache/trafficcontrol/pull/3980#issuecomment-547133983
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4649/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] ajschmidt commented on a change in pull request #3534: TP Delivery Service Generate SSL update, new letsencrypt generate and…

2019-10-28 Thread GitBox
ajschmidt commented on a change in pull request #3534: TP Delivery Service 
Generate SSL update, new letsencrypt generate and…
URL: https://github.com/apache/trafficcontrol/pull/3534#discussion_r339778718
 
 

 ##
 File path: docs/source/admin/traffic_router.rst
 ##
 @@ -681,8 +681,67 @@ The ordering of certificates within the certificate 
bundle matters. It must be:
 
 To see the ordering of certificates you may have to manually split up your 
certificate chain and use :manpage:`openssl(1ssl)` on each individual 
certificate
 
-Suggested Way of Setting up an HTTPS Delivery Service
--
+Let's Encrypt
+-
+Let’s Encrypt is a free, automated :abbr:`CA (Certificate Authority)` using 
:abbr:`ACME (Automated Certificate Management Environment)` protocol. Let's 
Encrypt performs a domain validation before issuing or renewing a certificate. 
There are several options for domain validation but for this application the 
DNS challenge is used in order to receive wildcard certificates. Let's Encrypt 
sends a token to be used as a TXT record at 
``_acme-challenge.domain.example.com`` and after verifying that the token is 
accessible there, will return the newly generated and signed certificate and 
key. The basic workflow implemented is:
+
+#. ``POST`` to Let's Encrypt and receive the DNS challenge token.
+#. Traffic Ops stores the DNS challenge in the Traffic Ops database.
+#. Traffic Router has a watcher set up to watch for changes in the Traffic Ops 
database table.
 
 Review comment:
   It still says 'watch for changes in the Traffic Ops database table'. It's 
not watching the table. It's checking with TO to see if any new challenges have 
been received using the new API endpoint. Right?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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: trafficcontrol-PR #4648

2019-10-28 Thread Apache Jenkins Server
See 


Changes:

[mitchell852] adds the ability to add or remove required server capabilities 
from a

[mitchell852] adds context menu items for viewing a server capability's servers 
and


--
GitHub pull request #4035 of commit a973df666c1c3df18fbbfbcd025439877242fa77, 
no merge conflicts.
Running as SYSTEM
Setting status of a973df666c1c3df18fbbfbcd025439877242fa77 to PENDING with url 
https://builds.apache.org/job/trafficcontrol-PR/4648/ and message: 'Build 
started for merge commit.'
Using context: default
[EnvInject] - Loading node environment variables.
Building remotely on H39 (ubuntu xenial) in workspace 

[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
using credential b205a645-1ea7-4dfd-973d-c14ac43cab07
Cloning the remote Git repository
Cloning repository git://github.com/apache/trafficcontrol.git
 > git init  # timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # 
 > timeout=10
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/pull/*:refs/remotes/origin/pr/*
 > git rev-parse a973df666c1c3df18fbbfbcd025439877242fa77^{commit} # timeout=10
Checking out Revision a973df666c1c3df18fbbfbcd025439877242fa77 (detached)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f a973df666c1c3df18fbbfbcd025439877242fa77
Commit message: "adds context menu items for viewing a server capability's 
servers and delivery services"
 > git rev-list --no-walk 22ac78628ddea7832e70b735526b616d4b7de7f6 # timeout=10
[trafficcontrol-PR] $ /bin/bash /tmp/jenkins7272380987451900135.sh
++ echo jenkins-trafficcontrol-PR-4648
++ sed s/-//g
++ sed s/jenkins//
+ proj=trafficcontrolPR4648
+ yml=infrastructure/docker/build/docker-compose.yml
++ mktemp /tmp/docker-compose-
+ dc=/tmp/docker-compose-8u3T
++ mktemp /tmp/tc-status-
+ st=/tmp/tc-status-kWzt
+ trap finish EXIT
++ uname -s
++ uname -m
+ curl -o /tmp/docker-compose-8u3T -L 
https://github.com/docker/compose/releases/download/1.13.0/docker-compose-Linux-x86_64
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 
0100   6170   6170 0982  0 --:--:-- --:--:-- --:--:--   984
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 
0100 8079k  100 8079k0 0  4639k  0  0:00:01  0:00:01 --:--:-- 8522k
+ chmod +x /tmp/docker-compose-8u3T
+ rm -rf dist
+ /tmp/docker-compose-8u3T -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4648 up
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ exit 1
+ finish
+ /tmp/docker-compose-8u3T -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4648 down -v
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ /tmp/docker-compose-8u3T -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4648 rm -v -f
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ rm -f /tmp/docker-compose-8u3T
Build step 'Execute shell' marked build as failure
Skipped archiving because build is not successful


[GitHub] [trafficcontrol] asf-ci commented on issue #4035: TP: adds the ability to add/remove required server capabilities from DS

2019-10-28 Thread GitBox
asf-ci commented on issue #4035: TP: adds the ability to add/remove required 
server capabilities from DS
URL: https://github.com/apache/trafficcontrol/pull/4035#issuecomment-547133789
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4648/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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: trafficcontrol-PR #4649

2019-10-28 Thread Apache Jenkins Server
See 


Changes:

[rob] Add atscfg logic for Server Capabilities.


--
GitHub pull request #3980 of commit ac8668b5bf3984b7f9c1bc57a7c43cb56db0485e, 
no merge conflicts.
Running as SYSTEM
Setting status of ac8668b5bf3984b7f9c1bc57a7c43cb56db0485e to PENDING with url 
https://builds.apache.org/job/trafficcontrol-PR/4649/ and message: 'Build 
started for merge commit.'
Using context: default
[EnvInject] - Loading node environment variables.
Building remotely on H39 (ubuntu xenial) in workspace 

[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
using credential b205a645-1ea7-4dfd-973d-c14ac43cab07
Cloning the remote Git repository
Cloning repository git://github.com/apache/trafficcontrol.git
 > git init  # timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # 
 > timeout=10
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/pull/*:refs/remotes/origin/pr/*
 > git rev-parse ac8668b5bf3984b7f9c1bc57a7c43cb56db0485e^{commit} # timeout=10
Checking out Revision ac8668b5bf3984b7f9c1bc57a7c43cb56db0485e (detached)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f ac8668b5bf3984b7f9c1bc57a7c43cb56db0485e
Commit message: "Add atscfg logic for Server Capabilities."
 > git rev-list --no-walk a973df666c1c3df18fbbfbcd025439877242fa77 # timeout=10
[trafficcontrol-PR] $ /bin/bash /tmp/jenkins3123845668103180237.sh
++ echo jenkins-trafficcontrol-PR-4649
++ sed s/jenkins//
++ sed s/-//g
+ proj=trafficcontrolPR4649
+ yml=infrastructure/docker/build/docker-compose.yml
++ mktemp /tmp/docker-compose-
+ dc=/tmp/docker-compose-nHKb
++ mktemp /tmp/tc-status-
+ st=/tmp/tc-status-ogvT
+ trap finish EXIT
++ uname -s
++ uname -m
+ curl -o /tmp/docker-compose-nHKb -L 
https://github.com/docker/compose/releases/download/1.13.0/docker-compose-Linux-x86_64
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 
0100   6170   6170 0   1016  0 --:--:-- --:--:-- --:--:--  1018
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 
0100 8079k  100 8079k0 0  4536k  0  0:00:01  0:00:01 --:--:-- k
+ chmod +x /tmp/docker-compose-nHKb
+ rm -rf dist
+ /tmp/docker-compose-nHKb -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4649 up
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ exit 1
+ finish
+ /tmp/docker-compose-nHKb -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4649 down -v
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ /tmp/docker-compose-nHKb -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4649 rm -v -f
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ rm -f /tmp/docker-compose-nHKb
Build step 'Execute shell' marked build as failure
Skipped archiving because build is not successful


[GitHub] [trafficcontrol] asf-ci commented on issue #4029: Rewrite cache_stats to Golang

2019-10-28 Thread GitBox
asf-ci commented on issue #4029: Rewrite cache_stats to Golang
URL: https://github.com/apache/trafficcontrol/pull/4029#issuecomment-547133599
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4647/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] asf-ci commented on issue #4035: TP: adds the ability to add/remove required server capabilities from DS

2019-10-28 Thread GitBox
asf-ci commented on issue #4035: TP: adds the ability to add/remove required 
server capabilities from DS
URL: https://github.com/apache/trafficcontrol/pull/4035#issuecomment-547133426
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4646/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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: trafficcontrol-PR #4647

2019-10-28 Thread Apache Jenkins Server
See 


Changes:

[Michael_Hoppal] Rewrite cache_stats from Perl to Golang

[Michael_Hoppal] Back out test/dev code

[Michael_Hoppal] Run gofmt


--
GitHub pull request #4029 of commit 22ac78628ddea7832e70b735526b616d4b7de7f6, 
no merge conflicts.
Running as SYSTEM
Setting status of 22ac78628ddea7832e70b735526b616d4b7de7f6 to PENDING with url 
https://builds.apache.org/job/trafficcontrol-PR/4647/ and message: 'Build 
started for merge commit.'
Using context: default
[EnvInject] - Loading node environment variables.
Building remotely on H39 (ubuntu xenial) in workspace 

[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
using credential b205a645-1ea7-4dfd-973d-c14ac43cab07
Cloning the remote Git repository
Cloning repository git://github.com/apache/trafficcontrol.git
 > git init  # timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # 
 > timeout=10
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/pull/*:refs/remotes/origin/pr/*
 > git rev-parse 22ac78628ddea7832e70b735526b616d4b7de7f6^{commit} # timeout=10
Checking out Revision 22ac78628ddea7832e70b735526b616d4b7de7f6 (detached)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 22ac78628ddea7832e70b735526b616d4b7de7f6
Commit message: "Run gofmt"
 > git rev-list --no-walk 0be3cd29b6640cc6f34a36e2998153ac524a70f9 # timeout=10
[trafficcontrol-PR] $ /bin/bash /tmp/jenkins4989261824916749373.sh
++ echo jenkins-trafficcontrol-PR-4647
++ sed s/jenkins//
++ sed s/-//g
+ proj=trafficcontrolPR4647
+ yml=infrastructure/docker/build/docker-compose.yml
++ mktemp /tmp/docker-compose-
+ dc=/tmp/docker-compose-2Oek
++ mktemp /tmp/tc-status-
+ st=/tmp/tc-status-C9fW
+ trap finish EXIT
++ uname -s
++ uname -m
+ curl -o /tmp/docker-compose-2Oek -L 
https://github.com/docker/compose/releases/download/1.13.0/docker-compose-Linux-x86_64
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 
0100   6170   6170 0   1009  0 --:--:-- --:--:-- --:--:--  1009
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0 
60 8079k   60 4928k0 0  2881k  0  0:00:02  0:00:01  0:00:01 
4908k100 8079k  100 8079k0 0  4418k  0  0:00:01  0:00:01 --:--:-- 
7200k
+ chmod +x /tmp/docker-compose-2Oek
+ rm -rf dist
+ /tmp/docker-compose-2Oek -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4647 up
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ exit 1
+ finish
+ /tmp/docker-compose-2Oek -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4647 down -v
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ /tmp/docker-compose-2Oek -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4647 rm -v -f
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ rm -f /tmp/docker-compose-2Oek
Build step 'Execute shell' marked build as failure
Skipped archiving because build is not successful


Build failed in Jenkins: trafficcontrol-PR #4646

2019-10-28 Thread Apache Jenkins Server
See 

Changes:


--
GitHub pull request #4035 of commit 0be3cd29b6640cc6f34a36e2998153ac524a70f9, 
no merge conflicts.
Running as SYSTEM
Setting status of 0be3cd29b6640cc6f34a36e2998153ac524a70f9 to PENDING with url 
https://builds.apache.org/job/trafficcontrol-PR/4646/ and message: 'Build 
started for merge commit.'
Using context: default
[EnvInject] - Loading node environment variables.
Building remotely on H39 (ubuntu xenial) in workspace 

[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
using credential b205a645-1ea7-4dfd-973d-c14ac43cab07
Cloning the remote Git repository
Cloning repository git://github.com/apache/trafficcontrol.git
 > git init  # timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # 
 > timeout=10
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/pull/*:refs/remotes/origin/pr/*
 > git rev-parse 0be3cd29b6640cc6f34a36e2998153ac524a70f9^{commit} # timeout=10
Checking out Revision 0be3cd29b6640cc6f34a36e2998153ac524a70f9 (detached)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 0be3cd29b6640cc6f34a36e2998153ac524a70f9
Commit message: "adds the ability to add or remove required server capabilities 
from a delivery service"
 > git rev-list --no-walk 3d0845738b3f9f61cfe906f475020e7a58aff658 # timeout=10
First time build. Skipping changelog.
[trafficcontrol-PR] $ /bin/bash /tmp/jenkins5971722762151996084.sh
++ echo jenkins-trafficcontrol-PR-4646
++ sed s/jenkins//
++ sed s/-//g
+ proj=trafficcontrolPR4646
+ yml=infrastructure/docker/build/docker-compose.yml
++ mktemp /tmp/docker-compose-
+ dc=/tmp/docker-compose-cjY1
++ mktemp /tmp/tc-status-
+ st=/tmp/tc-status-f1Kl
+ trap finish EXIT
++ uname -s
++ uname -m
+ curl -o /tmp/docker-compose-cjY1 -L 
https://github.com/docker/compose/releases/download/1.13.0/docker-compose-Linux-x86_64
  % 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 
  6170   6170 0   1033  0 --:--:-- --:--:-- --:--:--  1033
  3 8079k3  288k0 0   216k  0  0:00:37  0:00:01  0:00:36  
216k100 8079k  100 8079k0 0  4841k  0  0:00:01  0:00:01 --:--:-- 
22.6M
+ chmod +x /tmp/docker-compose-cjY1
+ rm -rf dist
+ /tmp/docker-compose-cjY1 -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4646 up
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ exit 1
+ finish
+ /tmp/docker-compose-cjY1 -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4646 down -v
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ /tmp/docker-compose-cjY1 -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4646 rm -v -f
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ rm -f /tmp/docker-compose-cjY1
Build step 'Execute shell' marked build as failure
Skipped archiving because build is not successful


Build failed in Jenkins: trafficcontrol-PR #4645

2019-10-28 Thread Apache Jenkins Server
See 


Changes:

[ocket] Add top-level vendor dir to TO-Go and TM unit test containers 
(#4009)

[ocket] accounts for null arrays (#4008)

[mitchell852] Rewrote /user/reset_password to Go (#3929)

[mitchell852] Removed restangular from ChangeLogService (#3608)

[ocket] Fix TO API test failure when starting from a fresh `db/admin reset`

[ocket] Implement GET /api/1.1/roles handler (#4011)

[mitchell852] Removed restangular from CacheGroupService (#3604)

[ocket] Add deliveryservice server capability docs (#4018)

[ocket] Add TO Go ATS CDN configs (#3875)

[ocket] TP: Ability to manager capabilities of servers (#3998)

[ocket] Fix missed files in PR (#4024)

[ocket] Rewrite federation user GET/POST/DELETE (#4014)

[ocket] Fix endpoint name in docs (#4027)

[ocket] Add TO-Go /api/1.1/servers/status GET handler (#4013)

[ocket] Feature/add deliveryservice required capability (#4026)

[mitchell852] adds the ability to add or remove required server capabilities 
from a


--
[...truncated 3.51 MB...]
traffic_portal_build_1   | | +-- shush@1.0.0 
traffic_portal_build_1   | | | +-- caller@0.0.1 
traffic_portal_build_1   | | | | `-- tape@2.3.3 
traffic_portal_build_1   | | | |   +-- deep-equal@0.1.2 
traffic_portal_build_1   | | | |   +-- defined@0.0.0 
traffic_portal_build_1   | | | |   +-- jsonify@0.0.0 
traffic_portal_build_1   | | | |   +-- resumer@0.0.0 
traffic_portal_build_1   | | | |   `-- through@2.3.8 
traffic_portal_build_1   | | | `-- strip-json-comments@0.1.3 
traffic_portal_build_1   | | +-- utile@0.3.0 
traffic_portal_build_1   | | | +-- async@0.9.2 
traffic_portal_build_1   | | | +-- deep-equal@0.2.2 
traffic_portal_build_1   | | | +-- i@0.3.6 
traffic_portal_build_1   | | | +-- ncp@1.0.1 
traffic_portal_build_1   | | | `-- rimraf@2.7.1 
traffic_portal_build_1   | | |   `-- glob@7.1.5 
traffic_portal_build_1   | | | +-- fs.realpath@1.0.0 
traffic_portal_build_1   | | | +-- inflight@1.0.6 
traffic_portal_build_1   | | | | `-- wrappy@1.0.2 
traffic_portal_build_1   | | | `-- once@1.4.0 
traffic_portal_build_1   | | `-- winston@0.8.3 
traffic_portal_build_1   | |   +-- cycle@1.0.3 
traffic_portal_build_1   | |   +-- isstream@0.1.2 
traffic_portal_build_1   | |   +-- pkginfo@0.3.1 
traffic_portal_build_1   | |   `-- stack-trace@0.0.10 
traffic_portal_build_1   | +-- morgan@1.9.1 
traffic_portal_build_1   | | `-- basic-auth@2.0.1 
traffic_portal_build_1   | +-- requirejs@2.1.22 
traffic_portal_build_1   | `-- ssl-root-cas@1.1.10 
traffic_portal_build_1   |   +-- es6-promise@2.3.0 
traffic_portal_build_1   |   `-- request@2.88.0 
traffic_portal_build_1   | +-- aws-sign2@0.7.0 
traffic_portal_build_1   | +-- aws4@1.8.0 
traffic_portal_build_1   | +-- caseless@0.12.0 
traffic_portal_build_1   | +-- combined-stream@1.0.8 
traffic_portal_build_1   | | `-- delayed-stream@1.0.0 
traffic_portal_build_1   | +-- extend@3.0.2 
traffic_portal_build_1   | +-- forever-agent@0.6.1 
traffic_portal_build_1   | +-- form-data@2.3.3 
traffic_portal_build_1   | | `-- asynckit@0.4.0 
traffic_portal_build_1   | +-- har-validator@5.1.3 
traffic_portal_build_1   | | +-- ajv@6.10.2 
traffic_portal_build_1   | | | +-- fast-deep-equal@2.0.1 
traffic_portal_build_1   | | | +-- 
fast-json-stable-stringify@2.0.0 
traffic_portal_build_1   | | | +-- json-schema-traverse@0.4.1 
traffic_portal_build_1   | | | `-- uri-js@4.2.2 
traffic_portal_build_1   | | |   `-- punycode@2.1.1 
traffic_portal_build_1   | | `-- har-schema@2.0.0 
traffic_portal_build_1   | +-- http-signature@1.2.0 
traffic_portal_build_1   | | +-- assert-plus@1.0.0 
traffic_portal_build_1   | | +-- jsprim@1.4.1 
traffic_portal_build_1   | | | +-- extsprintf@1.3.0 
traffic_portal_build_1   | | | +-- json-schema@0.2.3 
traffic_portal_build_1   | | | `-- verror@1.10.0 
traffic_portal_build_1   | | `-- sshpk@1.16.1 
traffic_portal_build_1   | |   +-- asn1@0.2.4 
traffic_portal_build_1   | |   +-- bcrypt-pbkdf@1.0.2 
traffic_portal_build_1   | |   +-- dashdash@1.14.1 
traffic_portal_build_1   | |   +-- ecc-jsbn@0.1.2 

[GitHub] [trafficcontrol] asf-ci commented on issue #4035: TP: adds the ability to add/remove required server capabilities from DS

2019-10-28 Thread GitBox
asf-ci commented on issue #4035: TP: adds the ability to add/remove required 
server capabilities from DS
URL: https://github.com/apache/trafficcontrol/pull/4035#issuecomment-547133243
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4645/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] rawlinp commented on a change in pull request #3534: TP Delivery Service Generate SSL update, new letsencrypt generate and…

2019-10-28 Thread GitBox
rawlinp commented on a change in pull request #3534: TP Delivery Service 
Generate SSL update, new letsencrypt generate and…
URL: https://github.com/apache/trafficcontrol/pull/3534#discussion_r339772000
 
 

 ##
 File path: traffic_ops/app/db/migrations/20191016_add_dns_challenges.sql
 ##
 @@ -0,0 +1,28 @@
+/*
 
 Review comment:
   This file probably needs to be renamed to have a prefix with a later date 
since another migration has been merged with a later date prefix than this one.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] lbathina opened a new issue #4036: TO: alert message on create server should be fixed.

2019-10-28 Thread GitBox
lbathina opened a new issue #4036: TO: alert message on create server should be 
fixed. 
URL: https://github.com/apache/trafficcontrol/issues/4036
 
 
   
   
   
   
   ## I'm submitting a ...
   
   
   - [ ] bug report
   - [ ] new feature / enhancement request
   - [X] improvement request (usability, performance, tech debt, etc.)
   - [ ] other 
   
   ## Traffic Control components affected ...
   
   - [ ] CDN in a Box
   - [ ] Documentation
   - [ ] Grove
   - [ ] Traffic Control Client
   - [ ] Traffic Monitor
   - [X] Traffic Ops
   - [ ] Traffic Ops ORT
   - [ ] Traffic Portal
   - [ ] Traffic Router
   - [ ] Traffic Stats
   - [ ] Traffic Vault
   - [ ] unknown
   
   ## Current behavior:
   
   ```
   {
   "alerts": [
   {
   "text": "CDN id '0' for profile '11' does not match Server CDN 
'1'",
   "level": "error"
   }
   ]
   }
   ```
   
   this message exposes the CDN that is available and can match the request to 
update the cdn. Kind a allows anyone to easily guess and hack.
   ## Expected / new behavior:
   
   ```
   {
   "alerts": [
   {
   "text":  profile id '11' does exist for given CDN id '1'",
   "level": "error"
   }
   ]
   }
   ```
   ## Minimal reproduction of the problem with instructions:
   
   
   create a server with cdnid and profile id combination that doesn't exist.
   {
   "cachegroupId": 6,
   "cdnId":1,
   "domainName": "infra.ciab.test",
   "hostName": "test2",
   "httpsPort": 443,
   "iloIpAddress": "",
   "iloIpGateway": "",
   "iloIpNetmask": "",
   "iloPassword": "",
   "iloUsername": "",
   "interfaceMtu": 1500,
   "interfaceName": "eth0",
   "ip6Address": "::2",
   "ip6Gateway": "::2",
   "ipAddress": "0.0.0.2",
   "ipGateway": "0.0.0.2",
   "ipNetmask": "255.255.255.0",
   "mgmtIpAddress": "",
   "mgmtIpGateway": "",
   "mgmtIpNetmask": "",
   "offlineReason": "",
   "physLocationId": 1,
   "profileId": 11,
   "routerHostName": "",
   "routerPortName": "",
   "statusId": 3,
   "tcpPort": 80,
   "typeId": 12,
   "updPending": false
   }
   ## Anything else:
   
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] guzzijason commented on issue #4010: Port legacy perl TO extension checks from perl to go

2019-10-28 Thread GitBox
guzzijason commented on issue #4010: Port legacy perl TO extension checks from 
perl to go
URL: https://github.com/apache/trafficcontrol/pull/4010#issuecomment-547123443
 
 
   Do not merge - there were changes in #ccff78a that broke the code in this 
PR, that I was not anticipating. I need to sort that out now.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mitchell852 commented on issue #4034: TP: Message displayed in Server server capabilities page should be corrected

2019-10-28 Thread GitBox
mitchell852 commented on issue #4034: TP: Message displayed in Server server 
capabilities page should be corrected
URL: https://github.com/apache/trafficcontrol/issues/4034#issuecomment-547123497
 
 
   This is really something that has to be changed in the TO API and not TP. TP 
only displays the message it gets from the TO API.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] guzzijason edited a comment on issue #4010: Port legacy perl TO extension checks from perl to go

2019-10-28 Thread GitBox
guzzijason edited a comment on issue #4010: Port legacy perl TO extension 
checks from perl to go
URL: https://github.com/apache/trafficcontrol/pull/4010#issuecomment-547123443
 
 
   Do not merge - there were changes in ccff78a that broke the code in this PR, 
that I was not anticipating. I need to sort that out now.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mitchell852 opened a new pull request #4035: TP: adds the ability to add/remove required server capabilities from DS

2019-10-28 Thread GitBox
mitchell852 opened a new pull request #4035: TP: adds the ability to add/remove 
required server capabilities from DS
URL: https://github.com/apache/trafficcontrol/pull/4035
 
 
   DRAFT
   
   
   ## What does this PR (Pull Request) do?
   
   
   - [ ] This PR fixes #REPLACE_ME OR is not related to any Issue 
   
   
   ## Which Traffic Control components are affected by this PR?
   
   
   - CDN in a Box
   - Documentation
   - Grove
   - Traffic Control Client 
   - Traffic Monitor
   - Traffic Ops
   - Traffic Ops ORT
   - Traffic Portal
   - Traffic Router
   - Traffic Stats
   - Traffic Vault
   
   ## What is the best way to verify this PR?
   
   
   ## If this is a bug fix, what versions of Traffic Control are affected?
   
   
   
   ## The following criteria are ALL met by this PR
   
   
   - [ ] This PR includes tests OR I have explained why tests are unnecessary
   - [ ] This PR includes documentation OR I have explained why documentation 
is unnecessary
   - [ ] This PR includes an update to CHANGELOG.md OR such an update is not 
necessary
   - [ ] This PR includes any and all required license headers
   - [ ] This PR ensures that database migration sequence is correct OR this PR 
does not include a database migration
   - [ ] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY** (see [the 
Apache Software Foundation's security 
guidelines](https://www.apache.org/security/) for details)
   
   
   ## Additional Information
   
   
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mitchell852 closed pull request #4028: DRAFT: TP: Adds the ability to add/remove required server capabilities to/from a DS

2019-10-28 Thread GitBox
mitchell852 closed pull request #4028: DRAFT: TP: Adds the ability to 
add/remove required server capabilities to/from a DS
URL: https://github.com/apache/trafficcontrol/pull/4028
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mattjackson220 commented on a change in pull request #3534: TP Delivery Service Generate SSL update, new letsencrypt generate and…

2019-10-28 Thread GitBox
mattjackson220 commented on a change in pull request #3534: TP Delivery Service 
Generate SSL update, new letsencrypt generate and…
URL: https://github.com/apache/trafficcontrol/pull/3534#discussion_r339763826
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/deliveryservice/keys.go
 ##
 @@ -210,9 +218,75 @@ func getSSLKeysByXMLIDHelper(xmlID string, inf 
*api.APIInfo, w http.ResponseWrit
return
}
}
+
api.WriteResp(w, r, keyObj)
 }
 
+// GetSSLKeysByXMLID fetches the deliveryservice ssl keys by the specified 
xmlID.
+func GetSSLKeysByXMLIDV14(w http.ResponseWriter, r *http.Request) {
+   inf, userErr, sysErr, errCode := api.NewInfo(r, []string{"xmlid"}, nil)
+   if userErr != nil || sysErr != nil {
+   api.HandleErr(w, r, inf.Tx.Tx, errCode, userErr, sysErr)
+   return
+   }
+   defer inf.Close()
+   if inf.Config.RiakEnabled == false {
+   api.HandleErr(w, r, inf.Tx.Tx, http.StatusServiceUnavailable, 
errors.New("the Riak service is unavailable"), errors.New("getting SSL keys 
from Riak by xml id: Riak is not configured"))
+   return
+   }
+   xmlID := inf.Params["xmlid"]
+   getSSLKeysByXMLIDHelperV14(xmlID, inf, w, r)
+}
+
+func getSSLKeysByXMLIDHelperV14(xmlID string, inf *api.APIInfo, w 
http.ResponseWriter, r *http.Request) {
+   version := inf.Params["version"]
+   decode := inf.Params["decode"]
+   if userErr, sysErr, errCode := tenant.Check(inf.User, xmlID, 
inf.Tx.Tx); userErr != nil || sysErr != nil {
+   api.HandleErr(w, r, inf.Tx.Tx, errCode, userErr, sysErr)
+   return
+   }
+   keyObj, ok, err := riaksvc.GetDeliveryServiceSSLKeysObjV14(xmlID, 
version, inf.Tx.Tx, inf.Config.RiakAuthOptions, inf.Config.RiakPort)
+   if err != nil {
+   api.HandleErr(w, r, inf.Tx.Tx, http.StatusInternalServerError, 
nil, errors.New("getting ssl keys: "+err.Error()))
+   return
+   }
+   if !ok {
+   api.WriteRespAlertObj(w, r, tc.InfoLevel, "no object found for 
the specified key", struct{}{}) // empty response object because Perl
 
 Review comment:
   done


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mattjackson220 commented on a change in pull request #3534: TP Delivery Service Generate SSL update, new letsencrypt generate and…

2019-10-28 Thread GitBox
mattjackson220 commented on a change in pull request #3534: TP Delivery Service 
Generate SSL update, new letsencrypt generate and…
URL: https://github.com/apache/trafficcontrol/pull/3534#discussion_r339762801
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/deliveryservice/autorenewcerts.go
 ##
 @@ -0,0 +1,190 @@
+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 (
+   "context"
+   "database/sql"
+   "errors"
+   "net/http"
+   "strconv"
+   "strings"
+   "time"
+
+   "github.com/apache/trafficcontrol/lib/go-log"
+   "github.com/apache/trafficcontrol/lib/go-tc"
+   "github.com/apache/trafficcontrol/lib/go-util"
+   "github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/api"
+   "github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/config"
+   
"github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/riaksvc"
+)
+
+type DsKey struct {
+   XmlId   string
+   Version sql.NullInt64
+}
+
+type DsExpirationInfo struct {
+   XmlId  string
+   Versionutil.JSONIntStr
+   Expiration time.Time
+   AuthType   string
+   Error  error
+}
+
+type ExpirationSummary struct {
+   LetsEncryptExpirations []DsExpirationInfo
+   SelfSignedExpirations  []DsExpirationInfo
+   OtherExpirations   []DsExpirationInfo
+}
+
+const emailTemplateFile = 
"/opt/traffic_ops/app/templates/send_mail/autorenewcerts_mail.html"
+
+func RenewCertificates(w http.ResponseWriter, r *http.Request) {
+   inf, userErr, sysErr, errCode := api.NewInfo(r, nil, nil)
+   if userErr != nil || sysErr != nil {
+   api.HandleErr(w, r, inf.Tx.Tx, errCode, userErr, sysErr)
+   return
+   }
+   defer inf.Close()
+
+   if inf.Config.RiakEnabled == false {
+   api.HandleErr(w, r, inf.Tx.Tx, http.StatusInternalServerError, 
errors.New("the Riak service is unavailable"), errors.New("getting SSL keys 
from Riak by xml id: Riak is not configured"))
+   return
+   }
+
+   rows, err := inf.Tx.Tx.Query(`SELECT xml_id, ssl_key_version FROM 
deliveryservice`)
+   if err != nil {
+   api.HandleErr(w, r, inf.Tx.Tx, http.StatusInternalServerError, 
nil, err)
+   return
+   }
+   defer rows.Close()
+
+   keysFound := ExpirationSummary{}
+   for rows.Next() {
+   ds := DsKey{}
+   err := rows.Scan(, )
+   if err != nil {
+   log.Errorf("getting delivery services: %v", err)
+   continue
+   }
+   if ds.Version.Valid && int(ds.Version.Int64) != 0 {
+   continue
+   }
+
+   dsExpInfo := DsExpirationInfo{}
+   keyObj, ok, err := 
riaksvc.GetDeliveryServiceSSLKeysObj(ds.XmlId, 
strconv.Itoa(int(ds.Version.Int64)), inf.Tx.Tx, inf.Config.RiakAuthOptions, 
inf.Config.RiakPort)
+   if err != nil {
+   log.Errorf("getting ssl keys for xmlId: " + ds.XmlId + 
" and version: " + strconv.Itoa(int(ds.Version.Int64)) + " :" + err.Error())
+   dsExpInfo.XmlId = ds.XmlId
+   dsExpInfo.Version = 
util.JSONIntStr(int(ds.Version.Int64))
+   dsExpInfo.Error = errors.New("getting ssl keys for 
xmlId: " + ds.XmlId + " and version: " + strconv.Itoa(int(ds.Version.Int64)) + 
" :" + err.Error())
+   continue
+   }
+   if !ok {
+   log.Errorf("no object found for the specified key with 
xmlId: " + ds.XmlId + " and version: " + strconv.Itoa(int(ds.Version.Int64)))
+   dsExpInfo.XmlId = ds.XmlId
+   dsExpInfo.Version = 
util.JSONIntStr(int(ds.Version.Int64))
+   dsExpInfo.Error = errors.New("no object found for the 
specified key with xmlId: " + ds.XmlId + " and version: " + 
strconv.Itoa(int(ds.Version.Int64)))
+   continue
+   }
+
+   err = base64DecodeCertificate()
+   if err != nil {
+   

[GitHub] [trafficcontrol] lbathina opened a new issue #4034: TP: Message displayed in Server server capabilities page should be corrected

2019-10-28 Thread GitBox
lbathina opened a new issue #4034: TP: Message displayed in Server server 
capabilities page should be corrected
URL: https://github.com/apache/trafficcontrol/issues/4034
 
 
   
   
   
   
   ## I'm submitting a ...
   
   
   - [ ] bug report
   - [ ] new feature / enhancement request
   - [X] improvement request (usability, performance, tech debt, etc.)
   - [ ] other 
   
   ## Traffic Control components affected ...
   
   - [ ] CDN in a Box
   - [ ] Documentation
   - [ ] Grove
   - [ ] Traffic Control Client
   - [ ] Traffic Monitor
   - [ ] Traffic Ops
   - [ ] Traffic Ops ORT
   - [X] Traffic Portal
   - [ ] Traffic Router
   - [ ] Traffic Stats
   - [ ] Traffic Vault
   - [ ] unknown
   
   ## Current behavior:
   
   When a server is associated with capability that is already associated , we 
get 
   `server_server_capability server, server_capability '151, TEST_DISK2' 
already exists.` 
   
   this exposes the database tables and fields and is not user friendly.
   ## Expected / new behavior:
   
   The message could be 
   `Server Capability  is already associated with server 
.`
   
   ## Minimal reproduction of the problem with instructions:
   
   create server capability 
   associate server capability to server 
   try associate the same server capability to server
   
   ## Anything else:
   
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] lbathina opened a new issue #4033: To: INternal server error when server capability associated with Server is deleted

2019-10-28 Thread GitBox
lbathina opened a new issue #4033: To: INternal server error when server 
capability associated with Server is deleted
URL: https://github.com/apache/trafficcontrol/issues/4033
 
 
   
   
   
   
   ## I'm submitting a ...
   
   
   - [X] bug report
   - [ ] new feature / enhancement request
   - [ ] improvement request (usability, performance, tech debt, etc.)
   - [ ] other 
   
   ## Traffic Control components affected ...
   
   - [ ] CDN in a Box
   - [ ] Documentation
   - [ ] Grove
   - [ ] Traffic Control Client
   - [ ] Traffic Monitor
   - [X] Traffic Ops
   - [ ] Traffic Ops ORT
   - [X] Traffic Portal
   - [ ] Traffic Router
   - [ ] Traffic Stats
   - [ ] Traffic Vault
   - [ ] unknown
   
   ## Current behavior:
   
   When a server capability associated with a server is deleted, we get 
internal server error
   ## Expected / new behavior:
   
   Should return error `Server capability  cannot be deleted when servers 
are associated to it.` 
   
   ## Minimal reproduction of the problem with instructions:
   
   
   ## Anything else:
   
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] ocket8888 commented on issue #4032: Missing DELETE servers in documentation

2019-10-28 Thread GitBox
ocket commented on issue #4032: Missing DELETE servers in documentation
URL: https://github.com/apache/trafficcontrol/issues/4032#issuecomment-547108382
 
 
   Related: #2726 and #3443 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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: trafficcontrol-PR #4644

2019-10-28 Thread Apache Jenkins Server
See 


Changes:

[Jason_Tucker] Port TO Extension Checks from perl to go

[Jason_Tucker] update extension check doc

[Jason_Tucker] Update CHANGELOG.md

[Jason_Tucker] change UpdateCheckStatus() to InsertServerCheckStatus()


--
GitHub pull request #4010 of commit f2ba4905fcf47302a62bb9adf8f6de03f50e459c, 
has merge conflicts.
Running as SYSTEM
Setting status of f2ba4905fcf47302a62bb9adf8f6de03f50e459c to PENDING with url 
https://builds.apache.org/job/trafficcontrol-PR/4644/ and message: 'Build 
started for original commit.'
Using context: default
[EnvInject] - Loading node environment variables.
Building remotely on H39 (ubuntu xenial) in workspace 

[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
using credential b205a645-1ea7-4dfd-973d-c14ac43cab07
Cloning the remote Git repository
Cloning repository git://github.com/apache/trafficcontrol.git
 > git init  # timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # 
 > timeout=10
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/pull/*:refs/remotes/origin/pr/*
 > git rev-parse f2ba4905fcf47302a62bb9adf8f6de03f50e459c^{commit} # timeout=10
Checking out Revision f2ba4905fcf47302a62bb9adf8f6de03f50e459c (detached)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f f2ba4905fcf47302a62bb9adf8f6de03f50e459c
Commit message: "change UpdateCheckStatus() to InsertServerCheckStatus()"
 > git rev-list --no-walk c3dc7e7d4f445139fdf8d4143e60e479a74f2099 # timeout=10
[trafficcontrol-PR] $ /bin/bash /tmp/jenkins4388134143211073267.sh
++ echo jenkins-trafficcontrol-PR-4644
++ sed s/-//g
++ sed s/jenkins//
+ proj=trafficcontrolPR4644
+ yml=infrastructure/docker/build/docker-compose.yml
++ mktemp /tmp/docker-compose-
+ dc=/tmp/docker-compose-1whg
++ mktemp /tmp/tc-status-
+ st=/tmp/tc-status-D611
+ trap finish EXIT
++ uname -s
++ uname -m
+ curl -o /tmp/docker-compose-1whg -L 
https://github.com/docker/compose/releases/download/1.13.0/docker-compose-Linux-x86_64
  % 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 
  6170   6170 0   1022  0 --:--:-- --:--:-- --:--:--  1021
 26 8079k   26 2131k0 0  1345k  0  0:00:06  0:00:01  0:00:05 
1345k100 8079k  100 8079k0 0  4685k  0  0:00:01  0:00:01 --:--:-- 
41.4M
+ chmod +x /tmp/docker-compose-1whg
+ rm -rf dist
+ /tmp/docker-compose-1whg -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4644 up
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ exit 1
+ finish
+ /tmp/docker-compose-1whg -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4644 down -v
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ /tmp/docker-compose-1whg -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4644 rm -v -f
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ rm -f /tmp/docker-compose-1whg
Build step 'Execute shell' marked build as failure
Skipped archiving because build is not successful


[GitHub] [trafficcontrol] asf-ci commented on issue #4010: Port legacy perl TO extension checks from perl to go

2019-10-28 Thread GitBox
asf-ci commented on issue #4010: Port legacy perl TO extension checks from perl 
to go
URL: https://github.com/apache/trafficcontrol/pull/4010#issuecomment-547107889
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4644/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] ZugNZwang opened a new issue #4032: Missing DELETE servers in documentation

2019-10-28 Thread GitBox
ZugNZwang opened a new issue #4032: Missing DELETE servers in documentation
URL: https://github.com/apache/trafficcontrol/issues/4032
 
 
   
   
   
   
   ## I'm submitting a ...
   
   
   - [ ] bug report
   - [ ] new feature / enhancement request
   - [ ] improvement request (usability, performance, tech debt, etc.)
   - [X] other 
   
   ## Traffic Control components affected ...
   
   - [ ] CDN in a Box
   - [X] Documentation
   - [ ] Grove
   - [ ] Traffic Control Client
   - [ ] Traffic Monitor
   - [ ] Traffic Ops
   - [ ] Traffic Ops ORT
   - [ ] Traffic Portal
   - [ ] Traffic Router
   - [ ] Traffic Stats
   - [ ] Traffic Vault
   - [ ] unknown
   
   ## Current behavior:
   
Missing documentation. DELETE endpoint for servers exists but is not 
documented.
   ## Expected / new behavior:
   
   The `DELETE` handler of `servers` endpoint should be documented.
   ## Minimal reproduction of the problem with instructions:
   
   Link to servers endpoint documentation: 
https://traffic-control-cdn.readthedocs.io/en/latest/api/servers.html
   ## Anything else:
   
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] ChrisHines commented on issue #4031: Fix query parameter name

2019-10-28 Thread GitBox
ChrisHines commented on issue #4031: Fix query parameter name
URL: https://github.com/apache/trafficcontrol/pull/4031#issuecomment-547104653
 
 
   @mhoppa PTAL


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] asf-ci commented on issue #4031: Fix query parameter name

2019-10-28 Thread GitBox
asf-ci commented on issue #4031: Fix query parameter name
URL: https://github.com/apache/trafficcontrol/pull/4031#issuecomment-547095815
 
 
   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 to 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] [trafficcontrol] ChrisHines opened a new pull request #4031: Fix query parameter name

2019-10-28 Thread GitBox
ChrisHines opened a new pull request #4031: Fix query parameter name
URL: https://github.com/apache/trafficcontrol/pull/4031
 
 
   ## What does this PR (Pull Request) do?
   - [x] This PR updates documentation to match implementation in #4026
   
   ## Which Traffic Control components are affected by this PR?
   - Documentation
   
   ## What is the best way to verify this PR?
   Build the docs and check that the query parameters are correct on the API 
page for the deliveryservices_required_capabilities endpoint.
   
   ## The following criteria are ALL met by this PR
   - [x] This PR includes tests OR I have explained why tests are unnecessary
   - [x] This PR includes documentation OR I have explained why documentation 
is unnecessary
   - [x] This PR includes an update to CHANGELOG.md OR such an update is not 
necessary
   - [x] This PR includes any and all required license headers
   - [x] This PR ensures that database migration sequence is correct OR this PR 
does not include a database migration
   - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY** (see [the 
Apache Software Foundation's security 
guidelines](https://www.apache.org/security/) for details)
   
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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: trafficcontrol-master-build #1566

2019-10-28 Thread Apache Jenkins Server
See 


Changes:

[ocket] Feature/add deliveryservice required capability (#4026)


--
Started by an SCM change
Running as SYSTEM
[EnvInject] - Loading node environment variables.
Building remotely on H42 (ubuntu xenial) in workspace 

[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
[WS-CLEANUP] Done
using credential b205a645-1ea7-4dfd-973d-c14ac43cab07
Cloning the remote Git repository
Cloning repository git://github.com/apache/trafficcontrol.git
 > git init  # 
 > timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # 
 > timeout=10
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 490bf00dc4e0b00da7f788d0340aeec22b5b03da 
(refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 490bf00dc4e0b00da7f788d0340aeec22b5b03da
Commit message: "Feature/add deliveryservice required capability (#4026)"
 > git rev-list --no-walk a5a4bb9012676125a160b9e7da0d6834f90b376e # timeout=10
[trafficcontrol-master-build] $ /bin/bash /tmp/jenkins3532018728241106259.sh
++ echo jenkins-trafficcontrol-master-build-1566
++ sed s/-//g
++ sed s/jenkins//
+ proj=trafficcontrolmasterbuild1566
+ yml=infrastructure/docker/build/docker-compose.yml
++ mktemp /tmp/docker-compose-
+ dc=/tmp/docker-compose-Fd9E
++ mktemp /tmp/tc-status-
+ st=/tmp/tc-status-RcO8
++ uname -s
++ uname -m
+ curl -o /tmp/docker-compose-Fd9E -L 
https://github.com/docker/compose/releases/download/1.13.0/docker-compose-Linux-x86_64
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 
0100   6170   6170 0947  0 --:--:-- --:--:-- --:--:--   947
  0 00 00 0  0  0 --:--:--  0:00:01 --:--:-- 
0100 8079k  100 8079k0 0  4408k  0  0:00:01  0:00:01 --:--:--  9.8M
+ chmod +x /tmp/docker-compose-Fd9E
+ rm -rf dist
+ /tmp/docker-compose-Fd9E -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolmasterbuild1566 up
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ exit 1
Build step 'Execute shell' marked build as failure
Archiving artifacts


Build failed in Jenkins: trafficcontrol-traffic_ops-test #1609

2019-10-28 Thread Apache Jenkins Server
See 


Changes:

[ocket] Feature/add deliveryservice required capability (#4026)


--
Started by an SCM change
Running as SYSTEM
[EnvInject] - Loading node environment variables.
Building remotely on H43 (ubuntu xenial) in workspace 

using credential b205a645-1ea7-4dfd-973d-c14ac43cab07
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 490bf00dc4e0b00da7f788d0340aeec22b5b03da 
(refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 490bf00dc4e0b00da7f788d0340aeec22b5b03da
Commit message: "Feature/add deliveryservice required capability (#4026)"
 > git rev-list --no-walk a5a4bb9012676125a160b9e7da0d6834f90b376e # timeout=10
[trafficcontrol-traffic_ops-test] $ /bin/bash /tmp/jenkins2366037313814965869.sh
docker-compose version 1.24.1, build 4667896
docker-py version: 3.7.2
CPython version: 2.7.12
OpenSSL version: OpenSSL 1.0.2g  1 Mar 2016
+ trap finish EXIT
+ proj=jenkins-trafficcontrol-traffic_ops-test-1609
++ pwd
+ 
compose=
+ cfile=traffic_ops/app/bin/tests/docker-compose.yml
+ [[ -z 

 ]]
+ [[ ! -x 

 ]]
+ 

 -p jenkins-trafficcontrol-traffic_ops-test-1609 -f 
traffic_ops/app/bin/tests/docker-compose.yml up --build --exit-code-from 
unit_golang unit_golang
using --exit-code-from implies --abort-on-container-exit
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ exit 1
+ finish
+ local st=1
+ [[ 1 -ne 0 ]]
+ echo 'Exiting with status 1'
Exiting with status 1
+ 

 -p jenkins-trafficcontrol-traffic_ops-test-1609 -f 
traffic_ops/app/bin/tests/docker-compose.yml down -v
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
Build step 'Execute shell' marked build as failure


[GitHub] [trafficcontrol] ocket8888 merged pull request #4026: Feature/add deliveryservice required capability

2019-10-28 Thread GitBox
ocket merged pull request #4026: Feature/add deliveryservice required 
capability
URL: https://github.com/apache/trafficcontrol/pull/4026
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] smalenfant commented on issue #4010: Port legacy perl TO extension checks from perl to go

2019-10-28 Thread GitBox
smalenfant commented on issue #4010: Port legacy perl TO extension checks from 
perl to go
URL: https://github.com/apache/trafficcontrol/pull/4010#issuecomment-547089027
 
 
   Can we add those to the Traffic Ops build? Would be nice to be available and 
compiled when installing traffic_ops RPM.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] jheitz200 commented on a change in pull request #4026: Feature/add deliveryservice required capability

2019-10-28 Thread GitBox
jheitz200 commented on a change in pull request #4026: Feature/add 
deliveryservice required capability
URL: https://github.com/apache/trafficcontrol/pull/4026#discussion_r339727160
 
 

 ##
 File path: 
traffic_ops/traffic_ops_golang/deliveryservice/deliveryservices_required_capabilities.go
 ##
 @@ -0,0 +1,302 @@
+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 (
+   "errors"
+   "fmt"
+   "net/http"
+
+   "github.com/apache/trafficcontrol/lib/go-tc"
+   "github.com/apache/trafficcontrol/lib/go-tc/tovalidate"
+   "github.com/apache/trafficcontrol/lib/go-util"
+   "github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/api"
+   
"github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/dbhelpers"
+   "github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/tenant"
+   validation "github.com/go-ozzo/ozzo-validation"
+)
+
+const (
+   deliveryServiceQueryParam= "deliveryServiceID"
+   requiredCapabilityQueryParam = "requiredCapability"
 
 Review comment:
   I will update Chris with the info for the docs


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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: trafficcontrol-PR #4643

2019-10-28 Thread Apache Jenkins Server
See 


Changes:

[rawlin_peters] Make /deliveryservice_stats accessible to read-only users 
(#4004)

[ocket] Fix deliveryservice_stats API to use already-vendored influxdb 
client,

[rawlin_peters] Rewrote /deliveryservices/request to Go (#3989)

[ocket] Add top-level vendor dir to TO-Go and TM unit test containers 
(#4009)

[ocket] accounts for null arrays (#4008)

[mitchell852] Rewrote /user/reset_password to Go (#3929)

[mitchell852] Removed restangular from ChangeLogService (#3608)

[ocket] Fix TO API test failure when starting from a fresh `db/admin reset`

[ocket] Implement GET /api/1.1/roles handler (#4011)

[mitchell852] Removed restangular from CacheGroupService (#3604)

[ocket] Add deliveryservice server capability docs (#4018)

[ocket] Add TO Go ATS CDN configs (#3875)

[ocket] TP: Ability to manager capabilities of servers (#3998)

[ocket] Fix missed files in PR (#4024)

[ocket] Rewrite federation user GET/POST/DELETE (#4014)

[ocket] Fix endpoint name in docs (#4027)

[ocket] Add TO-Go /api/1.1/servers/status GET handler (#4013)

[rawlin_peters] Rewrite PUT /api/1.1/server/:id/status to Go

[rawlin_peters] Return 400 bad request if "status" is missing from request body


--
GitHub pull request #4030 of commit c3dc7e7d4f445139fdf8d4143e60e479a74f2099, 
no merge conflicts.
Running as SYSTEM
Setting status of c3dc7e7d4f445139fdf8d4143e60e479a74f2099 to PENDING with url 
https://builds.apache.org/job/trafficcontrol-PR/4643/ and message: 'Build 
started for merge commit.'
Using context: default
[EnvInject] - Loading node environment variables.
Building remotely on H39 (ubuntu xenial) in workspace 

[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
using credential b205a645-1ea7-4dfd-973d-c14ac43cab07
Cloning the remote Git repository
Cloning repository git://github.com/apache/trafficcontrol.git
 > git init  # timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # 
 > timeout=10
 > git config remote.origin.url git://github.com/apache/trafficcontrol.git # 
 > timeout=10
Fetching upstream changes from git://github.com/apache/trafficcontrol.git
using GIT_SSH to set credentials 
 > git fetch --tags --progress git://github.com/apache/trafficcontrol.git 
 > +refs/pull/*:refs/remotes/origin/pr/*
 > git rev-parse c3dc7e7d4f445139fdf8d4143e60e479a74f2099^{commit} # timeout=10
Checking out Revision c3dc7e7d4f445139fdf8d4143e60e479a74f2099 (detached)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f c3dc7e7d4f445139fdf8d4143e60e479a74f2099
Commit message: "Return 400 bad request if "status" is missing from request 
body"
 > git rev-list --no-walk 878c138abe0050843ae9a44172fb664d5b9f8cf9 # timeout=10
[trafficcontrol-PR] $ /bin/bash /tmp/jenkins4818612430340150207.sh
++ echo jenkins-trafficcontrol-PR-4643
++ sed s/-//g
++ sed s/jenkins//
+ proj=trafficcontrolPR4643
+ yml=infrastructure/docker/build/docker-compose.yml
++ mktemp /tmp/docker-compose-
+ dc=/tmp/docker-compose-J3s4
++ mktemp /tmp/tc-status-
+ st=/tmp/tc-status-AMxf
+ trap finish EXIT
++ uname -s
++ uname -m
+ curl -o /tmp/docker-compose-J3s4 -L 
https://github.com/docker/compose/releases/download/1.13.0/docker-compose-Linux-x86_64
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 
0100   6170   6170 0   1041  0 --:--:-- --:--:-- --:--:--  1042
  0 8079k0 00 0  0  0 --:--:--  0:00:01 --:--:-- 
0100 8079k  100 8079k0 0  4878k  0  0:00:01  0:00:01 --:--:-- 13.0M
+ chmod +x /tmp/docker-compose-J3s4
+ rm -rf dist
+ /tmp/docker-compose-J3s4 -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4643 up
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ exit 1
+ finish
+ /tmp/docker-compose-J3s4 -f infrastructure/docker/build/docker-compose.yml -p 
trafficcontrolPR4643 down -v
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it 
running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST 
environment variable.
+ 

[GitHub] [trafficcontrol] asf-ci commented on issue #4030: Rewrite PUT /api/1.1/servers/:id/status to Go

2019-10-28 Thread GitBox
asf-ci commented on issue #4030: Rewrite PUT /api/1.1/servers/:id/status to Go
URL: https://github.com/apache/trafficcontrol/pull/4030#issuecomment-547075320
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/trafficcontrol-PR/4643/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mattjackson220 commented on a change in pull request #3534: TP Delivery Service Generate SSL update, new letsencrypt generate and…

2019-10-28 Thread GitBox
mattjackson220 commented on a change in pull request #3534: TP Delivery Service 
Generate SSL update, new letsencrypt generate and…
URL: https://github.com/apache/trafficcontrol/pull/3534#discussion_r339701370
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/deliveryservice/autorenewcerts.go
 ##
 @@ -0,0 +1,190 @@
+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 (
+   "context"
+   "database/sql"
+   "errors"
+   "net/http"
+   "strconv"
+   "strings"
+   "time"
+
+   "github.com/apache/trafficcontrol/lib/go-log"
+   "github.com/apache/trafficcontrol/lib/go-tc"
+   "github.com/apache/trafficcontrol/lib/go-util"
+   "github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/api"
+   "github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/config"
+   
"github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/riaksvc"
+)
+
+type DsKey struct {
+   XmlId   string
+   Version sql.NullInt64
+}
+
+type DsExpirationInfo struct {
+   XmlId  string
+   Versionutil.JSONIntStr
+   Expiration time.Time
+   AuthType   string
+   Error  error
+}
+
+type ExpirationSummary struct {
+   LetsEncryptExpirations []DsExpirationInfo
+   SelfSignedExpirations  []DsExpirationInfo
+   OtherExpirations   []DsExpirationInfo
+}
+
+const emailTemplateFile = 
"/opt/traffic_ops/app/templates/send_mail/autorenewcerts_mail.html"
+
+func RenewCertificates(w http.ResponseWriter, r *http.Request) {
+   inf, userErr, sysErr, errCode := api.NewInfo(r, nil, nil)
+   if userErr != nil || sysErr != nil {
+   api.HandleErr(w, r, inf.Tx.Tx, errCode, userErr, sysErr)
+   return
+   }
+   defer inf.Close()
+
+   if inf.Config.RiakEnabled == false {
+   api.HandleErr(w, r, inf.Tx.Tx, http.StatusInternalServerError, 
errors.New("the Riak service is unavailable"), errors.New("getting SSL keys 
from Riak by xml id: Riak is not configured"))
+   return
+   }
+
+   rows, err := inf.Tx.Tx.Query(`SELECT xml_id, ssl_key_version FROM 
deliveryservice`)
+   if err != nil {
+   api.HandleErr(w, r, inf.Tx.Tx, http.StatusInternalServerError, 
nil, err)
+   return
+   }
+   defer rows.Close()
+
+   keysFound := ExpirationSummary{}
+   for rows.Next() {
+   ds := DsKey{}
+   err := rows.Scan(, )
+   if err != nil {
+   log.Errorf("getting delivery services: %v", err)
+   continue
+   }
+   if ds.Version.Valid && int(ds.Version.Int64) != 0 {
+   continue
+   }
+
+   dsExpInfo := DsExpirationInfo{}
+   keyObj, ok, err := 
riaksvc.GetDeliveryServiceSSLKeysObj(ds.XmlId, 
strconv.Itoa(int(ds.Version.Int64)), inf.Tx.Tx, inf.Config.RiakAuthOptions, 
inf.Config.RiakPort)
+   if err != nil {
+   log.Errorf("getting ssl keys for xmlId: " + ds.XmlId + 
" and version: " + strconv.Itoa(int(ds.Version.Int64)) + " :" + err.Error())
+   dsExpInfo.XmlId = ds.XmlId
+   dsExpInfo.Version = 
util.JSONIntStr(int(ds.Version.Int64))
+   dsExpInfo.Error = errors.New("getting ssl keys for 
xmlId: " + ds.XmlId + " and version: " + strconv.Itoa(int(ds.Version.Int64)) + 
" :" + err.Error())
+   continue
+   }
+   if !ok {
+   log.Errorf("no object found for the specified key with 
xmlId: " + ds.XmlId + " and version: " + strconv.Itoa(int(ds.Version.Int64)))
+   dsExpInfo.XmlId = ds.XmlId
+   dsExpInfo.Version = 
util.JSONIntStr(int(ds.Version.Int64))
+   dsExpInfo.Error = errors.New("no object found for the 
specified key with xmlId: " + ds.XmlId + " and version: " + 
strconv.Itoa(int(ds.Version.Int64)))
+   continue
+   }
+
+   err = base64DecodeCertificate()
+   if err != nil {
+   

[GitHub] [trafficcontrol] mattjackson220 commented on a change in pull request #3534: TP Delivery Service Generate SSL update, new letsencrypt generate and…

2019-10-28 Thread GitBox
mattjackson220 commented on a change in pull request #3534: TP Delivery Service 
Generate SSL update, new letsencrypt generate and…
URL: https://github.com/apache/trafficcontrol/pull/3534#discussion_r339700181
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/deliveryservice/autorenewcerts.go
 ##
 @@ -0,0 +1,190 @@
+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 (
+   "context"
+   "database/sql"
+   "errors"
+   "net/http"
+   "strconv"
+   "strings"
+   "time"
+
+   "github.com/apache/trafficcontrol/lib/go-log"
+   "github.com/apache/trafficcontrol/lib/go-tc"
+   "github.com/apache/trafficcontrol/lib/go-util"
+   "github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/api"
+   "github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/config"
+   
"github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/riaksvc"
+)
+
+type DsKey struct {
+   XmlId   string
+   Version sql.NullInt64
+}
+
+type DsExpirationInfo struct {
+   XmlId  string
+   Versionutil.JSONIntStr
+   Expiration time.Time
+   AuthType   string
+   Error  error
+}
+
+type ExpirationSummary struct {
+   LetsEncryptExpirations []DsExpirationInfo
+   SelfSignedExpirations  []DsExpirationInfo
+   OtherExpirations   []DsExpirationInfo
+}
+
+const emailTemplateFile = 
"/opt/traffic_ops/app/templates/send_mail/autorenewcerts_mail.html"
+
+func RenewCertificates(w http.ResponseWriter, r *http.Request) {
+   inf, userErr, sysErr, errCode := api.NewInfo(r, nil, nil)
+   if userErr != nil || sysErr != nil {
+   api.HandleErr(w, r, inf.Tx.Tx, errCode, userErr, sysErr)
+   return
+   }
+   defer inf.Close()
+
+   if inf.Config.RiakEnabled == false {
+   api.HandleErr(w, r, inf.Tx.Tx, http.StatusInternalServerError, 
errors.New("the Riak service is unavailable"), errors.New("getting SSL keys 
from Riak by xml id: Riak is not configured"))
+   return
+   }
+
+   rows, err := inf.Tx.Tx.Query(`SELECT xml_id, ssl_key_version FROM 
deliveryservice`)
+   if err != nil {
+   api.HandleErr(w, r, inf.Tx.Tx, http.StatusInternalServerError, 
nil, err)
+   return
+   }
+   defer rows.Close()
+
+   keysFound := ExpirationSummary{}
+   for rows.Next() {
+   ds := DsKey{}
+   err := rows.Scan(, )
+   if err != nil {
+   log.Errorf("getting delivery services: %v", err)
+   continue
+   }
+   if ds.Version.Valid && int(ds.Version.Int64) != 0 {
 
 Review comment:
   done


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mhoppa commented on a change in pull request #4026: Feature/add deliveryservice required capability

2019-10-28 Thread GitBox
mhoppa commented on a change in pull request #4026: Feature/add deliveryservice 
required capability
URL: https://github.com/apache/trafficcontrol/pull/4026#discussion_r339697208
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/deliveryservice/cookie.txt
 ##
 @@ -0,0 +1,5 @@
+# Netscape HTTP Cookie File
 
 Review comment:
   accidental addition of file


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mhoppa commented on a change in pull request #4026: Feature/add deliveryservice required capability

2019-10-28 Thread GitBox
mhoppa commented on a change in pull request #4026: Feature/add deliveryservice 
required capability
URL: https://github.com/apache/trafficcontrol/pull/4026#discussion_r339690499
 
 

 ##
 File path: 
traffic_ops/traffic_ops_golang/deliveryservice/deliveryservices_required_capabilities.go
 ##
 @@ -0,0 +1,302 @@
+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 (
+   "errors"
+   "fmt"
+   "net/http"
+
+   "github.com/apache/trafficcontrol/lib/go-tc"
+   "github.com/apache/trafficcontrol/lib/go-tc/tovalidate"
+   "github.com/apache/trafficcontrol/lib/go-util"
+   "github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/api"
+   
"github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/dbhelpers"
+   "github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/tenant"
+   validation "github.com/go-ozzo/ozzo-validation"
+)
+
+const (
+   deliveryServiceQueryParam= "deliveryServiceID"
+   requiredCapabilityQueryParam = "requiredCapability"
 
 Review comment:
   this mismatches the documentation - 
https://github.com/apache/trafficcontrol/blob/master/docs/source/api/deliveryservices_required_capabilities.rst#request-structuret


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mattjackson220 commented on a change in pull request #3534: TP Delivery Service Generate SSL update, new letsencrypt generate and…

2019-10-28 Thread GitBox
mattjackson220 commented on a change in pull request #3534: TP Delivery Service 
Generate SSL update, new letsencrypt generate and…
URL: https://github.com/apache/trafficcontrol/pull/3534#discussion_r339699937
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/deliveryservice/autorenewcerts.go
 ##
 @@ -0,0 +1,190 @@
+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 (
+   "context"
+   "database/sql"
+   "errors"
+   "net/http"
+   "strconv"
+   "strings"
+   "time"
+
+   "github.com/apache/trafficcontrol/lib/go-log"
+   "github.com/apache/trafficcontrol/lib/go-tc"
+   "github.com/apache/trafficcontrol/lib/go-util"
+   "github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/api"
+   "github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/config"
+   
"github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/riaksvc"
+)
+
+type DsKey struct {
+   XmlId   string
+   Version sql.NullInt64
+}
+
+type DsExpirationInfo struct {
+   XmlId  string
+   Versionutil.JSONIntStr
+   Expiration time.Time
+   AuthType   string
+   Error  error
+}
+
+type ExpirationSummary struct {
+   LetsEncryptExpirations []DsExpirationInfo
+   SelfSignedExpirations  []DsExpirationInfo
+   OtherExpirations   []DsExpirationInfo
+}
+
+const emailTemplateFile = 
"/opt/traffic_ops/app/templates/send_mail/autorenewcerts_mail.html"
+
+func RenewCertificates(w http.ResponseWriter, r *http.Request) {
+   inf, userErr, sysErr, errCode := api.NewInfo(r, nil, nil)
+   if userErr != nil || sysErr != nil {
+   api.HandleErr(w, r, inf.Tx.Tx, errCode, userErr, sysErr)
+   return
+   }
+   defer inf.Close()
+
+   if inf.Config.RiakEnabled == false {
+   api.HandleErr(w, r, inf.Tx.Tx, http.StatusInternalServerError, 
errors.New("the Riak service is unavailable"), errors.New("getting SSL keys 
from Riak by xml id: Riak is not configured"))
+   return
+   }
+
+   rows, err := inf.Tx.Tx.Query(`SELECT xml_id, ssl_key_version FROM 
deliveryservice`)
+   if err != nil {
+   api.HandleErr(w, r, inf.Tx.Tx, http.StatusInternalServerError, 
nil, err)
+   return
+   }
+   defer rows.Close()
+
+   keysFound := ExpirationSummary{}
+   for rows.Next() {
+   ds := DsKey{}
+   err := rows.Scan(, )
+   if err != nil {
+   log.Errorf("getting delivery services: %v", err)
+   continue
+   }
+   if ds.Version.Valid && int(ds.Version.Int64) != 0 {
+   continue
+   }
+
+   dsExpInfo := DsExpirationInfo{}
+   keyObj, ok, err := 
riaksvc.GetDeliveryServiceSSLKeysObj(ds.XmlId, 
strconv.Itoa(int(ds.Version.Int64)), inf.Tx.Tx, inf.Config.RiakAuthOptions, 
inf.Config.RiakPort)
+   if err != nil {
+   log.Errorf("getting ssl keys for xmlId: " + ds.XmlId + 
" and version: " + strconv.Itoa(int(ds.Version.Int64)) + " :" + err.Error())
+   dsExpInfo.XmlId = ds.XmlId
+   dsExpInfo.Version = 
util.JSONIntStr(int(ds.Version.Int64))
+   dsExpInfo.Error = errors.New("getting ssl keys for 
xmlId: " + ds.XmlId + " and version: " + strconv.Itoa(int(ds.Version.Int64)) + 
" :" + err.Error())
+   continue
+   }
+   if !ok {
+   log.Errorf("no object found for the specified key with 
xmlId: " + ds.XmlId + " and version: " + strconv.Itoa(int(ds.Version.Int64)))
+   dsExpInfo.XmlId = ds.XmlId
+   dsExpInfo.Version = 
util.JSONIntStr(int(ds.Version.Int64))
+   dsExpInfo.Error = errors.New("no object found for the 
specified key with xmlId: " + ds.XmlId + " and version: " + 
strconv.Itoa(int(ds.Version.Int64)))
+   continue
+   }
+
+   err = base64DecodeCertificate()
+   if err != nil {
+   

[GitHub] [trafficcontrol] mattjackson220 commented on a change in pull request #3534: TP Delivery Service Generate SSL update, new letsencrypt generate and…

2019-10-28 Thread GitBox
mattjackson220 commented on a change in pull request #3534: TP Delivery Service 
Generate SSL update, new letsencrypt generate and…
URL: https://github.com/apache/trafficcontrol/pull/3534#discussion_r339699191
 
 

 ##
 File path: traffic_ops/traffic_ops_golang/api/api.go
 ##
 @@ -747,3 +753,70 @@ func AddUserToReq(r *http.Request, u auth.CurrentUser) {
ctx = context.WithValue(ctx, auth.CurrentUserKey, u)
*r = *r.WithContext(ctx)
 }
+
+func SendEmailFromTemplate(config config.Config, header string, data 
interface{}, templateFile string, toEmail string) (int, error, error) {
 
 Review comment:
   done


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mattjackson220 commented on a change in pull request #3534: TP Delivery Service Generate SSL update, new letsencrypt generate and…

2019-10-28 Thread GitBox
mattjackson220 commented on a change in pull request #3534: TP Delivery Service 
Generate SSL update, new letsencrypt generate and…
URL: https://github.com/apache/trafficcontrol/pull/3534#discussion_r339697322
 
 

 ##
 File path: traffic_ops/app/templates/send_mail/autorenewcerts_mail.html
 ##
 @@ -0,0 +1,107 @@
+
+
+
+
+   Certificate Autorenewal Summary
+
+table {
+  font-family: arial, sans-serif;
+  border-collapse: collapse;
+  width: 100%;
+}
+
+td, th {
+  border: 1px solid #dd;
+  text-align: left;
+  padding: 8px;
+}
+
+
+
+   
+   Let's Encrypt Certificates Summary
+   
+   
+   
+   XmlId
+   Version
+   Expiration
+   AuthType
+   Error
+   
+   
+   
+   {{range .LetsEncryptExpirations}}
+   
+   {{.XmlId}}
+   {{.Version}}
+   {{.Expiration}}
+   {{.AuthType}}
+   {{.Error}}
+   
+   {{end}}
+   
+   
+
+   Self Signed Certificates Summary
 
 Review comment:
   done


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] guzzijason commented on issue #3965: Traffic Router inconsistent behavior on HTTP HEAD requests

2019-10-28 Thread GitBox
guzzijason commented on issue #3965: Traffic Router inconsistent behavior on 
HTTP HEAD requests
URL: https://github.com/apache/trafficcontrol/issues/3965#issuecomment-547049866
 
 
   Sorry... actually, `Content-Length` is one of the payload headers that MAY 
be omitted in a HEAD response. At any rate, keeping that header as part of the 
HEAD response is still RFC-compliant behavior.
   
   I think the bigger problem is the `Transfer-Encoding: chunked` header, which 
is NOT part of the standard HTTP GET request from TR. Its unclear why we would 
want TR to send that at in any case of a 302 response.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mattjackson220 commented on a change in pull request #3534: TP Delivery Service Generate SSL update, new letsencrypt generate and…

2019-10-28 Thread GitBox
mattjackson220 commented on a change in pull request #3534: TP Delivery Service 
Generate SSL update, new letsencrypt generate and…
URL: https://github.com/apache/trafficcontrol/pull/3534#discussion_r339685416
 
 

 ##
 File path: docs/source/admin/traffic_router.rst
 ##
 @@ -681,8 +681,67 @@ The ordering of certificates within the certificate 
bundle matters. It must be:
 
 To see the ordering of certificates you may have to manually split up your 
certificate chain and use :manpage:`openssl(1ssl)` on each individual 
certificate
 
-Suggested Way of Setting up an HTTPS Delivery Service
--
+Let's Encrypt
+-
+Let’s Encrypt is a free, automated :abbr:`CA (Certificate Authority)` using 
:abbr:`ACME (Automated Certificate Management Environment)` protocol. Let's 
Encrypt performs a domain validation before issuing or renewing a certificate. 
There are several options for domain validation but for this application the 
DNS challenge is used in order to receive wildcard certificates. Let's Encrypt 
sends a token to be used as a TXT record at 
``_acme-challenge.domain.example.com`` and after verifying that the token is 
accessible there, will return the newly generated and signed certificate and 
key. The basic workflow implemented is:
+
+#. ``POST`` to Let's Encrypt and receive the DNS challenge token.
+#. Traffic Ops stores the DNS challenge in the Traffic Ops database.
+#. Traffic Router has a watcher set up to watch for changes in the Traffic Ops 
database table.
+#. When a new record appears, Traffic Router reads it and puts the token from 
Let's Encrypt as a TXT record at ``_acme-challenge.domain.example.com`` for the 
specified :term:`Delivery Service`.
+#. Let's Encrypt verifies that the correct record is accessible to verify 
ownership of the domain.
 
 Review comment:
   done


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] guzzijason commented on issue #3965: Traffic Router inconsistent behavior on HTTP HEAD requests

2019-10-28 Thread GitBox
guzzijason commented on issue #3965: Traffic Router inconsistent behavior on 
HTTP HEAD requests
URL: https://github.com/apache/trafficcontrol/issues/3965#issuecomment-547047350
 
 
   Per RFC 7231:
   ```
   The server SHOULD send the same
header fields in response to a HEAD request as it would have sent if
the request had been a GET, except that the payload header fields
   (Section 3.3) MAY be omitted.
   ```
   TR sends `Content-Length: 0` as part of a HTTP GET response, so based on the 
RFC recommended behavior, then I believe it should do the same in response to 
an HTTP HEAD.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mattjackson220 commented on a change in pull request #3534: TP Delivery Service Generate SSL update, new letsencrypt generate and…

2019-10-28 Thread GitBox
mattjackson220 commented on a change in pull request #3534: TP Delivery Service 
Generate SSL update, new letsencrypt generate and…
URL: https://github.com/apache/trafficcontrol/pull/3534#discussion_r339683197
 
 

 ##
 File path: docs/source/admin/traffic_router.rst
 ##
 @@ -681,8 +681,67 @@ The ordering of certificates within the certificate 
bundle matters. It must be:
 
 To see the ordering of certificates you may have to manually split up your 
certificate chain and use :manpage:`openssl(1ssl)` on each individual 
certificate
 
-Suggested Way of Setting up an HTTPS Delivery Service
--
+Let's Encrypt
+-
+Let’s Encrypt is a free, automated :abbr:`CA (Certificate Authority)` using 
:abbr:`ACME (Automated Certificate Management Environment)` protocol. Let's 
Encrypt performs a domain validation before issuing or renewing a certificate. 
There are several options for domain validation but for this application the 
DNS challenge is used in order to receive wildcard certificates. Let's Encrypt 
sends a token to be used as a TXT record at 
``_acme-challenge.domain.example.com`` and after verifying that the token is 
accessible there, will return the newly generated and signed certificate and 
key. The basic workflow implemented is:
+
+#. ``POST`` to Let's Encrypt and receive the DNS challenge token.
+#. Traffic Ops stores the DNS challenge in the Traffic Ops database.
+#. Traffic Router has a watcher set up to watch for changes in the Traffic Ops 
database table.
 
 Review comment:
   done


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] jheitz200 commented on a change in pull request #4026: Feature/add deliveryservice required capability

2019-10-28 Thread GitBox
jheitz200 commented on a change in pull request #4026: Feature/add 
deliveryservice required capability
URL: https://github.com/apache/trafficcontrol/pull/4026#discussion_r339675402
 
 

 ##
 File path: traffic_ops/app/db/seeds.sql
 ##
 @@ -541,6 +541,10 @@ insert into api_capability (http_method, route, 
capability) values ('GET', 'deli
 insert into api_capability (http_method, route, capability) values ('POST', 
'deliveryserviceserver', 'delivery-service-servers-write') ON CONFLICT 
(http_method, route, capability) DO NOTHING;
 insert into api_capability (http_method, route, capability) values ('POST', 
'deliveryservices/*/servers', 'delivery-service-servers-write') ON CONFLICT 
(http_method, route, capability) DO NOTHING;
 insert into api_capability (http_method, route, capability) values ('DELETE', 
'deliveryservice_server/*/*', 'delivery-service-servers-write') ON CONFLICT 
(http_method, route, capability) DO NOTHING;
+-- delivery service server capabilities
+insert into api_capability (http_method, route, capability) values ('GET', 
'deliveryservice_required_capabilities', 'delivery-services-read') ON CONFLICT 
(http_method, route, capability) DO NOTHING;
 
 Review comment:
   Thanks it got left out on accident with the first commit


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] mhoppa commented on a change in pull request #4026: Feature/add deliveryservice required capability

2019-10-28 Thread GitBox
mhoppa commented on a change in pull request #4026: Feature/add deliveryservice 
required capability
URL: https://github.com/apache/trafficcontrol/pull/4026#discussion_r339667097
 
 

 ##
 File path: traffic_ops/app/db/seeds.sql
 ##
 @@ -541,6 +541,10 @@ insert into api_capability (http_method, route, 
capability) values ('GET', 'deli
 insert into api_capability (http_method, route, capability) values ('POST', 
'deliveryserviceserver', 'delivery-service-servers-write') ON CONFLICT 
(http_method, route, capability) DO NOTHING;
 insert into api_capability (http_method, route, capability) values ('POST', 
'deliveryservices/*/servers', 'delivery-service-servers-write') ON CONFLICT 
(http_method, route, capability) DO NOTHING;
 insert into api_capability (http_method, route, capability) values ('DELETE', 
'deliveryservice_server/*/*', 'delivery-service-servers-write') ON CONFLICT 
(http_method, route, capability) DO NOTHING;
+-- delivery service server capabilities
+insert into api_capability (http_method, route, capability) values ('GET', 
'deliveryservice_required_capabilities', 'delivery-services-read') ON CONFLICT 
(http_method, route, capability) DO NOTHING;
 
 Review comment:
   these need to be updated as well 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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] [trafficcontrol] zrhoffman commented on issue #3965: Traffic Router inconsistent behavior on HTTP HEAD requests

2019-10-28 Thread GitBox
zrhoffman commented on issue #3965: Traffic Router inconsistent behavior on 
HTTP HEAD requests
URL: https://github.com/apache/trafficcontrol/issues/3965#issuecomment-546920662
 
 
   The wait itself is wontfix cURL-specific behavior. From [a curl-users 
mailing list thread](https://curl.haxx.se/mail/archive-2015-11/0021.html):
   
   > The difference in the HTTP protocol between a HEAD and a GET response is 
that a HEAD response is _exactly_ the same as the GET response except that 
there's no response body. Since curl knows it sent a GET request, it will wait 
for a response body if the response headers indicate there is one. If curl 
knows it sent a HEAD it will just not wait for a response, even if the headers 
say there is one, since it knows a server will never send a response body to 
such a request.
   
   That said, setting a content length does get rid of the timeout. As a 
proof-of-concept, I have added the `Content-Length` header for steering 
responses on a branch: 
https://github.com/apache/trafficcontrol/compare/a5a4bb9012...zrhoffman:set_content_length
   
   Would we also want to ensure a content length for the TR API?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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