[GitHub] incubator-trafficcontrol issue #167: Refactor and cleanup the influxdb_tools...

2017-01-09 Thread sbogacz
Github user sbogacz commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/167
  
I've had good experiences with `godep` for the most part, and I'd be happy 
to bring it in (I can maybe throw in a Makefile to make some of the local 
commands easier). That said, [a native solution is in the 
works](https://groups.google.com/forum/#!msg/go-package-management/P8TehVoFLjg/Ni6VRyOjEAAJ)
 so it will probably have to be updated at some point. 


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


[jira] [Commented] (TC-91) Add support for path based filtering to relevant legacy APIs

2017-01-09 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on TC-91:
--

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


https://github.com/apache/incubator-trafficcontrol/pull/172#discussion_r95268661
  
--- Diff: 
traffic_monitor/experimental/traffic_monitor/manager/datarequest.go ---
@@ -198,6 +204,16 @@ func NewCacheStatFilter(params url.Values, cacheTypes 
map[enum.CacheName]enum.Ca
}, nil
 }
 
+// This is the "spirit" of how TM1.0 works; hack to extract a path 
argument to filter data (/publish/SomeEndpoint/:argument).
+func getPathArgument(path string) string {
+   pathParts := strings.Split(path, "/")
+   if len(pathParts) == 4 {
--- End diff --

I considered making it `>=` but decided against it. I don't have strong 
feelings so I'll go ahead and make that change.


> Add support for path based filtering to relevant legacy APIs
> 
>
> Key: TC-91
> URL: https://issues.apache.org/jira/browse/TC-91
> Project: Traffic Control
>  Issue Type: Improvement
>  Components: Traffic Monitor (golang)
>Affects Versions: 1.8.0
>Reporter: Jeff Elsloo
>Priority: Minor
> Fix For: 2.0.0
>
>
> Add path based filtering (e.g.: {{/publish/CacheStats/:cache}} to relevant 
> legacy APIs where applicable.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] incubator-trafficcontrol pull request #172: [TC-91] TM2 - Add support for pa...

2017-01-09 Thread elsloo
Github user elsloo commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/172#discussion_r95268661
  
--- Diff: 
traffic_monitor/experimental/traffic_monitor/manager/datarequest.go ---
@@ -198,6 +204,16 @@ func NewCacheStatFilter(params url.Values, cacheTypes 
map[enum.CacheName]enum.Ca
}, nil
 }
 
+// This is the "spirit" of how TM1.0 works; hack to extract a path 
argument to filter data (/publish/SomeEndpoint/:argument).
+func getPathArgument(path string) string {
+   pathParts := strings.Split(path, "/")
+   if len(pathParts) == 4 {
--- End diff --

I considered making it `>=` but decided against it. I don't have strong 
feelings so I'll go ahead and make that change.


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


[GitHub] incubator-trafficcontrol pull request #173: [TC-92] -- Add RPM build for goT...

2017-01-09 Thread dneuman64
GitHub user dneuman64 opened a pull request:

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

[TC-92] -- Add RPM build for goTM

A goTM RPM can now be built by running `./build/build.sh 
traffic_monitor/experimental` from the incubator-trafficcontrol directory.

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

$ git pull https://github.com/dneuman64/incubator-trafficcontrol 
goTM-rpm-build

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

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

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

This closes #173


commit abba425fafd346287bb937b31c8504c402e1f5f7
Author: David Neuman 
Date:   2017-01-05T23:27:30Z

initial commit of RPM packaging

commit 0ee3772e930cf3b9ef0147c5de8c8852ae15406e
Author: David Neuman 
Date:   2017-01-09T19:46:56Z

get RPM to build correctly

commit 27b7bca521354b6655b1e5a10772e46deb42cced
Author: David Neuman 
Date:   2017-01-09T21:00:00Z

add config option for static http and js file

commit 7afbf26f95a73e0d71e28a438bf2d015a0f0bc63
Author: David Neuman 
Date:   2017-01-09T21:40:54Z

move index.html and sorttable.js to static dir

commit 0ab782b025ddba7470b54516b1db03d83dd49604
Author: David Neuman 
Date:   2017-01-09T22:01:43Z

remove unncessary echo




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


[jira] [Created] (TC-93) Add RPM build for goTM

2017-01-09 Thread David Neuman (JIRA)
David Neuman created TC-93:
--

 Summary: Add RPM build for goTM
 Key: TC-93
 URL: https://issues.apache.org/jira/browse/TC-93
 Project: Traffic Control
  Issue Type: Improvement
  Components: Traffic Monitor (golang)
Reporter: David Neuman
Assignee: David Neuman


goTM currently does not have any build packaging.  It should at least have RPM 
build packaging.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] incubator-trafficcontrol pull request #171: Traffic Monitor 2.0 fixes

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

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


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


[jira] [Created] (TC-91) Add support for path based filtering to relevant legacy APIs

2017-01-09 Thread Jeff Elsloo (JIRA)
Jeff Elsloo created TC-91:
-

 Summary: Add support for path based filtering to relevant legacy 
APIs
 Key: TC-91
 URL: https://issues.apache.org/jira/browse/TC-91
 Project: Traffic Control
  Issue Type: Improvement
  Components: Traffic Monitor (golang)
Affects Versions: 1.8.0
Reporter: Jeff Elsloo
Priority: Minor
 Fix For: 2.0.0


Add path based filtering (e.g.: {{/publish/CacheStats/:cache}} to relevant 
legacy APIs where applicable.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] incubator-trafficcontrol pull request #172: [TC-91] TM2 - Add support for pa...

2017-01-09 Thread elsloo
GitHub user elsloo opened a pull request:

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

[TC-91] TM2 - Add support for path based filtering to applicable lega…

…cy APIs.

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

$ git pull https://github.com/elsloo/incubator-trafficcontrol 
2.0.x_legacy_api_add_filtering

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

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

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

This closes #172


commit f73437d317cfc5eb3f92585145711f559e4fcd67
Author: Jeff Elsloo 
Date:   2017-01-09T21:05:39Z

[TC-91] TM2 - Add support for path based filtering to applicable legacy 
APIs.




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


[GitHub] incubator-trafficcontrol pull request #169: [TC-89] fix tar ball and directo...

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

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


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


[jira] [Commented] (TC-89) tar ball name should be "trafficcontrol-incubating-"

2017-01-09 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on TC-89:
--

Github user asfgit closed the pull request at:

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


> tar ball name should be "trafficcontrol-incubating-"
> -
>
> Key: TC-89
> URL: https://issues.apache.org/jira/browse/TC-89
> Project: Traffic Control
>  Issue Type: Task
>Affects Versions: 1.8.0
>Reporter: Dan Kirkwood
>Assignee: Dan Kirkwood
>Priority: Trivial
> Fix For: 1.8.0
>
>
> Current tar ball name for 1.8.0 is "incubation-trafficcontrol-1.8.0".   
> Instead,  recommendation is that it be "trafficcontrol-incubating-1.8.0".



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] incubator-trafficcontrol pull request #171: Traffic Monitor 2.0 fixes

2017-01-09 Thread rob05c
GitHub user rob05c opened a pull request:

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

Traffic Monitor 2.0 fixes

Fixes for various uncommon Traffic Control scenarios.

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

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

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

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

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

This closes #171


commit 3de533a7830069750ee90cbfbb4745187bf02e72
Author: Robert Butts 
Date:   2017-01-09T18:25:09Z

Fix TM2 for EDGE*, MID* types

commit 21e77335e30c978547d718fdf2eea402b7fb3956
Author: Robert Butts 
Date:   2017-01-09T18:27:01Z

Fix TM2 for nonexistent health params

commit abccf8f659f4b5cacfc023a764f2bc0a7bf74f81
Author: Robert Butts 
Date:   2017-01-09T18:27:38Z

fix TM2 to log missing health poll URLs




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


[jira] [Created] (TC-90) TR should check for closest cache group because using Maxmind Geolocation

2017-01-09 Thread Eric Friedrich (JIRA)
Eric Friedrich created TC-90:


 Summary: TR should check for closest cache group because using 
Maxmind Geolocation
 Key: TC-90
 URL: https://issues.apache.org/jira/browse/TC-90
 Project: Traffic Control
  Issue Type: Bug
  Components: Traffic Router
Affects Versions: 1.8.0
Reporter: Eric Friedrich
Priority: Minor


Problem Statement: 
If all caches in the primary cache group are unavailable, our goal is to 
provide a backup routing policy for RFC1918 clients. 

When client IP is an public Internet IP, the current backup policy is to assign 
the client to the geographically closest cache (Distance = MaxMind Geo Lat/Long 
- configured CG lat/long). 

With Jeff's proposed fix below, instead of going to the geolocation provider, 
TR would find the cache group closest to the CZF "hit" cache group. 

>From Jeff Elsoo:
There's a small logic gap in the existing algorithm around cache
location selection and I think if we fix that (two line change), we
should be better off all around. I think the only time we'd ever want
to go to the geolocation provider is in the event of a miss on the
CZF, so as long as we have a hit there, we should find the cache group
closest to that hit location that has available caches. This would
automatically provide the "backup" cache group concept, and has the
added benefit of doing this selection dynamically based on the state
of the CDN.

See this to get an idea of what I mean: http://apaste.info/u3PQo

Obviously we'd need to test this to ensure we don't break other functionality.


dev@ Discussion Thread: 
https://lists.apache.org/thread.html/b033b3943c22a606370ad3981fa05fb0e7039161b88bbc035bc49b25@%3Cdev.trafficcontrol.apache.org%3E



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] incubator-trafficcontrol pull request #170: get dnssec from old-releases dir

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

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


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


[GitHub] incubator-trafficcontrol pull request #170: get dnssec from old-releases dir

2017-01-09 Thread dangogh
GitHub user dangogh opened a pull request:

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

get dnssec from old-releases dir

for 1.8.0 -- dnssec made a new release 0.13.   The version we have been 
using is 0.12, which was moved to old-releases directory.

Referencing that directory for download until the new version is evaluated 
or dnssec is removed.

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

$ git pull https://github.com/dangogh/incubator-trafficcontrol 
dnssec-version

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

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

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

This closes #170


commit f3dc65ed182b8380a295e982a6098b2788d12cf6
Author: Dan Kirkwood 
Date:   2017-01-09T17:01:22Z

get dnssec from old-releases dir




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


[jira] [Commented] (TC-89) tar ball name should be "trafficcontrol-incubating-"

2017-01-09 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on TC-89:
--

GitHub user dangogh opened a pull request:

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

[TC-89] fix tar ball and directory names



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

$ git pull https://github.com/dangogh/incubator-trafficcontrol 
incubating-not-incubation

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

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

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

This closes #169


commit 045ea8dba74d1695900bebea8532402d3105b299
Author: Dan Kirkwood 
Date:   2017-01-09T15:51:24Z

use "incubating" in tarball name

commit ce973cc51dcc82450198bb4e412c1e82291e
Author: Dan Kirkwood 
Date:   2017-01-09T16:02:30Z

tar ball dir name is "trafficcontrol-incubating-"




> tar ball name should be "trafficcontrol-incubating-"
> -
>
> Key: TC-89
> URL: https://issues.apache.org/jira/browse/TC-89
> Project: Traffic Control
>  Issue Type: Task
>Affects Versions: 1.8.0
>Reporter: Dan Kirkwood
>Assignee: Dan Kirkwood
>Priority: Trivial
> Fix For: 1.8.0
>
>
> Current tar ball name for 1.8.0 is "incubation-trafficcontrol-1.8.0".   
> Instead,  recommendation is that it be "trafficcontrol-incubating-1.8.0".



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TC-6) Traffic Ops postinstall: non-interactive configuration

2017-01-09 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on TC-6:
-

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


https://github.com/apache/incubator-trafficcontrol/pull/126#discussion_r95186410
  
--- Diff: traffic_ops/install/bin/input.json ---
@@ -67,5 +67,102 @@
 },
 {
   "LDAP Search Base":"",
-  "input.json"  169  L,
-  4044  C
\ No newline at end of file
+  "config_var":"search_base"
+}
+  ],
+  "/opt/traffic_ops/install/data/json/users.json":[
+{
+  "Administration username for Traffic Ops":"root",
+  "config_var":"tmAdminUser"
+},
+{
+  "Password for the admin user":"default",
+  "config_var":"tmAdminPw",
+  "hidden":"1"
+}
+  ],
+  "/opt/traffic_ops/install/data/profiles/":[
+
+  ],
+  "/opt/traffic_ops/install/data/json/openssl_configuration.json":[
+{
+  "Do you want to generate a certificate?":"yes",
+  "config_var":"genCert"
+},
+{
+  "Country Name (2 letter code)":"XX",
+  "config_var":"country"
+},
+{
+  "State or Province Name (full name)":"Default State",
+  "config_var":"state"
+},
+{
+  "Locality Name (eg, city)":"Default City",
+  "config_var":"locality"
+},
+{
+  "Organization Name (eg, company)":"Default Company Ltd",
+  "config_var":"company"
+},
+{
+  "Organizational Unit Name (eg, section)":"",
+  "config_var":"org_unit"
+},
+{
+  "Common Name (eg, your name or your server's 
hostname)":"example.com",
+  "config_var":"common_name"
+},
+{
+  "RSA Passphrase":"password",
--- End diff --

Passwords in files always worry me, we should maybe evaluate a command line 
option or have a separate file that can be stored locally to be safe.


> Traffic Ops postinstall: non-interactive configuration
> --
>
> Key: TC-6
> URL: https://issues.apache.org/jira/browse/TC-6
> Project: Traffic Control
>  Issue Type: Improvement
>  Components: Traffic Ops
>Affects Versions: 1.8.0
>Reporter: Dan Kirkwood
>Assignee: Dan Kirkwood
> Attachments: Automated_Postinstall_for_Traffic_Ops_v4.docx
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Traffic Ops postinstall currently requires interactive user input.   This 
> makes it difficult to install exactly the same way each time,  and can be 
> error prone.  It also makes installation within a docker container difficult.
> There should be a way to get this same input from a file that can be 
> configured ahead of time.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] incubator-trafficcontrol pull request #167: Refactor and cleanup the influxd...

2017-01-09 Thread dewrich
Github user dewrich commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/167#discussion_r95182473
  
--- Diff: traffic_stats/influxdb_tools/sync/sync_test.go ---
@@ -0,0 +1,230 @@
+/*
+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.
+*/
+
+package main
+
+import (
+   "encoding/json"
+   "fmt"
+   "testing"
+
+   influx "github.com/influxdata/influxdb/client/v2"
+   "github.com/influxdata/influxdb/models"
+   . "github.com/smartystreets/goconvey/convey"
--- End diff --

I've used GoConvey to monitor test coverage, but I'm not sure about the 
value add of tying the code to the framework.  I've typically just wrapped the 
Go testing framework with convenience methods when necessary.  We haven't had a 
larger discussion about these types of frameworks to weigh the pros/cons.


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


[GitHub] incubator-trafficcontrol issue #167: Refactor and cleanup the influxdb_tools...

2017-01-09 Thread dneuman64
Github user dneuman64 commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/167
  
+1 on vendoring.  We are currently defining the version of the InfluxDb 
client to use in the build script and vendoring is a much better solution.  


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


[jira] [Commented] (TC-6) Traffic Ops postinstall: non-interactive configuration

2017-01-09 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on TC-6:
-

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


https://github.com/apache/incubator-trafficcontrol/pull/126#discussion_r95162579
  
--- Diff: traffic_ops/build/traffic_ops.spec ---
@@ -122,7 +122,7 @@ Built: %(date) by %{getenv: USER}
 # install
 if [ "$1" = "1" ]; then
   # see postinstall, the .reconfigure file triggers init().
-  /bin/touch %{PACKAGEDIR}/.reconfigure
+  #/bin/touch %{PACKAGEDIR}/.reconfigure
--- End diff --

Removed because reconfigure is now a command line option - removed line 
from spec file


> Traffic Ops postinstall: non-interactive configuration
> --
>
> Key: TC-6
> URL: https://issues.apache.org/jira/browse/TC-6
> Project: Traffic Control
>  Issue Type: Improvement
>  Components: Traffic Ops
>Affects Versions: 1.8.0
>Reporter: Dan Kirkwood
>Assignee: Dan Kirkwood
> Attachments: Automated_Postinstall_for_Traffic_Ops_v4.docx
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Traffic Ops postinstall currently requires interactive user input.   This 
> makes it difficult to install exactly the same way each time,  and can be 
> error prone.  It also makes installation within a docker container difficult.
> There should be a way to get this same input from a file that can be 
> configured ahead of time.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)