Skip to content

unknown setting [archived.opendistro.sql.cursor.enabled] error when upgrading #136

Closed

Description

@penghuo

Is your feature request related to a problem? Please describe.
In SQL Plugin, the settings opendistro.sql.cursor.enable are deprecated and removed. We noticed that if those settings are configured before upgrade, they will be archived and seems block other cluster setting change after upgrade.

% curl localhost:9200/_cluster/settings?pretty
{
  "persistent" : {
    "archived" : {
      "opendistro" : {
        "sql" : {
          "cursor" : {
            "enabled" : "true",
            "keep_alive" : "10m"
          }
        }
      }
    },
    "cluster" : {
      "routing" : {
        "allocation" : {
          "enable" : "primaries"
        }
      }
    }
  },
  "transient" : { }
}
% curl -X PUT "localhost:9200/_cluster/settings" -H 'Content-Type: application/json' -d'
{
  "persistent": {
    "cluster.routing.allocation.enable": null
  }
}'
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"unknown setting [archived.opendistro.sql.cursor.enabled] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"}],"type":"illegal_argument_exception","reason":"unknown setting [archived.opendistro.sql.cursor.enabled] please check that any required plugins are installed, or check the breaking changes documentation for removed settings","suppressed":[{"type":"illegal_argument_exception","reason":"unknown setting [archived.opendistro.sql.cursor.keep_alive] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"}]},"status":400}

Describe the solution you'd like
The OpenSearch should have the clearly way to handle the setting deprecation.

Describe alternatives you've considered
The clealry defined check list for customer which defined which they should do before rolling upgrade.

Additional context

  1. The PR which deprecated the opendistro.sql.cursor.enable in SQL plugin.
  2. The doc which describe how to use cusor now.

Activity

  1. dblock commented on Jun 23, 2021

    @dblock
    Member

    This looks broken, the setting should have been deprecated and not removed?

  2. changed the title [-]Provide the mechanism for plugin to deprecated settings.[/-] [+]unknown setting [archived.opendistro.sql.cursor.enabled] error when upgrading[/+] on Jun 23, 2021
  3. dblock commented on Jun 23, 2021

    @dblock
    Member

    I renamed the issue as we do provide a backward compatible way to do this in other plugins, I think this is a bug in the SQL plugin where the setting should have been deprecated and not removed

  4. penghuo commented on Jun 23, 2021

    @penghuo
    CollaboratorAuthor

    Yes, we will make it deprecated instead of removing.

  5. penghuo commented on Jun 23, 2021

    @penghuo
    CollaboratorAuthor

    Tasks

    • Mark opendistro.sql.cursor.enabled and opendistro.sql.cursor.fetch_size as deprecated instead of removing it. Reference Remove cursor enabling and fetch size setting #75.
    • Add the docs to describe the deprecated settings.
    • Verify the rolling upgrade.
  6. penghuo commented on Jun 23, 2021

    @penghuo
    CollaboratorAuthor

    I renamed the issue as we do provide a backward compatible way to do this in other plugins, I think this is a bug in the SQL plugin where the setting should have been deprecated and not removed

    One question, if we do want to remove the setting eventually, How could we do that? Does it means the customer to delete the archive settings during upgrade? The PR elastic/elasticsearch#28888 which archive the unknown and invalid settings. The PR callout that it allows the setting update to go through, and the archived settings can be removed at a later time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions