@@ -1001,7 +1001,7 @@ func validateNetwork(h *host.Host, r command.Runner) string {
1001
1001
out .T (out .Option , "{{.key}}={{.value}}" , out.V {"key" : k , "value" : v })
1002
1002
ipExcluded := proxy .IsIPExcluded (ip ) // Skip warning if minikube ip is already in NO_PROXY
1003
1003
k = strings .ToUpper (k ) // for http_proxy & https_proxy
1004
- if ( k == "HTTP_PROXY" || k == "HTTPS_PROXY" ) && ! ipExcluded && ! warnedOnce {
1004
+ if k == ( "HTTP_PROXY" || k == "HTTPS_PROXY" ) && ! ipExcluded && ! warnedOnce {
1005
1005
out .WarningT ("You appear to be using a proxy, but your NO_PROXY environment does not include the minikube IP ({{.ip_address}}). Please see {{.documentation_url}} for more details" , out.V {"ip_address" : ip , "documentation_url" : "https://minikube.sigs.k8s.io/docs/reference/networking/proxy/" })
1006
1006
warnedOnce = true
1007
1007
}
@@ -1029,16 +1029,13 @@ Suggested workarounds:
1029
1029
defer conn .Close ()
1030
1030
}
1031
1031
1032
- if _ , err := r .RunCmd (exec .Command ("nslookup" , "kubernetes.io" )); err != nil {
1033
- out .WarningT ("VM is unable to resolve DNS hosts: {[.error}}" , out.V {"error" : err })
1032
+ // DNS check
1033
+ if rr , err := r .RunCmd (exec .Command ("nslookup" , "kubernetes.io" )); err != nil {
1034
+ glog .Warningf ("%s failed: %v" , rr .Args , err )
1035
+ out .WarningT ("VM may be unable to resolve external DNS records" )
1034
1036
}
1035
1037
1036
- // Try both UDP and ICMP to assert basic external connectivity
1037
- if _ , err := r .RunCmd (exec .Command ("/bin/bash" , "-c" , "nslookup k8s.io 8.8.8.8 || nslookup k8s.io 1.1.1.1 || ping -c1 8.8.8.8" )); err != nil {
1038
- out .WarningT ("VM is unable to directly connect to the internet: {{.error}}" , out.V {"error" : err })
1039
- }
1040
-
1041
- // Try an HTTPS connection to the
1038
+ // Try an HTTPS connection to the image repository
1042
1039
proxy := os .Getenv ("HTTPS_PROXY" )
1043
1040
opts := []string {"-sS" }
1044
1041
if proxy != "" && ! strings .HasPrefix (proxy , "localhost" ) && ! strings .HasPrefix (proxy , "127.0" ) {
@@ -1051,8 +1048,9 @@ Suggested workarounds:
1051
1048
}
1052
1049
1053
1050
opts = append (opts , fmt .Sprintf ("https://%s/" , repo ))
1054
- if _ , err := r .RunCmd (exec .Command ("curl" , opts ... )); err != nil {
1055
- out .WarningT ("VM is unable to connect to the selected image repository: {{.error}}" , out.V {"error" : err })
1051
+ if rr , err := r .RunCmd (exec .Command ("curl" , opts ... )); err != nil {
1052
+ glog .Warningf ("%s failed: %v" , rr .Args , err )
1053
+ out .WarningT ("VM is unable to access {{.repository}}, you may need to configure a proxy or set --image-repository" , out.V {"repository" : repo })
1056
1054
}
1057
1055
return ip
1058
1056
}
0 commit comments