This bug:
https://issues.infn.it/jira/browse/STOR-779
prevents the proper cleanup of ongoing PtPs on a surl when srmRm is called on that surl on all StoRM versions >= 1.11.5.
This bug will be fixed in StoRM 1.11.8, scheduled for release on Friday, March 13th 2015.
Cleanup the stuck SURLs by hand using the scripts in this GIST.
-
count_busy_surls.sh
: will display the surls that are considered to be 'stuck', i.e. for which there is an ongoing PtP request and there have been other requests resulting in 'SRM_FILE_BUSY'. Note that the script cannot tell if the PtP requests that ended up in 'SRM_FILE_BUSY' are due to the surl being stuck or due to concurrent PtP requests on the same SURL. This will have to be sorted out by the StoRM administrator. -
abort_ptp_by_token.sh
: aborts a PtP given a request token. This script can take the token produced by thecount_busy_surls.sh
as input.
# get the surls that are considered busy/stuck
MYSQL_USER=storm MYSQL_PASSWORD=thepassword sh count_busy_surls.sh > busy_surls.out
# Inspect the output and choose which SURLs to 'unlock'
# The following command, for instance, unlocks all SAM surls
# found in the busy surl list
for t in $(grep SAM busy_surls.out | cut -f1); do \
MYSQL_USER=storm MYSQL_PASSWORD=thepassword sh abort_ptp_by_token.sh $t; \
done