cea-hpc / robinhood

Robinhood Policy Engine : a versatile tool to monitor filesystem contents and schedule actions on filesystem entries.
http://robinhood.sf.net
Other
177 stars 60 forks source link

lhsm_remove policy with a UUID and a missing FID #95

Open guilbaults opened 6 years ago

guilbaults commented 6 years ago

lhsm_remove policy with a UUID and a missing FID

Currently Robinhood does not seem to support an lhsm_remove policy on a file that was removed from lustre and stored on the HSM backend using a UUID.

Robinhood will issue a lfs hsm_remove to the POSIX path were that file was on Lustre before getting an rm command. Since this path/FID does not exist anymore, the copytool will not be able to extract the UUID from the xattr and will fail.

Posible solutions:

Example:

Robinhood send the equivalent of lfs hsm_remove on a FID that does not exist anymore, it was deleted from Lustre while still having a copy in the HSM backend. robinhood_actions.log:

2018/05/28 10:47:21 [9391/15] lhsm_remove success for '/project/archive/sigui4/test1', matching rule 'default', rm_time 7.2min ago | size=104857600, rm_time=1527518412

The copytool receive the request but can't find the FID to get the UUID from the xattr on the inode, logs from lhsmtool_cmd stdout:

1527518855.378281 lhsmtool_cmd[30344]: Running REMOVE command: '/root/sigui4/env/bin/python3.6 /root/sigui4/ct_tsm.py --remove --fid=[0x200001b73:0x5fc:0x0] --lustre-root=/project' 
[...]
FileNotFoundError: [Errno 2] No such file or directory: b'/project/.lustre/fid/0x200001b73:0x5fc:0x0'

lhsmtool_cmd was patched to add the remove command