mirror of https://github.com/k3s-io/k3s
Merge pull request #24426 from pwittrock/flaky
Automatic merge from submit-queue Incremental improvements to kubelet e2e tests - Add keep-alive to ssh connection - Don't try to stop services on image-based runs - Increase jenkins ci timeout to 90 minutes to accomadate unpredictable go build times - Remove spammy log statementpull/6/head
commit
86544c2288
|
@ -93,7 +93,7 @@
|
||||||
- ansicolor:
|
- ansicolor:
|
||||||
colormap: xterm
|
colormap: xterm
|
||||||
- timeout:
|
- timeout:
|
||||||
timeout: 45
|
timeout: 90
|
||||||
fail: true
|
fail: true
|
||||||
- timestamps
|
- timestamps
|
||||||
- inject:
|
- inject:
|
||||||
|
|
|
@ -82,6 +82,7 @@ var _ = AfterSuite(func() {
|
||||||
glog.Infof("Stopping node services...")
|
glog.Infof("Stopping node services...")
|
||||||
e2es.stop()
|
e2es.stop()
|
||||||
}
|
}
|
||||||
|
glog.Infof("Tests Finished")
|
||||||
})
|
})
|
||||||
|
|
||||||
var _ Reporter = &LogReporter{}
|
var _ Reporter = &LogReporter{}
|
||||||
|
@ -91,7 +92,7 @@ type LogReporter struct{}
|
||||||
func (lr *LogReporter) SpecSuiteWillBegin(config config.GinkgoConfigType, summary *types.SuiteSummary) {
|
func (lr *LogReporter) SpecSuiteWillBegin(config config.GinkgoConfigType, summary *types.SuiteSummary) {
|
||||||
b := &bytes.Buffer{}
|
b := &bytes.Buffer{}
|
||||||
b.WriteString("******************************************************\n")
|
b.WriteString("******************************************************\n")
|
||||||
glog.V(0).Infof(b.String())
|
glog.Infof(b.String())
|
||||||
}
|
}
|
||||||
|
|
||||||
func (lr *LogReporter) BeforeSuiteDidRun(setupSummary *types.SetupSummary) {}
|
func (lr *LogReporter) BeforeSuiteDidRun(setupSummary *types.SetupSummary) {}
|
||||||
|
@ -115,5 +116,5 @@ func (lr *LogReporter) SpecSuiteDidEnd(summary *types.SuiteSummary) {
|
||||||
b.WriteString(fmt.Sprintf("etcd output:\n%s\n", e2es.etcdCombinedOut.String()))
|
b.WriteString(fmt.Sprintf("etcd output:\n%s\n", e2es.etcdCombinedOut.String()))
|
||||||
}
|
}
|
||||||
b.WriteString("******************************************************\n")
|
b.WriteString("******************************************************\n")
|
||||||
glog.V(0).Infof(b.String())
|
glog.Infof(b.String())
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ func init() {
|
||||||
glog.Fatal(err)
|
glog.Fatal(err)
|
||||||
}
|
}
|
||||||
sshOptionsMap = map[string]string{
|
sshOptionsMap = map[string]string{
|
||||||
"gce": fmt.Sprintf("-i %s/.ssh/google_compute_engine -o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o CheckHostIP=no -o StrictHostKeyChecking=no", usr.HomeDir),
|
"gce": fmt.Sprintf("-i %s/.ssh/google_compute_engine -o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o CheckHostIP=no -o StrictHostKeyChecking=no -o ServerAliveInterval=30", usr.HomeDir),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,14 +118,14 @@ func CreateTestArchive() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
// RunRemote copies the archive file to a /tmp file on host, unpacks it, and runs the e2e_node.test
|
// RunRemote copies the archive file to a /tmp file on host, unpacks it, and runs the e2e_node.test
|
||||||
func RunRemote(archive string, host string, deleteFiles bool) (string, error) {
|
func RunRemote(archive string, host string, cleanup bool) (string, error) {
|
||||||
// Create the temp staging directory
|
// Create the temp staging directory
|
||||||
tmp := fmt.Sprintf("/tmp/gcloud-e2e-%d", rand.Int31())
|
tmp := fmt.Sprintf("/tmp/gcloud-e2e-%d", rand.Int31())
|
||||||
_, err := RunSshCommand("ssh", host, "--", "mkdir", tmp)
|
_, err := RunSshCommand("ssh", host, "--", "mkdir", tmp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
if deleteFiles {
|
if cleanup {
|
||||||
defer func() {
|
defer func() {
|
||||||
output, err := RunSshCommand("ssh", host, "--", "rm", "-rf", tmp)
|
output, err := RunSshCommand("ssh", host, "--", "rm", "-rf", tmp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -155,7 +155,7 @@ func RunRemote(archive string, host string, deleteFiles bool) (string, error) {
|
||||||
cmd = getSshCommand(" && ",
|
cmd = getSshCommand(" && ",
|
||||||
fmt.Sprintf("cd %s", tmp),
|
fmt.Sprintf("cd %s", tmp),
|
||||||
fmt.Sprintf("tar -xzvf ./%s", archiveName),
|
fmt.Sprintf("tar -xzvf ./%s", archiveName),
|
||||||
fmt.Sprintf("./e2e_node.test --logtostderr --v 2 --build-services=false --node-name=%s", host),
|
fmt.Sprintf("./e2e_node.test --logtostderr --v 2 --build-services=false --stop-services=%t --node-name=%s", cleanup, host),
|
||||||
)
|
)
|
||||||
output, err := RunSshCommand("ssh", host, "--", "sh", "-c", cmd)
|
output, err := RunSshCommand("ssh", host, "--", "sh", "-c", cmd)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -86,7 +86,7 @@ func (es *e2eService) stop() {
|
||||||
if es.apiServerCmd != nil {
|
if es.apiServerCmd != nil {
|
||||||
err := es.apiServerCmd.Process.Kill()
|
err := es.apiServerCmd.Process.Kill()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Errorf("Failed to stop be-apiserver.\n%v", err)
|
glog.Errorf("Failed to stop kube-apiserver.\n%v", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if es.etcdCmd != nil {
|
if es.etcdCmd != nil {
|
||||||
|
|
|
@ -22,7 +22,6 @@ import (
|
||||||
"net/url"
|
"net/url"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/golang/glog"
|
|
||||||
"k8s.io/kubernetes/pkg/api"
|
"k8s.io/kubernetes/pkg/api"
|
||||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||||
"k8s.io/kubernetes/pkg/apimachinery/registered"
|
"k8s.io/kubernetes/pkg/apimachinery/registered"
|
||||||
|
@ -151,7 +150,6 @@ func (config *PrivilegedPodTestConfig) dialFromContainer(containerIP string, con
|
||||||
var output map[string]string
|
var output map[string]string
|
||||||
err = json.Unmarshal([]byte(stdout), &output)
|
err = json.Unmarshal([]byte(stdout), &output)
|
||||||
Expect(err).NotTo(HaveOccurred(), fmt.Sprintf("Could not unmarshal curl response: %s", stdout))
|
Expect(err).NotTo(HaveOccurred(), fmt.Sprintf("Could not unmarshal curl response: %s", stdout))
|
||||||
glog.Infof("Deserialized output is %v", output)
|
|
||||||
return output
|
return output
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue