mirror of https://github.com/k3s-io/k3s
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
parent
e5f237a7ff
commit
90d2f9ad5e
|
@ -95,7 +95,7 @@
|
|||
- ansicolor:
|
||||
colormap: xterm
|
||||
- timeout:
|
||||
timeout: 45
|
||||
timeout: 90
|
||||
fail: true
|
||||
- timestamps
|
||||
- inject:
|
||||
|
|
|
@ -82,6 +82,7 @@ var _ = AfterSuite(func() {
|
|||
glog.Infof("Stopping node services...")
|
||||
e2es.stop()
|
||||
}
|
||||
glog.Infof("Tests Finished")
|
||||
})
|
||||
|
||||
var _ Reporter = &LogReporter{}
|
||||
|
@ -91,7 +92,7 @@ type LogReporter struct{}
|
|||
func (lr *LogReporter) SpecSuiteWillBegin(config config.GinkgoConfigType, summary *types.SuiteSummary) {
|
||||
b := &bytes.Buffer{}
|
||||
b.WriteString("******************************************************\n")
|
||||
glog.V(0).Infof(b.String())
|
||||
glog.Infof(b.String())
|
||||
}
|
||||
|
||||
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("******************************************************\n")
|
||||
glog.V(0).Infof(b.String())
|
||||
glog.Infof(b.String())
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ func init() {
|
|||
glog.Fatal(err)
|
||||
}
|
||||
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
|
||||
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
|
||||
tmp := fmt.Sprintf("/tmp/gcloud-e2e-%d", rand.Int31())
|
||||
_, err := RunSshCommand("ssh", host, "--", "mkdir", tmp)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
if deleteFiles {
|
||||
if cleanup {
|
||||
defer func() {
|
||||
output, err := RunSshCommand("ssh", host, "--", "rm", "-rf", tmp)
|
||||
if err != nil {
|
||||
|
@ -155,7 +155,7 @@ func RunRemote(archive string, host string, deleteFiles bool) (string, error) {
|
|||
cmd = getSshCommand(" && ",
|
||||
fmt.Sprintf("cd %s", tmp),
|
||||
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)
|
||||
if err != nil {
|
||||
|
|
|
@ -86,7 +86,7 @@ func (es *e2eService) stop() {
|
|||
if es.apiServerCmd != nil {
|
||||
err := es.apiServerCmd.Process.Kill()
|
||||
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 {
|
||||
|
|
|
@ -22,7 +22,6 @@ import (
|
|||
"net/url"
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
"k8s.io/kubernetes/pkg/apimachinery/registered"
|
||||
|
@ -151,7 +150,6 @@ func (config *PrivilegedPodTestConfig) dialFromContainer(containerIP string, con
|
|||
var output map[string]string
|
||||
err = json.Unmarshal([]byte(stdout), &output)
|
||||
Expect(err).NotTo(HaveOccurred(), fmt.Sprintf("Could not unmarshal curl response: %s", stdout))
|
||||
glog.Infof("Deserialized output is %v", output)
|
||||
return output
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue