Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Kube OVN
Commits
765ede7b
Commit
765ede7b
authored
3 years ago
by
Mengxin Liu
Committed by
oilbeater
3 years ago
Browse files
Options
Download
Email Patches
Plain Diff
fix: serialize pod add/delete order
(cherry picked from commit
edaf41e0
)
parent
78dc1fbf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pkg/controller/pod.go
+2
-1
pkg/controller/pod.go
with
2 additions
and
1 deletion
+2
-1
pkg/controller/pod.go
+
2
-
1
View file @
765ede7b
...
...
@@ -536,7 +536,8 @@ func (c *Controller) handleDeletePod(pod *v1.Pod) error {
c
.
podKeyMutex
.
Lock
(
key
)
defer
c
.
podKeyMutex
.
Unlock
(
key
)
if
pod
!=
nil
&&
pod
.
DeletionTimestamp
==
nil
&&
isPodAlive
(
pod
)
{
p
,
_
:=
c
.
podsLister
.
Pods
(
pod
.
Namespace
)
.
Get
(
pod
.
Name
)
if
p
!=
nil
&&
p
.
UID
!=
pod
.
UID
{
// Pod with same name exists, just return here
return
nil
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment