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

a tidb-scheduler bug fix and emit event when scheduled failed #427

Merged
merged 2 commits into from
Apr 29, 2019

Conversation

weekface
Copy link
Contributor

This pr:

  • fix realAcquireLock bug: pvc must bound and its pod.spec.nodeName is not empty
  • emit event when scheduled failed
  • more nice error message:
$ kubectl describe po -n tidb demo-pd-1
...
Events:
  Type     Reason            Age                     From            Message
  ----     ------            ----                    ----            -------
  Warning  FailedScheduling  2m25s (x1484 over 12m)  tidb-scheduler  Failed filter with extender at URL http://127.0.0.1:10262/scheduler/filter, code 500
  Warning  FailedScheduling  2m21s (x1489 over 12m)  tidb-scheduler  can't scheduled to nodes: [172.16.4.159 172.16.4.160], because these pods had been scheduled to nodes: map[172.16.4.159:[demo-pd-0] 172.16.4.160:[demo-pd-2]]

* emit event when scheduled failed
* more nice error message
@weekface
Copy link
Contributor Author

/run-e2e-tests

if err != nil {
return schedulingPVC, currentPVC, err
}
if schedulingPVC.Status.Phase != apiv1.ClaimBound || schedulingPod.Spec.NodeName == "" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add some comments for function realAcquireLock? I feel that the logic in this function is difficult to understand

Copy link
Contributor

@onlymellb onlymellb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test/stability stability tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants