trafficcontrol icon indicating copy to clipboard operation
trafficcontrol copied to clipboard

Fix Cache Config Generation for UrlSig to add necessary Parameters if they don't exist.

Open rob05c opened this issue 4 years ago • 0 comments

Currently, if magic Parameters for URLSig don't exist, url_sig.so and remap.config will fail to reload. At least error_url, possibly also excl_regex and sig_anchor = urlsig.

We should make the Cache Config Generation for URLSig insert these necessary strings if they don't exist, and log a warning.

One DS should never be able to cause the CDN to fail, or fail to load new config. We could also remove the DS line from remap.config. But most users probably don't care about the parameters, it's easy enough to add them to make the DS succeed.

Generation code is here: https://github.com/apache/trafficcontrol/blob/master/lib/go-atscfg/urlsigconfig.go

I'm submitting a ...

  • improvement request (usability, performance, tech debt, etc.)

Traffic Control components affected ...

  • Traffic Ops ORT

Current behavior:

Creating a Delivery Service with URLSig without magic Parameters will cause remap.config to fail to load.

New behavior:

Creating a Delivery Service with URLSig without magic Parameters will cause config generation to insert necessary parameters in url_sig_dsname.config, so remap.config loads and the Delivery Service works.

Minimal reproduction of the problem with instructions:

Create a Delivery Service with URLSig without magic Parameters.

Anything else:

rob05c avatar May 26 '21 22:05 rob05c