Skip to content

Commit

Permalink
Merge pull request #9613 from peterlin741/issue-9247-profile-mssg
Browse files Browse the repository at this point in the history
Improving log message when profile not found
  • Loading branch information
priyawadhwa authored Nov 6, 2020
2 parents ac898f8 + 6fc6bfc commit 31e7b3c
Show file tree
Hide file tree
Showing 9 changed files with 315 additions and 234 deletions.
4 changes: 2 additions & 2 deletions pkg/minikube/mustload/mustload.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func Partial(name string, miniHome ...string) (libmachine.API, *config.ClusterCo
cc, err := config.Load(name, miniHome...)
if err != nil {
if config.IsNotExist(err) {
out.T(style.Shrug, `There is no local cluster named "{{.cluster}}"`, out.V{"cluster": name})
out.T(style.Shrug, `Profile "{{.cluster}}" not found. Run "minikube profile list" to view all profiles.`, out.V{"cluster": name})
exitTip("start", name, reason.ExGuestNotFound)
}
exit.Error(reason.HostConfigLoad, "Error getting cluster config", err)
Expand Down Expand Up @@ -174,6 +174,6 @@ func ExampleCmd(cname string, action string) string {
// exitTip returns an action tip and exits
func exitTip(action string, profile string, code int) {
command := ExampleCmd(profile, action)
out.T(style.Workaround, `To fix this, run: "{{.command}}"`, out.V{"command": command})
out.T(style.Workaround, `To start a cluster, run: "{{.command}}"`, out.V{"command": command})
os.Exit(code)
}
78 changes: 43 additions & 35 deletions translations/de.json

Large diffs are not rendered by default.

78 changes: 43 additions & 35 deletions translations/es.json

Large diffs are not rendered by default.

76 changes: 43 additions & 33 deletions translations/fr.json

Large diffs are not rendered by default.

68 changes: 43 additions & 25 deletions translations/ja.json

Large diffs are not rendered by default.

74 changes: 43 additions & 31 deletions translations/ko.json

Large diffs are not rendered by default.

79 changes: 44 additions & 35 deletions translations/pl.json

Large diffs are not rendered by default.

18 changes: 11 additions & 7 deletions translations/strings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"Consider creating a cluster with larger memory size using `minikube start --memory SIZE_MB` ": "",
"Consider increasing Docker Desktop's memory size.": "",
"Could not determine a Google Cloud project, which might be ok.": "",
"Could not find any GCP credentials. Either run `gcloud auth login` or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the path of your credentials file.": "",
"Could not find any GCP credentials. Either run `gcloud auth application-default login` or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the path of your credentials file.": "",
"Could not process error from failed deletion": "",
"Could not process errors from failed deletion": "",
"Country code of the image mirror to be used. Leave empty to use the global one. For Chinese mainland users, set it to cn.": "",
Expand Down Expand Up @@ -258,12 +258,14 @@
"List existing minikube nodes.": "",
"List nodes.": "",
"List of guest VSock ports that should be exposed as sockets on the host (hyperkit driver only)": "",
"List of ports that should be exposed (docker and podman driver only)": "",
"Lists all available minikube addons as well as their current statuses (enabled/disabled)": "",
"Lists all minikube profiles.": "",
"Lists all valid default values for PROPERTY_NAME": "",
"Lists all valid minikube profiles and detects all possible invalid profiles.": "",
"Lists the URLs for the services in your local cluster": "",
"Local folders to share with Guest via NFS mounts (hyperkit driver only)": "",
"Local proxy ignored: not passing {{.name}}={{.value}} to docker env.": "",
"Location of the VPNKit socket used for networking. If empty, disables Hyperkit VPNKitSock, if 'auto' uses Docker for Mac VPNKit connection, otherwise uses the specified VSock (hyperkit driver only)": "",
"Locations to fetch the minikube ISO from.": "",
"Log into or run a command on a machine with SSH; similar to 'docker-machine ssh'.": "",
Expand All @@ -290,14 +292,14 @@
"Node {{.nodeName}} does not exist.": "",
"None of the known repositories are accessible. Consider specifying an alternative image repository with --image-repository flag": "",
"None of the known repositories in your location are accessible. Using {{.image_repository_name}} as fallback.": "",
"Not passing {{.name}}={{.value}} to docker env.": "",
"Noticed you have an activated docker-env on {{.driver_name}} driver in this terminal:": "",
"Noticed you have an activated podman-env on {{.driver_name}} driver in this terminal:": "",
"Number of CPUs allocated to Kubernetes.": "",
"Number of lines back to go within the log": "",
"OS release is {{.pretty_name}}": "",
"One of 'yaml' or 'json'.": "",
"Only alphanumeric and dashes '-' are permitted. Minimum 1 character, starting with alphanumeric.": "",
"Only alphanumeric and dashes '-' are permitted. Minimum 2 characters, starting with alphanumeric.": "",
"Open the addons URL with https instead of http": "",
"Open the service URL with https instead of http (defaults to \\\"false\\\")": "",
"Opening Kubernetes service {{.namespace_name}}/{{.service_name}} in default browser...": "",
Expand Down Expand Up @@ -336,6 +338,7 @@
"Print the version of minikube.": "",
"Problems detected in {{.entry}}:": "",
"Problems detected in {{.name}}:": "",
"Profile \"{{.cluster}}\" not found. Run \"minikube profile list\" to view all profiles.": "",
"Profile name \"{{.profilename}}\" is reserved keyword. To delete this profile, run: \"{{.cmd}}\"": "",
"Profile name '{{.name}}' is not valid": "",
"Profile name '{{.profilename}}' is not valid": "",
Expand Down Expand Up @@ -424,7 +427,7 @@
"Startup with {{.old_driver}} driver failed, trying with alternate driver {{.new_driver}}: {{.error}}": "",
"Stopping node \"{{.name}}\" ...": "",
"Stopping tunnel for service {{.service}}.": "",
"Stops a local Kubernetes cluster running in Virtualbox. This command stops the VM\nitself, leaving all files intact. The cluster can be started again with the \"start\" command.": "",
"Stops a local Kubernetes cluster. This command stops the underlying VM or container, but keeps user data intact. The cluster can be started again with the \"start\" command.": "",
"Stops a node in a cluster.": "",
"Stops a running local Kubernetes cluster": "",
"Successfully added {{.name}} to {{.cluster}}!": "",
Expand Down Expand Up @@ -502,7 +505,6 @@
"The value passed to --format is invalid": "",
"The value passed to --format is invalid: {{.error}}": "",
"The vmwarefusion driver is deprecated and support for it will be removed in a future release.\n\t\t\tPlease consider switching to the new vmware unified driver, which is intended to replace the vmwarefusion driver.\n\t\t\tSee https://minikube.sigs.k8s.io/docs/reference/drivers/vmware/ for more information.\n\t\t\tTo disable this message, run [minikube config set ShowDriverDeprecationNotification false]": "",
"There is no local cluster named \"{{.cluster}}\"": "",
"These --extra-config parameters are invalid: {{.invalid_extra_opts}}": "",
"These changes will take effect upon a minikube delete and then a minikube start": "",
"This addon does not have an endpoint defined for the 'addons open' command.\nYou can add one by annotating a service with the label {{.labelName}}:{{.addonName}}": "",
Expand All @@ -517,10 +519,10 @@
"To connect to this cluster, use: --context={{.name}}": "",
"To connect to this cluster, use: kubectl --context={{.profile_name}}": "",
"To disable this notice, run: 'minikube config set WantUpdateNotification false'\\n": "",
"To fix this, run: \"{{.command}}\"": "",
"To pull new external images, you may need to configure a proxy: https://minikube.sigs.k8s.io/docs/reference/networking/proxy/": "",
"To see addons list for other profiles use: `minikube addons -p name list`": "",
"To set your Google Cloud project, run: \n\n\t\tgcloud config set project \u003cproject name\u003e\n\nor set the GOOGLE_CLOUD_PROJECT environment variable.": "",
"To start a cluster, run: \"{{.command}}\"": "",
"To start minikube with Hyper-V, Powershell must be in your PATH`": "",
"To track progress on multi-node clusters, see https://github.com/kubernetes/minikube/issues/7538.": "",
"To use kubectl or minikube commands as your own user, you may need to relocate them. For example, to overwrite your own settings, run:": "",
Expand All @@ -529,6 +531,7 @@
"Try 'minikube delete', and disable any conflicting VPN or firewall software": "",
"Trying to delete invalid profile {{.profile}}": "",
"Unable to bind flags": "",
"Unable to create dedicated network, this might result in cluster IP change after restart: {{.error}}": "",
"Unable to enable dashboard": "",
"Unable to fetch latest version info": "",
"Unable to find control plane": "",
Expand Down Expand Up @@ -607,6 +610,7 @@
"Want kubectl {{.version}}? Try 'minikube kubectl -- get pods -A'": "",
"Where to root the NFS Shares, defaults to /nfsshares (hyperkit driver only)": "",
"Whether to use external switch over Default Switch if virtual switch not explicitly specified. (hyperv driver only)": "",
"With --network-plugin=cni, you will need to provide your own CNI. See --cni flag as a user-friendly alternative": "",
"You appear to be using a proxy, but your NO_PROXY environment does not include the minikube IP ({{.ip_address}}).": "",
"You can delete them using the following command(s): ": "",
"You can force an unsupported Kubernetes version via the --force flag": "",
Expand All @@ -631,6 +635,7 @@
"config modifies minikube config files using subcommands like \"minikube config set driver kvm\"\nConfigurable fields: \\n\\n": "",
"config view failed": "",
"dashboard service is not running: {{.error}}": "",
"delete ctx": "",
"deleting node": "",
"disable failed": "",
"dry-run mode. Validates configuration, but does not mutate system state": "",
Expand Down Expand Up @@ -661,7 +666,6 @@
"kubectl proxy": "",
"libmachine failed": "",
"list displays all valid default settings for PROPERTY_NAME\nAcceptable fields: \\n\\n": "",
"logdir set failed": "",
"max time to wait per Kubernetes or host to be healthy.": "",
"minikube addons list --output OUTPUT. json, list": "",
"minikube is exiting due to an error. If the above message is not useful, open an issue:": "",
Expand All @@ -683,6 +687,7 @@
"not enough arguments ({{.ArgCount}}).\\nusage: minikube config set PROPERTY_NAME PROPERTY_VALUE": "",
"output layout (EXPERIMENTAL, JSON only): 'nodes' or 'cluster'": "",
"pause Kubernetes": "",
"preload extraction failed: \\\"No space left on device\\\"": "",
"profile sets the current minikube profile, or gets the current profile if no arguments are provided. This is used to run and manage multiple minikube instance. You can return to the default minikube profile by running `minikube profile default`": "",
"provisioning host for node": "",
"reload cached images.": "",
Expand All @@ -696,7 +701,6 @@
"tunnel creates a route to services deployed with type LoadBalancer and sets their Ingress to their ClusterIP. for a detailed example see https://minikube.sigs.k8s.io/docs/tasks/loadbalancer": "",
"unable to bind flags": "",
"unable to delete minikube config folder": "",
"unable to set logtostderr": "",
"unpause Kubernetes": "",
"unset failed": "",
"unsets PROPERTY_NAME from the minikube config file. Can be overwritten by flags or environmental variables": "",
Expand Down
Loading

0 comments on commit 31e7b3c

Please sign in to comment.