NC | Lifecycle | Adjust expire/noncurrent state properties to GPFS flow + fix of 2 small bugs #8999
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
GPFS flow still uses old inline state usage for maintaining expiration state.
Explain the Changes
parse_candidates_from_gpfs_ilm_policy() - currently GPFS flow supports only expiration rule, but for modularity purposes checked the rule type and used it for setting/getting the rule state based on the type - expire/noncurrent.
_set_rule_state() - updated the whole state while we are calling it for a specific action, therefore we should update only the relevant part and keep the existing state that is irrelevant to the action (expire/noncurrent).
create_gpfs_candidates_files () - we were not skipping correctly buckets that don't have any bucket lifecycle configuration - added a check + continue for that.
Refactoring - replaced
this.lifecycle_run_status.buckets_statuses[bucket_json.name].rules_statuses[lifecycle_rule.id].state
with a call to_get_rule_state()
function where needed.Issues: Fixed #xxx / Gap #xxx
Testing Instructions:
Manual tests on a GPFS machine -
/mnt/gpfs0/romy/bucket1_storage/
and/mnt/gpfs0/romy/bucket2_storage/
for i in $(seq 1 1500); do echo "blalalalla" > /mnt/gpfs0/romy/bucket1_storage/bav$i.txt ; done
noobaa-cli lifecycle --disable_service_validation --disable_runtime_validation --debug 5 &> lifecycle_logs1.logs