Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
07366151
Commit
07366151
authored
Dec 10, 2015
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #18129 from yujuhong/fix_status
Auto commit by PR queue bot
parents
87bf85a6
c8a075ad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
manager.go
pkg/kubelet/status/manager.go
+3
-2
manager_test.go
pkg/kubelet/status/manager_test.go
+0
-2
No files found.
pkg/kubelet/status/manager.go
View file @
07366151
...
@@ -343,8 +343,9 @@ func (m *manager) syncPod(uid types.UID, status versionedPodStatus) {
...
@@ -343,8 +343,9 @@ func (m *manager) syncPod(uid types.UID, status versionedPodStatus) {
// TODO: make me easier to express from client code
// TODO: make me easier to express from client code
pod
,
err
:=
m
.
kubeClient
.
Pods
(
status
.
podNamespace
)
.
Get
(
status
.
podName
)
pod
,
err
:=
m
.
kubeClient
.
Pods
(
status
.
podNamespace
)
.
Get
(
status
.
podName
)
if
errors
.
IsNotFound
(
err
)
{
if
errors
.
IsNotFound
(
err
)
{
glog
.
V
(
3
)
.
Infof
(
"Pod %q (%s) was deleted on the server"
,
status
.
podName
,
uid
)
glog
.
V
(
3
)
.
Infof
(
"Pod %q (%s) does not exist on the server"
,
status
.
podName
,
uid
)
m
.
deletePodStatus
(
uid
)
// If the Pod is deleted the status will be cleared in
// RemoveOrphanedStatuses, so we just ignore the update here.
return
return
}
}
if
err
==
nil
{
if
err
==
nil
{
...
...
pkg/kubelet/status/manager_test.go
View file @
07366151
...
@@ -264,8 +264,6 @@ func TestSyncBatchIgnoresNotFound(t *testing.T) {
...
@@ -264,8 +264,6 @@ func TestSyncBatchIgnoresNotFound(t *testing.T) {
verifyActions
(
t
,
syncer
.
kubeClient
,
[]
testclient
.
Action
{
verifyActions
(
t
,
syncer
.
kubeClient
,
[]
testclient
.
Action
{
testclient
.
GetActionImpl
{
ActionImpl
:
testclient
.
ActionImpl
{
Verb
:
"get"
,
Resource
:
"pods"
}},
testclient
.
GetActionImpl
{
ActionImpl
:
testclient
.
ActionImpl
{
Verb
:
"get"
,
Resource
:
"pods"
}},
})
})
_
,
found
:=
syncer
.
GetPodStatus
(
testPod
.
UID
)
assert
.
False
(
t
,
found
,
"Pod status should have been deleted"
)
}
}
func
TestSyncBatch
(
t
*
testing
.
T
)
{
func
TestSyncBatch
(
t
*
testing
.
T
)
{
...
...
Write
Preview
Markdown
is supported
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