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

improve error handling on getoutput #5305

Open
belforte opened this issue Apr 26, 2024 · 1 comment
Open

improve error handling on getoutput #5305

belforte opened this issue Apr 26, 2024 · 1 comment
Assignees

Comments

@belforte
Copy link
Member

a spurios "failed to retrieve file" is generated when gfal_copy contains a line with the error string

line.find("error") != -1 or line.find("Failed") != -1 or \

even if the message was harmless and transfer worked OK. E.g.

TLS: Unable to create TLS context; invalid private key.
TLS: 47882433451776:error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch:crypto/x509/x509_cmp.c:303:

see dmwm/CRABServer#8357

It is better to rely on gfal-copy exit code first. And only parse stderr in case of failure so somehow translate known messages into more clear error categories.

relevant code is in

error = simpleOutputCheck(stderr)
logger.debug("Finish executing for file %s" % fileid)
if returncode != 0 or len(error) > 0:
logger.info("%sWarning%s: Failed retrieving %s" % (colors.RED, colors.NORMAL, fileid))
#logger.debug(colors.RED +"Stderr: %s " %stderr+ colors.NORMAL)

def simpleOutputCheck(outlines):

@belforte belforte self-assigned this Apr 26, 2024
@belforte
Copy link
Member Author

Not very urgent since so far the spurious TLS error only appear when running in Jenkins nodes. But it indicates a fragility

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant