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
06b31849
Commit
06b31849
authored
Sep 12, 2017
by
Jiaying Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extends GPUDevicePlugin e2e test to exercise device plugin restarts.
parent
db809c0e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
nvidia-gpus.go
test/e2e/scheduling/nvidia-gpus.go
+20
-0
No files found.
test/e2e/scheduling/nvidia-gpus.go
View file @
06b31849
...
@@ -240,6 +240,26 @@ var _ = SIGDescribe("[Feature:GPU]", func() {
...
@@ -240,6 +240,26 @@ var _ = SIGDescribe("[Feature:GPU]", func() {
var
_
=
SIGDescribe
(
"[Feature:GPUDevicePlugin]"
,
func
()
{
var
_
=
SIGDescribe
(
"[Feature:GPUDevicePlugin]"
,
func
()
{
f
:=
framework
.
NewDefaultFramework
(
"device-plugin-gpus"
)
f
:=
framework
.
NewDefaultFramework
(
"device-plugin-gpus"
)
It
(
"run Nvidia GPU Device Plugin tests on Container Optimized OS only"
,
func
()
{
It
(
"run Nvidia GPU Device Plugin tests on Container Optimized OS only"
,
func
()
{
// 1. Verifies GPU resource is successfully advertised on the nodes
// and we can run pods using GPUs.
By
(
"Starting device plugin daemonset and running GPU pods"
)
testNvidiaGPUsOnCOS
(
f
)
// 2. Verifies that when the device plugin DaemonSet is removed, resource capacity drops to zero.
By
(
"Deleting device plugin daemonset"
)
ds
:=
dsFromManifest
(
dsYamlUrl
)
falseVar
:=
false
err
:=
f
.
ClientSet
.
Extensions
()
.
DaemonSets
(
f
.
Namespace
.
Name
)
.
Delete
(
ds
.
Name
,
&
metav1
.
DeleteOptions
{
OrphanDependents
:
&
falseVar
})
framework
.
ExpectNoError
(
err
,
"failed to delete daemonset"
)
framework
.
Logf
(
"Successfully deleted device plugin daemonset. Wait for resource to be removed."
)
// Wait for Nvidia GPUs to be not available on nodes
Eventually
(
func
()
bool
{
return
!
areGPUsAvailableOnAllSchedulableNodes
(
f
)
},
5
*
time
.
Minute
,
time
.
Second
)
.
Should
(
BeTrue
())
// 3. Restarts the device plugin DaemonSet. Verifies GPU resource is successfully advertised
// on the nodes and we can run pods using GPUs.
By
(
"Restarting device plugin daemonset and running GPU pods"
)
testNvidiaGPUsOnCOS
(
f
)
testNvidiaGPUsOnCOS
(
f
)
})
})
})
})
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