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
265db191
Commit
265db191
authored
Jul 27, 2017
by
Seth Jennings
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
skip WaitForAttachAndMount for terminated pods in syncPod
parent
2c624e59
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
kubelet.go
pkg/kubelet/kubelet.go
+8
-5
No files found.
pkg/kubelet/kubelet.go
View file @
265db191
...
@@ -1542,11 +1542,14 @@ func (kl *Kubelet) syncPod(o syncPodOptions) error {
...
@@ -1542,11 +1542,14 @@ func (kl *Kubelet) syncPod(o syncPodOptions) error {
return
err
return
err
}
}
// Wait for volumes to attach/mount
// Volume manager will not mount volumes for terminated pods
if
err
:=
kl
.
volumeManager
.
WaitForAttachAndMount
(
pod
);
err
!=
nil
{
if
!
kl
.
podIsTerminated
(
pod
)
{
kl
.
recorder
.
Eventf
(
pod
,
v1
.
EventTypeWarning
,
events
.
FailedMountVolume
,
"Unable to mount volumes for pod %q: %v"
,
format
.
Pod
(
pod
),
err
)
// Wait for volumes to attach/mount
glog
.
Errorf
(
"Unable to mount volumes for pod %q: %v; skipping pod"
,
format
.
Pod
(
pod
),
err
)
if
err
:=
kl
.
volumeManager
.
WaitForAttachAndMount
(
pod
);
err
!=
nil
{
return
err
kl
.
recorder
.
Eventf
(
pod
,
v1
.
EventTypeWarning
,
events
.
FailedMountVolume
,
"Unable to mount volumes for pod %q: %v"
,
format
.
Pod
(
pod
),
err
)
glog
.
Errorf
(
"Unable to mount volumes for pod %q: %v; skipping pod"
,
format
.
Pod
(
pod
),
err
)
return
err
}
}
}
// Fetch the pull secrets for the pod
// Fetch the pull secrets for the pod
...
...
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