New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add curl debug info to debug log #3329
Conversation
@mharvey-jt This suggestion simply uses the normal debug log file for the verbose curl output. It seems somewhat simpler and it is avoiding one more option and file. |
@cernvm-bot cloudtest |
building for cloudtests finished: SUCCESS |
cloudtests finished: FAILURE |
@cernvm-bot cloudtest |
building for cloudtests finished: SUCCESS |
cloudtests finished: FAILURE |
@@ -833,6 +880,10 @@ void DownloadManager::InitializeRequest(JobInfo *info, CURL *handle) { | |||
curl_easy_setopt(handle, CURLOPT_FOLLOWLOCATION, 1); | |||
curl_easy_setopt(handle, CURLOPT_MAXREDIRS, 4); | |||
} | |||
#ifdef DEBUGMSG |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you want for this an extra CVMFS param? curl states on their page that this will create a lot of output and maybe because of that we do not want it as an default debug option?
have you tested if you see the curl verbose output? it is supposed to write to stderr. but in case it doesnt work
we might also need to set: CURLOPT_STDERR
, see here https://stackoverflow.com/questions/49658719/curlopt-verbose-not-working
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The debug log already creates a lot of output, curl does not add orders of magnitude more. sample:
(download) escaped http://cvmfs-stratum-one.cern.ch/cvmfs/cvmfs-config.cern.ch/.cvmfspublished to http://cvmfs-stratum-one.cern.ch/cvmfs/cvmfs-config.cern.ch/.cvmfspublished [07-26-2023 09:54:20 CEST]
(curl) {header/out} GET /cvmfs/cvmfs-config.cern.ch/.cvmfspublished HTTP/1.1^M
Host: cvmfs-stratum-one.cern.ch^M
Accept: */*^M
Connection: Keep-Alive^M
User-Agent: cvmfs Fuse 2.11.0 [07-26-2023 09:54:20 CEST]
(curl) {header/in} HTTP/1.1 200 OK [07-26-2023 09:54:20 CEST]
(curl) {header/in} Server: Apache/2.4.37 (centos) mod_wsgi/4.6.4 Python/3.6 [07-26-2023 09:54:20 CEST]
(curl) {header/in} Accept-Ranges: bytes [07-26-2023 09:54:20 CEST]
(curl) {header/in} Content-Length: 604 [07-26-2023 09:54:20 CEST]
(curl) {header/in} Cache-Control: max-age=61 [07-26-2023 09:54:20 CEST]
(curl) {header/in} Expires: Wed, 26 Jul 2023 07:54:53 GMT [07-26-2023 09:54:20 CEST]
(curl) {header/in} Content-Type: application/x-cvmfs [07-26-2023 09:54:20 CEST]
(curl) {header/in} Age: 28 [07-26-2023 09:54:20 CEST]
(curl) {header/in} Date: Wed, 26 Jul 2023 07:53:52 GMT [07-26-2023 09:54:20 CEST]
(curl) {header/in} X-Cache: HIT from front-lcg04.cern.ch [07-26-2023 09:54:20 CEST]
(curl) {header/in} Via: 1.1 front-lcg04.cern.ch (squid/frontier-squid-5.9-1.1) [07-26-2023 09:54:20 CEST]
(curl) {header/in} Connection: keep-alive [07-26-2023 09:54:20 CEST]
(curl) {header/in} [07-26-2023 09:54:20 CEST]
(curl) {data/in} <snip> [07-26-2023 09:54:20 CEST]
(download) Verify downloaded url /.cvmfspublished, proxy DIRECT (curl error 0) [07-26-2023 09:54:20 CEST]
(cache) remote checksum is 030b27f3680f9943093f538b63e464492140e057 [07-26-2023 09:54:20 CEST]
There's also a benefit to having just one option, I'm in favor of keeping it like this.
Replaces #3146