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
40e5d292
Commit
40e5d292
authored
Dec 22, 2015
by
Avesh Agarwal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix parallel image pullers event messages with reasons constants.
parent
45064e19
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
image_puller.go
pkg/kubelet/container/image_puller.go
+4
-4
No files found.
pkg/kubelet/container/image_puller.go
View file @
40e5d292
...
@@ -90,7 +90,7 @@ func (puller *imagePuller) PullImage(pod *api.Pod, container *api.Container, pul
...
@@ -90,7 +90,7 @@ func (puller *imagePuller) PullImage(pod *api.Pod, container *api.Container, pul
if
!
shouldPullImage
(
container
,
present
)
{
if
!
shouldPullImage
(
container
,
present
)
{
if
present
{
if
present
{
msg
:=
fmt
.
Sprintf
(
"Container image %q already present on machine"
,
container
.
Image
)
msg
:=
fmt
.
Sprintf
(
"Container image %q already present on machine"
,
container
.
Image
)
puller
.
logIt
(
ref
,
api
.
EventTypeNormal
,
"Pulled"
,
logPrefix
,
msg
,
glog
.
Info
)
puller
.
logIt
(
ref
,
api
.
EventTypeNormal
,
PulledImage
,
logPrefix
,
msg
,
glog
.
Info
)
return
nil
,
""
return
nil
,
""
}
else
{
}
else
{
msg
:=
fmt
.
Sprintf
(
"Container image %q is not present with pull policy of Never"
,
container
.
Image
)
msg
:=
fmt
.
Sprintf
(
"Container image %q is not present with pull policy of Never"
,
container
.
Image
)
...
@@ -105,9 +105,9 @@ func (puller *imagePuller) PullImage(pod *api.Pod, container *api.Container, pul
...
@@ -105,9 +105,9 @@ func (puller *imagePuller) PullImage(pod *api.Pod, container *api.Container, pul
puller
.
logIt
(
ref
,
api
.
EventTypeNormal
,
BackOffPullImage
,
logPrefix
,
msg
,
glog
.
Info
)
puller
.
logIt
(
ref
,
api
.
EventTypeNormal
,
BackOffPullImage
,
logPrefix
,
msg
,
glog
.
Info
)
return
ErrImagePullBackOff
,
msg
return
ErrImagePullBackOff
,
msg
}
}
puller
.
logIt
(
ref
,
api
.
EventTypeNormal
,
"Pulling"
,
logPrefix
,
fmt
.
Sprintf
(
"pulling image %q"
,
container
.
Image
),
glog
.
Info
)
puller
.
logIt
(
ref
,
api
.
EventTypeNormal
,
PullingImage
,
logPrefix
,
fmt
.
Sprintf
(
"pulling image %q"
,
container
.
Image
),
glog
.
Info
)
if
err
:=
puller
.
runtime
.
PullImage
(
spec
,
pullSecrets
);
err
!=
nil
{
if
err
:=
puller
.
runtime
.
PullImage
(
spec
,
pullSecrets
);
err
!=
nil
{
puller
.
logIt
(
ref
,
api
.
EventTypeWarning
,
"Failed"
,
logPrefix
,
fmt
.
Sprintf
(
"Failed to pull image %q: %v"
,
container
.
Image
,
err
),
glog
.
Warning
)
puller
.
logIt
(
ref
,
api
.
EventTypeWarning
,
FailedToPullImage
,
logPrefix
,
fmt
.
Sprintf
(
"Failed to pull image %q: %v"
,
container
.
Image
,
err
),
glog
.
Warning
)
puller
.
backOff
.
Next
(
backOffKey
,
puller
.
backOff
.
Clock
.
Now
())
puller
.
backOff
.
Next
(
backOffKey
,
puller
.
backOff
.
Clock
.
Now
())
if
err
==
RegistryUnavailable
{
if
err
==
RegistryUnavailable
{
msg
:=
fmt
.
Sprintf
(
"image pull failed for %s because the registry is temporarily unavailable."
,
container
.
Image
)
msg
:=
fmt
.
Sprintf
(
"image pull failed for %s because the registry is temporarily unavailable."
,
container
.
Image
)
...
@@ -116,7 +116,7 @@ func (puller *imagePuller) PullImage(pod *api.Pod, container *api.Container, pul
...
@@ -116,7 +116,7 @@ func (puller *imagePuller) PullImage(pod *api.Pod, container *api.Container, pul
return
ErrImagePull
,
err
.
Error
()
return
ErrImagePull
,
err
.
Error
()
}
}
}
}
puller
.
logIt
(
ref
,
api
.
EventTypeNormal
,
"Pulled"
,
logPrefix
,
fmt
.
Sprintf
(
"Successfully pulled image %q"
,
container
.
Image
),
glog
.
Info
)
puller
.
logIt
(
ref
,
api
.
EventTypeNormal
,
PulledImage
,
logPrefix
,
fmt
.
Sprintf
(
"Successfully pulled image %q"
,
container
.
Image
),
glog
.
Info
)
puller
.
backOff
.
DeleteEntry
(
backOffKey
)
puller
.
backOff
.
DeleteEntry
(
backOffKey
)
puller
.
backOff
.
GC
()
puller
.
backOff
.
GC
()
return
nil
,
""
return
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