dcache icon indicating copy to clipboard operation
dcache copied to clipboard

chimera: cannot delete a sym-link if target is missing

Open paulmillar opened this issue 4 years ago • 0 comments

Although often unintended: tt is perfectly valid for a symbolic link to "dangle"; i.e., for the link to point to a target that does not exist. Creating the sym-link's target (an independent operation) will result in that symbolic link no longer dangling.

Currently, it is not possible to delete a dangling symbolic link. Attempts to delete such sym-links result in an error indicating that the sym-linik does not exist. The precise form of the error depends on the door, but here is an example:

paul@sprocket:~$ curl -k -u paul:password -X DELETE https://localhost:2881/public/sym-link
Path not found: /public/sym-link
paul@sprocket:~$ 

The same is true when attempting to delete the sym-link through the chimera shell:

chimera:/public# rm sym-link
path [sym-link] does not exist
chimera:/public# 

This problem is not present when dCache is NFS-mounted:

paul@sprocket:/mnt/public$ rm sym-link
paul@sprocket:/mnt/public$ 

Therefore: NFS-mounting dCache provides one possible work-around.

Creating a temporary file (so that the sym-link is no longer dangling) provides a work-around for the chimera shell:

chimera:/public# rm sym-link
chimera:/public# 

but (unfortunately) doesn't work for doors, as it leads to the following error:

paul@sprocket:~$ curl -k -u paul:password -X DELETE https://localhost:2881/public/sym-link
Internal problem: PNFSID does not correspond to provided file.
paul@sprocket:~$ 

paulmillar avatar Sep 27 '21 08:09 paulmillar