Deleting autoscaling policies – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7.11-8.9

Briefly, this error occurs when you attempt to delete autoscaling policies that are currently in use or do not exist in Elasticsearch. Autoscaling policies help manage resources based on the workload. To resolve this issue, ensure the policy you’re trying to delete is not in use or check if it exists in the first place. If it’s in use, you may need to disable it before deletion. If it doesn’t exist, you may have already deleted it or you’re using the wrong policy name.

This guide will help you check for common problems that cause the log ” deleting [{}] autoscaling policies ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin.

Log Context

Log “deleting [{}] autoscaling policies” classname is TransportDeleteAutoscalingPolicyAction.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

        }

        final SortedMap newPolicies = new TreeMap(currentMetadata.policies());
        if (wildcard) {
            newPolicies.keySet().removeIf(key -> Regex.simpleMatch(name; key));
            logger.info("deleting [{}] autoscaling policies"; currentMetadata.policies().size() - newPolicies.size());
        } else {
            final AutoscalingPolicyMetadata policy = newPolicies.remove(name);
            assert policy != null : name;
            logger.info("deleting autoscaling policy [{}]"; name);
        }

 

How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?