Skip to content

Script settings validation breaks mixed version cluster (7.15 + 7.16)  #81486

@tvernum

Description

@tvernum

In #79508 the default value for script.max_compilations_rate was changed from "use-context" to "150/5m".

That means, that validateCacheSetting now treats useContext as false, and rejects any cluster settings on a context.
https://github.com/elastic/elasticsearch/blob/v7.16.0/server/src/main/java/org/elasticsearch/script/ScriptService.java#L349-L360

When in a mixed version cluster, the 7.15 node will accept cluster settings such as

PUT /_cluster/settings
{
  "persistent": {
    "script.context.template.max_compilations_rate": "5000/5m"
  }
}

But the 7.16 version will reject them, and will fail to apply the cluster state on the local node.

Consequently, rolling upgrades with context settings will fail unless script.max_compilations_rate is explicitly set to use-context on the 7.15 node.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions