From 32c3ccd486d4c72d678663fbdf24567ec73b9842 Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Thu, 24 Oct 2019 13:01:52 -0700 Subject: [PATCH 1/4] Use print instead of printf to preserve whitespace --- hack/jenkins/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/jenkins/common.sh b/hack/jenkins/common.sh index ccd921616037..64abce7819da 100755 --- a/hack/jenkins/common.sh +++ b/hack/jenkins/common.sh @@ -165,7 +165,7 @@ if type -P vboxmanage; then vboxmanage unregistervm "${guid}" || true done - ifaces=$(vboxmanage list hostonlyifs | grep -E "^Name:" | awk '{ printf $2 }') + ifaces=$(vboxmanage list hostonlyifs | grep -E "^Name:" | awk '{ print $2 }') for if in $ifaces; do vboxmanage hostonlyif remove "${if}" || true done From 33ef4e11030dfed074531e7e4841029b45cbf48a Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Thu, 24 Oct 2019 15:26:34 -0700 Subject: [PATCH 2/4] Add comment explaining why EXPECTED_DEFAULT_DRIVER=hyperkit --- hack/jenkins/osx_integration_tests_virtualbox.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hack/jenkins/osx_integration_tests_virtualbox.sh b/hack/jenkins/osx_integration_tests_virtualbox.sh index b4382058c90f..8f7c6e3dd0b8 100755 --- a/hack/jenkins/osx_integration_tests_virtualbox.sh +++ b/hack/jenkins/osx_integration_tests_virtualbox.sh @@ -30,6 +30,8 @@ VM_DRIVER="virtualbox" JOB_NAME="VirtualBox_macOS" EXTRA_ARGS="--bootstrapper=kubeadm" PARALLEL_COUNT=3 +# hyperkit behaves better, so it has higher precedence. +# Assumes that hyperkit is also installed on the VirtualBox CI host. EXPECTED_DEFAULT_DRIVER="hyperkit" From c153919a56ceee42bbec4cf35a9aff93e70d2f32 Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Thu, 24 Oct 2019 20:34:29 -0700 Subject: [PATCH 3/4] Mark none driver as Linux only --- pkg/minikube/registry/drvs/none/none.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/minikube/registry/drvs/none/none.go b/pkg/minikube/registry/drvs/none/none.go index 3491b1909028..fa094f9aeaa8 100644 --- a/pkg/minikube/registry/drvs/none/none.go +++ b/pkg/minikube/registry/drvs/none/none.go @@ -1,3 +1,5 @@ +// +build linux + /* Copyright 2018 The Kubernetes Authors All rights reserved. From c50a84934951d466975fe826a45a7b6e5633f6f4 Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Thu, 24 Oct 2019 20:34:38 -0700 Subject: [PATCH 4/4] Add more debug logs --- pkg/minikube/driver/driver.go | 1 + pkg/minikube/registry/global.go | 6 ++++++ test/integration/a_serial_test.go | 9 ++++++++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/pkg/minikube/driver/driver.go b/pkg/minikube/driver/driver.go index 4222470a075d..a87d7a607120 100644 --- a/pkg/minikube/driver/driver.go +++ b/pkg/minikube/driver/driver.go @@ -111,6 +111,7 @@ func Choose(options []registry.DriverState) (registry.DriverState, []registry.Dr continue } if ds.Priority > pick.Priority { + glog.V(1).Infof("%q has a higher priority (%d) than %q (%d)", ds.Name, ds.Priority, pick.Name, pick.Priority) pick = ds } } diff --git a/pkg/minikube/registry/global.go b/pkg/minikube/registry/global.go index 0d95cd8da363..97882296a540 100644 --- a/pkg/minikube/registry/global.go +++ b/pkg/minikube/registry/global.go @@ -17,6 +17,8 @@ limitations under the License. package registry import ( + "os" + "github.com/golang/glog" ) @@ -54,12 +56,16 @@ func Driver(name string) DriverDef { // Installed returns a list of installed drivers in the global registry func Installed() []DriverState { sts := []DriverState{} + glog.Infof("Querying for installed drivers using PATH=%s", os.Getenv("PATH")) + for _, d := range globalRegistry.List() { if d.Status == nil { glog.Errorf("%q does not implement Status", d.Name) continue } s := d.Status() + glog.Infof("%s priority: %d, state: %+v", d.Name, d.Priority, s) + if !s.Installed { glog.Infof("%q not installed: %v", d.Name, s.Error) continue diff --git a/test/integration/a_serial_test.go b/test/integration/a_serial_test.go index b39d7aa6b0dd..ae931662d707 100644 --- a/test/integration/a_serial_test.go +++ b/test/integration/a_serial_test.go @@ -55,7 +55,14 @@ func TestDownloadOnly(t *testing.T) { // Explicitly does not pass StartArgs() to test driver default // --force to avoid uid check args := []string{"start", "--download-only", "-p", profile, "--force", "--alsologtostderr", fmt.Sprintf("--kubernetes-version=%s", v)} - rrr, err = Run(t, exec.CommandContext(ctx, Target(), args...)) + + // Preserve the initial run-result for debugging + if rrr == nil { + rrr, err = Run(t, exec.CommandContext(ctx, Target(), args...)) + } else { + _, err = Run(t, exec.CommandContext(ctx, Target(), args...)) + } + if err != nil { t.Errorf("%s failed: %v", args, err) }