Open thiell opened 2 years ago
To help reproducing the issue, could you show what your policy look like? In particular, in which clause the path is matched? And also what command you execute for the policy run? Thx
Apologies for the delay. A policy basically looks either like this:
define_policy checkdv {
status_manager = checker;
scope { type == file }
default_lru_sort_attr = none;
# 'output' stands for previous value in DB
# 7862400 = 90 days + 1 day grace
default_action = cmd("/usr/sbin/rbh_checkdv /fir '{creation_time}' '{output}' 7862400 '{fid}'");
}
checkdv_rules {
# ignore system files
ignore_fileclass = system;
rule default {
condition { (checkdv.last_check == 0 or checkdv.output == "") and creation > 2d and
(ost_index == 0 or
ost_index == 1 or
ost_index == 2 or
ost_index == 3 or
ost_index == 4 or
ost_index == 5 or
ost_index == 6 or
ost_index == 7 or
ost_index == 8 or
ost_index == 9 or
ost_index == 10 or
ost_index == 11) }
}
}
checkdv_parameters {
db_result_size_max = 262144;
queue_size = 65536;
nb_threads = 8;
reschedule_delay_ms = 0;
recheck_ignored_entries = no;
report_interval = 1min;
pre_sched_match = none;
post_sched_match = force_update;
}
...or like that:
define_policy checkdv {
status_manager = checker;
scope { type == file }
default_lru_sort_attr = creation; #oldest first
# 'output' stands for previous value in DB
# 7862400 = 90 days + 1 day grace
default_action = cmd("/usr/sbin/rbh_checkdv /fir '{creation_time}' '{output}' 7862400 '{fid}'");
}
checkdv_rules {
# ignore system files
ignore_fileclass = system;
rule default {
condition { checkdv.output != "" and creation > 90d and checkdv.last_check > 2d and
(ost_index == 0 or
ost_index == 1 or
ost_index == 2 or
ost_index == 3 or
ost_index == 4 or
ost_index == 5 or
ost_index == 6 or
ost_index == 7 or
ost_index == 8 or
ost_index == 9 or
ost_index == 10 or
ost_index == 11) }
}
}
checkdv_parameters {
db_result_size_max = 1000000000; #no pagination? if not big enough we might never reach some entries
queue_size = 131072;
nb_threads = 8;
reschedule_delay_ms = 0;
recheck_ignored_entries = no;
report_interval = 1min;
pre_sched_match = none;
post_sched_match = force_update;
}
So I believe fullpath is only used as part of this fileclass:
FileClass system {
definition { tree == "/fir/.*" }
}
But TBH we have made quite some changes since I opened this ticket so these differ a little bit from the original policy. I will try to test a little bit more when possible. But in any case, it seems to work fine with post_sched_match = force_update;
.
We've been investigating what could cause the following errors for existing files when using
post_sched_match = auto_update;
(the default):This has also been reported by others on the mailing list I believe.
When running the policy, we have a few occurrences per minute, so it's not insignificant.
We checked the errors with multiple FIDs, and every time, the path is OK in the DB, like for this one:
However, full logs show that the path is not resolved when the policy is run (example with another FID
0x2000523b3:0x1a:0x0
):It looks like if we set
post_sched_match = force_update;
, the error goes away. It's our current workaround, but I'm worried it will slow down the policy (testing now...).I'm suspecting an issue in
src/policies/policy_run.c:check_entry()
, when the path is updated:Any idea? :) Thx