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
d7a7f87e
Commit
d7a7f87e
authored
Feb 25, 2016
by
Mike Danese
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix nil pointer in dameonset controller
parent
f4947edd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
controller.go
pkg/controller/daemon/controller.go
+3
-2
No files found.
pkg/controller/daemon/controller.go
View file @
d7a7f87e
...
@@ -295,11 +295,11 @@ func (dsc *DaemonSetsController) updatePod(old, cur interface{}) {
...
@@ -295,11 +295,11 @@ func (dsc *DaemonSetsController) updatePod(old, cur interface{}) {
func
(
dsc
*
DaemonSetsController
)
deletePod
(
obj
interface
{})
{
func
(
dsc
*
DaemonSetsController
)
deletePod
(
obj
interface
{})
{
pod
,
ok
:=
obj
.
(
*
api
.
Pod
)
pod
,
ok
:=
obj
.
(
*
api
.
Pod
)
glog
.
V
(
4
)
.
Infof
(
"Pod %s deleted."
,
pod
.
Name
)
// When a delete is dropped, the relist will notice a pod in the store not
// When a delete is dropped, the relist will notice a pod in the store not
// in the list, leading to the insertion of a tombstone object which contains
// in the list, leading to the insertion of a tombstone object which contains
// the deleted key/value. Note that this value might be stale. If the pod
// the deleted key/value. Note that this value might be stale. If the pod
// changed labels the new rc will not be woken up till the periodic resync.
// changed labels the new daemonset will not be woken up till the periodic
// resync.
if
!
ok
{
if
!
ok
{
tombstone
,
ok
:=
obj
.
(
cache
.
DeletedFinalStateUnknown
)
tombstone
,
ok
:=
obj
.
(
cache
.
DeletedFinalStateUnknown
)
if
!
ok
{
if
!
ok
{
...
@@ -312,6 +312,7 @@ func (dsc *DaemonSetsController) deletePod(obj interface{}) {
...
@@ -312,6 +312,7 @@ func (dsc *DaemonSetsController) deletePod(obj interface{}) {
return
return
}
}
}
}
glog
.
V
(
4
)
.
Infof
(
"Pod %s deleted."
,
pod
.
Name
)
if
ds
:=
dsc
.
getPodDaemonSet
(
pod
);
ds
!=
nil
{
if
ds
:=
dsc
.
getPodDaemonSet
(
pod
);
ds
!=
nil
{
dsKey
,
err
:=
controller
.
KeyFunc
(
ds
)
dsKey
,
err
:=
controller
.
KeyFunc
(
ds
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
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