minikube: Template parsing error when getting docker network
Template parsing error when getting docker network
We’re running some minikube deployments on CI and recently (around the 21st) we started seeing failures with the following error message when starting minikube. This is currently happening only on CI, so I don’t have full detailed logs, but I’m working on reproducing it locally so I can get more.
This is from Minikube latest builds, the last published version continues to work with no issues.
Based on the timing and error message I suspect it may be related to this PR but I’m not sure!
Steps to reproduce the issue:
- Run
minikube startwith minikube from master
Full output of minikube start command used, if not already included:
minikube v1.15.1 on Ubuntu 16.04
- MINIKUBE_WANTUPDATENOTIFICATION=false
* Using the docker driver based on user configuration
* Starting control plane node minikube in cluster minikube
* Pulling base image ...
* Downloading Kubernetes v1.19.4 preload ...
> preloaded-images-k8s-v6-v1....: 42.10 MiB / 486.35 MiB [>_] 8.66% ? p/s ? > preloaded-images-k8s-v6-v1....: 90.44 MiB / 486.35 MiB [>] 18.60% ? p/s ? > preloaded-images-k8s-v6-v1....: 167.30 MiB / 486.35 MiB [] 34.40% ? p/s ? > preloaded-images-k8s-v6-v1....: 230.84 MiB / 486.35 MiB 47.46% 314.62 Mi > preloaded-images-k8s-v6-v1....: 304.00 MiB / 486.35 MiB 62.51% 314.62 Mi > preloaded-images-k8s-v6-v1....: 382.67 MiB / 486.35 MiB 78.68% 314.62 Mi > preloaded-images-k8s-v6-v1....: 448.80 MiB / 486.35 MiB 92.28% 317.76 Mi > preloaded-images-k8s-v6-v1....: 486.35 MiB / 486.35 MiB 100.00% 373.80 M* Creating docker container (CPUs=2, Memory=3700MB) ...
* Preparing Kubernetes v1.19.4 on Docker 19.03.13 ...
E1130 08:37:33.452875 388 start.go:99] Unable to get host IP: network inspect: docker network inspect minikube --format "{"Name": "{{.Name}}","Driver": "{{.Driver}}","Subnet": "{{range .IPAM.Config}}{{.Subnet}}{{end}}","Gateway": "{{range .IPAM.Config}}{{.Gateway}}{{end}}","MTU": {{(index .Options "com.docker.network.driver.mtu")}},{{$first := true}} "ContainerIPs": [{{range $k,$v := .Containers }}{{if $first}}{{$first = false}}{{else}}, {{end}}"{{$v.IPv4Address}}"{{end}}]}": exit status 64
stdout:
stderr:
Template parsing error: template: :1: unexpected "=" in operand
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 4
- Comments: 20 (3 by maintainers)
@medyagh Here’s my operation:
Thanksfully after I deleted the minikube network, it seemed to be OK ? But why was minikube network not created ?
I did the above on another host that had installed docker 19.03. Here’s output of
minikube start:And this time minikube network was created. Anyway deleting the previous network minikube created by older version is correct @medyagh
@baiwfg2 @fsladkey I think you are on to something that we missed.
we used not set the MTU for minikube but later versions we started setting the MTU for the custom networks.
is it possible that your minikube docker network was created by an older minikube ? and now the newer minikube is not liking that it can not get the MTU ?
does deleting minikube and re-creating it with latest version fix this problem?
regardless if that fixes the problem I consider this a bug, we should not fail on older minikube created networks.
(we do have an integration test for upgrading from an older minikube verison to newest version, but I belive that test doesnt cover the version that we added mtu to the “docker network”
Seems like that there was a bug in that particular version (18.09.7), but not in 18.09.9
Please upgrade.
Sorry for that.
docker network inspect minikubedocker version :