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

attribute is missing for checking fileset for all fileclasses #94

Closed bp85 closed 6 months ago

bp85 commented 6 years ago

Hi, we're using robinhood-3.1.1 with lustre 2.8 we've defined fileclasses as below

fileclass largedir {
    definition { type == directory and dircount > 30000 }
}
fileclass rc_files {
    Definition { tree == "/n/scratch2/rc" }
}

when running policies we're seeing multiple errors like

Policy | [0x20003217c:0x1b06c:0x0]: attribute is missing for checking fileset 'rc_files'
Policy | [0x200000bd0:0x3:0x0]: attribute is missing for checking fileset 'largedir'

This is very annoying and we can't use fileclass definitions to run policies

Any help would be appreciated

dnhodgson commented 6 years ago

Can you do a rbh-report -e <fid> on one of the IDs that it's throwing an error for? Also look at one that it doesn't error for and see if there is a difference...

bp85 commented 6 years ago

for the one that's showing error it's not printing any data other than id

[root@robinhood ~]# rbh-report -e 0x200032291:0x1231e:0x0 
Using config file '/etc/robinhood.d/scratch2.conf'.
id             :    [0x200032291:0x1231e:0x0]

where as for non-error ones it's printing much more data

[root@robinhood ~]# rbh-report -e 0x20002020c:0x16b7b:0x0
Using config file '/etc/robinhood.d/scratch2.conf'.
id             :    [0x20002020c:0x16b7b:0x0]
parent_id      :    [0x20002020c:0x37d3:0x0]
name           :    1LWO_A_14_SEP
path updt      :    2018/05/10 19:39:45
path           :    /n/scratch2/affinityDatasets/VDS1/database/data/split/1LWO_A_14_SEP
depth          :    8
dircount       :    2
avgsize        :    6.18 KB
user           :    xl198
group          :    xl198
size           :    4.00 KB
spc_used       :    4.00 KB
creation       :    2017/11/06 11:42:22
last_access    :    2018/05/03 17:21:21
last_mod       :    2017/11/06 11:42:22
last_mdchange  :    2017/11/06 11:42:22
type           :    dir
mode           :    rwxrwxr-x
nlink          :    2
md updt        :    2018/05/11 12:35:34
invalid        :    no
fileclass      :    
class updt     :    2018/05/11 12:35:34
alert.last_check:   0
alert.last_alert:   0
dnhodgson commented 6 years ago

can you select everything from the NAMES and ENTRIES tables about the missing ID? Maybe see what's in the database about this file? You can also try to see if rbh-find 0x200032291:0x1231e:0x0 gets you anything. It should return the file path.

When was the last time a full scan was done? Maybe the database is out of sync with the filesystem?

bp85 commented 6 years ago

DB return emptyset from both tables and rbh-find says no such file or directory The last FS-Scan was done this morning, so DB isn't out of date. Dumb question is, if a file is deleted when policy is trying to apply on that file what happens? I mean if a file is trying to match for a fileclass and it's deleted, what error it produce?