-
Notifications
You must be signed in to change notification settings - Fork 47
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
Remove node IP from excluded list when draining fails #423
base: master
Are you sure you want to change the base?
Remove node IP from excluded list when draining fails #423
Conversation
The draining annotation needs to be removed otherwise the next run will start draining the pod again. |
This fixes the clean variant of the described bug. However, we are still left with dirty exclude list in a messy case, when the process just crashes during the draining loop. It's a fairly realistic scenario as the draining loop potentially runs for hours. |
Would it make sense to have es-operator do log a warning and kill of the node in case each of the shards have another copy outside this node? |
…e elastic search excluded IPs. Signed-off-by: Abouzar Kamaee <[email protected]>
a3aa704
to
ea7ab5f
Compare
I don't think it's a good idea. There's a reason Elasticsearch can't empty the node. If es-operator abruptly kills the node, even if there are shards available in other nodes, the cluster might end up in an unknown state. WDYT? |
Can you elaborate on the specific scenario you have in mind? Please also consider that in the event of a context Done, we will clean up the exclude list. |
Signed-off-by: Abouzar Kamaee <[email protected]>
067b299
to
0367cbf
Compare
…y and add tests for ESClient.excludePodIP function Signed-off-by: Abouzar Kamaee <[email protected]>
0367cbf
to
b1eb694
Compare
Signed-off-by: Abouzar Kamaee <[email protected]>
Actually, I just learned this is not an issue in es-operator exactly due to the mentioned annotation. Ignore my previous comment, the PR looks good IMO. |
In case of unsuccessful drain of a node we remove the node IP from the elastic search excluded IPs.
Description
A few sentences describing the overall goals of the pull request's
commits.
Types of Changes
What types of changes does your code introduce? Keep the ones that apply:
Tasks
List of tasks you will do to complete the PR
Review
List of tasks the reviewer must do to review the PR
Deployment Notes
These should highlight any db migrations, feature toggles, etc.