Example ILM policy simulations
The examples of ILM policy simulations provide guidelines for structuring and modifying simulations for your environment.
Example 1: Verify rules when simulating an ILM policy
This example describes how to verify rules when simulating a policy.
In this example, the Example ILM policy is being simulated against the ingested objects in two buckets. The policy includes three rules, as follows:
-
The first rule, Two copies, two years for bucket-a, applies only to objects in bucket-a.
-
The second rule, EC objects > 1 MB, applies to all buckets but filters on objects greater than 1 MB.
-
The third rule, Two copies, two data centers, is the default rule. It does not include any filters and does not use the Noncurrent reference time.
After simulating the policy, confirm that each object was matched by the correct rule.
In this example:
-
bucket-a/bucket-a object.pdf
correctly matched the first rule, which filters on objects inbucket-a
. -
bucket-b/test object greater than 1 MB.pdf
is inbucket-b
, so it did not match the first rule. Instead, it was correctly matched by the second rule, which filters on objects greater than 1 MB. -
bucket-b/test object less than 1 MB.pdf
did not match the filters in the first two rules, so it will be placed by the default rule, which includes no filters.
Example 2: Reorder rules when simulating an ILM policy
This example shows how you can reorder rules to change the results when simulating a policy.
In this example, the Demo policy is being simulated. This policy, which is intended to find objects that have series=x-men user metadata, includes three rules, as follows:
-
The first rule, PNGs, filters for key names that end in
.png
. -
The second rule, X-men, applies only to objects for Tenant A and filters for
series=x-men
user metadata. -
The last rule, Two copies two data centers, is the default rule, which matches any objects that don't match the first two rules.
-
After adding the rules and saving the policy, select Simulate.
-
In the Object field, enter the S3 bucket/object-key for a test object and select Simulate.
The Simulation results appear, showing that the
Havok.png
object was matched by the PNGs rule.However,
Havok.png
was meant to test the X-men rule. -
To resolve the issue, reorder the rules.
-
Select Finish to close the Simulate ILM Policy window.
-
Select Edit to edit the policy.
-
Drag the X-men rule to the top of the list.
-
Select Save.
-
-
Select Simulate.
The objects you previously tested are re-evaluated against the updated policy, and the new simulation results are shown. In the example, the Rule matched column shows that the
Havok.png
object now matches the X-men metadata rule, as expected. The Previous match column shows that the PNGs rule matched the object in the previous simulation.
Example 3: Correct a rule when simulating an ILM policy
This example shows how to simulate a policy, correct a rule in the policy, and continue the simulation.
In this example, the Demo policy is being simulated. This policy is intended to find objects that have series=x-men
user metadata. However, unexpected results occurred when simulating this policy against the Beast.jpg
object. Instead of matching the X-men metadata rule, the object matched the default rule, Two copies two data centers.
When a test object is not matched by the expected rule in the policy, you must examine each rule in the policy and correct any errors.
-
Select Finish to close the Simulate policy dialog. On the details page for the policy, select Retention diagram. Then select Expand all or View details for each rule as needed.
-
Review the rule's tenant account, reference time, and filtering criteria.
As an example, suppose the metadata for the X-men rule was entered as "x-men01" instead of "x-men."
-
To resolve the error, correct the rule as follows:
-
If the rule is part of the policy, you can either clone the rule or remove the rule from the policy and then edit it.
-
If the rule is part of the active policy, you must clone the rule. You can't edit or remove a rule from the active policy.
-
-
Perform the simulation again.
In this example, the corrected X-men rule now matches the
Beast.jpg
object based on theseries=x-men
user metadata, as expected.