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

All master-eligible nodes may be upgraded before all master-ineligible nodes #5241

Closed
barkbay opened this issue Jan 12, 2022 · 1 comment · Fixed by #5242
Closed

All master-eligible nodes may be upgraded before all master-ineligible nodes #5241

barkbay opened this issue Jan 12, 2022 · 1 comment · Fixed by #5242
Assignees
Labels
>bug Something isn't working v2.0.0

Comments

@barkbay
Copy link
Contributor

barkbay commented Jan 12, 2022

To reproduce:

  1. Create the following deployment:
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: elasticsearch-sample
spec:
  version: 7.16.1
  updateStrategy:
    changeBudget:
      maxUnavailable: 2
  nodeSets:
  - name: content
    config:
      node.roles: ["data_content"]
      node.store.allow_mmap: false
    count: 2
  - name: master
    config:
      node.roles: ["master"]
      node.store.allow_mmap: false
    count: 1
  1. Create an index with the following settings:
{
  "settings": {
    "index": {
      "number_of_shards": 2,
      "number_of_replicas": 1
    }
  }
}
  1. Upgrade the deployment (to 7.16.2 for example)

The master node instance is upgraded/deleted before one of the two data node, which is not able to join the cluster anymore:

"stacktrace": ["org.elasticsearch.transport.RemoteTransportException: [elasticsearch-sample-es-master-0][10.48.178.44:9300][internal:cluster/coordination/join]",
"Caused by: java.lang.IllegalStateException: node version [7.16.1] may not join a cluster comprising only nodes of version [7.16.2] or greater",

The reason is that the predicate do_not_delete_last_master_if_data_nodes_are_not_upgraded only relies on the label "elasticsearch.k8s.elastic.co/node-data" to assess if a node is not a master node:

@barkbay barkbay added the >bug Something isn't working label Jan 12, 2022
@barkbay barkbay self-assigned this Jan 12, 2022
@pebrc
Copy link
Collaborator

pebrc commented Jan 12, 2022

This sounds like something we want to fix asap and include in 2.0?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug Something isn't working v2.0.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants