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
13821de1
Commit
13821de1
authored
Sep 23, 2015
by
Eric Tune
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14427 from mesosphere/sttts-resource-tests
Avoid assumption of a fixed list of cgroups in e2e conformance tests
parents
c9c59370
643a7f19
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
15 deletions
+24
-15
conformance-test.sh
hack/conformance-test.sh
+1
-1
e2e.sh
hack/jenkins/e2e.sh
+2
-2
kubelet.go
test/e2e/kubelet.go
+1
-1
kubelet_stats.go
test/e2e/kubelet_stats.go
+18
-9
monitor_resources.go
test/e2e/monitor_resources.go
+2
-2
No files found.
hack/conformance-test.sh
View file @
13821de1
...
...
@@ -103,7 +103,7 @@ echo "Conformance test checking conformance with Kubernetes version 1.0"
# MaxPods\slimit\snumber\sof\spods: not sure why this wasn't working on GCE but it wasn't.
# Kubectl\sclient\sSimple\spod: not sure why this wasn't working on GCE but it wasn't
# DNS: not sure why this wasn't working on GCE but it wasn't
export
CONFORMANCE_TEST_SKIP_REGEX
=
"Cadvisor|MasterCerts|Density|Cluster
\s
level
\s
logging|Etcd
\s
failure|Load
\s
Capacity|Monitoring|Namespaces.*seconds|Pod
\s
disks|Reboot|Restart|Nodes|Scale|Services.*load
\s
balancer|Services.*NodePort|Services.*nodeport|Shell|SSH|Addon
\s
update|Volumes|Clean
\s
up
\s
pods
\s
on
\s
node|Skipped|skipped|MaxPods
\s
limit
\s
number
\s
of
\s
pods|Kubectl
\s
client
\s
Simple
\s
pod|DNS"
export
CONFORMANCE_TEST_SKIP_REGEX
=
"Cadvisor|MasterCerts|Density|Cluster
\s
level
\s
logging|Etcd
\s
failure|Load
\s
Capacity|Monitoring|Namespaces.*seconds|Pod
\s
disks|Reboot|Restart|Nodes|Scale|Services.*load
\s
balancer|Services.*NodePort|Services.*nodeport|Shell|SSH|Addon
\s
update|Volumes|Clean
\s
up
\s
pods
\s
on
\s
node|Skipped|skipped|MaxPods
\s
limit
\s
number
\s
of
\s
pods|Kubectl
\s
client
\s
Simple
\s
pod|DNS
|Resource
\s
usage
\s
of
\s
system
\s
containers
"
declare
-x
KUBERNETES_CONFORMANCE_TEST
=
"y"
declare
-x
NUM_MINIONS
=
4
...
...
hack/jenkins/e2e.sh
View file @
13821de1
...
...
@@ -119,7 +119,7 @@ GKE_REQUIRED_SKIP_TESTS=(
GCE_FLAKY_TESTS
=(
"DaemonRestart"
"Daemon
\s
set
\s
should
\s
launch
\s
a
\s
daemon
\s
pod
\s
on
\s
every
\s
node
\s
of
\s
the
\s
cluster"
"Resource
Usage
"
"Resource
\s
usage
\s
of
\s
system
\s
containers
"
"monotonically
\s
increasing
\s
restart
\s
count"
"should
\s
be
\s
able
\s
to
\s
change
\s
the
\s
type
\s
and
\s
nodeport
\s
settings
\s
of
\s
a
\s
service"
# file: service.go, issue: #13032
"allows
\s
scheduling
\s
of
\s
pods
\s
on
\s
a
\s
minion
\s
after
\s
it
\s
rejoins
\s
the
\s
cluster"
# file: resize_nodes.go, issue: #13258
...
...
@@ -143,7 +143,7 @@ GCE_PARALLEL_SKIP_TESTS=(
"Nodes
\s
Network"
"Nodes
\s
Resize"
"MaxPods"
"Resource
Usage
"
"Resource
\s
usage
\s
of
\s
system
\s
containers
"
"SchedulerPredicates"
"Services.*restarting"
"Shell.*services"
...
...
test/e2e/kubelet.go
View file @
13821de1
...
...
@@ -103,7 +103,7 @@ var _ = Describe("kubelet", func() {
for
_
,
node
:=
range
nodes
.
Items
{
nodeNames
.
Insert
(
node
.
Name
)
}
resourceMonitor
=
newResourceMonitor
(
framework
.
Client
,
targetContainers
,
containerStatsPollingInterval
)
resourceMonitor
=
newResourceMonitor
(
framework
.
Client
,
targetContainers
()
,
containerStatsPollingInterval
)
resourceMonitor
.
Start
()
})
...
...
test/e2e/kubelet_stats.go
View file @
13821de1
...
...
@@ -178,12 +178,20 @@ const (
)
// A list of containers for which we want to collect resource usage.
var
targetContainers
=
[]
string
{
"/"
,
"/docker-daemon"
,
"/kubelet"
,
"/kube-proxy"
,
"/system"
,
func
targetContainers
()
[]
string
{
if
providerIs
(
"gce"
,
"gke"
)
{
return
[]
string
{
"/"
,
"/docker-daemon"
,
"/kubelet"
,
"/kube-proxy"
,
"/system"
,
}
}
else
{
return
[]
string
{
"/"
,
}
}
}
type
containerResourceUsage
struct
{
...
...
@@ -229,8 +237,9 @@ func getOneTimeResourceUsageOnNode(c *client.Client, nodeName string, cpuInterva
return
nil
,
err
}
// Process container infos that are relevant to us.
usageMap
:=
make
(
map
[
string
]
*
containerResourceUsage
,
len
(
targetContainers
))
for
_
,
name
:=
range
targetContainers
{
containers
:=
targetContainers
()
usageMap
:=
make
(
map
[
string
]
*
containerResourceUsage
,
len
(
containers
))
for
_
,
name
:=
range
containers
{
info
,
ok
:=
containerInfos
[
name
]
if
!
ok
{
return
nil
,
fmt
.
Errorf
(
"missing info for container %q on node %q"
,
name
,
nodeName
)
...
...
@@ -491,7 +500,7 @@ func (r *resourceMonitor) LogCPUSummary() {
buf
:=
&
bytes
.
Buffer
{}
w
:=
tabwriter
.
NewWriter
(
buf
,
1
,
0
,
1
,
' '
,
0
)
fmt
.
Fprintf
(
w
,
"%s
\n
"
,
strings
.
Join
(
header
,
"
\t
"
))
for
_
,
containerName
:=
range
targetContainers
{
for
_
,
containerName
:=
range
targetContainers
()
{
data
:=
collector
.
GetBasicCPUStats
(
containerName
)
var
s
[]
string
s
=
append
(
s
,
fmt
.
Sprintf
(
"%q"
,
containerName
))
...
...
test/e2e/monitor_resources.go
View file @
13821de1
...
...
@@ -83,9 +83,9 @@ func computeAverage(sliceOfUsages []resourceUsagePerContainer) (result resourceU
return
}
// This tests does nothing except checking current resource usage of containers def
a
ined in kubelet_stats systemContainers variable.
// This tests does nothing except checking current resource usage of containers defined in kubelet_stats systemContainers variable.
// Test fails if an average container resource consumption over datapointAmount tries exceeds amount defined in allowedUsage.
var
_
=
Describe
(
"Resource
Usage
"
,
func
()
{
var
_
=
Describe
(
"Resource
usage of system containers
"
,
func
()
{
var
c
*
client
.
Client
BeforeEach
(
func
()
{
var
err
error
...
...
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