Skip to content

Draft: Enable curl redirection required for running with cache hierarchy at P1

Joerg Stelzer requested to merge stelzer/athena:24.0-curlredir into 24.0

This is a suggestion how to address the issue that the CrestApi needs to enable redirection for working properly with the Varnish cache. CrestApi developers should decide if this is the best way to enable the redirection and the correct place to add configure the curl object.

Details are in ATDBOPS-362.

It is akin to using curl -L from the command line. On the testbed machines where Varnish is running (e.g. pc-tbed-test-01), the following fails

$ curl -X GET http://localhost:8080/api-v4.0/globaltagmaps/CREST-HLTP-2024-02
<html>
<head><title>308 Permanent Redirect</title></head>
<body>
<center><h1>308 Permanent Redirect</h1></center>
<hr><center>nginx</center>
</body>
</html>

while this works

$ curl -L -X GET http://localhost:8080/api-v4.0/globaltagmaps/CREST-HLTP-2024-02
{"format":"GlobalTagMapSetDto","resources": ...}

Setting CURLOPT_FOLLOWLOCATION to 1 in the CrestApi achieves the same thing for running athena, without it I get

IOVDbSvc                                                          INFO Global tag: CREST-HLTP-2024-02 set from joboptions
cURL request to http://localhost:8080/api-v4.0/globaltagmaps/CREST-HLTP-2024-02
/build/atnight/localbuilds/nightlies/Athena/24.0/athena/Database/IOVDbSvc/src/CrestFunctions.cxx:285: ERROR in CrestClient::findGlobalTagMap | CREST Server response : |308 Permanent Redirect||308 Permanent Redirect|nginx||| Cannot get a global tag map for CREST-HLTP-2024-02

Tagging @nozturk @gunal @formica @mmineev @aleksand @ivukotic @fwinkl

Merge request reports