NC | Lifecycle | GPFS ILM integration #8923
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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