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
50af1d65
Commit
50af1d65
authored
Dec 05, 2015
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #17756 from zhengguoyong/check_ref_before_use
Auto commit by PR queue bot
parents
51094926
2b5a655a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
kubelet.go
pkg/kubelet/kubelet.go
+6
-9
No files found.
pkg/kubelet/kubelet.go
View file @
50af1d65
...
...
@@ -1646,18 +1646,15 @@ func (kl *Kubelet) syncPod(pod *api.Pod, mirrorPod *api.Pod, runningPod kubecont
return
err
}
// Starting phase:
ref
,
err
:=
api
.
GetReference
(
pod
)
if
err
!=
nil
{
glog
.
Errorf
(
"Couldn't make a ref to pod %q: '%v'"
,
podFullName
,
err
)
}
// Mount volumes.
podVolumes
,
err
:=
kl
.
mountExternalVolumes
(
pod
)
if
err
!=
nil
{
kl
.
recorder
.
Eventf
(
ref
,
api
.
EventTypeWarning
,
kubecontainer
.
FailedMountVolume
,
"Unable to mount volumes for pod %q: %v"
,
podFullName
,
err
)
glog
.
Errorf
(
"Unable to mount volumes for pod %q: %v; skipping pod"
,
podFullName
,
err
)
return
err
ref
,
errGetRef
:=
api
.
GetReference
(
pod
)
if
errGetRef
==
nil
&&
ref
!=
nil
{
kl
.
recorder
.
Eventf
(
ref
,
api
.
EventTypeWarning
,
kubecontainer
.
FailedMountVolume
,
"Unable to mount volumes for pod %q: %v"
,
podFullName
,
err
)
glog
.
Errorf
(
"Unable to mount volumes for pod %q: %v; skipping pod"
,
podFullName
,
err
)
return
err
}
}
kl
.
volumeManager
.
SetVolumes
(
pod
.
UID
,
podVolumes
)
...
...
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