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

Former master reports "failed to reassign persistent tasks" repeatedly #58531

Closed
DaveCTurner opened this issue Jun 25, 2020 · 2 comments · Fixed by #58539
Closed

Former master reports "failed to reassign persistent tasks" repeatedly #58531

DaveCTurner opened this issue Jun 25, 2020 · 2 comments · Fixed by #58539
Assignees
Labels
>bug :Distributed/Task Management Issues for anything around the Tasks API - both persistent and node level. Team:Distributed Meta label for distributed team

Comments

@DaveCTurner
Copy link
Contributor

Following a slightly messy master election I saw a 7.6.1 cluster with the two unelected master nodes both reporting this message every 30 seconds apparently indefinitely:

failed to reassign persistent tasks
org.elasticsearch.cluster.NotMasterException: no longer master. source: [reassign persistent tasks]

Possibly there's a race in the PersistentTasksClusterService around election time? Not sure, I am not very familiar with this area.

@DaveCTurner DaveCTurner added >bug :Distributed/Task Management Issues for anything around the Tasks API - both persistent and node level. labels Jun 25, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (:Distributed/Task Management)

@elasticmachine elasticmachine added the Team:Distributed Meta label for distributed team label Jun 25, 2020
@droberts195
Copy link
Contributor

This is a silly bug. If a persistent task cannot be immediately reassigned and has caused periodic rechecks to be scheduled (on the master node at that time) then those rechecks continue to be rescheduled regardless of whether the node is still the master. I will open a PR to fix it.

@droberts195 droberts195 self-assigned this Jun 25, 2020
droberts195 added a commit to droberts195/elasticsearch that referenced this issue Jun 25, 2020
If a persistent task cannot be assigned on the first attempt
then the master node will schedule periodic rechecks to see
if the assignment requirements have been met.

These periodic rechecks should be cancelled if the node ceases
to be master.  Previously they weren't, leading to exceptions
being logged repeatedly.  This PR cancels the rechecks on
learning that the node is no longer the master.

Fixes elastic#58531
droberts195 added a commit that referenced this issue Jun 25, 2020
If a persistent task cannot be assigned on the first attempt
then the master node will schedule periodic rechecks to see
if the assignment requirements have been met.

These periodic rechecks should be cancelled if the node ceases
to be master.  Previously they weren't, leading to exceptions
being logged repeatedly.  This PR cancels the rechecks on
learning that the node is no longer the master.

Fixes #58531
droberts195 added a commit that referenced this issue Jun 25, 2020
If a persistent task cannot be assigned on the first attempt
then the master node will schedule periodic rechecks to see
if the assignment requirements have been met.

These periodic rechecks should be cancelled if the node ceases
to be master.  Previously they weren't, leading to exceptions
being logged repeatedly.  This PR cancels the rechecks on
learning that the node is no longer the master.

Fixes #58531
droberts195 added a commit that referenced this issue Jun 25, 2020
If a persistent task cannot be assigned on the first attempt
then the master node will schedule periodic rechecks to see
if the assignment requirements have been met.

These periodic rechecks should be cancelled if the node ceases
to be master.  Previously they weren't, leading to exceptions
being logged repeatedly.  This PR cancels the rechecks on
learning that the node is no longer the master.

Fixes #58531
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Distributed/Task Management Issues for anything around the Tasks API - both persistent and node level. Team:Distributed Meta label for distributed team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants