Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
penghuo opened this issue Jun 22, 2021 · 5 comments
Closed

Comments

@penghuo
Copy link
Collaborator

penghuo commented Jun 22, 2021

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.
@dblock dblock transferred this issue from opensearch-project/OpenSearch Jun 23, 2021
@dblock
Copy link
Member

dblock commented Jun 23, 2021

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

@dblock dblock changed the title Provide the mechanism for plugin to deprecated settings. unknown setting [archived.opendistro.sql.cursor.enabled] error when upgrading Jun 23, 2021
@dblock
Copy link
Member

dblock commented Jun 23, 2021

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

@penghuo
Copy link
Collaborator Author

penghuo commented Jun 23, 2021

Yes, we will make it deprecated instead of removing.

@penghuo
Copy link
Collaborator Author

penghuo commented Jun 23, 2021

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.

@penghuo
Copy link
Collaborator Author

penghuo commented Jun 23, 2021

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
Projects
None yet
Development

No branches or pull requests

3 participants