-
Notifications
You must be signed in to change notification settings - Fork 36
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
CRABRestInterface parses curl stdout and stderr at same time #5159
Comments
the It was a tricky point. And I am afraid we need to revisit. |
rats !! this happens also on tasks on production server using production client like
increasing priority :-( |
I am of course pretty sure that in the past we had "sane outputs from crab status" also when DBS was returning HTTP 502. So is this maybe really due to change in TW ? |
hmm... the cmsbot example above was from crab-dev-tw01 where message is truncated to 7500 char. Also the truncate message is in any case added to the message, would not override the reporting of HTTP 502 at the beginning which is the problem here. I am puzzled. |
if I remove the
|
It really looks like TW used to upload a much more terse message :-( |
FWIW, the message in #5159 (comment) is "only" 7003 char long (from the DB, i.e. measured at
|
a quick test indicates that truncating message at 1K char is plenty. |
hmm... maybe WMCore changed and now reports the full http details instead of only one line like |
Dario and myself debugged this. The change is not due to WMCore, but to new DBSClient which prints a new exception message which (besides being too long dmwm/DBSClient#68 ) contains the text from the http header |
We have deployed a patched TaskWorker which does not upload such messages anymore. It replaces
|
I am inclined to do the following:
@mapellidario I welcome your opinion |
in CRABRestInerface the output of curl is piped to stderr,
this makes the code wrongly assume that the call to serve failed if the output contains a string reporting an HTTP error, like when task submission failed due to an HTTP error in TaskWorker.
In following example task submission failed with the "typical" proxy error 502
tm_task_failure | Problem handling 220317_170502:cmsbot_crab_outLFNDirBase because of DBSReaderError Message: Can't contact DBS at https://cmsweb-prod.cern.ch/dbs/prod/global/DBSReader, got errors Instantiating DBS3Reader failed with HTTP Error 502: URL=https://cmsweb-prod.cern.ch:8443/dbs/prod/global/DBSReader/serverinfo Code=502 Message=Proxy Error Header=HTTP/1.1 502 Proxy Error Date: Thu, 17 Mar 2022 17:14:10 GMT Server: Apache Content-Length: 497 Content-Type: text/html; charset=iso-8859-1 Body= Proxy Error The proxy server received an invalid response from an upstream server. The proxy server could not handle the request GET /auth/complete/dbs/prod/global/DBSReader/serverinfo.
but crab status just prints:
problematic code is (I believe)
CRABClient/src/python/CRABClient/CrabRestInterface.py
Lines 200 to 208 in 37caaf2
combined with
CRABClient/src/python/CRABClient/CrabRestInterface.py
Lines 58 to 79 in 37caaf2
I am surprised that this did not appear earlier. Maybe it is another side effect of new message handling in REST (the b64 saga) ? the message is 11.8K characters, maybe earlier it was truncated and this made it formatted in such a way not to tool
parseResponseHeader
?In any case we should not mix HTTP Header and Body in this way, need to understand why we have
|tee /dev/stderr
inCRABClient/src/python/CRABClient/CrabRestInterface.py
Line 200 in 37caaf2
The text was updated successfully, but these errors were encountered: