apache / trafficcontrol

Apache Traffic Control is an Open Source implementation of a Content Delivery Network
https://trafficcontrol.apache.org/
Apache License 2.0
1.06k stars 340 forks source link

Feature: UI elements to delete active invalidation rules & queue revalidations #2030

Open MattMills opened 6 years ago

MattMills commented 6 years ago

There is currently no mechanism to delete active invalidation rules or to queue revalidations across a CDN. These UI elements should be added so that when a disruptive invalidation rule is added.

This has additional priority as there is an existing bug in ATS that re-applies every open invalidation any time a new one is added.

mitchell852 commented 6 years ago

I think this would require 2 things:

  1. A new API endpoint like POST /api/1.3/cdns/:id/queue_revalidate to queue revalidations (set reval_pending=1) for all servers for a given CDN

I suppose this endpoint would be limited to the Operations or Admin role?

Question: Is there any need to "unqueue revalidations". I'm thinking probably not.

  1. Create a DELETE /api/1.3/jobs/:id API endpoint

This endpoint would probably require the Portal role and need to check tenancy to ensure that someone isn't trying to delete a job associated with a delivery service outside their tenancy.

regex_revalidate.config file is built from the job table so deleting a job is how you clear things from regex_revalidate.config as far as I can tell.

https://github.com/apache/incubator-trafficcontrol/blob/master/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm#L1714

Question: Should deleting a job automatically set reval_pending=1 for all servers of the CDN that the DS belongs to? The opposite is currently true - creating a job, sets reval_pending=1 for all servers of the CDN that the DS belongs to.

MattMills commented 6 years ago

Question: Is there any need to "unqueue revalidations". I'm thinking probably not.

No, it fires too quickly anyway.

Question: Should deleting a job automatically set reval_pending=1 for all servers of the CDN that the DS belongs to? The opposite is currently true - creating a job, sets reval_pending=1 for all servers of the CDN that the DS belongs to.

I think that makes sense logically... but with the current ATS bug that can cause older rules to get re-applied I think I'd like to not happen right now.

mitchell852 commented 6 years ago

looks like #1867 takes care of the ability to delete invalidate content jobs...