Thanks Thomas, I can see I ran the troubleshooting command twice - I did not
notice the first time it ran it deleted the target entry, hence why no entry in
DB was returned for this entry the second time it was run. What is strange is
why this entry has not been matched when running the rmdir policy previously.
For example, testing against another entry from the target fileclass
[xctrh00:~]$ sudo rbh-report -f test --entryinfo
/work/.lustre_home/research/working/d00/frrj/jtmp/tmp.brIqJIQjaM
Using config file '/etc/robinhood.d/test.conf'.
id : [0x20000e2b4:0x3580:0x0]
parent_id : [0x20000d337:0x322:0x0]
name : tmp.brIqJIQjaM
path updt : 2018/04/11 04:26:56
path :
/work/.lustre_home/research/working/d00/frrj/jtmp/tmp.brIqJIQjaM
depth : 6
dircount : 0
user : medemo
group : mo_users
size : 4.00 KB
spc_used : 4.00 KB
creation : 2016/11/01 11:40:51
last_access : 2017/01/26 15:36:27
last_mod : 2016/11/01 11:40:51
last_mdchange : 2016/11/01 11:40:51
type : dir
mode : rwxr-xr-x
nlink : 2
md updt : 2018/04/11 04:26:56
invalid : no
fileclass : working_empty_dir
class updt : 2018/04/11 04:26:56
When running the rmdir policy the entry is not removed
[xctrh00:~]$ sudo robinhood -f test --run=rmdir --once
Using config file '/etc/robinhood.d/test.conf'.
2018/04/11 13:35:16 @xctrh00[53354/1] CheckFS | '/work' matches mount point
'/work', type=lustre, fs=10.xxx@o2ib:10.xxx@o2ib:/snx11106
2018/04/11 13:35:16 @xctrh00[53354/1] rmdir | Notice: no 'default' policy rule
is defined. Unmatched entries will be ignored.
2018/04/11 13:35:16 @xctrh00[53354/2] rmdir | Checking policy rules for all
2018/04/11 13:35:16 @xctrh00[53354/2] rmdir | Building policy list - last full
FS Scan: 2018/04/11 04:35:37
2018/04/11 13:35:16 @xctrh00[53354/2] rmdir | Starting policy run
<snip>
2018/04/11 13:55:21 @xctrh00[53354/2] rmdir | Policy run summary: time=19min
50s; target=all; 0 successful actions (0.00/sec); volume: 0 (0/sec); 1499995
entries skipped; 0 errors.
2018/04/11 13:55:21 @xctrh00[53354/1] Main | rmdir: policy run terminated (rc =
0).
2018/04/11 13:55:21 @xctrh00[53354/1] Main | All tasks done! Exiting.
But when running the troubleshooting command against the entry it is removed
[xctrh00:~]$ sudo robinhood -f test --run=rmdir --target
file:/work/.lustre_home/research/working/d00/frrj/jtmp/tmp.brIqJIQjaM -l full
-L stderr
<snip>
2018/04/11 14:01:12 @xctrh00[58029/7] Policy | Entry [0x20000e2b4:0x3580:0x0]
matches target file class 'working_empty_dir' of policy 'rmdir_empty'
2018/04/11 14:01:12 @xctrh00[58029/7] rmdir | Entry
/work/.lustre_home/research/working/d00/frrj/jtmp/tmp.brIqJIQjaM matches the
condition for policy rule 'rmdir_empty'.
2018/04/11 14:01:12 @xctrh00[58029/7] rmdir | Executing policy action on:
0x20000e2b4:0x3580:0x0
(/work/.lustre_home/research/working/d00/frrj/jtmp/tmp.brIqJIQjaM)
2018/04/11 14:01:12 @xctrh00[58029/7] rmdir | [0x20000e2b4:0x3580:0x0]:
action_params:
2018/04/11 14:01:12 @xctrh00[58029/7] rmdir | [0x20000e2b4:0x3580:0x0]: action:
common.rmdir
2018/04/11 14:01:12 @xctrh00[58029/7] rmdir | rmdir success for
'/work/.lustre_home/research/working/d00/frrj/jtmp/tmp.brIqJIQjaM', matching
rule 'rmdir_empty' (fileset=working_empty_dir), last_mod 526.1d ago, size=4.00
KB
2018/04/11 14:01:12 @xctrh00[58029/7] ListMgr | SQL query: DELETE
M.*,A.*,I.*,S.* FROM ENTRIES M LEFT JOIN ANNEX_INFO A ON M.id = A.id LEFT JOIN
STRIPE_INFO I ON M.id = I.id LEFT JOIN STRIPE_ITEMS S ON M.id = S.id WHERE
M.id='0x20000e2b4:0x3580:0x0'
2018/04/11 14:01:12 @xctrh00[58029/7] ListMgr | SQL query: DELETE FROM NAMES
WHERE pkn=sha1(CONCAT('0x20000d337:0x322:0x0','/','tmp.brIqJIQjaM')) AND
id='0x20000e2b4:0x3580:0x0'
2018/04/11 14:01:12 @xctrh00[58029/7] rmdir | target: none
2018/04/11 14:01:12 @xctrh00[58029/7] rmdir | done: 1 entries, total volume
4.00 KB (8 blocks)
2018/04/11 14:01:12 @xctrh00[58029/7] rmdir | Policy run summary: time=01s;
target=entry
'/work/.lustre_home/research/working/d00/frrj/jtmp/tmp.brIqJIQjaM'; 1
successful actions (1.00/sec); volume: 4.00 KB (4.00 KB/sec); 0 entries
skipped; 0 errors.
2018/04/11 14:01:12 @xctrh00[58029/7] ListMgr | SQL query: DELETE FROM VARS
WHERE varname ='rmdir_start_current'
2018/04/11 14:01:12 @xctrh00[58029/7] ListMgr | SQL query: DELETE FROM VARS
WHERE varname ='rmdir_trigger_current'
2018/04/11 14:01:12 @xctrh00[58029/7] ListMgr | SQL query: INSERT INTO VARS
(varname,value) VALUES ('rmdir_start','1523455272') ON DUPLICATE KEY UPDATE
value='1523455272'
2018/04/11 14:01:12 @xctrh00[58029/7] ListMgr | SQL query: INSERT INTO VARS
(varname,value) VALUES ('rmdir_end','1523455272') ON DUPLICATE KEY UPDATE
value='1523455272'
2018/04/11 14:01:12 @xctrh00[58029/7] ListMgr | SQL query: INSERT INTO VARS
(varname,value) VALUES ('rmdir_trigger','manual run, target: entry
\'/work/.lustre_home/research/working/d00/frrj/jtmp/tmp.brIqJIQjaM\'') ON
DUPLICATE KEY UPDATE value='manual run, target: entry
\'/work/.lustre_home/research/working/d00/frrj/jtmp/tmp.brIqJIQjaM\''
2018/04/11 14:01:12 @xctrh00[58029/7] ListMgr | SQL query: INSERT INTO VARS
(varname,value) VALUES ('rmdir_status','1 successful actions, volume: 4.00 KB;
0 entries skipped; 0 errors') ON DUPLICATE KEY UPDATE value='1 successful
actions, volume: 4.00 KB; 0 entries skipped; 0 errors'
2018/04/11 14:01:12 @xctrh00[58029/7] ListMgr | Database connection closed
2018/04/11 14:01:12 @xctrh00[58029/7] rmdir | Policy run terminated with status 0
2018/04/11 14:01:12 @xctrh00[58029/1] Main | rmdir: policy run terminated (rc =
0).
2018/04/11 14:01:12 @xctrh00[58029/1] Main | All tasks done! Exiting.
Cheers, Doug
From: Thomas LEIBOVICI (mail perso) [mailto:thomasleibov...@free.fr]
Sent: 09 April 2018 19:36
To: Hayman, Doug <doug.hay...@metoffice.gov.uk>; LEIBOVICI Thomas
<thomas.leibov...@cea.fr>; robinhood-support@lists.sourceforge.net
Subject: Re: [robinhood-support] rmdir policy
Le 09/04/2018 à 15:49, Hayman, Doug wrote:
Checking policy rules for entry
'/work/.lustre_home/research/working/d03/itwl/jtmp/tmp.gjmMLApNvN'
No entry in DB was returned for this entry and the error code is -2 (i.e. No
such file or directory). I think this path doesn't exist.
[https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif]<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
Garanti sans virus.
www.avast.com<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
robinhood-support mailing list
robinhood-support@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/robinhood-support