Stuck in "Attempting to transition"

I’ve been trying out managed indexes. Setup and getting the initial state seem fine, however all my indexes show an action of “Transition” with info listed as “Attempting to Transition”.

Is this expected behavior? Are there instructions for where I can go to debug/diagnose further?

Hi @tschaible,

The “transition” action is the internal action used for transitioning between states. It means your managed index has finished the actions in its current state and is attempting to transition to a new one which will happen once the condition is true.

Can you post an example of your policy and an index status so we can see what it’s waiting for?

Sure, the index policy is meant to manage indexes auto-created by fluentd. Fluentd creates them with a date-key automatically. The example is below, but it’s intended to simply start them as “hot”, move them to “cold” (read-only) after the day is done, and then delete them after 30 days.

{
    "policy": {
        "policy_id": "hot-cold-delete",
        "description": "A simple default policy that changes the replica count between hot and cold states.",
        "last_updated_time": 1581629650252,
        "schema_version": 1,
        "error_notification": null,
        "default_state": "hot",
        "states": [
            {
                "name": "hot",
                "actions": [
                    {
                        "replica_count": {
                            "number_of_replicas": 1
                        }
                    }
                ],
                "transitions": [
                    {
                        "state_name": "cold",
                        "conditions": {
                            "min_index_age": "7d"
                        }
                    }
                ]
            },
            {
                "name": "cold",
                "actions": [
                    {
                        "read_only": {}
                    }
                ],
                "transitions": [
                    {
                        "state_name": "delete",
                        "conditions": {
                            "min_index_age": "30d"
                        }
                    }
                ]
            },
            {
                "name": "delete",
                "actions": [
                    {
                        "delete": {}
                    }
                ],
                "transitions": []
            }
        ]
    }
}

I currently have 2 indexes (yesterdays and todays) in the “hot” state, with the status attempting to transition.

If I read your description correctly, this is actually expected behavior. It is “attempting to transition” as it is waiting for the minimum index age to reach 7 days to transition to “cold”, and it should actually transition when the minimum index age is reached.

If that’s all correct, I understand better. The “Attempting to transition” description through me off. If it’s helpful at all, a description of “Waiting for condition” or even documentation describing the normal workflow would be helpful. If there’s anything I can help to document to make that clearer for others, please just point me in the right direction.

Yep, that’s the correct behavior. It’s now waiting for the condition to be met before it transitions to the specified state.

Agree, we can better document and give better messages. Possibly listing the different conditions checked and the current values might be helpful. Will create a GitHub issue for this.

This alone is very helpful, and any time you run in to things that seem confusing or you don’t understand, please reach out. Helps us better solidify the plugin :slight_smile:

Thanks!

2 Likes