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
05fe21fa
Unverified
Commit
05fe21fa
authored
Nov 29, 2018
by
k8s-ci-robot
Committed by
GitHub
Nov 29, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #71210 from pohly/podlogs-activated-pods
e2e/framework: capture logs only from pods that actually started
parents
8c5b9b74
a4fc58cc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
podlogs.go
test/e2e/framework/podlogs/podlogs.go
+8
-2
No files found.
test/e2e/framework/podlogs/podlogs.go
View file @
05fe21fa
...
@@ -99,9 +99,15 @@ func CopyAllLogs(ctx context.Context, cs clientset.Interface, ns string, to LogO
...
@@ -99,9 +99,15 @@ func CopyAllLogs(ctx context.Context, cs clientset.Interface, ns string, to LogO
}
}
for
_
,
pod
:=
range
pods
.
Items
{
for
_
,
pod
:=
range
pods
.
Items
{
for
_
,
c
:=
range
pod
.
Spec
.
Containers
{
for
i
,
c
:=
range
pod
.
Spec
.
Containers
{
name
:=
pod
.
ObjectMeta
.
Name
+
"/"
+
c
.
Name
name
:=
pod
.
ObjectMeta
.
Name
+
"/"
+
c
.
Name
if
logging
[
name
]
{
if
logging
[
name
]
||
// sanity check, array should have entry for each container
len
(
pod
.
Status
.
ContainerStatuses
)
<=
i
||
// Don't attempt to get logs for a container unless it is running or has terminated.
// Trying to get a log would just end up with an error that we would have to suppress.
(
pod
.
Status
.
ContainerStatuses
[
i
]
.
State
.
Running
==
nil
&&
pod
.
Status
.
ContainerStatuses
[
i
]
.
State
.
Terminated
==
nil
)
{
continue
continue
}
}
readCloser
,
err
:=
LogsForPod
(
ctx
,
cs
,
ns
,
pod
.
ObjectMeta
.
Name
,
readCloser
,
err
:=
LogsForPod
(
ctx
,
cs
,
ns
,
pod
.
ObjectMeta
.
Name
,
...
...
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