@@ -1236,7 +1236,7 @@ class NCLifecycle {
12361236 const { bucket_rule_id, in_bucket_path, in_bucket_internal_dir } = ilm_policy_helpers ;
12371237 const mod_age_definition = `define( mod_age, (DAYS(CURRENT_TIMESTAMP) - DAYS(MODIFICATION_TIME)) )\n` ;
12381238 const change_age_definition = `define( change_age, (DAYS(CURRENT_TIMESTAMP) - DAYS(CHANGE_TIME)) )\n` ;
1239- const rule_id_definition = `RULE ${ bucket_rule_id } LIST ${ bucket_rule_id } \n` ;
1239+ const rule_id_definition = `RULE ' ${ bucket_rule_id } ' LIST ' ${ bucket_rule_id } ' \n` ;
12401240 const policy_path_base = `WHERE PATH_NAME LIKE '${ in_bucket_path } '\n` +
12411241 `AND PATH_NAME NOT LIKE '${ in_bucket_internal_dir } '\n` ;
12421242
@@ -1285,8 +1285,8 @@ class NCLifecycle {
12851285 const { object_size_greater_than = undefined , object_size_less_than = undefined , tags = undefined } = filter ;
12861286 const rule_prefix = prefix || filter . prefix ;
12871287 filter_policy += rule_prefix ? `AND PATH_NAME LIKE '${ path . join ( bucket_path , rule_prefix ) } %'\n` : '' ;
1288- filter_policy += object_size_greater_than ? `AND FILE_SIZE > ${ object_size_greater_than } \n` : '' ;
1289- filter_policy += object_size_less_than ? `AND FILE_SIZE < ${ object_size_less_than } \n` : '' ;
1288+ filter_policy += object_size_greater_than === undefined ? '' : `AND FILE_SIZE > ${ object_size_greater_than } \n` ;
1289+ filter_policy += object_size_less_than === undefined ? '' : `AND FILE_SIZE < ${ object_size_less_than } \n` ;
12901290 filter_policy += tags ? tags . map ( tag => `AND XATTR('user.noobaa.tag.${ tag . key } ') LIKE ${ tag . value } \n` ) . join ( '' ) : '' ;
12911291 }
12921292 return filter_policy ;
@@ -1434,7 +1434,7 @@ class NCLifecycle {
14341434 if ( err . code === 'ENOENT' ) {
14351435 dbg . log2 ( `parse_candidates_from_gpfs_ilm_policy ilm_candidates_file_exists does not exist, no candidates to delete` ) ;
14361436 this . _set_rule_state ( bucket_json , lifecycle_rule , finished_state ) ;
1437- return ;
1437+ return [ ] ;
14381438 }
14391439 dbg . error ( 'parse_candidates_from_gpfs_ilm_policy: error' , err ) ;
14401440 throw err ;
0 commit comments