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
55bf7862
Commit
55bf7862
authored
Oct 20, 2015
by
jiangyaoguo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adjust container event message
parent
02f8e427
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
manager.go
pkg/kubelet/dockertools/manager.go
+5
-4
No files found.
pkg/kubelet/dockertools/manager.go
View file @
55bf7862
...
@@ -770,7 +770,7 @@ func (dm *DockerManager) runContainer(
...
@@ -770,7 +770,7 @@ func (dm *DockerManager) runContainer(
return
kubecontainer
.
ContainerID
{},
err
return
kubecontainer
.
ContainerID
{},
err
}
}
dm
.
recorder
.
Eventf
(
ref
,
"Created"
,
"Created with docker id %v"
,
util
.
ShortenString
(
dockerContainer
.
ID
,
12
))
dm
.
recorder
.
Eventf
(
ref
,
"Created"
,
"Created
container
with docker id %v"
,
util
.
ShortenString
(
dockerContainer
.
ID
,
12
))
podHasSELinuxLabel
:=
pod
.
Spec
.
SecurityContext
!=
nil
&&
pod
.
Spec
.
SecurityContext
.
SELinuxOptions
!=
nil
podHasSELinuxLabel
:=
pod
.
Spec
.
SecurityContext
!=
nil
&&
pod
.
Spec
.
SecurityContext
.
SELinuxOptions
!=
nil
binds
:=
makeMountBindings
(
opts
.
Mounts
,
podHasSELinuxLabel
)
binds
:=
makeMountBindings
(
opts
.
Mounts
,
podHasSELinuxLabel
)
...
@@ -827,10 +827,11 @@ func (dm *DockerManager) runContainer(
...
@@ -827,10 +827,11 @@ func (dm *DockerManager) runContainer(
if
err
=
dm
.
client
.
StartContainer
(
dockerContainer
.
ID
,
hc
);
err
!=
nil
{
if
err
=
dm
.
client
.
StartContainer
(
dockerContainer
.
ID
,
hc
);
err
!=
nil
{
dm
.
recorder
.
Eventf
(
ref
,
"Failed"
,
dm
.
recorder
.
Eventf
(
ref
,
"Failed"
,
"Failed to start with docker id %v with error: %v"
,
util
.
ShortenString
(
dockerContainer
.
ID
,
12
),
err
)
"Failed to start
container
with docker id %v with error: %v"
,
util
.
ShortenString
(
dockerContainer
.
ID
,
12
),
err
)
return
kubecontainer
.
ContainerID
{},
err
return
kubecontainer
.
ContainerID
{},
err
}
}
dm
.
recorder
.
Eventf
(
ref
,
"Started"
,
"Started with docker id %v"
,
util
.
ShortenString
(
dockerContainer
.
ID
,
12
))
dm
.
recorder
.
Eventf
(
ref
,
"Started"
,
"Started container with docker id %v"
,
util
.
ShortenString
(
dockerContainer
.
ID
,
12
))
return
kubetypes
.
DockerID
(
dockerContainer
.
ID
)
.
ContainerID
(),
nil
return
kubetypes
.
DockerID
(
dockerContainer
.
ID
)
.
ContainerID
(),
nil
}
}
...
@@ -1441,7 +1442,7 @@ func (dm *DockerManager) killContainer(containerID kubecontainer.ContainerID, co
...
@@ -1441,7 +1442,7 @@ func (dm *DockerManager) killContainer(containerID kubecontainer.ContainerID, co
if
!
ok
{
if
!
ok
{
glog
.
Warningf
(
"No ref for pod '%q'"
,
name
)
glog
.
Warningf
(
"No ref for pod '%q'"
,
name
)
}
else
{
}
else
{
message
:=
fmt
.
Sprintf
(
"Killing with docker id %v"
,
util
.
ShortenString
(
ID
,
12
))
message
:=
fmt
.
Sprintf
(
"Killing
container
with docker id %v"
,
util
.
ShortenString
(
ID
,
12
))
if
reason
!=
""
{
if
reason
!=
""
{
message
=
fmt
.
Sprint
(
message
,
": "
,
reason
)
message
=
fmt
.
Sprint
(
message
,
": "
,
reason
)
}
}
...
...
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