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
bd920de4
Commit
bd920de4
authored
May 24, 2016
by
Wojciech Tyczynski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid dumping all information in large clusters
parent
8f104a7b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
util.go
test/e2e/framework/util.go
+15
-3
No files found.
test/e2e/framework/util.go
View file @
bd920de4
...
@@ -2264,9 +2264,21 @@ func DumpAllNamespaceInfo(c *client.Client, namespace string) {
...
@@ -2264,9 +2264,21 @@ func DumpAllNamespaceInfo(c *client.Client, namespace string) {
// that if you delete a bunch of pods right before ending your test,
// that if you delete a bunch of pods right before ending your test,
// you may or may not see the killing/deletion/Cleanup events.
// you may or may not see the killing/deletion/Cleanup events.
dumpAllPodInfo
(
c
)
// If cluster is large, then the following logs are basically useless, because:
// 1. it takes tens of minutes or hours to grab all of them
dumpAllNodeInfo
(
c
)
// 2. there are so many of them that working with them are mostly impossible
// So we dump them only if the cluster is relatively small.
maxNodesForDump
:=
20
if
nodes
,
err
:=
c
.
Nodes
()
.
List
(
api
.
ListOptions
{});
err
==
nil
{
if
len
(
nodes
.
Items
)
<=
maxNodesForDump
{
dumpAllPodInfo
(
c
)
dumpAllNodeInfo
(
c
)
}
else
{
Logf
(
"skipping dumping cluster info - cluster too large"
)
}
}
else
{
Logf
(
"unable to fetch node list: %v"
,
err
)
}
}
}
// byFirstTimestamp sorts a slice of events by first timestamp, using their involvedObject's name as a tie breaker.
// byFirstTimestamp sorts a slice of events by first timestamp, using their involvedObject's name as a tie breaker.
...
...
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