Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
srm: Add safe-guard against invalid file ID in put requests
Motivation: When aborting an upload, the SRM sends an abort upload request to PnfsManager and PnfsManager will delete the temporary upload directory and all files it contains. The SRM tracks the temporary upload path in the fileid field of the putfilerequests table. If this field contains a value different from a regular path, either because it was changed outside of dCache, or it contains entries from a very old version of dCache (which stored PNFS IDs in that field), then bad things happen: Due to another bug in dCache, the parent directory of a relative simple relative path like "foo" becomes the root, which would be the directory PnfsManager deletes recursively. Modification: Add a simple check to SRM to only submit a cancel request to PnfsManager if the field looks like an absolute file system path. Result: Fixed a potential data loss scenario in case of corrupted or very old SRM database entries. Target: trunk Request: 2.14 Request: 2.13 Request: 2.12 Request: 2.11 Request: 2.10 Require-notes: yes Require-book: no Acked-by: Paul Millar <paul.millar@desy.de> Acked-by: Dmitry Litvintsev <litvinse@fnal.gov> Patch: https://rb.dcache.org/r/9023/ (cherry picked from commit 8d2056e)
- Loading branch information