Skip to content
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

Merged
merged 8 commits into from Jul 26, 2023
Merged

Add curl debug info to debug log #3329

merged 8 commits into from Jul 26, 2023

Conversation

jblomer
Copy link
Member

@jblomer jblomer commented Jul 17, 2023

Replaces #3146

@jblomer
Copy link
Member Author

jblomer commented Jul 17, 2023

@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.

@jblomer
Copy link
Member Author

jblomer commented Jul 17, 2023

@cernvm-bot cloudtest

@jblomer jblomer self-assigned this Jul 17, 2023
@cernvm-bot
Copy link
Collaborator

building for cloudtests finished: SUCCESS
https://lcgapp-services.cern.ch/cvmfs-jenkins/job/CvmfsFullBuildDocker/3979/

@cernvm-bot
Copy link
Collaborator

@vvolkl
Copy link
Contributor

vvolkl commented Jul 25, 2023

@cernvm-bot cloudtest

@cernvm-bot
Copy link
Collaborator

building for cloudtests finished: SUCCESS
https://lcgapp-services.cern.ch/cvmfs-jenkins/job/CvmfsFullBuildDocker/4007/

@cernvm-bot
Copy link
Collaborator

@@ -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
Copy link
Contributor

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

Copy link
Contributor

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.

@vvolkl vvolkl merged commit b21405e into devel Jul 26, 2023
4 of 5 checks passed
@vvolkl vvolkl deleted the fix-3146 branch July 26, 2023 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants