# ElasticsearchException: index lifecycle policy [my_policy] failed to rollover index [logs-2025.03.15] - condition [max_age: 30d] not met, actual age [25d]

- **ID:** `elasticsearch/index-lifecycle-policy-rollover-failure`
- **Domain:** elasticsearch
- **Category:** config_error
- **Error Code:** `ES_ILM_ROLLOVER_FAIL`
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

An ILM rollover condition (max_age, max_docs, or max_size) is not met because the index was manually created with an alias, causing the rollover to be skipped or misconfigured.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 7.17.0 | active | — | — |
| 8.11.0 | active | — | — |
| 8.12.0 | active | — | — |

## Workarounds

1. **Ensure the index is part of an alias with `is_write_index: true` and that the rollover alias matches the policy's `rollover_alias` setting. Use `PUT _ilm/policy/my_policy` to correct the alias name.** (85% success)
   ```
   Ensure the index is part of an alias with `is_write_index: true` and that the rollover alias matches the policy's `rollover_alias` setting. Use `PUT _ilm/policy/my_policy` to correct the alias name.
   ```
2. **Force rollover manually by calling `POST /logs-2025.03.15/_rollover` with the required conditions, then check ILM status with `GET logs-2025.03.15/_ilm/explain`.** (80% success)
   ```
   Force rollover manually by calling `POST /logs-2025.03.15/_rollover` with the required conditions, then check ILM status with `GET logs-2025.03.15/_ilm/explain`.
   ```
3. **Delete the index and recreate it with proper alias configuration: `PUT /logs-2025.03.15-000001 { "aliases": { "logs_write": { "is_write_index": true } } }`.** (90% success)
   ```
   Delete the index and recreate it with proper alias configuration: `PUT /logs-2025.03.15-000001 { "aliases": { "logs_write": { "is_write_index": true } } }`.
   ```

## Dead Ends

- **** — Index creation date is immutable; modifying it via update doesn't affect ILM's internal tracking. (95% fail)
- **** — Loses automated lifecycle management, requiring manual intervention for each rollover and deletion. (80% fail)
