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
8ea9417a
Commit
8ea9417a
authored
Nov 09, 2017
by
Yang Guo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust GKE spec to validate images with kernel version 4.10+
parent
33f873db
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
1 deletion
+32
-1
BUILD
test/e2e_node/BUILD
+1
-0
gke_environment_test.go
test/e2e_node/gke_environment_test.go
+28
-0
gke.yaml
test/e2e_node/system/specs/gke.yaml
+3
-1
No files found.
test/e2e_node/BUILD
View file @
8ea9417a
...
...
@@ -135,6 +135,7 @@ go_test(
"//test/e2e_node/services:go_default_library",
"//test/e2e_node/system:go_default_library",
"//test/utils/image:go_default_library",
"//vendor/github.com/blang/semver:go_default_library",
"//vendor/github.com/coreos/go-systemd/util:go_default_library",
"//vendor/github.com/davecgh/go-spew/spew:go_default_library",
"//vendor/github.com/golang/glog:go_default_library",
...
...
test/e2e_node/gke_environment_test.go
View file @
8ea9417a
...
...
@@ -28,6 +28,7 @@ import (
"k8s.io/kubernetes/test/e2e/framework"
"github.com/blang/semver"
.
"github.com/onsi/ginkgo"
)
...
...
@@ -122,6 +123,18 @@ func checkDockerConfig() error {
}
missing
=
map
[
string
]
bool
{}
)
// Whitelists CONFIG_DEVPTS_MULTIPLE_INSTANCES (meaning allowing it to be
// absent) if the kernel version is >= 4.8, because this option has been
// removed from the 4.8 kernel.
kernelVersion
,
err
:=
getKernelVersion
()
if
err
!=
nil
{
return
err
}
if
kernelVersion
.
GTE
(
semver
.
MustParse
(
"4.8.0"
))
{
whitelist
[
"CONFIG_DEVPTS_MULTIPLE_INSTANCES"
]
=
true
}
for
_
,
bin
:=
range
bins
{
if
_
,
err
:=
os
.
Stat
(
bin
);
os
.
IsNotExist
(
err
)
{
continue
...
...
@@ -400,3 +413,18 @@ func getCmdToProcessMap() (map[string][]process, error) {
}
return
result
,
nil
}
// getKernelVersion returns the kernel version in the semantic version format.
func
getKernelVersion
()
(
*
semver
.
Version
,
error
)
{
output
,
err
:=
runCommand
(
"uname"
,
"-r"
)
if
err
!=
nil
{
return
nil
,
err
}
// An example 'output' could be "4.13.0-1001-gke".
v
:=
strings
.
TrimSpace
(
strings
.
Split
(
output
,
"-"
)[
0
])
kernelVersion
,
err
:=
semver
.
Make
(
v
)
if
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"failed to convert %q to semantic version: %s"
,
v
,
err
)
}
return
&
kernelVersion
,
nil
}
test/e2e_node/system/specs/gke.yaml
View file @
8ea9417a
...
...
@@ -5,7 +5,9 @@ os: Linux
kernelSpec
:
versions
:
# GKE requires kernel version 4.4+.
-
4\.[4-9].*
-
'
4\.[4-9].*'
-
'
4\.[1-9][0-9].*'
-
'
[5-9].*'
# Required kernel configurations -- the configuration must be set to "y" or
# "m".
...
...
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