Skip to content

[BUG] Applied policy body not properly displayed on older indexes #1403

Description

@spapadop

What is the bug?
The Policy-managed indexes page, has a Policy column that refers to the body of the policy assigned to the respective index.

If a policy that is already applied to some indexes is updated (e.g., change the deletion action from 14 days to 21) the UI immediately shows the updated body (with 21 days) on all indexes. However, in reality, unless I "manually" remove and re-add the ISM policy to the existing indexes, the old version of the policy still applies.

How can one reproduce the bug?
Steps to reproduce the behavior:

  1. Create an ISM index policy, for example with a delete action after 14 days.
  2. Create an index that agrees with the pattern, so that it picks up your created ISM policy.
  3. Update the created ISM policy delete action to be now 21 days.
  4. Create a new index that agrees with the pattern, so that it picks up your updated ISM policy.
  5. Go to Policy-managed indexes page and see that the same body appears for both new and old index.

What is the expected behavior?
The old index should have the old body (with 14 days on deletion action).

What is your host/environment?

  • OS: AlmaLinux 9.7
  • Version 3.5.0
  • Plugins: all default + repository-s3

Do you have any additional context?
GET _plugins/_ism/explain/index-name seems to give some insights of what policy is applied on

so for old-index:

    "policy_id": "hot_delete",
    "policy_seq_no": 1,
    "policy_primary_term": 1,

and for new-index:

    "policy_id": "hot_delete",
    "policy_seq_no": 12277718,
    "policy_primary_term": 6,

So I guess it would be possible to display the right version of the ISM policy object on the UI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions