Skip to content

Commit 045b232

Browse files
committed
NC | Lifecycle | GPFS | fix skip of incorrect noobaa uploads internal directory
Signed-off-by: Romy <35330373+romayalon@users.noreply.github.com>
1 parent 35bfb70 commit 045b232

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/manage_nsfs/nc_lifecycle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1210,7 +1210,7 @@ class NCLifecycle {
12101210
const bucket_path = bucket_json.path;
12111211
const bucket_rule_id = this.get_lifecycle_ilm_candidate_file_suffix(bucket_json.name, lifecycle_rule);
12121212
const in_bucket_path = path.join(bucket_path, '/%');
1213-
const in_bucket_internal_dir = path.join(bucket_path, '/.noobaa_nsfs%/%');
1213+
const in_bucket_internal_dir = path.join(bucket_path, `/${config.NSFS_TEMP_DIR_NAME}%/%`);
12141214
const in_versions_dir = path.join(bucket_path, '/.versions/%');
12151215
const in_nested_versions_dir = path.join(bucket_path, '/%/.versions/%');
12161216
const ilm_policy_helpers = { bucket_rule_id, in_bucket_path, in_bucket_internal_dir, in_versions_dir, in_nested_versions_dir };

src/test/unit_tests/jest_tests/test_nc_lifecycle_gpfs_ilm_integration.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ process.env.DISABLE_INIT_RANDOM_SEED = 'true';
66

77
const fs = require('fs');
88
const path = require('path');
9+
const config = require('../../../../config');
910
const { ConfigFS } = require('../../../sdk/config_fs');
1011
const { file_delete, create_fresh_path } = require('../../../util/fs_utils');
1112
const { read_file } = require('../../../util/native_fs_utils');
@@ -479,7 +480,7 @@ function get_mock_base_ilm_policy(bucket_storage_path, rule_id, lifecycle_run_st
479480
const policy_rule_id = `${bucket_name}_${rule_id}_${lifecycle_run_status.lifecycle_run_times.run_lifecycle_start_time}`;
480481
const policy_base = `RULE '${policy_rule_id}' LIST '${policy_rule_id}'\n` +
481482
`WHERE PATH_NAME LIKE '${bucket_storage_path}/%'\n` +
482-
`AND PATH_NAME NOT LIKE '${bucket_storage_path}/.noobaa_nsfs%/%'\n`;
483+
`AND PATH_NAME NOT LIKE '${bucket_storage_path}/${config.NSFS_TEMP_DIR_NAME}%/%'\n`;
483484

484485
return definitions_base + policy_base;
485486
}

0 commit comments

Comments
 (0)