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
19c19c2e
Commit
19c19c2e
authored
Oct 21, 2016
by
Vishnu kannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updating GCI mounter to be containerized
Signed-off-by:
Vishnu kannan
<
vishnuk@google.com
>
parent
634df041
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
8 deletions
+23
-8
mounter
cluster/gce/gci/mounter/mounter
+17
-2
remote.go
test/e2e_node/remote/remote.go
+6
-6
No files found.
cluster/gce/gci/mounter/mounter
100644 → 100755
View file @
19c19c2e
...
@@ -17,4 +17,20 @@
...
@@ -17,4 +17,20 @@
set
-e
set
-e
set
-o
pipefail
set
-o
pipefail
sudo
/bin/mount
"
$@
"
MOUNTER_DOCKER_IMAGE
=
gcr.io/google_containers/gci-mounter
\ No newline at end of file
MOUNTER_DOCKER_VERSION
=
v1
MOUNTER_USER
=
root
RKT_BINARY
=
/home/kubernetes/bin/rkt
function
gc
{
${
RKT_BINARY
}
gc
--grace-period
=
0s &> /dev/null
}
# Garbage collect old rkt containers on exit
trap
gc EXIT
${
RKT_BINARY
}
run
--stage1-name
=
"coreos.com/rkt/stage1-fly:1.17.0"
\
--insecure-options
=
image
\
--volume
=
rootfs,kind
=
host,source
=
/,readOnly
=
false
,recursive
=
true
\
--mount
volume
=
rootfs,target
=
/media/root
\
docker://
${
MOUNTER_DOCKER_IMAGE
}
:
${
MOUNTER_DOCKER_VERSION
}
--user
=
${
MOUNTER_USER
}
--exec
/bin/mount
--
"
$@
"
test/e2e_node/remote/remote.go
View file @
19c19c2e
...
@@ -42,10 +42,11 @@ var resultsDir = flag.String("results-dir", "/tmp/", "Directory to scp test resu
...
@@ -42,10 +42,11 @@ var resultsDir = flag.String("results-dir", "/tmp/", "Directory to scp test resu
var
sshOptionsMap
map
[
string
]
string
var
sshOptionsMap
map
[
string
]
string
const
(
const
(
archiveName
=
"e2e_node_test.tar.gz"
archiveName
=
"e2e_node_test.tar.gz"
CNIRelease
=
"07a8a28637e97b22eb8dfe710eeae1344f69d16e"
CNIRelease
=
"07a8a28637e97b22eb8dfe710eeae1344f69d16e"
CNIDirectory
=
"cni"
CNIDirectory
=
"cni"
mounterRootfsPath
string
=
"/"
// Note: This path needs to be in sync with the "target" path for `/` in cluster/gce/gci/mounter/mounter
mounterRootfsPath
string
=
"/media/root"
)
)
var
CNIURL
=
fmt
.
Sprintf
(
"https://storage.googleapis.com/kubernetes-release/network-plugins/cni-%s.tar.gz"
,
CNIRelease
)
var
CNIURL
=
fmt
.
Sprintf
(
"https://storage.googleapis.com/kubernetes-release/network-plugins/cni-%s.tar.gz"
,
CNIRelease
)
...
@@ -264,8 +265,6 @@ func RunRemote(archive string, host string, cleanup bool, junitFilePrefix string
...
@@ -264,8 +265,6 @@ func RunRemote(archive string, host string, cleanup bool, junitFilePrefix string
return
""
,
false
,
fmt
.
Errorf
(
"Issue detecting node's OS via node's /etc/os-release. Err: %v, Output:
\n
%s"
,
err
,
output
)
return
""
,
false
,
fmt
.
Errorf
(
"Issue detecting node's OS via node's /etc/os-release. Err: %v, Output:
\n
%s"
,
err
,
output
)
}
}
if
strings
.
Contains
(
output
,
"ID=gci"
)
{
if
strings
.
Contains
(
output
,
"ID=gci"
)
{
glog
.
Infof
(
"GCI node and GCI mounter both detected, modifying --mounter-path & --experimental-mounter-rootfs-path accordingly"
)
// Note this implicitly requires the script to be where we expect in the tarball, so if that location changes the error
// Note this implicitly requires the script to be where we expect in the tarball, so if that location changes the error
// here will tell us to update the remote test runner.
// here will tell us to update the remote test runner.
mounterPath
:=
filepath
.
Join
(
tmp
,
"cluster/gce/gci/mounter/mounter"
)
mounterPath
:=
filepath
.
Join
(
tmp
,
"cluster/gce/gci/mounter/mounter"
)
...
@@ -277,6 +276,7 @@ func RunRemote(archive string, host string, cleanup bool, junitFilePrefix string
...
@@ -277,6 +276,7 @@ func RunRemote(archive string, host string, cleanup bool, junitFilePrefix string
// Insert args at beginning of testArgs, so any values from command line take precedence
// Insert args at beginning of testArgs, so any values from command line take precedence
testArgs
=
fmt
.
Sprintf
(
"--experimental-mounter-rootfs-path=%s "
,
mounterRootfsPath
)
+
testArgs
testArgs
=
fmt
.
Sprintf
(
"--experimental-mounter-rootfs-path=%s "
,
mounterRootfsPath
)
+
testArgs
testArgs
=
fmt
.
Sprintf
(
"--experimental-mounter-path=%s "
,
mounterPath
)
+
testArgs
testArgs
=
fmt
.
Sprintf
(
"--experimental-mounter-path=%s "
,
mounterPath
)
+
testArgs
glog
.
Infof
(
"GCI node and GCI mounter both detected, setting --experimental-mounter-path=%q and --experimental-mounter-rootfs-path=%q accordingly"
,
mounterPath
,
mounterRootfsPath
)
}
}
// Run the tests
// Run the tests
...
...
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