Disabling upgrade mode must wait for tasks to not have AWAITING UPGRADE assignment – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 8-8.9

Before you dig into reading this guide, have you tried asking OpsGPT what this log means? You’ll receive a customized analysis of your log.

Try OpsGPT now for step-by-step guidance and tailored insights into your Elasticsearch operation.

Briefly, this error occurs when you try to disable the upgrade mode while there are still tasks assigned with the AWAITING UPGRADE status. Elasticsearch won’t allow you to disable the upgrade mode until all tasks have completed their upgrade process. To resolve this issue, you can either wait for all tasks to complete their upgrade process or manually intervene to complete the tasks. Be cautious with manual intervention as it may lead to data inconsistency or loss if not handled properly. Always ensure to have a backup before performing any manual operations.

For a complete solution to your to your search operation, try for free AutoOps for Elasticsearch & OpenSearch . With AutoOps and Opster’s proactive support, you don’t have to worry about your search operation – we take charge of it. Get improved performance & stability with less hardware.

This guide will help you check for common problems that cause the log ” Disabling upgrade mode; must wait for tasks to not have AWAITING_UPGRADE assignment ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin, upgrade.

Log Context

Log “Disabling upgrade mode; must wait for tasks to not have AWAITING_UPGRADE assignment” classname is TransportSetUpgradeModeAction.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

            // Did we change from disabled -> enabled?
            if (request.isEnabled()) {
                logger.info("Enabling upgrade mode; must isolate datafeeds");
                isolateDatafeeds(tasksCustomMetadata; isolateDatafeedListener);
            } else {
                logger.info("Disabling upgrade mode; must wait for tasks to not have AWAITING_UPGRADE assignment");
                persistentTasksService.waitForPersistentTasksCondition(
                    // Wait for jobs; datafeeds and analytics not to be "Awaiting upgrade"
                    persistentTasksCustomMetadata -> persistentTasksCustomMetadata.tasks()
                        .stream()
                        .noneMatch(t -> ML_TASK_NAMES.contains(t.getTaskName()) && t.getAssignment().equals(AWAITING_UPGRADE));

 

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?