-
Notifications
You must be signed in to change notification settings - Fork 81
NC | Lifecycle | GPFS ILM integration #8923
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
2280eb5
to
4d1e32f
Compare
c7e3ab5
to
6dcabf2
Compare
src/manage_nsfs/nc_lifecycle.js
Outdated
const in_versions_dir = path.join(bucket_path, '/.versions/%'); | ||
const in_nested_versions_dir = path.join(bucket_path, '/%/.versions/%'); | ||
let path_policy = ``; | ||
if (expiration && !noncurrent_version_expiration?.days) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if we have both expiration and noncurrent_version_expiration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on this PR I don't plan to support noncurrent_version_expiration really, removing it
src/manage_nsfs/nc_lifecycle.js
Outdated
if (file_key.startsWith(config.NSFS_FOLDER_OBJECT_NAME)) { | ||
file_key = file_path.replace(bucket_json.path, '').replace(config.NSFS_FOLDER_OBJECT_NAME, ''); | ||
} | ||
parsed_candidates_array.push({ key: file_key }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note that for notifications you need more information like size and eTag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these mandatory? I don't have the ETag in the candidate line, I can head object if you think it's needed
src/manage_nsfs/nc_lifecycle.js
Outdated
@@ -526,6 +796,7 @@ class NCLifecycle { | |||
} else { | |||
rule_state.is_finished = true; | |||
} | |||
this.lifecycle_run_status.buckets_statuses[bucket_json.name].rules_statuses[lifecycle_rule.id].state = rule_state; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't do anything
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you mean? it sets the rule state
eadca77
to
ff156da
Compare
0367811
to
7e207e0
Compare
Signed-off-by: Romy <[email protected]>
7e207e0
to
d91d515
Compare
Describe the Problem
Today, NooBaa NC lifecycle worker is running a directory scan for both POSIX and GPFS file systems.
A method for optimizing the scan on GPFS file system is to generate and apply GPFS ILM policies based on the configured lifecycle configuration.
Explain the Changes
Note - currently we support only expiry + filter
(non current days is not supported yet)
Implementation changes -
const ILM_POLICIES_TMP_DIR = path.join(config.NC_LIFECYCLE_LOGS_DIR, 'lifecycle_ilm_policies')
- notice it's inside the lifecycle logs dir which means it's not shared between nodes.const ILM_CANDIDATES_TMP_DIR = path.join(config.NC_LIFECYCLE_LOGS_DIR, 'lifecycle_ilm_candidates');
- notice it's inside the lifecycle logs dir which means it's not shared between nodes.Issues: Fixed #xxx / Gap #xxx
Testing Instructions:
sudo jest --testRegex=jest_tests/test_nc_lifecycle_gpfs
Manual tests -
mkdir /mnt/gpfs0/romy/
mkdir /mnt/gpfs0/romy/bucket1_storage/
noobaa-cli bucket add --name bucket1 --owner account1 --path /mnt/gpfs0/romy/bucket1_storage/
alias s3-nb='AWS_ACCESS_KEY_ID=<access_key> AWS_SECRET_ACCESS_KEY=<secret_key> aws --endpoint https://localhost:6443 --no-verify-ssl'
vi lifecycle.json
-s3-nb s3api put-bucket-lifecycle-configuration --bucket bucket1 --lifecycle-configuration file://lifecycle.json
s3-nb s3api get-bucket-lifecycle-configuration --bucket bucket1
noobaa-cli lifecycle --disable_runtime_validation