[GitHub] incubator-trafficcontrol pull request #733: Add ability to copy url sig keys...
Github user asfgit closed the pull request at: https://github.com/apache/incubator-trafficcontrol/pull/733 --- 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-336) Add ability to copy url_sig keys from one DS to another GH #1540
[ https://issues.apache.org/jira/browse/TC-336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16110907#comment-16110907 ] ASF GitHub Bot commented on TC-336: --- Github user asfgit closed the pull request at: https://github.com/apache/incubator-trafficcontrol/pull/733 > Add ability to copy url_sig keys from one DS to another GH #1540 > > > Key: TC-336 > URL: https://issues.apache.org/jira/browse/TC-336 > Project: Traffic Control > Issue Type: Improvement > Components: Traffic Ops, Traffic Vault >Reporter: Dewayne Richardson >Assignee: Dylan Volz >Priority: Minor > Labels: keys, url_signing > > There are some cases where we want to use the same URL sig keys for multiple > delivery services. Currently this is handled by using cURL and other manual > processes. Traffic Ops should support the ability to copy url sig keys from > one DS to another. When this happens Traffic Ops should also create the > necessary parameters for the target DS so that URL signing works. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[GitHub] incubator-trafficcontrol pull request #729: Traffic Ops Golang Incremental R...
Github user alficles commented on a diff in the pull request: https://github.com/apache/incubator-trafficcontrol/pull/729#discussion_r13009 --- Diff: traffic_ops/install/bin/_postinstall --- @@ -183,6 +183,22 @@ sub generateDbConf { return \%todbconf; --- End diff -- Did you intend to strip execute permissions from this? --- 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 #729: Traffic Ops Golang Incremental R...
Github user rob05c commented on a diff in the pull request: https://github.com/apache/incubator-trafficcontrol/pull/729#discussion_r130890812 --- Diff: traffic_ops/install/bin/_postinstall --- @@ -183,6 +183,22 @@ sub generateDbConf { return \%todbconf; --- End diff -- Fixed. --- 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 #751: [TC-462] Ds tenancy validation r...
Github user mitchell852 commented on a diff in the pull request: https://github.com/apache/incubator-trafficcontrol/pull/751#discussion_r130975670 --- Diff: traffic_ops/app/lib/API/DeliveryServiceRegexes.pm --- @@ -222,6 +262,18 @@ sub delete { return $self->forbidden(); } + my $ds = $self->db->resultset('Deliveryservice')->find( { id => $ds_id } ); + if ( !defined($ds) ) { + #allow deletion if the ds is not valid --- End diff -- can you make this change? this doesn't make sense to me. if the ds doesn't exist, don't worry about deleting ds regexes...just throw a not_found() --- 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-462) Delivery-service tenancy based access control - Regexes
[ https://issues.apache.org/jira/browse/TC-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16111625#comment-16111625 ] ASF GitHub Bot commented on TC-462: --- Github user mitchell852 commented on a diff in the pull request: https://github.com/apache/incubator-trafficcontrol/pull/751#discussion_r130975670 --- Diff: traffic_ops/app/lib/API/DeliveryServiceRegexes.pm --- @@ -222,6 +262,18 @@ sub delete { return $self->forbidden(); } + my $ds = $self->db->resultset('Deliveryservice')->find( { id => $ds_id } ); + if ( !defined($ds) ) { + #allow deletion if the ds is not valid --- End diff -- can you make this change? this doesn't make sense to me. if the ds doesn't exist, don't worry about deleting ds regexes...just throw a not_found() > Delivery-service tenancy based access control - Regexes > --- > > Key: TC-462 > URL: https://issues.apache.org/jira/browse/TC-462 > Project: Traffic Control > Issue Type: Improvement > Components: Traffic Ops >Reporter: Nir Sopher > > We have recently added "tenancy" to the project. > With tenancy, every resource have a tenant, where resource can be a > delivery-service, a server (future) and even a user. > We are now starting to enforce access-control based on the resource tenancy. > A user can manage a resource only if the resource is under the user tenancy. > This JIRA deals with another step of "delivery-service as a resource" - > enforcing via the API access control on DS regexes. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[GitHub] incubator-trafficcontrol pull request #751: [TC-462] Ds tenancy validation r...
Github user nir-sopher commented on a diff in the pull request: https://github.com/apache/incubator-trafficcontrol/pull/751#discussion_r130981656 --- Diff: traffic_ops/app/lib/API/DeliveryServiceRegexes.pm --- @@ -222,6 +262,18 @@ sub delete { return $self->forbidden(); } + my $ds = $self->db->resultset('Deliveryservice')->find( { id => $ds_id } ); + if ( !defined($ds) ) { + #allow deletion if the ds is not valid --- End diff -- 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] [Commented] (TC-462) Delivery-service tenancy based access control - Regexes
[ https://issues.apache.org/jira/browse/TC-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16111647#comment-16111647 ] ASF GitHub Bot commented on TC-462: --- Github user nir-sopher commented on a diff in the pull request: https://github.com/apache/incubator-trafficcontrol/pull/751#discussion_r130981656 --- Diff: traffic_ops/app/lib/API/DeliveryServiceRegexes.pm --- @@ -222,6 +262,18 @@ sub delete { return $self->forbidden(); } + my $ds = $self->db->resultset('Deliveryservice')->find( { id => $ds_id } ); + if ( !defined($ds) ) { + #allow deletion if the ds is not valid --- End diff -- done > Delivery-service tenancy based access control - Regexes > --- > > Key: TC-462 > URL: https://issues.apache.org/jira/browse/TC-462 > Project: Traffic Control > Issue Type: Improvement > Components: Traffic Ops >Reporter: Nir Sopher > > We have recently added "tenancy" to the project. > With tenancy, every resource have a tenant, where resource can be a > delivery-service, a server (future) and even a user. > We are now starting to enforce access-control based on the resource tenancy. > A user can manage a resource only if the resource is under the user tenancy. > This JIRA deals with another step of "delivery-service as a resource" - > enforcing via the API access control on DS regexes. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Created] (TC-494) Clone DS assignments button on Server times out
Matt Mills created TC-494: - Summary: Clone DS assignments button on Server times out Key: TC-494 URL: https://issues.apache.org/jira/browse/TC-494 Project: Traffic Control Issue Type: Bug Components: Traffic Ops API Affects Versions: 2.1.0 Reporter: Matt Mills When you try to clone DS assignments in our current production environment, it will never complete the "clone" process, and gets timed out midway through, leaving you with a broken configuration on that server. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[GitHub] incubator-trafficcontrol pull request #752: [TC-460] Ds tenancy validation s...
Github user asfgit closed the pull request at: https://github.com/apache/incubator-trafficcontrol/pull/752 --- 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-460) Delivery-service tenancy based access control - DS/Server Assignment
[ https://issues.apache.org/jira/browse/TC-460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16111692#comment-16111692 ] ASF GitHub Bot commented on TC-460: --- Github user asfgit closed the pull request at: https://github.com/apache/incubator-trafficcontrol/pull/752 > Delivery-service tenancy based access control - DS/Server Assignment > > > Key: TC-460 > URL: https://issues.apache.org/jira/browse/TC-460 > Project: Traffic Control > Issue Type: Improvement > Components: Traffic Ops >Reporter: Nir Sopher > > We have recently added "tenancy" to the project. > With tenancy, every resource have a tenant, where resource can be a > delivery-service, a server (future) and even a user. > We are now starting to enforce access-control based on the resource tenancy. > A user can manage a resource only if the resource is under the user tenancy. > This JIRA deals with another step of "delivery-service as a resource" - > enforcing via the API access control on DS assignment to servers. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Assigned] (TC-494) Clone DS assignments button on Server times out
[ https://issues.apache.org/jira/browse/TC-494?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dylan Volz reassigned TC-494: - Assignee: Dylan Volz > Clone DS assignments button on Server times out > --- > > Key: TC-494 > URL: https://issues.apache.org/jira/browse/TC-494 > Project: Traffic Control > Issue Type: Bug > Components: Traffic Ops API >Affects Versions: 2.1.0 >Reporter: Matt Mills >Assignee: Dylan Volz > > When you try to clone DS assignments in our current production environment, > it will never complete the "clone" process, and gets timed out midway > through, leaving you with a broken configuration on that server. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[GitHub] incubator-trafficcontrol issue #768: Tenant parent - on delete cascade
Github user dewrich commented on the issue: https://github.com/apache/incubator-trafficcontrol/pull/768 @nir-sopher I think your first option `1. Write a custom "delete all tenants" function, to be used in tear-down. The function will delete the tenants in the correct order.` is best. Cascading Deletes is a scary function, especially when it takes a lot of work to setup the data. --- 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 #758: [TC-478] Parameter value can be ...
Github user mitchell852 commented on a diff in the pull request: https://github.com/apache/incubator-trafficcontrol/pull/758#discussion_r131001497 --- Diff: traffic_ops/app/lib/API/Parameter.pm --- @@ -317,7 +317,7 @@ sub update { my $name = $params->{name} || $find->name; my $configFile = $params->{configFile} || $find->config_file; -my $value = $params->{value} || $find->value; +my $value = exists($params->{value}) ? $params->{value} : $find->value; --- End diff -- what does this allow you to do? to set the parameter value to null? is that what you want to do? it sounds like by the name of the PR you want to set a parameter value to 0...but parameter values are strings so can you set the value to "0" without this change? and is that sufficient? --- 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-478) Parameter value cannot be set to "0" using the parameters crud API
[ https://issues.apache.org/jira/browse/TC-478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16111751#comment-16111751 ] ASF GitHub Bot commented on TC-478: --- Github user mitchell852 commented on a diff in the pull request: https://github.com/apache/incubator-trafficcontrol/pull/758#discussion_r131001497 --- Diff: traffic_ops/app/lib/API/Parameter.pm --- @@ -317,7 +317,7 @@ sub update { my $name = $params->{name} || $find->name; my $configFile = $params->{configFile} || $find->config_file; -my $value = $params->{value} || $find->value; +my $value = exists($params->{value}) ? $params->{value} : $find->value; --- End diff -- what does this allow you to do? to set the parameter value to null? is that what you want to do? it sounds like by the name of the PR you want to set a parameter value to 0...but parameter values are strings so can you set the value to "0" without this change? and is that sufficient? > Parameter value cannot be set to "0" using the parameters crud API > -- > > Key: TC-478 > URL: https://issues.apache.org/jira/browse/TC-478 > Project: Traffic Control > Issue Type: Bug > Components: Traffic Ops API >Affects Versions: 2.1.0 >Reporter: Nir Sopher > > Example: > Having a parameter with value=="1" > Trying to "PUT" a value of "0" in this parameter. > The value of the parameter stays "1". -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TC-494) Clone DS assignments button on Server times out
[ https://issues.apache.org/jira/browse/TC-494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16111766#comment-16111766 ] Dylan Volz commented on TC-494: --- Initial investigation: the update in question makes 9600+ separate db queries for the clone. the majority of these come from the 3 calls to very similar methods in a loop over affected DSes: &UI::DeliveryService::header_rewrite &UI::DeliveryService::regex_remap &UI::DeliveryService::cacheurl Since all 3 use an almost identical logic pattern a simple rewrite to make a combined method could help lower the multiplier but I am not sure, without testing, how much this would move the needle. I think a more significant refactor may be needed to remove loops with db calls contained within and perhaps looking at changing our use of DBI to batch better. The other issue surfaced by this ticket is that since hypnotoad kills the worker that is blocked on IO the server assignments are broken since the delete goes first, again a refactor for transactions could be needed. This all said this seems like a strong candidate for a method to rewrite in golang pending: https://github.com/apache/incubator-trafficcontrol/pull/729 . > Clone DS assignments button on Server times out > --- > > Key: TC-494 > URL: https://issues.apache.org/jira/browse/TC-494 > Project: Traffic Control > Issue Type: Bug > Components: Traffic Ops API >Affects Versions: 2.1.0 >Reporter: Matt Mills >Assignee: Dylan Volz > > When you try to clone DS assignments in our current production environment, > it will never complete the "clone" process, and gets timed out midway > through, leaving you with a broken configuration on that server. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TC-478) Parameter value cannot be set to "0" using the parameters crud API
[ https://issues.apache.org/jira/browse/TC-478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16112294#comment-16112294 ] ASF GitHub Bot commented on TC-478: --- Github user nir-sopher commented on a diff in the pull request: https://github.com/apache/incubator-trafficcontrol/pull/758#discussion_r131065694 --- Diff: traffic_ops/app/lib/API/Parameter.pm --- @@ -317,7 +317,7 @@ sub update { my $name = $params->{name} || $find->name; my $configFile = $params->{configFile} || $find->config_file; -my $value = $params->{value} || $find->value; +my $value = exists($params->{value}) ? $params->{value} : $find->value; --- End diff -- I would like to allow to set the value to 0. **Apparently in Perl the string "0" is equivalent to False** See http://www.perlmonks.org/?node=what%20is%20true%20and%20false%20in%20Perl%3F I can replace the "exists" with "defined" if you prefer. I believe that logically "exists"is better, but it really does not matter for this case > Parameter value cannot be set to "0" using the parameters crud API > -- > > Key: TC-478 > URL: https://issues.apache.org/jira/browse/TC-478 > Project: Traffic Control > Issue Type: Bug > Components: Traffic Ops API >Affects Versions: 2.1.0 >Reporter: Nir Sopher > > Example: > Having a parameter with value=="1" > Trying to "PUT" a value of "0" in this parameter. > The value of the parameter stays "1". -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[GitHub] incubator-trafficcontrol pull request #758: [TC-478] Parameter value can be ...
Github user nir-sopher commented on a diff in the pull request: https://github.com/apache/incubator-trafficcontrol/pull/758#discussion_r131065694 --- Diff: traffic_ops/app/lib/API/Parameter.pm --- @@ -317,7 +317,7 @@ sub update { my $name = $params->{name} || $find->name; my $configFile = $params->{configFile} || $find->config_file; -my $value = $params->{value} || $find->value; +my $value = exists($params->{value}) ? $params->{value} : $find->value; --- End diff -- I would like to allow to set the value to 0. **Apparently in Perl the string "0" is equivalent to False** See http://www.perlmonks.org/?node=what%20is%20true%20and%20false%20in%20Perl%3F I can replace the "exists" with "defined" if you prefer. I believe that logically "exists"is better, but it really does not matter for this case --- 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. ---