Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regenerate config on retry #8782

Merged
merged 2 commits into from
Jul 21, 2020
Merged

Conversation

sharifelgamal
Copy link
Collaborator

@sharifelgamal sharifelgamal commented Jul 20, 2020

Fixes #8736

Example of 1.9 config:

 cat ~/.minikube/profiles/minikube/config.json 
{
        "Name": "minikube",
        "KeepContext": false,
        "EmbedCerts": false,
        "MinikubeISO": "",
        "Memory": 3892,
        "CPUs": 2,
        "DiskSize": 20000,
        "Driver": "docker",
        "HyperkitVpnKitSock": "",
        "HyperkitVSockPorts": [],
        "DockerEnv": null,
        "InsecureRegistry": null,
        "RegistryMirror": null,
        "HostOnlyCIDR": "192.168.99.1/24",
        "HypervVirtualSwitch": "",
        "HypervUseExternalSwitch": false,
        "HypervExternalAdapter": "",
        "KVMNetwork": "default",
        "KVMQemuURI": "qemu:///system",
        "KVMGPU": false,
        "KVMHidden": false,
        "DockerOpt": null,
        "DisableDriverMounts": false,
        "NFSShare": [],
        "NFSSharesRoot": "/nfsshares",
        "UUID": "",
        "NoVTXCheck": false,
        "DNSProxy": false,
        "HostDNSResolver": true,
        "HostOnlyNicType": "virtio",
        "NatNicType": "virtio",
        "KubernetesConfig": {
                "KubernetesVersion": "v1.18.0",
                "ClusterName": "minikube",
                "APIServerName": "minikubeCA",
                "APIServerNames": null,
                "APIServerIPs": null,
                "DNSDomain": "cluster.local",
                "ContainerRuntime": "docker",
                "CRISocket": "",
                "NetworkPlugin": "",
                "FeatureGates": "",
                "ServiceCIDR": "10.96.0.0/12",
                "ImageRepository": "",
                "ExtraOptions": [
                        {
                                "Component": "kubeadm",
                                "Key": "pod-network-cidr",
                                "Value": "10.244.0.0/16"
                        }
                ],
                "ShouldLoadCachedImages": true,
                "EnableDefaultCNI": false,
                "NodeIP": "",
                "NodePort": 0,
                "NodeName": ""
        },
        "Nodes": [
                {
                        "Name": "m01",
                        "IP": "172.17.0.2",
                        "Port": 8443,
                        "KubernetesVersion": "v1.18.0",
                        "ControlPlane": true,
                        "Worker": true
                }
        ],
        "Addons": {
                "default-storageclass": true,
                "storage-provisioner": true
        },
        "VerifyComponents": {
                "apiserver": true,
                "system_pods": true
        }

What a start with retry on failure now looks like:

minikube start --delete-on-failure=true
😄  minikube v1.12.1 on Darwin 10.15.5
🆕  Kubernetes 1.18.3 is now available. If you would like to upgrade, specify: --kubernetes-version=v1.18.3
✨  Using the docker driver based on existing profile
👍  Starting control plane node minikube in cluster minikube
🏃  Updating the running docker "minikube" container ...
❗  Node m01 failed to start, deleting and trying again.
🔥  Deleting "minikube" in docker ...
🔥  Deleting container "minikube" ...
🔥  Removing /Users/selgamal/.minikube/machines/minikube ...
💀  Removed all traces of the "minikube" cluster.
👍  Starting control plane node minikube in cluster minikube
🔥  Creating docker container (CPUs=2, Memory=3892MB) ...
🌐  Found network options:
    ▪ NO_PROXY=172.17.0.2
🐳  Preparing Kubernetes v1.18.0 on Docker 19.03.2 ...
    ▪ env NO_PROXY=172.17.0.2
🔎  Verifying Kubernetes components...
🌟  Enabled addons: default-storageclass, storage-provisioner
🏄  Done! kubectl is now configured to use "minikube"

And the config file after the retry:

cat ~/.minikube/profiles/minikube/config.json 
{
        "Name": "minikube",
        "KeepContext": false,
        "EmbedCerts": false,
        "MinikubeISO": "",
        "KicBaseImage": "gcr.io/k8s-minikube/kicbase:v0.0.10@sha256:f58e0c4662bac8a9b5dda7984b185bad8502ade5d9fa364bf2755d636ab51438",
        "Memory": 3892,
        "CPUs": 2,
        "DiskSize": 20000,
        "VMDriver": "",
        "Driver": "docker",
        "HyperkitVpnKitSock": "",
        "HyperkitVSockPorts": [],
        "DockerEnv": null,
        "InsecureRegistry": null,
        "RegistryMirror": null,
        "HostOnlyCIDR": "192.168.99.1/24",
        "HypervVirtualSwitch": "",
        "HypervUseExternalSwitch": false,
        "HypervExternalAdapter": "",
        "KVMNetwork": "default",
        "KVMQemuURI": "qemu:///system",
        "KVMGPU": false,
        "KVMHidden": false,
        "DockerOpt": null,
        "DisableDriverMounts": false,
        "NFSShare": [],
        "NFSSharesRoot": "/nfsshares",
        "UUID": "",
        "NoVTXCheck": false,
        "DNSProxy": false,
        "HostDNSResolver": true,
        "HostOnlyNicType": "virtio",
        "NatNicType": "virtio",
        "KubernetesConfig": {
                "KubernetesVersion": "v1.18.0",
                "ClusterName": "minikube",
                "APIServerName": "minikubeCA",
                "APIServerNames": null,
                "APIServerIPs": null,
                "DNSDomain": "cluster.local",
                "ContainerRuntime": "docker",
                "CRISocket": "",
                "NetworkPlugin": "",
                "FeatureGates": "",
                "ServiceCIDR": "10.96.0.0/12",
                "ImageRepository": "",
                "LoadBalancerStartIP": "",
                "LoadBalancerEndIP": "",
                "ExtraOptions": [
                        {
                                "Component": "kubeadm",
                                "Key": "pod-network-cidr",
                                "Value": "10.244.0.0/16"
                        }
                ],
                "ShouldLoadCachedImages": true,
                "EnableDefaultCNI": false,
                "CNI": "",
                "NodeIP": "",
                "NodePort": 8443,
                "NodeName": ""
        },
        "Nodes": [
                {
                        "Name": "m01",
                        "IP": "172.17.0.3",
                        "Port": 8443,
                        "KubernetesVersion": "v1.18.0",
                        "ControlPlane": true,
                        "Worker": true
                }
        ],
        "Addons": {
                "ambassador": false,
                "dashboard": false,
                "default-storageclass": true,
                "efk": false,
                "freshpod": false,
                "gvisor": false,
                "helm-tiller": false,
                "ingress": false,
                "ingress-dns": false,
                "istio": false,
                "istio-provisioner": false,
                "kubevirt": false,
                "logviewer": false,
                "metallb": false,
                "metrics-server": false,
                "nvidia-driver-installer": false,
                "nvidia-gpu-device-plugin": false,
                "olm": false,
                "pod-security-policy": false,
                "registry": false,
                "registry-aliases": false,
                "registry-creds": false,
                "storage-provisioner": true,
                "storage-provisioner-gluster": false
        },
        "VerifyComponents": {
                "apiserver": true,
                "system_pods": true
        }

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 20, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sharifelgamal

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 20, 2020
@sharifelgamal
Copy link
Collaborator Author

cc @priyawadhwa @medyagh

Copy link
Member

@medyagh medyagh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for fixing this, do you mind sharing the before after this PR output?

@sharifelgamal
Copy link
Collaborator Author

thank you for fixing this, do you mind sharing the before after this PR output?

There's no difference to minikube output

@codecov-commenter
Copy link

Codecov Report

Merging #8782 into master will decrease coverage by 0.13%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8782      +/-   ##
==========================================
- Coverage   32.20%   32.06%   -0.14%     
==========================================
  Files         165      165              
  Lines       10706    10762      +56     
==========================================
+ Hits         3448     3451       +3     
- Misses       6848     6897      +49     
- Partials      410      414       +4     
Impacted Files Coverage Δ
cmd/minikube/cmd/node_add.go 17.85% <0.00%> (ø)
cmd/minikube/cmd/node_start.go 9.09% <0.00%> (ø)
cmd/minikube/cmd/start.go 11.16% <0.00%> (-0.17%) ⬇️
cmd/minikube/cmd/start_flags.go 49.69% <0.00%> (-0.16%) ⬇️
pkg/minikube/driver/driver.go 52.50% <0.00%> (-7.50%) ⬇️
pkg/drivers/kic/oci/oci.go 0.00% <0.00%> (ø)
pkg/drivers/kic/oci/info.go 0.00% <0.00%> (ø)
pkg/drivers/kic/oci/volumes.go 0.00% <0.00%> (ø)

@medyagh
Copy link
Member

medyagh commented Jul 21, 2020

thank you for fixing this, do you mind sharing the before after this PR output?

There's no difference to minikube output

how about different in the config file ? before and after?

@sharifelgamal
Copy link
Collaborator Author

thank you for fixing this, do you mind sharing the before after this PR output?

There's no difference to minikube output

how about different in the config file ? before and after?

Done. Added to PR description.

@sharifelgamal
Copy link
Collaborator Author

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Jul 21, 2020
@minikube-pr-bot
Copy link

kvm2 Driver
docker Driver

@sharifelgamal sharifelgamal merged commit 280c251 into kubernetes:master Jul 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--delete-on-failure does not regenerate configuration
5 participants