From fc93678154ba6730f2267c5e86735843adbf30db Mon Sep 17 00:00:00 2001
From: Thomas Stromberg <t+github@stromberg.org>
Date: Thu, 23 Apr 2020 10:47:36 -0700
Subject: [PATCH 1/6] Add IS_EXE to integration dependency list

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 061d62039d..2ca6b1787e 100755
--- a/Makefile
+++ b/Makefile
@@ -255,7 +255,7 @@ docker-machine-driver-hyperkit: out/docker-machine-driver-hyperkit ## Build Hype
 docker-machine-driver-kvm2: out/docker-machine-driver-kvm2 ## Build KVM2 driver
 
 .PHONY: integration
-integration: out/minikube ## Trigger minikube integration test
+integration: out/minikube$(IS_EXE) ## Trigger minikube integration test
 	go test -v -test.timeout=60m ./test/integration --tags="$(MINIKUBE_INTEGRATION_BUILD_TAGS)" $(TEST_ARGS)
 
 .PHONY: integration-none-driver

From c10822cb6562a0066894d52fff6ad65311b53710 Mon Sep 17 00:00:00 2001
From: Tobias Klauser <tklauser@distanz.ch>
Date: Thu, 23 Apr 2020 11:02:50 +0200
Subject: [PATCH 2/6] Drop duplicate import

The k8s.io/minikube/pkg/util package is imported twice, in one case
aliased to "pkgutil". Drop the alias and use the original package name.
---
 cmd/minikube/cmd/start.go | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go
index edd592b1e8..b3f32eec77 100644
--- a/cmd/minikube/cmd/start.go
+++ b/cmd/minikube/cmd/start.go
@@ -60,7 +60,6 @@ import (
 	"k8s.io/minikube/pkg/minikube/registry"
 	"k8s.io/minikube/pkg/minikube/translate"
 	"k8s.io/minikube/pkg/util"
-	pkgutil "k8s.io/minikube/pkg/util"
 	"k8s.io/minikube/pkg/version"
 )
 
@@ -751,7 +750,7 @@ func suggestMemoryAllocation(sysLimit int, containerLimit int) int {
 
 // validateMemorySize validates the memory size matches the minimum recommended
 func validateMemorySize() {
-	req, err := pkgutil.CalculateSizeInMB(viper.GetString(memory))
+	req, err := util.CalculateSizeInMB(viper.GetString(memory))
 	if err != nil {
 		exit.WithCodeT(exit.Config, "Unable to parse memory '{{.memory}}': {{.error}}", out.V{"memory": viper.GetString(memory), "error": err})
 	}
@@ -787,7 +786,7 @@ func validateCPUCount(local bool) {
 // validateFlags validates the supplied flags against known bad combinations
 func validateFlags(cmd *cobra.Command, drvName string) {
 	if cmd.Flags().Changed(humanReadableDiskSize) {
-		diskSizeMB, err := pkgutil.CalculateSizeInMB(viper.GetString(humanReadableDiskSize))
+		diskSizeMB, err := util.CalculateSizeInMB(viper.GetString(humanReadableDiskSize))
 		if err != nil {
 			exit.WithCodeT(exit.Config, "Validation unable to parse disk size '{{.diskSize}}': {{.error}}", out.V{"diskSize": viper.GetString(humanReadableDiskSize), "error": err})
 		}

From 277a331f6b96dc038ef8ca3b38fd5e97b5e49ff5 Mon Sep 17 00:00:00 2001
From: Thomas Stromberg <t+github@stromberg.org>
Date: Thu, 23 Apr 2020 12:38:05 -0700
Subject: [PATCH 3/6] Skip if empty, turn inability to poll other clusters into
 a warning

---
 pkg/minikube/machine/cache_images.go | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/pkg/minikube/machine/cache_images.go b/pkg/minikube/machine/cache_images.go
index 94702cbc07..e677e5e58d 100644
--- a/pkg/minikube/machine/cache_images.go
+++ b/pkg/minikube/machine/cache_images.go
@@ -158,6 +158,10 @@ func needsTransfer(imgClient *client.Client, imgName string, cr cruntime.Manager
 
 // CacheAndLoadImages caches and loads images to all profiles
 func CacheAndLoadImages(images []string) error {
+	if len(images) == 0 {
+		return nil
+	}
+
 	// This is the most important thing
 	if err := image.SaveToDir(images, constants.ImageCacheDir); err != nil {
 		return errors.Wrap(err, "save to dir")
@@ -192,7 +196,7 @@ func CacheAndLoadImages(images []string) error {
 
 			status, err := Status(api, m)
 			if err != nil {
-				glog.Errorf("error getting status for %s: %v", pName, err)
+				glog.Warningf("error getting status for %s: %v", pName, err)
 				failed = append(failed, pName)
 				continue
 			}
@@ -200,7 +204,7 @@ func CacheAndLoadImages(images []string) error {
 			if status == state.Running.String() { // the not running hosts will load on next start
 				h, err := api.Load(m)
 				if err != nil {
-					glog.Errorf("Failed to load machine %q: %v", m, err)
+					glog.Warningf("Failed to load machine %q: %v", m, err)
 					failed = append(failed, pName)
 					continue
 				}

From 5af5098ed651aa376f4a53c40ba280f7859cd5b8 Mon Sep 17 00:00:00 2001
From: Thomas Stromberg <t+github@stromberg.org>
Date: Thu, 23 Apr 2020 12:40:04 -0700
Subject: [PATCH 4/6] Silence cache_images state errors

---
 test/integration/error_spam_test.go | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/test/integration/error_spam_test.go b/test/integration/error_spam_test.go
index d144da8945..254db00770 100644
--- a/test/integration/error_spam_test.go
+++ b/test/integration/error_spam_test.go
@@ -32,6 +32,8 @@ var stderrWhitelist = []string{
 	`kubectl`,
 	// slow docker warning
 	`slow|long time|Restarting the docker service may improve`,
+	// don't care if we can't push images to other profiles
+	`cache_images.go:.*error getting status`,
 }
 
 // stderrWhitelistRe combines rootCauses into a single regex

From a37b8f0a82c3b78728f6afb42df6dcecee6536d9 Mon Sep 17 00:00:00 2001
From: Thomas Stromberg <t+github@stromberg.org>
Date: Thu, 23 Apr 2020 12:45:07 -0700
Subject: [PATCH 5/6] TestServiceCmd: use echoserver image instead of
 hello-node

---
 test/integration/functional_test.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/integration/functional_test.go b/test/integration/functional_test.go
index 2f41ea89ef..2350f322dd 100644
--- a/test/integration/functional_test.go
+++ b/test/integration/functional_test.go
@@ -639,7 +639,7 @@ func validateProfileCmd(ctx context.Context, t *testing.T, profile string) {
 
 // validateServiceCmd asserts basic "service" command functionality
 func validateServiceCmd(ctx context.Context, t *testing.T, profile string) {
-	rr, err := Run(t, exec.CommandContext(ctx, "kubectl", "--context", profile, "create", "deployment", "hello-node", "--image=gcr.io/hello-minikube-zero-install/hello-node"))
+	rr, err := Run(t, exec.CommandContext(ctx, "kubectl", "--context", profile, "create", "deployment", "hello-node", "--image=k8s.gcr.io/echoserver:1.4"))
 	if err != nil {
 		t.Logf("%q failed: %v (may not be an error).", rr.Command(), err)
 	}

From 7aad0576cc66a01a6ea5b4ee272b26aa9e9fb371 Mon Sep 17 00:00:00 2001
From: Medya Gh <medya.gh@gmail.com>
Date: Thu, 23 Apr 2020 13:41:43 -0700
Subject: [PATCH 6/6] rename default cni file to have higher priority

---
 pkg/minikube/bootstrapper/bsutil/files.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkg/minikube/bootstrapper/bsutil/files.go b/pkg/minikube/bootstrapper/bsutil/files.go
index 8d6bc05bc3..c18cb0452c 100644
--- a/pkg/minikube/bootstrapper/bsutil/files.go
+++ b/pkg/minikube/bootstrapper/bsutil/files.go
@@ -28,7 +28,7 @@ var KubeadmYamlPath = path.Join(vmpath.GuestEphemeralDir, "kubeadm.yaml")
 
 const (
 	//DefaultCNIConfigPath is the configuration file for CNI networks
-	DefaultCNIConfigPath = "/etc/cni/net.d/k8s.conf"
+	DefaultCNIConfigPath = "/etc/cni/net.d/1-k8s.conf"
 	// KubeletServiceFile is the file for the systemd kubelet.service
 	KubeletServiceFile = "/lib/systemd/system/kubelet.service"
 	// KubeletSystemdConfFile is config for the systemd kubelet.service