Skip to main content

Examples for simulating ILM policies

Contributors netapp-lhalbert

These examples show how you can verify ILM rules by simulating the ILM policy before activating it.

Example 1: Verifying rules when simulating a proposed ILM policy

This example shows how to verify rules when simulating a proposed 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, menu:EC objects[1 MB], applies to all buckets but filters on objects greater than 1 MB.

  • The third rule is the default rule and does not include any filters.

Saved Policy for Simulation
Steps
  1. After adding the rules and saving the policy, click Simulate.

    The Simulate ILM Policy dialog box appears.

  2. In the Object field, enter the S3 bucket/object-key or the Swift container/object-name for a test object, and click Simulate.

    The Simulation Results appear, showing which rule in the policy matched each object you tested.

    Simulate Policy Screen
  3. Confirm that each object was matched by the correct rule.

    In this example:

    1. bucket-a/bucket-a object.pdf correctly matched the first rule, which filters on objects in bucket-a.

    2. bucket-b/test object greater than 1 MB.pdf is in bucket-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.

    3. 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: Reordering rules when simulating a proposed 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 do not match the first two rules.

Example 2: Reordering rules when simulating a proposed ILM policy
Steps
  1. After adding the rules and saving the policy, click Simulate.

  2. In the Object field, enter the S3 bucket/object-key or the Swift container/object-name for a test object, and click Simulate.

    The Simulation Results appear, showing that the Havok.png object was matched by the PNGs rule.

    Example 2: Reordering rules when simulating a proposed ILM policy

    However, the rule that the Havok.png object was meant to test was the X-men rule.

  3. To resolve the issue, reorder the rules.

    1. Click Finish to close the Simulate ILM Policy page.

    2. Click Edit to edit the policy.

    3. Drag the X-men rule to the top of the list.

      Simulate - Reorder Rules - Correct Rule
    4. Click Save.

  4. Click 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 2: Reordering rules when simulating a proposed ILM policy
    Note If you stay on the Configure Policies page, you can re-simulate a policy after making changes without needing to re-enter the names of the test objects.

Example 3: Correcting a rule when simulating a proposed 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.

Example 3: Correcting a rule when simulating a proposed ILM policy

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.

Steps
  1. For each rule in the policy, view the rule settings by clicking the rule name or the more details icon more details icon on any dialog box where the rule is displayed.

  2. Review the rule's tenant account, reference time, and filtering criteria.

    In this example, the metadata for the X-men rule includes an error. The metadata value was entered as “x-men1” instead of “x-men.”

    Example 3: Correcting a rule when simulating a proposed ILM policy
  3. To resolve the error, correct the rule, as follows:

    • If the rule is part of the proposed 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 cannot edit or remove a rule from the active policy.

      Option Description

      Cloning the rule

      1. Select ILM > Rules.

      2. Select the incorrect rule, and click Clone.

      3. Change the incorrect information, and click Save.

      4. Select ILM > Policies.

      5. Select the proposed policy, and click Edit.

      6. Click Select Rules.

      7. Select the check box for the new rule, uncheck the check box for the original rule, and click Apply.

      8. Click Save.

      Editing the rule

      1. Select the proposed policy, and click Edit.

      2. Click the delete icon delete icon to remove the incorrect rule, and click Save.

      3. Select ILM > Rules.

      4. Select the incorrect rule, and click Edit.

      5. Change the incorrect information, and click Save.

      6. Select ILM > Policies.

      7. Select the proposed policy, and click Edit.

      8. Select the corrected rule, click Apply, and click Save.

  4. Perform the simulation again.

    Note Because you navigated away from the ILM Policies page to edit the rule, the objects you previously entered for simulation are no longer displayed. You must re-enter the names of the objects.

    In this example, the corrected X-men rule now matches the Beast.jpg object based on the series=x-men user metadata, as expected.

    Example 3: Correcting a rule when simulating a proposed ILM policy