Merge branch 'master' of github.com:kubernetes/minikube into oci_err_type

pull/7862/head
Medya Gh 2020-04-23 15:55:03 -07:00
commit 804c531f5a
No known key found for this signature in database
GPG Key ID: 7CF7792C6DF3245C
6 changed files with 13 additions and 8 deletions

View File

@ -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

View File

@ -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})
}

View File

@ -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

View File

@ -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
}

View File

@ -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

View File

@ -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)
}