dCache/dcache — pull request #897 by gbehrmann (2014-10-13 06:33:56+00:00)
Title: srm-client: Output file level errors for sync requests

srm clients fail to output file level error information if the initial srmPrepareToPut,
srmPrepareToGet or srmCopy request fails. This would be the common way for synchroneous
process to fail. Originally these requests were always asynchronous and this problem
was not visible to the client.

This patch fixes this for srmCopy, srmPrepareToGet and srmPrepareToPut.

Without the patch one could observe:

Gerds-MacBook-Pro:dcache-git behrmann$ srmcp file:////bin/bash srm://localhost/private/test2
srm copy of at least one file failed or not completed
srm client error:
java.io.IOException: srmPrepareToPut submission failed, unexpected or failed status : SRM_FAILURE explanation= File requests have failed.

with the patch one now gets:

Gerds-MacBook-Pro:dcache-git behrmann$ srmcp file:////bin/bash srm://localhost/private/test2
Fri Oct 10 13:35:55 CEST 2014: retrieval of surl srm://localhost/private/test2 failed, status = SRM_AUTHORIZATION_FAILURE explanation=Access denied: /private/test2
srm copy of at least one file failed or not completed

Target: trunk
Request: 2.10
Require-notes: yes
Require-book: no
Acked-by: Christian Bernardt
Acked-by: Paul Millar
Patch: https://rb.dcache.org/r/7349/
(cherry picked from commit d88a98be54eaa96a71b3b7ad9348c6067151976c)