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
d705cc5c
Commit
d705cc5c
authored
Apr 29, 2016
by
Yifan Gu
Committed by
Yifan Gu
May 01, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
e2e_node: Disable auto restart on CoreOS.
parent
05951caa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
e2e_node_suite_test.go
test/e2e_node/e2e_node_suite_test.go
+19
-0
No files found.
test/e2e_node/e2e_node_suite_test.go
View file @
d705cc5c
...
@@ -22,6 +22,7 @@ import (
...
@@ -22,6 +22,7 @@ import (
"bytes"
"bytes"
"flag"
"flag"
"fmt"
"fmt"
"io/ioutil"
"math/rand"
"math/rand"
"os/exec"
"os/exec"
"strings"
"strings"
...
@@ -65,6 +66,11 @@ var _ = BeforeSuite(func() {
...
@@ -65,6 +66,11 @@ var _ = BeforeSuite(func() {
*
nodeName
=
strings
.
TrimSpace
(
fmt
.
Sprintf
(
"%s"
,
output
))
*
nodeName
=
strings
.
TrimSpace
(
fmt
.
Sprintf
(
"%s"
,
output
))
}
}
// TODO(yifan): Temporary workaround to disable coreos from auto restart
// by masking the locksmithd.
// We should mask locksmithd when provisioning the machine.
maskLocksmithdOnCoreos
()
if
*
startServices
{
if
*
startServices
{
e2es
=
newE2eService
(
*
nodeName
)
e2es
=
newE2eService
(
*
nodeName
)
if
err
:=
e2es
.
start
();
err
!=
nil
{
if
err
:=
e2es
.
start
();
err
!=
nil
{
...
@@ -118,3 +124,16 @@ func (lr *LogReporter) SpecSuiteDidEnd(summary *types.SuiteSummary) {
...
@@ -118,3 +124,16 @@ func (lr *LogReporter) SpecSuiteDidEnd(summary *types.SuiteSummary) {
b
.
WriteString
(
"******************************************************
\n
"
)
b
.
WriteString
(
"******************************************************
\n
"
)
glog
.
Infof
(
b
.
String
())
glog
.
Infof
(
b
.
String
())
}
}
func
maskLocksmithdOnCoreos
()
{
data
,
err
:=
ioutil
.
ReadFile
(
"/etc/os-release"
)
if
err
!=
nil
{
glog
.
Fatalf
(
"Could not read /etc/os-release: %v"
,
err
)
}
if
bytes
.
Contains
(
data
,
[]
byte
(
"ID=coreos"
))
{
if
output
,
err
:=
exec
.
Command
(
"sudo"
,
"systemctl"
,
"mask"
,
"--now"
,
"locksmithd"
)
.
CombinedOutput
();
err
!=
nil
{
glog
.
Fatalf
(
"Could not mask locksmithd: %v, output: %q"
,
err
,
string
(
output
))
}
}
glog
.
Infof
(
"Locksmithd is masked successfully"
)
}
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