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
e7a1b4e1
Commit
e7a1b4e1
authored
Aug 30, 2016
by
Random-Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not set stop-services=false for node e2e and add more logs.
parent
f839c5ff
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
5 deletions
+13
-5
test-e2e-node.sh
hack/make-rules/test-e2e-node.sh
+2
-2
remote.go
test/e2e_node/remote/remote.go
+2
-2
services.go
test/e2e_node/services/services.go
+9
-1
No files found.
hack/make-rules/test-e2e-node.sh
View file @
e7a1b4e1
...
...
@@ -168,7 +168,7 @@ else
# Test using the host the script was run on
# Provided for backwards compatibility
go run
test
/e2e_node/runner/local/run_local.go
--ginkgo-flags
=
"
$ginkgoflags
"
\
--test-flags
=
"--alsologtostderr --v
2
--report-dir=
${
report
}
--node-name
$(
hostname
)
\
--start-services=true --stop-services=true
$test_args
"
--build-dependencies
=
true
--test-flags
=
"--alsologtostderr --v
4
--report-dir=
${
report
}
--node-name
$(
hostname
)
\
$test_args
"
--build-dependencies
=
true
exit
$?
fi
test/e2e_node/remote/remote.go
View file @
e7a1b4e1
...
...
@@ -195,8 +195,8 @@ func RunRemote(archive string, host string, cleanup bool, junitFilePrefix string
// Run the tests
cmd
=
getSshCommand
(
" && "
,
fmt
.
Sprintf
(
"cd %s"
,
tmp
),
fmt
.
Sprintf
(
"timeout -k 30s %fs ./ginkgo %s ./e2e_node.test -- --logtostderr --v
2 --stop-services=%t
--node-name=%s --report-dir=%s/results --report-prefix=%s %s"
,
testTimeoutSeconds
.
Seconds
(),
ginkgoFlags
,
cleanup
,
host
,
tmp
,
junitFilePrefix
,
testArgs
),
fmt
.
Sprintf
(
"timeout -k 30s %fs ./ginkgo %s ./e2e_node.test -- --logtostderr --v
4
--node-name=%s --report-dir=%s/results --report-prefix=%s %s"
,
testTimeoutSeconds
.
Seconds
(),
ginkgoFlags
,
host
,
tmp
,
junitFilePrefix
,
testArgs
),
)
aggErrs
:=
[]
error
{}
...
...
test/e2e_node/services/services.go
View file @
e7a1b4e1
...
...
@@ -87,6 +87,7 @@ func (e *E2EServices) Start() error {
// "--cgroups-per-qos="+strconv.FormatBool(framework.TestContext.CgroupsPerQOS),
"--manifest-path"
,
framework
.
TestContext
.
ManifestPath
,
"--eviction-hard"
,
framework
.
TestContext
.
EvictionHard
,
"--logtostderr"
,
)
e
.
services
=
newServer
(
"services"
,
startCmd
,
nil
,
nil
,
getHealthCheckURLs
(),
servicesLogFile
,
false
)
return
e
.
services
.
start
()
...
...
@@ -195,6 +196,7 @@ func (es *e2eService) run() error {
}
func
(
es
*
e2eService
)
start
()
error
{
glog
.
Info
(
"Starting e2e services..."
)
err
:=
es
.
startEtcd
()
if
err
!=
nil
{
return
err
...
...
@@ -215,7 +217,7 @@ func (es *e2eService) start() error {
if
err
!=
nil
{
return
nil
}
glog
.
Info
(
"E2E services started."
)
return
nil
}
...
...
@@ -226,6 +228,7 @@ func (es *e2eService) getLogFiles() {
if
framework
.
TestContext
.
ReportDir
==
""
{
return
}
glog
.
Info
(
"Fetching log files..."
)
journaldFound
:=
isJournaldAvailable
()
for
targetFileName
,
logFileData
:=
range
es
.
logFiles
{
targetLink
:=
path
.
Join
(
framework
.
TestContext
.
ReportDir
,
targetFileName
)
...
...
@@ -234,6 +237,7 @@ func (es *e2eService) getLogFiles() {
if
len
(
logFileData
.
journalctlCommand
)
==
0
{
continue
}
glog
.
Infof
(
"Get log file %q with journalctl command %v."
,
targetFileName
,
logFileData
.
journalctlCommand
)
out
,
err
:=
exec
.
Command
(
"sudo"
,
append
([]
string
{
"journalctl"
},
logFileData
.
journalctlCommand
...
)
...
)
.
CombinedOutput
()
if
err
!=
nil
{
glog
.
Errorf
(
"failed to get %q from journald: %v, %v"
,
targetFileName
,
string
(
out
),
err
)
...
...
@@ -275,6 +279,7 @@ func isJournaldAvailable() bool {
}
func
(
es
*
e2eService
)
stop
()
{
glog
.
Info
(
"Stopping e2e services..."
)
es
.
getLogFiles
()
// TODO(random-liu): Use a loop to stop all services after introducing service interface.
// Stop namespace controller
...
...
@@ -306,6 +311,7 @@ func (es *e2eService) stop() {
glog
.
Errorf
(
"Failed to delete directory %s.
\n
%v"
,
d
,
err
)
}
}
glog
.
Info
(
"E2E services stopped."
)
}
func
(
es
*
e2eService
)
startEtcd
()
error
{
...
...
@@ -496,6 +502,7 @@ func readinessCheck(urls []string, errCh <-chan error) error {
// Note: restartOnExit == true requires len(s.healthCheckUrls) > 0 to work properly.
func
(
s
*
server
)
start
()
error
{
glog
.
Infof
(
"Start server %q with command %q"
,
s
.
name
,
commandToString
(
s
.
startCommand
))
errCh
:=
make
(
chan
error
)
var
stopRestartingCh
,
ackStopRestartingCh
chan
bool
...
...
@@ -634,6 +641,7 @@ func (s *server) start() error {
}
func
(
s
*
server
)
kill
()
error
{
glog
.
Infof
(
"Kill server %q"
,
s
.
name
)
name
:=
s
.
name
cmd
:=
s
.
startCommand
...
...
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