DIRACGrid/DIRAC — Issue #472: ReplicaManager: removing files fails when not in one of the catalogs
Author: sposs
Created: 2012-02-02 09:15:03+00:00
State: open

When using 2 catalogs, and they are not synchronized, removing a file does remove the PFN, but the LFN stays in:
>>> rm.removeFile("/ilc/user/s/sposs/ttbar_dst_4.slcio")
ReplicaManager.__removePhysicalReplica: Successfully issued accounting removal request.
StorageElement.getPfnForProtocol: Requested protocol not available for SE. DIP for IN2P3-SRM
ReplicaManager.__removeCatalogReplica: Removed 1 replicas
ReplicaManager.__removeCatalogReplica: Failed to remove replica. /ilc/user/s/sposs/ttbar_dst_4.slcio {'LcgFileCatalog': 'No such file or directory'}
{'OK': True, 'Value': {'Successful': {}, 'Failed': {'/ilc/user/s/sposs/ttbar_dst_4.slcio': " {'LcgFileCatalog': 'No such file or directory'}"}}}
>>> rm.getReplicas("/ilc/user/s/sposs/ttbar_dst_4.slcio")
{'OK': True, 'Value': {'Successful': {'/ilc/user/s/sposs/ttbar_dst_4.slcio': {}}, 'Failed': {}}}

In the CLI I get this:
FC:/> ls /ilc/user/s/sposs/ttbar_dst_4.slcio
-rwxrwxr-x 0 sposs ilc_user 36046424 2011-05-06 18:58:14 ttbar_dst_4.slcio

But recalling removeFile does the job:
>>> rm.removeFile("/ilc/user/s/sposs/ttbar_dst_4.slcio")
{'OK': True, 'Value': {'Successful': {'/ilc/user/s/sposs/ttbar_dst_4.slcio': {'LcgFileCatalog': True, 'FileCatalog': True}}, 'Failed': {}}}
>>> rm.getReplicas("/ilc/user/s/sposs/ttbar_dst_4.slcio")
{'OK': True, 'Value': {'Successful': {}, 'Failed': {'/ilc/user/s/sposs/ttbar_dst_4.slcio': 'No such file or directory'}}}

So one needs 2 calls to removeFile to get the job done.