[jira] [Created] (TC-198) Add ability to filter profiles by cdn thru the API

2017-03-15 Thread Jeremy Mitchell (JIRA)
Jeremy Mitchell created TC-198:
--

 Summary: Add ability to filter profiles by cdn thru the API
 Key: TC-198
 URL: https://issues.apache.org/jira/browse/TC-198
 Project: Traffic Control
  Issue Type: New Feature
  Components: Traffic Ops API
Reporter: Jeremy Mitchell
Priority: Minor


for the GET /api/$version/profiles API you should be able to filter by cdn by 
passing in ?cdn=[cdn Id]




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (TC-193) Add ability to filter delivery services by profile thru the API

2017-03-15 Thread Jeremy Mitchell (JIRA)

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

Jeremy Mitchell updated TC-193:
---
Description: for the GET /api/$version/deliveryservices API you should be 
able to filter by profile by passing in ?profile=[profile Id]  (was: for the 
GET /api/$version/deliveryservices API you should be able to filter by profile 
by passing in ?profileId=x)

> Add ability to filter delivery services by profile thru the API
> ---
>
> Key: TC-193
> URL: https://issues.apache.org/jira/browse/TC-193
> Project: Traffic Control
>  Issue Type: New Feature
>  Components: Traffic Ops API
>Reporter: Jeremy Mitchell
>Priority: Minor
>
> for the GET /api/$version/deliveryservices API you should be able to filter 
> by profile by passing in ?profile=[profile Id]



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] incubator-trafficcontrol pull request #299: Instant Invalidate for ORT and T...

2017-03-15 Thread dneuman64
Github user dneuman64 commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/299#discussion_r106326442
  
--- Diff: traffic_ops/bin/traffic_ops_ort.pl ---
@@ -1481,8 +1783,8 @@ sub get_header_comment {
my $to_host = shift;
my $toolname;
 
-   my $url= "$to_host/api/1.1/system/info.json";
-   my $result = _get($url);
+   my $uri= "/api/1.1/system/info.json";
--- End diff --

can we use the 1.2 version if the API instead? Not sure if it changed at 
all.


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


[GitHub] incubator-trafficcontrol pull request #299: Instant Invalidate for ORT and T...

2017-03-15 Thread dneuman64
Github user dneuman64 commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/299#discussion_r106294548
  
--- Diff: traffic_ops/bin/traffic_ops_ort.pl ---
@@ -262,6 +316,7 @@ sub usage {
print "\t = report - prints config differences and exits.\n";
print "\t = badass - attempts to fix all config differences that 
it can.\n";
print "\t = syncds - syncs delivery services with what is 
configured in Traffic Ops.\n";
+   print "\t = revalidate - checks for updated revalidations in 
Traffic Ops and applies them.  Requires Traffic Ops 1.2.\n";
--- End diff --

requires traffic ops 2.1 not 1.2


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


[GitHub] incubator-trafficcontrol pull request #299: Instant Invalidate for ORT and T...

2017-03-15 Thread dneuman64
Github user dneuman64 commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/299#discussion_r106293453
  
--- Diff: traffic_ops/bin/traffic_ops_ort.pl ---
@@ -177,32 +184,62 @@
  Start main flow
 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
- First and foremost, if this is a syncds run, check to see if we can 
bail.
-my $syncds_update = undef;
-if ( defined $traffic_ops_host ) {
-   ($syncds_update) = _syncds_state();
-}
-else {
-   print "FATAL Could not resolve Traffic Ops host!\n";
-   exit 1;
-}
 
  Delete /tmp dirs older than one week
-if ( $script_mode == $BADASS || $script_mode == $INTERACTIVE || 
$script_mode == $SYNCDS ) {
+if ( $script_mode == $BADASS || $script_mode == $INTERACTIVE || 
$script_mode == $SYNCDS || $script_mode == $REVALIDATE ) {
_mkdir($TMP_BASE);
_tmp_dirs();
 }
 
-( my $my_profile_name, $cfg_file_tracker, my $my_cdn_name ) = 
_cfg_file_list( $hostname_short, $traffic_ops_host );
 my $header_comment = _header_comment($traffic_ops_host);
 
-_packages( $hostname_short, $traffic_ops_host );
-# get the ats user's UID after package installation in case this is the 
initial badass
 my $ats_uid  = getpwnam("ats");
-_chkconfig( $hostname_short, $traffic_ops_host );
+
+ If this is a syncds run, check to see if we can bail.
+my $syncds_update = 0;
+if ( $script_mode == $REVALIDATE ) {
--- End diff --

This seems like it can use some cleanup.  Can you do the check to see if 
$traffic_ops_host is defined first and then check the script mode? 


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


[GitHub] incubator-trafficcontrol pull request #299: Instant Invalidate for ORT and T...

2017-03-15 Thread dneuman64
Github user dneuman64 commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/299#discussion_r106326536
  
--- Diff: traffic_ops/bin/traffic_ops_ort.pl ---
@@ -2151,13 +2453,22 @@ sub validate_result {
}
 }
 
-sub set_url {
+sub set_uri {
my $filename = shift;
+   
my $filepath = $cfg_file_tracker->{$filename}->{'location'};
+   my $URI;
+   if ( $api_in_use == 1 && 
defined($cfg_file_tracker->{$filename}->{'API_URI'}) ) {
+   $URI = $cfg_file_tracker->{$filename}->{'API_URI'};
+   }
+   else {
+   $URI = "\/genfiles\/view\/$hostname_short\/" . 
$cfg_file_tracker->{$filename}->{'fname-in-TO'};
+   }
 
return if (!defined($cfg_file_tracker->{$filename}->{'fname-in-TO'}));
 
-   return "$traffic_ops_host\/genfiles\/view\/$hostname_short\/" . 
$cfg_file_tracker->{$filename}->{'fname-in-TO'};
+   #return "$traffic_ops_host\/genfiles\/view\/$hostname_short\/" . 
$cfg_file_tracker->{$filename}->{'fname-in-TO'};
--- End diff --

do we need this commented out line or can it be removed?


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


[GitHub] incubator-trafficcontrol pull request #299: Instant Invalidate for ORT and T...

2017-03-15 Thread dneuman64
Github user dneuman64 commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/299#discussion_r106294133
  
--- Diff: traffic_ops/bin/traffic_ops_ort.pl ---
@@ -226,6 +263,7 @@
}
 }
 
+
--- End diff --

is this new line necessary?


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


[GitHub] incubator-trafficcontrol pull request #299: Instant Invalidate for ORT and T...

2017-03-15 Thread dneuman64
Github user dneuman64 commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/299#discussion_r106294076
  
--- Diff: traffic_ops/bin/traffic_ops_ort.pl ---
@@ -213,7 +250,7 @@
_file('remap.config');
last;
}
-   }
+   }   
--- End diff --

extra whitespace!


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


[GitHub] incubator-trafficcontrol pull request #299: Instant Invalidate for ORT and T...

2017-03-15 Thread dneuman64
Github user dneuman64 commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/299#discussion_r106325936
  
--- Diff: traffic_ops/bin/traffic_ops_ort.pl ---
@@ -671,31 +748,128 @@ sub get_print_current_client_connections {
( $log_level >> $DEBUG ) && print "DEBUG There are currently 
$current_connections connections.\n";
 }
 
+sub check_revalidate_state {
+   my $sleep_override = shift;
+
+   my $syncds_update = 0;
+
+   ( $log_level >> $DEBUG ) && print "DEBUG Checking revalidate state.\n";
+   if ( $script_mode == $REVALIDATE || $sleep_override == 1 ) {
+   ## The herd is about to get /update/
+
+   my $uri = "/update/$hostname_short";
+   my $upd_ref = _get($uri);
+   if ( $upd_ref =~ m/^\d{3}$/ ) {
+   ( $log_level >> $ERROR ) && print "ERROR Update URL: 
$uri returned $upd_ref. Exiting, not sure what else to do.\n";
+   exit 1;
+   }
+
+   my $upd_json = decode_json($upd_ref);
+   my $reval_pending = ( defined( 
$upd_json->[0]->{'reval_pending'} ) ) ? $upd_json->[0]->{'reval_pending'} : 
undef;
+   if ( !defined($reval_pending) ) {
+   ( $log_level >> $ERROR ) && print "ERROR Update URL: 
$uri did not have an reval_pending key.  Separated revalidation requires 
upgrading to Traffic Ops version 2.1.\n";
+   return($UPDATE_TROPS_NOTNEEDED);
+   }
+
+   if ( $reval_pending == 1 ) {
+   ( $log_level >> $ERROR ) && print "ERROR Traffic Ops is 
signaling that a revalidation is waiting to be applied.\n";
+   $syncds_update = $UPDATE_TROPS_NEEDED;
+
+   my $parent_reval_pending = ( defined( 
$upd_json->[0]->{'parent_reval_pending'} ) ) ? 
$upd_json->[0]->{'parent_reval_pending'} : undef;
+   if ( !defined($parent_reval_pending) ) {
+   ( $log_level >> $ERROR ) && print "ERROR Update 
URL: $uri did not have an parent_reval_pending key.  Separated revalidation 
requires upgrading to Traffic Ops version 2.1.  Unable to continue!\n";
+   return($UPDATE_TROPS_NOTNEEDED);
+   }
+   if ( $parent_reval_pending == 1 ) {
+   ( $log_level >> $ERROR ) && print "ERROR 
Traffic Ops is signaling that my parents need to revalidate.\n";
+   return($UPDATE_TROPS_NOTNEEDED);
+   }
+   }
+   elsif ( $script_mode == $REVALIDATE && $reval_pending != 1 ) {
+   ( $log_level >> $ERROR ) && print "ERROR In revalidate 
mode, but no update needs to be applied. I'm outta here.\n";
+   return($UPDATE_TROPS_NOTNEEDED);
+   }
+   else {
+   ( $log_level >> $ERROR ) && print "ERROR Traffic Ops is 
signaling that no revalidations are waiting to be applied.\n";
+   }
+
+   my $stj = _get("/datastatus");
--- End diff --

/datastatus will be depricated before too long, could you use 
/api/1.2/statuses instead?


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


[GitHub] incubator-trafficcontrol pull request #299: Instant Invalidate for ORT and T...

2017-03-15 Thread dneuman64
Github user dneuman64 commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/299#discussion_r106325223
  
--- Diff: traffic_ops/bin/traffic_ops_ort.pl ---
@@ -646,18 +713,28 @@ sub update_trops {
}
}
elsif ( $script_mode == $BADASS || $script_mode == $SYNCDS ) {
-   _update_to_trops($CLEAR);
+   if ( defined $reval_pending ) {
+   _update_to_trops($CLEAR, $reval_pending );
+   }
+   else {
+   _update_to_trops($CLEAR, $CLEAR);
+   }
+   }
+   elsif ( $script_mode = $REVALIDATE ) {
+   _update_to_trops($upd_pending, $CLEAR);
}
}
 }
 
 sub send_update_to_trops {
my $status = shift;
-   my $url= "$traffic_ops_host\/update/$hostname_short";
+   my $reval_status = shift;
+   my $uri= "/update/$hostname_short";
( $log_level >> $DEBUG ) && print "DEBUG Setting update flag in Traffic 
Ops to $status.\n";
 
my %headers = ( 'Cookie' => $cookie );
-   my $response = $lwp_conn->post( $url, [ 'updated' => $status ], 
%headers );
+   my $url = $traffic_ops_host . $uri;
+   my $response = $lwp_conn->post( $url, [ 'updated' => $status, 
'reval_updated' => $reval_status ], %headers );
--- End diff --

is it ok if reval_status is null here? Didnt trace the code, I just assume 
that can happen.


---
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 #372: Add Traffic Monitor 2.0 getting ...

2017-03-15 Thread rob05c
GitHub user rob05c opened a pull request:

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

Add Traffic Monitor 2.0 getting its CDN from Traffic Ops

Adds Traffic Monitor 2.0 getting the name of the CDN to monitor from
Traffic Ops. The CDN is the CDN that this Traffic Monitor is assigned
to in TO (known by the hostname command). If this TO hostname doesn't
exist in Traffic Ops, an error is logged and the old traffic_ops.cfg
cdnName value is used. If a config cdnName is set which differs from
the TO CDN, the TO CDN is used, and a warning is logged (TO is the
Source of Truth).

This makes deployment easier and safer: Traffic Monitor deployment
configs need only the Traffic Ops URL and login, and the Traffic Ops
CDN will be used, so it isn't possible to accidentally deploy a
Monitor configured to use a different CDN than is in Traffic Ops.

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

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

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

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


commit a4bb507d25a3f5da7987434e37e01649318f9e77
Author: Robert Butts 
Date:   2017-03-15T21:29:59Z

Add TM2 getting CDN name from Traffic Ops

Adds Traffic Monitor 2.0 getting the name of the CDN to monitor from
Traffic Ops. The CDN is the CDN that this Traffic Monitor is assigned
to in TO (known by the hostname command). If this TO hostname doesn't
exist in Traffic Ops, an error is logged and the old traffic_ops.cfg
cdnName value is used. If a config cdnName is set which differs from
the TO CDN, the TO CDN is used, and a warning is logged (TO is the
Source of Truth).

This makes deployment easier and safer: Traffic Monitor deployment
configs need only the Traffic Ops URL and login, and the Traffic Ops
CDN will be used, so it isn't possible to accidentally deploy a
Monitor configured to use a different CDN than is in Traffic Ops.




---
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 #371: Tenancy table creation

2017-03-15 Thread nir-sopher
GitHub user nir-sopher opened a pull request:

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

Tenancy table creation

This PR is the first step in adding "org tenancy" to TC. It comes to start 
and replace PR-322
It define the tenants table, including an "active" flag as well as 
"parent-tenant".
This PR is pre-requisite for adding the tenancy to the Users/CDN/DS tables

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

$ git pull https://github.com/nir-sopher/incubator-trafficcontrol 
tenancy-table-creation

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

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


commit 7c8fab02a56feb1d2cc76ba65c08cee74cc45c03
Author: nir-sopher 
Date:   2017-03-15T13:42:50Z

Add 'tenant' table to the DB

commit 5647b27625319a0878eeb037dc79b9bfd4368f4e
Author: nir-sopher 
Date:   2017-03-15T13:47:28Z

add the 'tenant' fixture

commit 4ed28007aa02cbbc22ca76d9722b5179e19cd1ee
Author: nir-sopher 
Date:   2017-03-15T13:50:58Z

Tenant API




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


[GitHub] incubator-trafficcontrol pull request #299: Instant Invalidate for ORT and T...

2017-03-15 Thread dg4prez
Github user dg4prez commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/299#discussion_r106284146
  
--- Diff: traffic_ops/app/lib/MojoPlugins/Job.pm ---
@@ -70,8 +70,16 @@ sub register {
}
);
 
-   my $result = $update_server_bit_rs->update( { 
upd_pending => 1 } );
-   ( $self, "Set upd_pending = 1 for all applicable 
caches", "OPER" );
+   my $use_reval_pending = 
$self->db->resultset('Parameter')->search( { -and => [ 'name' => 
'use_reval_pending', 'config_file' => 'global' ] } 
)->get_column('value')->single;
+
+   if ( defined($use_reval_pending) && $use_reval_pending 
== 1 ) {
--- End diff --

Adjusted.


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


[GitHub] incubator-trafficcontrol pull request #299: Instant Invalidate for ORT and T...

2017-03-15 Thread dg4prez
Github user dg4prez commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/299#discussion_r106283866
  
--- Diff: traffic_ops/app/lib/UI/Server.pm ---
@@ -980,7 +1018,14 @@ sub postupdate {
 
my $update_server =
$self->db->resultset('Server')->search( { id => $serverid } );
-   if ( defined $updated ) {
+
+   my $use_reval_pending = $self->db->resultset('Parameter')->search( { 
-and => [ 'name' => 'use_reval_pending', 'config_file' => 'global' ] } 
)->get_column('value')->single;
+
+   if ( defined($use_reval_pending) && $use_reval_pending == 1 ) {
--- End diff --

Adjusted per discussion.


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


[GitHub] incubator-trafficcontrol pull request #299: Instant Invalidate for ORT and T...

2017-03-15 Thread dg4prez
Github user dg4prez commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/299#discussion_r106283782
  
--- Diff: traffic_ops/app/lib/UI/Server.pm ---
@@ -915,20 +916,53 @@ sub readupdate {
{
$parent_pending{ 
$rs_servers->single->host_name } = 1;
}
+   if (   $prow->reval_pending == 1
+   && $prow->status->name ne 
"OFFLINE" )
+   {
+   $parent_reval_pending{ 
$rs_servers->single->host_name } = 1;
+   }
}
}
}
}
 
while ( my $row = $rs_servers->next ) {
-   if ( $parent_pending{ $row->host_name } ) {
+   if ( $parent_pending{ $row->host_name } && 
$parent_reval_pending{ $row->host_name } ) {
--- End diff --

Agreed.  Done.


---
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 #344: TO Install instructions

2017-03-15 Thread MattMills
Github user MattMills commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/344#discussion_r106282322
  
--- Diff: traffic_ops/INSTALL.md ---
@@ -88,14 +107,18 @@ We need to tell carton where it is so the `DBD::Pg` 
module is installed correctl
   - if logging data needed,  change ERROR to DEBUG on first line
 
 ## Initialize the db
+
 $ cd /opt/traffic_ops/app
 $ PERL5LIB=$(pwd)/lib:$(pwd)/local/lib/perl5 db/admin.pl 
--env=production setup
 
 ## Install any extensions needed
+
- install in /opt/traffic_ops_extensions

 ## Install `openssl` certs (or use this to generate them)
+
- `sudo /opt/traffic_ops/install/bin/generateCert`

 ## Install web dependencies
+
- `sudo /opt/traffic_ops/install/bin/download_web_deps`
--- End diff --

What about the additional data in 
https://github.com/apache/incubator-trafficcontrol/tree/master/traffic_ops/install/data/json
 that used to be loaded by (I think) postinstall, but now isn't loaded, which 
includes the default profiles and parameters?

If we don't have a way to load them today, I think it's worth putting a 
warning in the install instructions that they won't quite be able to get to a 
fully functioning install yet.


---
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 #370: Adding a "create user" to the ap...

2017-03-15 Thread nir-sopher
GitHub user nir-sopher opened a pull request:

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

Adding a "create user" to the api



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

$ git pull https://github.com/nir-sopher/incubator-trafficcontrol 
create-user-rest-api

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

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


commit be444c5b593a21cf6585abe055345badfea6a2c7
Author: nir-sopher 
Date:   2017-03-15T14:48:24Z

User REST UPI - update, registration_sent cannot be 0/1

commit 53f7f47b1a94240e4b284adbb93bdb52c32da3e6
Author: nir-sopher 
Date:   2017-03-15T14:49:11Z

Adding user create API




---
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 #344: TO Install instructions

2017-03-15 Thread MattMills
Github user MattMills commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/344#discussion_r106281138
  
--- Diff: traffic_ops/INSTALL.md ---
@@ -8,53 +8,71 @@
 Instructions are here: https://yum.postgresql.org/
 
 - grab the link for CentOS 7 and install:
-$ sudo yum install 
https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-.noarch.rpm
 
+$ sudo yum install 
https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-.noarch.rpm
+
+  NOTE: get a valid link from https://yum.postgresql.org/ with the correct 
version number.
+  
 - install `postgresql96` (for psql commands) and `postgresql96-devel` (for 
includes/libraries needed to install `DBD::Pg` perl library)
+
 $ sudo yum install postgresql96 postgresql96-devel
 
 ## Install Postgres 9.6 server (in a container or on the host)
 
 ### on the host:
+
$ sudo yum install postgresql96-server
 
 ### -or- in a container
 
 NOTE: you do *not* need postgresql96-server if running postgres within a 
`docker` container.
 
 Install `docker` and `docker-compose` using instructions here:
+
 https://docs.docker.com/engine/installation/linux/centos/
+
 https://docs.docker.com/compose/install/
 
 Add yourself to `docker` group
+
 $ sudo usermod -G docker $USER
 
 Remember to logout and login again..   You should see `docker` in your 
list of groups:
 
 $ id
 uid=9876(myuser) gid=9876(myuser) groups=9876(myuser),990(docker) ...
 
+Edit `mysql-to-postgres.env` to suit your needs.
+* modify `POSTGRES_*` vars to apply to new postgres container that will 
house your database, e.g.
+  * POSTGRES_USER=postgres
+  * POSTGRES_PASSWORD=itSas3cre4
+  
+If migrating from an existing pre-2.0 traffic_ops server (mysql):
+* `TO_*` vars for admin access to existing mysql-based `traffic_ops` (to 
get a db dump), e.g.
+  * TO_SERVER=https://trafficops.example.com
+  * TO_USER=dennisr
+  
+* `MYSQL_*` vars to apply to temporary mysql container -- really no need 
to change..
+
 Start a docker container to run postgres
+
 $ cd incubator-trafficcontrol/traffic_ops/app/db/pg-migration
 $ ./start_postgres.sh
 
-Edit `mysql-to-postgres.yml` to suit your needs.
-- modify `POSTGRES_*` vars to apply to new postgres container that will 
house
-
-If migrating from an existing pre-2.0 traffic_ops server (mysql):
-- `TO_*` vars for admin access to existing mysql-based `traffic_ops` (to 
get a db dump)
-- `MYSQL_*` vars to apply to temporary mysql container
-
 Run migration from existing mysql-based `traffic_ops`
+
 $ ./migrate.sh
 
 ## Install `traffic_ops`
+
 $ sudo yum install traffic_ops
--- End diff --

This won't work outside of Comcast


---
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 #344: TO Install instructions

2017-03-15 Thread MattMills
Github user MattMills commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/344#discussion_r106280949
  
--- Diff: traffic_ops/INSTALL.md ---
@@ -8,53 +8,71 @@
 Instructions are here: https://yum.postgresql.org/
 
 - grab the link for CentOS 7 and install:
-$ sudo yum install 
https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-.noarch.rpm
 
+$ sudo yum install 
https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-.noarch.rpm
+
+  NOTE: get a valid link from https://yum.postgresql.org/ with the correct 
version number.
+  
--- End diff --

You'll also need a yum install epel-release, since postgres' repo depends 
on epel.


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


[GitHub] incubator-trafficcontrol pull request #299: Instant Invalidate for ORT and T...

2017-03-15 Thread dg4prez
Github user dg4prez commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/299#discussion_r106271956
  
--- Diff: traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm ---
@@ -76,7 +76,9 @@ sub get_config_metadata {
$data_obj->{'info'}->{'cdn_name'}   = $cdn_name;
$data_obj->{'info'}->{'cdn_id'} = 
$server->cdn->id;
$data_obj->{'info'}->{'tm_url'} = $tm_url;
-   $data_obj->{'info'}->{'tm_cache_url'}   = $tm_cache_url;
+   if ( $tm_cache_url ) {
--- End diff --

Agreed.  Done.


---
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] [Updated] (TC-197) File descriptor leak caused by NIO protocol connector

2017-03-15 Thread Jeff Elsloo (JIRA)

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

Jeff Elsloo updated TC-197:
---
Attachment: Screen Shot 2017-03-15 at 2.12.58 PM.png

Chart showing growth of threads, memory and connections.

> File descriptor leak caused by NIO protocol connector
> -
>
> Key: TC-197
> URL: https://issues.apache.org/jira/browse/TC-197
> Project: Traffic Control
>  Issue Type: Bug
>  Components: Traffic Router
>Affects Versions: 2.1.0
>Reporter: Jeff Elsloo
> Attachments: Screen Shot 2017-03-15 at 2.12.58 PM.png
>
>
> The new default configuration for Traffic Router and Tomcat is to use the 
> {{Http11NioProtocol}} adapter over the previous {{Http11Protocol}} adapter. 
> This is accomplished via the {{LanguidNioProtocol}} connectors specified in 
> Tomcat's {{server.xml}}.
> We observed a file descriptor leak with connections, but have not dug into 
> the cause. We observed roughly 30-40k connections in {{CLOSE_WAIT}} which 
> caused the machine to exhaust its file descriptors based upon configured 
> limits. We also observed a similar growth curve on total threads, so 
> something is not behaving and being cleaned up appropriately.
> The cause could range from a bug in the {{Http11NioProtocol}} connector due 
> to the ancient version of Tomcat we're using, tuning within the connector 
> itself (max threads, intervals, etc), tuning within the JVM (memory, GC, 
> etc), or at the OS level (kernel params around TCP connections, etc).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (TC-197) File descriptor leak caused by NIO protocol connector

2017-03-15 Thread Jeff Elsloo (JIRA)
Jeff Elsloo created TC-197:
--

 Summary: File descriptor leak caused by NIO protocol connector
 Key: TC-197
 URL: https://issues.apache.org/jira/browse/TC-197
 Project: Traffic Control
  Issue Type: Bug
  Components: Traffic Router
Affects Versions: 2.1.0
Reporter: Jeff Elsloo


The new default configuration for Traffic Router and Tomcat is to use the 
{{Http11NioProtocol}} adapter over the previous {{Http11Protocol}} adapter. 
This is accomplished via the {{LanguidNioProtocol}} specified in Tomcat's 
{{server.xml}}.

We observed a file descriptor leak with connections, but have not dug into the 
cause. We observed roughly 30-40k connections in {{CLOSE_WAIT}} which caused 
the machine to exhaust its file descriptors based upon configured limits. We 
also observed a similar growth curve on total threads, so something is not 
behaving and being cleaned up appropriately.

The cause could range from a bug in the {{Http11NioProtocol}} connector due to 
the ancient version of Tomcat we're using, tuning within the connector itself 
(max threads, intervals, etc), tuning within the JVM (memory, GC, etc), or at 
the OS level (kernel params around TCP connections, etc).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] incubator-trafficcontrol pull request #299: Instant Invalidate for ORT and T...

2017-03-15 Thread mitchell852
Github user mitchell852 commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/299#discussion_r106269894
  
--- Diff: traffic_ops/app/lib/UI/Server.pm ---
@@ -980,7 +1018,14 @@ sub postupdate {
 
my $update_server =
$self->db->resultset('Server')->search( { id => $serverid } );
-   if ( defined $updated ) {
+
+   my $use_reval_pending = $self->db->resultset('Parameter')->search( { 
-and => [ 'name' => 'use_reval_pending', 'config_file' => 'global' ] } 
)->get_column('value')->single;
+
+   if ( defined($use_reval_pending) && $use_reval_pending == 1 ) {
--- End diff --

you can save a few lines of code here by getting rid of the else and moving 

$update_server->update( { upd_pending => $updated } );

below the remaining if...and also leave it out of the if...


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


[GitHub] incubator-trafficcontrol pull request #299: Instant Invalidate for ORT and T...

2017-03-15 Thread mitchell852
Github user mitchell852 commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/299#discussion_r106267760
  
--- Diff: traffic_ops/app/lib/UI/Server.pm ---
@@ -915,20 +916,53 @@ sub readupdate {
{
$parent_pending{ 
$rs_servers->single->host_name } = 1;
}
+   if (   $prow->reval_pending == 1
+   && $prow->status->name ne 
"OFFLINE" )
+   {
+   $parent_reval_pending{ 
$rs_servers->single->host_name } = 1;
+   }
}
}
}
}
 
while ( my $row = $rs_servers->next ) {
-   if ( $parent_pending{ $row->host_name } ) {
+   if ( $parent_pending{ $row->host_name } && 
$parent_reval_pending{ $row->host_name } ) {
--- End diff --

can't we collapse this if/elseif...seems like the only thing that is 
different is the 

parent_pending => 0|1,
parent_reval_pending => 0|1

maybe a tertiary operator?

parent_pending => (condition) ? 1 : 0,
parent_reval_pending => (condition) ? 1 : 0,


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


[GitHub] incubator-trafficcontrol pull request #299: Instant Invalidate for ORT and T...

2017-03-15 Thread mitchell852
Github user mitchell852 commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/299#discussion_r106264761
  
--- Diff: traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm ---
@@ -76,7 +76,9 @@ sub get_config_metadata {
$data_obj->{'info'}->{'cdn_name'}   = $cdn_name;
$data_obj->{'info'}->{'cdn_id'} = 
$server->cdn->id;
$data_obj->{'info'}->{'tm_url'} = $tm_url;
-   $data_obj->{'info'}->{'tm_cache_url'}   = $tm_cache_url;
+   if ( $tm_cache_url ) {
--- End diff --

should this be called to_cache_url instead? it would be nice to get rid of 
all references to 'tm' at some point if possible...


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


[GitHub] incubator-trafficcontrol pull request #299: Instant Invalidate for ORT and T...

2017-03-15 Thread mitchell852
Github user mitchell852 commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/299#discussion_r106263950
  
--- Diff: 
traffic_ops/app/db/migrations/20170221190747_add_reval_pending.sql ---
@@ -0,0 +1,26 @@
+/*
+
--- End diff --

this migration file needs a later timestamp on the name. see existing 
migrations - 
https://github.com/apache/incubator-trafficcontrol/tree/master/traffic_ops/app/db/migrations

it needs to be timestamped later than the add_client_steering migration...


---
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 #344: TO Install instructions

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


https://github.com/apache/incubator-trafficcontrol/pull/344#discussion_r106258947
  
--- Diff: INSTALL.md ---
@@ -0,0 +1,101 @@
+# From new CentOS 7 install:
+
+## Disable selinux:
+### change `/etc/selinux/config` to `SELINUX=disabled`
+
+## Install Postgreql 9.6 client and libraries
+
+Instructions are here: https://yum.postgresql.org/
+
+- grab the link for CentOS 7 and install:
+$ sudo yum install 
https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-.noarch.rpm
+
+- install `postgresql96` (for psql commands) and `postgresql96-devel` (for 
includes/libraries needed to install `DBD::Pg` perl library)
+$ sudo yum install postgresql96 postgresql96-devel
+
+## Install Postgres 9.6 server (in a container or on the host)
+
+### on the host:
+   $ sudo yum install postgresql96-server
+
+### -or- in a container
+
+NOTE: you do *not* need postgresql96-server if running postgres within a 
`docker` container.
+
+Install `docker` and `docker-compose` using instructions here:
+https://docs.docker.com/engine/installation/linux/centos/
+https://docs.docker.com/compose/install/
+
+Add yourself to `docker` group
+$ sudo usermod -G docker $USER
+
+Remember to logout and login again..   You should see `docker` in your 
list of groups:
+
+$ id
+uid=9876(myuser) gid=9876(myuser) groups=9876(myuser),990(docker) ...
+
+Start a docker container to run postgres
+$ cd incubator-trafficcontrol/traffic_ops/app/db/pg-migration
+$ ./start_postgres.sh
+
+Edit `mysql-to-postgres.yml` to suit your needs.
+- modify `POSTGRES_*` vars to apply to new postgres container that will 
house
+
+If migrating from an existing pre-2.0 traffic_ops server (mysql):
+- `TO_*` vars for admin access to existing mysql-based `traffic_ops` (to 
get a db dump)
+- `MYSQL_*` vars to apply to temporary mysql container
+
+Run migration from existing mysql-based `traffic_ops`
+$ ./migrate.sh
+
+## Install `traffic_ops`
+$ sudo yum install traffic_ops
+
+## Install `go` and `gcc` (required for `goose` and some `Perl` modules)
+$ sudo yum install go gcc
+
+## Install Perl modules
+$ sudo cpanm Carton
+
+IMPORTANT!!: We're using a later version of Postgresql,  so it's not 
installed in the default place.
+We need to tell carton where it is so the `DBD::Pg` module is installed 
correctly.
+
+$ sudo su -
+# cd /opt/traffic_ops/app
+# POSTGRES_HOME=/usr/pgsql-9.6 /usr/local/bin/carton
+
+
+## Install goose
+$ sudo GOPATH=/tmp GOBIN=/usr/local/bin go get 
bitbucket.org/liamstask/goose/cmd/goose
+
+
+## Modify `traffic_ops` configuration
+
--- End diff --

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


[GitHub] incubator-trafficcontrol pull request #344: TO Install instructions

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


https://github.com/apache/incubator-trafficcontrol/pull/344#discussion_r106258828
  
--- Diff: INSTALL.md ---
@@ -0,0 +1,101 @@
+# From new CentOS 7 install:
+
+## Disable selinux:
+### change `/etc/selinux/config` to `SELINUX=disabled`
+
+## Install Postgreql 9.6 client and libraries
+
+Instructions are here: https://yum.postgresql.org/
+
+- grab the link for CentOS 7 and install:
+$ sudo yum install 
https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-.noarch.rpm
+
+- install `postgresql96` (for psql commands) and `postgresql96-devel` (for 
includes/libraries needed to install `DBD::Pg` perl library)
+$ sudo yum install postgresql96 postgresql96-devel
+
+## Install Postgres 9.6 server (in a container or on the host)
+
+### on the host:
+   $ sudo yum install postgresql96-server
+
+### -or- in a container
+
+NOTE: you do *not* need postgresql96-server if running postgres within a 
`docker` container.
+
+Install `docker` and `docker-compose` using instructions here:
+https://docs.docker.com/engine/installation/linux/centos/
+https://docs.docker.com/compose/install/
+
+Add yourself to `docker` group
+$ sudo usermod -G docker $USER
+
+Remember to logout and login again..   You should see `docker` in your 
list of groups:
+
+$ id
+uid=9876(myuser) gid=9876(myuser) groups=9876(myuser),990(docker) ...
+
+Start a docker container to run postgres
+$ cd incubator-trafficcontrol/traffic_ops/app/db/pg-migration
+$ ./start_postgres.sh
+
+Edit `mysql-to-postgres.yml` to suit your needs.
+- modify `POSTGRES_*` vars to apply to new postgres container that will 
house
+
+If migrating from an existing pre-2.0 traffic_ops server (mysql):
+- `TO_*` vars for admin access to existing mysql-based `traffic_ops` (to 
get a db dump)
+- `MYSQL_*` vars to apply to temporary mysql container
+
--- End diff --

that's fair..


---
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 #344: TO Install instructions

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


https://github.com/apache/incubator-trafficcontrol/pull/344#discussion_r106258688
  
--- Diff: INSTALL.md ---
@@ -0,0 +1,101 @@
+# From new CentOS 7 install:
+
+## Disable selinux:
+### change `/etc/selinux/config` to `SELINUX=disabled`
+
+## Install Postgreql 9.6 client and libraries
+
+Instructions are here: https://yum.postgresql.org/
+
+- grab the link for CentOS 7 and install:
+$ sudo yum install 
https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-.noarch.rpm
+
+- install `postgresql96` (for psql commands) and `postgresql96-devel` (for 
includes/libraries needed to install `DBD::Pg` perl library)
+$ sudo yum install postgresql96 postgresql96-devel
+
+## Install Postgres 9.6 server (in a container or on the host)
+
+### on the host:
+   $ sudo yum install postgresql96-server
+
+### -or- in a container
+
+NOTE: you do *not* need postgresql96-server if running postgres within a 
`docker` container.
+
+Install `docker` and `docker-compose` using instructions here:
+https://docs.docker.com/engine/installation/linux/centos/
+https://docs.docker.com/compose/install/
+
+Add yourself to `docker` group
+$ sudo usermod -G docker $USER
+
+Remember to logout and login again..   You should see `docker` in your 
list of groups:
+
+$ id
+uid=9876(myuser) gid=9876(myuser) groups=9876(myuser),990(docker) ...
+
+Start a docker container to run postgres
+$ cd incubator-trafficcontrol/traffic_ops/app/db/pg-migration
+$ ./start_postgres.sh
+
+Edit `mysql-to-postgres.yml` to suit your needs.
--- End diff --

ahh..   yep



---
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 #344: TO Install instructions

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


https://github.com/apache/incubator-trafficcontrol/pull/344#discussion_r106258643
  
--- Diff: INSTALL.md ---
@@ -0,0 +1,101 @@
+# From new CentOS 7 install:
+
+## Disable selinux:
+### change `/etc/selinux/config` to `SELINUX=disabled`
+
+## Install Postgreql 9.6 client and libraries
+
+Instructions are here: https://yum.postgresql.org/
+
+- grab the link for CentOS 7 and install:
+$ sudo yum install 
https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-.noarch.rpm
+
+- install `postgresql96` (for psql commands) and `postgresql96-devel` (for 
includes/libraries needed to install `DBD::Pg` perl library)
+$ sudo yum install postgresql96 postgresql96-devel
+
+## Install Postgres 9.6 server (in a container or on the host)
+
+### on the host:
+   $ sudo yum install postgresql96-server
+
+### -or- in a container
+
+NOTE: you do *not* need postgresql96-server if running postgres within a 
`docker` container.
+
+Install `docker` and `docker-compose` using instructions here:
+https://docs.docker.com/engine/installation/linux/centos/
+https://docs.docker.com/compose/install/
+
+Add yourself to `docker` group
+$ sudo usermod -G docker $USER
+
+Remember to logout and login again..   You should see `docker` in your 
list of groups:
+
+$ id
+uid=9876(myuser) gid=9876(myuser) groups=9876(myuser),990(docker) ...
+
+Start a docker container to run postgres
--- End diff --

yep..


---
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 #369: fixes broken cdn test. domainNam...

2017-03-15 Thread mitchell852
GitHub user mitchell852 opened a pull request:

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

fixes broken cdn test. domainName is required on put.



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

$ git pull https://github.com/mitchell852/incubator-trafficcontrol 
fix-cdn-test

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

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


commit ac4548c9268222d382134703cd015bef44906922
Author: Jeremy Mitchell 
Date:   2017-03-15T19:04:16Z

fixes broken cdn test. domainName is required on put.




---
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-184) Tenant Hierarchy

2017-03-15 Thread Ryan Durfey (JIRA)

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

Ryan Durfey commented on TC-184:


Certainly.  I think that makes sense.

> Tenant Hierarchy
> 
>
> Key: TC-184
> URL: https://issues.apache.org/jira/browse/TC-184
> Project: Traffic Control
>  Issue Type: New Feature
>  Components: Traffic Ops
>Reporter: Ryan Durfey
>  Labels: Access, Tenancy
>
> Design under discussion here: 
> https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=68715910
> The requirements below are seed requirements and final design guidance should 
> defer to the evolving wiki page discussion referenced above.
> Overview
> The goal of this system is to create a hierarchical tenancy system which is 
> very simple to understand and administer and is highly expandable so that 
> large organizations with many subsidiaries have the flexibility to create 
> child-tenants to their liking.  
> General Seed Requirements
> 1. Provide a structure to create a hierarchy of Tenants where each Tenant has 
> a single parent-Tenant and can have multiple child-Tenants
> 2. Provide the ability to group multiple Delivery Services, Users, and child- 
> Tenants under each Tenant
> 3. Provide the ability to create at least 10 child-Tenant layers within the 
> system
> 4. Make it easy to assign a User to a single Tenant so that they inherit 
> their permissions to all child-Tenants and Delivery Services. 
> 5. Adding child-Tenants or Delivery Services anywhere in an existing tenant 
> hierarchy does not require re-assigning users.  Users inherit pre-defined 
> permissions to new tenants and services added below their assigned layer in 
> the tenancy tree.
> 6. Allow Users  to be assigned multiple Tenants, each with different Roles.  
> While a user would inherit their access to all services and child Tenants 
> below them, they may need more restrictive access further up the Tenant 
> hierarchy or they may want different access to another branch of the tenant 
> tree.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (TC-196) TO endpoint for version

2017-03-15 Thread Dan Kirkwood (JIRA)

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

Dan Kirkwood updated TC-196:

Description: 
Traffic Ops UI has Help->About link to show what version is installed along 
with other info.Wish there were an easy way to tell what version is 
installed for automated testing/monitoring.

Something like .../api/1.2/about could return a json struct with relevant info 
from that page.

  was:
Traffic Ops UI has Help->About link to show what version is installed along 
with other info.Wish there were an easy way to tell what version is 
installed for automated testing/monitoring.

Something like .../api/1.2/about.json could return a json struct with relevant 
info from that page.


> TO endpoint for version
> ---
>
> Key: TC-196
> URL: https://issues.apache.org/jira/browse/TC-196
> Project: Traffic Control
>  Issue Type: Wish
>  Components: Traffic Ops API
>Reporter: Dan Kirkwood
>Priority: Trivial
>
> Traffic Ops UI has Help->About link to show what version is installed along 
> with other info.Wish there were an easy way to tell what version is 
> installed for automated testing/monitoring.
> Something like .../api/1.2/about could return a json struct with relevant 
> info from that page.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (TC-196) TO endpoint for version

2017-03-15 Thread Dan Kirkwood (JIRA)
Dan Kirkwood created TC-196:
---

 Summary: TO endpoint for version
 Key: TC-196
 URL: https://issues.apache.org/jira/browse/TC-196
 Project: Traffic Control
  Issue Type: Wish
  Components: Traffic Ops API
Reporter: Dan Kirkwood
Priority: Trivial


Traffic Ops UI has Help->About link to show what version is installed along 
with other info.Wish there were an easy way to tell what version is 
installed for automated testing/monitoring.

Something like .../api/1.2/about.json could return a json struct with relevant 
info from that page.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] incubator-trafficcontrol issue #331: Fixing typo in traffic_router/build/pom...

2017-03-15 Thread limited
Github user limited commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/331
  
@hbeatty Can you please close this PR?



---
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-190) TTL type mismatch in CrConfig

2017-03-15 Thread ASF GitHub Bot (JIRA)

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

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

Github user dneuman64 commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/365
  
This was merged, closing


> TTL type mismatch in CrConfig
> -
>
> Key: TC-190
> URL: https://issues.apache.org/jira/browse/TC-190
> Project: Traffic Control
>  Issue Type: Bug
>  Components: Traffic Ops
>Affects Versions: 2.0.0
>Reporter: David Neuman
>Assignee: David Neuman
> Fix For: 2.0.0, 2.1.0
>
>
> The A and  types in the Config -> ttls section of the CrConfig are a 
> different type than the A and  values in the DeliveryService -> ttls 
> section of the CrConfig.  In the config sections they are strings but in the 
> DS sections they are ints.  Since goTM uses a common struct for TTLs, this 
> causes an parsing the CrConfig in goTM.  The CrConfig should be updated so 
> that the types are consistent.
> ttls in the Config sections:
> "ttls": {
>   "A": "3600",
>   "DNSKEY": "30",
>   "DS": "30",
>   "SOA": "86400",
>   "NS": "3600",
>   "": "3600"
> },
> ttls in the DS section:
>   "ttls": {
> "A": 30,
> "SOA": "86400",
> "NS": "3600",
> "": 30
>   },



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (TC-190) TTL type mismatch in CrConfig

2017-03-15 Thread ASF GitHub Bot (JIRA)

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

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

Github user dneuman64 closed the pull request at:

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


> TTL type mismatch in CrConfig
> -
>
> Key: TC-190
> URL: https://issues.apache.org/jira/browse/TC-190
> Project: Traffic Control
>  Issue Type: Bug
>  Components: Traffic Ops
>Affects Versions: 2.0.0
>Reporter: David Neuman
>Assignee: David Neuman
> Fix For: 2.0.0, 2.1.0
>
>
> The A and  types in the Config -> ttls section of the CrConfig are a 
> different type than the A and  values in the DeliveryService -> ttls 
> section of the CrConfig.  In the config sections they are strings but in the 
> DS sections they are ints.  Since goTM uses a common struct for TTLs, this 
> causes an parsing the CrConfig in goTM.  The CrConfig should be updated so 
> that the types are consistent.
> ttls in the Config sections:
> "ttls": {
>   "A": "3600",
>   "DNSKEY": "30",
>   "DS": "30",
>   "SOA": "86400",
>   "NS": "3600",
>   "": "3600"
> },
> ttls in the DS section:
>   "ttls": {
> "A": 30,
> "SOA": "86400",
> "NS": "3600",
> "": 30
>   },



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] incubator-trafficcontrol pull request #365: BACKPORT - [TC-190] update CrCon...

2017-03-15 Thread dneuman64
Github user dneuman64 closed the pull request at:

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


---
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] [Assigned] (TC-181) Fancybox software in web_deps.txt is unavailable at specificed URL

2017-03-15 Thread Robert Scrimo (JIRA)

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

Robert Scrimo reassigned TC-181:


Assignee: Robert Scrimo  (was: Dan Kirkwood)

> Fancybox software in web_deps.txt is unavailable at specificed URL
> --
>
> Key: TC-181
> URL: https://issues.apache.org/jira/browse/TC-181
> Project: Traffic Control
>  Issue Type: Bug
>Reporter: Robert Scrimo
>Assignee: Robert Scrimo
>
> Fancybox software URL and related paths in the configuration file needs to be 
> updated in web_deps.txt to an updated location for zip file for v2.1.5 of 
> fancybox.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (TC-195) Traffic Router requires status to be set to OFFLINE to remove an active Traffic Router

2017-03-15 Thread Jeff Elsloo (JIRA)

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

Jeff Elsloo updated TC-195:
---
Description: 
Traffic Router currently requires the status of a given Traffic Router to be 
set to OFFLINE if it is to be removed from DNS answers. When set to OFFLINE, 
Traffic Ops will drop it from the CrConfig, so naturally it would drop from the 
configuration. If, however, a Traffic Router is set to ADMIN_DOWN, it remains 
in the CrConfig and Traffic Router leaves it in the DNS zones because the 
status is not OFFLINE.

Ideally, instead of checking if the status is OFFLINE, we would check to see if 
it's a "positive" status (ONLINE or REPORTED). Any other status should be 
considered invalid and the Traffic Router should be skipped with regard to DNS.

  was:Traffic Router currently requires the status of a given Traffic Router to 
be set to OFFLINE if it is to be removed from DNS answers. When set to OFFLINE, 
Traffic Ops will drop it from the CrConfig, so naturally it would drop from the 
configuration. If, however, a Traffic Router is set to ADMIN_DOWN, it remains 
in the CrConfig and Traffic Router leaves it in the DNS zones because the 
status is not OFFLINE.


> Traffic Router requires status to be set to OFFLINE to remove an active 
> Traffic Router
> --
>
> Key: TC-195
> URL: https://issues.apache.org/jira/browse/TC-195
> Project: Traffic Control
>  Issue Type: Bug
>  Components: Traffic Router
>Affects Versions: 2.1.0
>Reporter: Jeff Elsloo
>Assignee: Jeff Elsloo
>Priority: Minor
>
> Traffic Router currently requires the status of a given Traffic Router to be 
> set to OFFLINE if it is to be removed from DNS answers. When set to OFFLINE, 
> Traffic Ops will drop it from the CrConfig, so naturally it would drop from 
> the configuration. If, however, a Traffic Router is set to ADMIN_DOWN, it 
> remains in the CrConfig and Traffic Router leaves it in the DNS zones because 
> the status is not OFFLINE.
> Ideally, instead of checking if the status is OFFLINE, we would check to see 
> if it's a "positive" status (ONLINE or REPORTED). Any other status should be 
> considered invalid and the Traffic Router should be skipped with regard to 
> DNS.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (TC-189) deliveryservice api doesn't return missLong

2017-03-15 Thread ASF GitHub Bot (JIRA)

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

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

Github user mitchell852 closed the pull request at:

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


> deliveryservice api doesn't return missLong
> ---
>
> Key: TC-189
> URL: https://issues.apache.org/jira/browse/TC-189
> Project: Traffic Control
>  Issue Type: Bug
>  Components: Traffic Ops API
>Affects Versions: 2.0.0
>Reporter: Jeremy Mitchell
>Assignee: Jeremy Mitchell
>Priority: Minor
> Fix For: 2.0.0
>
>
> Instead it returns missLat two times. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] incubator-trafficcontrol pull request #362: [BACKPORT] [TC-189] - fixes 2 mi...

2017-03-15 Thread mitchell852
Github user mitchell852 closed the pull request at:

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


---
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-195) Traffic Router requires status to be set to OFFLINE to remove an active Traffic Router

2017-03-15 Thread Jeff Elsloo (JIRA)
Jeff Elsloo created TC-195:
--

 Summary: Traffic Router requires status to be set to OFFLINE to 
remove an active Traffic Router
 Key: TC-195
 URL: https://issues.apache.org/jira/browse/TC-195
 Project: Traffic Control
  Issue Type: Bug
  Components: Traffic Router
Affects Versions: 2.1.0
Reporter: Jeff Elsloo
Assignee: Jeff Elsloo
Priority: Minor


Traffic Router currently requires the status of a given Traffic Router to be 
set to OFFLINE if it is to be removed from DNS answers. When set to OFFLINE, 
Traffic Ops will drop it from the CrConfig, so naturally it would drop from the 
configuration. If, however, a Traffic Router is set to ADMIN_DOWN, it remains 
in the CrConfig and Traffic Router leaves it in the DNS zones because the 
status is not OFFLINE.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] incubator-trafficcontrol pull request #368: [BACKPORT] - fixes regression - ...

2017-03-15 Thread mitchell852
Github user mitchell852 closed the pull request at:

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


---
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-190) TTL type mismatch in CrConfig

2017-03-15 Thread ASF GitHub Bot (JIRA)

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

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

Github user asfgit closed the pull request at:

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


> TTL type mismatch in CrConfig
> -
>
> Key: TC-190
> URL: https://issues.apache.org/jira/browse/TC-190
> Project: Traffic Control
>  Issue Type: Bug
>  Components: Traffic Ops
>Affects Versions: 2.0.0
>Reporter: David Neuman
>Assignee: David Neuman
> Fix For: 2.0.0, 2.1.0
>
>
> The A and  types in the Config -> ttls section of the CrConfig are a 
> different type than the A and  values in the DeliveryService -> ttls 
> section of the CrConfig.  In the config sections they are strings but in the 
> DS sections they are ints.  Since goTM uses a common struct for TTLs, this 
> causes an parsing the CrConfig in goTM.  The CrConfig should be updated so 
> that the types are consistent.
> ttls in the Config sections:
> "ttls": {
>   "A": "3600",
>   "DNSKEY": "30",
>   "DS": "30",
>   "SOA": "86400",
>   "NS": "3600",
>   "": "3600"
> },
> ttls in the DS section:
>   "ttls": {
> "A": 30,
> "SOA": "86400",
> "NS": "3600",
> "": 30
>   },



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] incubator-trafficcontrol issue #368: [BACKPORT] - fixes regression - unable ...

2017-03-15 Thread limited
Github user limited commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/368
  
merged to 2.0.x, please close


---
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-189) deliveryservice api doesn't return missLong

2017-03-15 Thread ASF GitHub Bot (JIRA)

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

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

Github user limited commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/362
  
merged to 2.0.x please close


> deliveryservice api doesn't return missLong
> ---
>
> Key: TC-189
> URL: https://issues.apache.org/jira/browse/TC-189
> Project: Traffic Control
>  Issue Type: Bug
>  Components: Traffic Ops API
>Affects Versions: 2.0.0
>Reporter: Jeremy Mitchell
>Assignee: Jeremy Mitchell
>Priority: Minor
> Fix For: 2.0.0
>
>
> Instead it returns missLat two times. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] incubator-trafficcontrol issue #358: [BACKPORT] -- This fixes a potential nu...

2017-03-15 Thread limited
Github user limited commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/358
  
merged, please close


---
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 #358: [BACKPORT] -- This fixes a poten...

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

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


---
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 #368: [BACKPORT] - fixes regression - ...

2017-03-15 Thread mitchell852
GitHub user mitchell852 opened a pull request:

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

[BACKPORT] - fixes regression - unable to create federations

(cherry picked from commit 6685b67d373562849e94cda3ee5c4ca630ee57fb)

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

$ git pull https://github.com/mitchell852/incubator-trafficcontrol 
2.0.x_tc-194

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

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


commit 334b0637310992d48f2a99966345d503a1f1ff0f
Author: Jeremy Mitchell 
Date:   2017-03-14T21:16:55Z

name is not a column on the ds table. display_name is however.

(cherry picked from commit 6685b67d373562849e94cda3ee5c4ca630ee57fb)




---
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] [Closed] (TC-179) Add support for client steering/multi-location format response

2017-03-15 Thread Jeff Elsloo (JIRA)

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

Jeff Elsloo closed TC-179.
--

> Add support for client steering/multi-location format response
> --
>
> Key: TC-179
> URL: https://issues.apache.org/jira/browse/TC-179
> Project: Traffic Control
>  Issue Type: New Feature
>  Components: Traffic Router
>Reporter: Jeff Elsloo
>Assignee: Jeff Elsloo
>Priority: Minor
> Fix For: 2.1.0
>
>
> Add support to Traffic Router for client steering/multi-location format 
> responses. The proposed format can be found at the link that follows, plus a 
> few other permutations such as no-302 with the response format.
> https://github.com/PSUdaemon/multi-location



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (TC-184) Tenant Hierarchy

2017-03-15 Thread Nir Sopher (JIRA)

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

Nir Sopher commented on TC-184:
---

Hi Ryan,
I'm currently working on a PR focusing on items 1-4 of the JIRA requirements.
May I make my PR and refer them to this JIRA?
Thanks,
Nir

> Tenant Hierarchy
> 
>
> Key: TC-184
> URL: https://issues.apache.org/jira/browse/TC-184
> Project: Traffic Control
>  Issue Type: New Feature
>  Components: Traffic Ops
>Reporter: Ryan Durfey
>  Labels: Access, Tenancy
>
> Design under discussion here: 
> https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=68715910
> The requirements below are seed requirements and final design guidance should 
> defer to the evolving wiki page discussion referenced above.
> Overview
> The goal of this system is to create a hierarchical tenancy system which is 
> very simple to understand and administer and is highly expandable so that 
> large organizations with many subsidiaries have the flexibility to create 
> child-tenants to their liking.  
> General Seed Requirements
> 1. Provide a structure to create a hierarchy of Tenants where each Tenant has 
> a single parent-Tenant and can have multiple child-Tenants
> 2. Provide the ability to group multiple Delivery Services, Users, and child- 
> Tenants under each Tenant
> 3. Provide the ability to create at least 10 child-Tenant layers within the 
> system
> 4. Make it easy to assign a User to a single Tenant so that they inherit 
> their permissions to all child-Tenants and Delivery Services. 
> 5. Adding child-Tenants or Delivery Services anywhere in an existing tenant 
> hierarchy does not require re-assigning users.  Users inherit pre-defined 
> permissions to new tenants and services added below their assigned layer in 
> the tenancy tree.
> 6. Allow Users  to be assigned multiple Tenants, each with different Roles.  
> While a user would inherit their access to all services and child Tenants 
> below them, they may need more restrictive access further up the Tenant 
> hierarchy or they may want different access to another branch of the tenant 
> tree.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)