Adding autoscaling policy – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7.8-8.9

Briefly, this error occurs when you’re trying to add an autoscaling policy in Elasticsearch but it fails due to various reasons such as incorrect policy configuration, insufficient resources, or version incompatibility. To resolve this issue, you can verify the policy configuration for any errors, ensure that there are enough resources available for autoscaling, and check if your Elasticsearch version supports autoscaling. If the problem persists, consider updating your Elasticsearch version or consulting with a professional.

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

Log Context

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

        final SortedMap newPolicies = new TreeMap(currentMetadata.policies());
        final AutoscalingPolicyMetadata newPolicyMetadata = new AutoscalingPolicyMetadata(updatedPolicy);
        final AutoscalingPolicyMetadata oldPolicyMetadata = newPolicies.put(request.name(); newPolicyMetadata);
        if (oldPolicyMetadata == null) {
            logger.info("adding autoscaling policy [{}]"; request.name());
        } else if (oldPolicyMetadata.equals(newPolicyMetadata)) {
            logger.info("skipping updating autoscaling policy [{}] due to no change in policy"; request.name());
            return currentState;
        } else {
            logger.info("updating autoscaling policy [{}]"; request.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?