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

fix: delete pod panic when delete vm or statefulset. #1565

Merged
merged 1 commit into from
May 30, 2022
Merged

fix: delete pod panic when delete vm or statefulset. #1565

merged 1 commit into from
May 30, 2022

Conversation

xujunjie-cover
Copy link
Member

sorry, if vm or statefulset is deleted, vm or statefulset != nil; so need use err == isNotFound.

What type of this PR
Examples of user facing changes:

  • Bug fixes

if err != nil {
if k8serrors.IsNotFound(err) {
return true, nil
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

What about other errors?

Copy link
Collaborator

Choose a reason for hiding this comment

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

It's better to add a log here if don't need to process other errors.

when vm is deleted, get vm != nil; need use err == isNotFound.

add log for other errors when get vm or statefulset
@hongzhen-ma hongzhen-ma merged commit d5535f2 into kubeovn:master May 30, 2022
hongzhen-ma pushed a commit that referenced this pull request May 30, 2022
when vm is deleted, get vm != nil; need use err == isNotFound.

add log for other errors when get vm or statefulset
hongzhen-ma pushed a commit that referenced this pull request May 30, 2022
when vm is deleted, get vm != nil; need use err == isNotFound.

add log for other errors when get vm or statefulset
@hongzhen-ma
Copy link
Collaborator

已回合release-1.9 和 release-1.10 分支

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

Successfully merging this pull request may close these issues.

2 participants