-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Template parsing error when getting docker network #9811
Comments
/kind support |
I met with same error:
docker version : 19.03 |
Which docker version was this ? (for trying to reproduce) Also Here it looks like: (with the same --format as in minikube)
|
And it would still be nice to print out the Docker version... Now we have to guess, based on the OS. Not very nice. See #7952 (comment) |
Sorry for that.
docker version :
|
Hmm, wondering if it has something to do with the outdated versions (CentOS 7.2, Docker 19.03.1) The client is even older (18.09), so maybe it doesn't understand the advanced --format being used See #9077 EDIT: But I tried both 18.09 and 19.03 clients now, and they didn't seem to have any problems... |
Seems like that there was a bug in that particular version (18.09.7), but not in 18.09.9 $ ./docker/docker version --format '{{ .Client.Version }}'
18.09.7
$ ./docker/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}}]}'
Template parsing error: template: :1: unexpected "=" in operand $ ./docker/docker version --format '{{ .Client.Version }}'
18.09.9
$ ./docker/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}}]}'
{"Name": "minikube","Driver": "bridge","Subnet": "192.168.49.0/24","Gateway": "192.168.49.1","MTU": 1500, "ContainerIPs": ["192.168.49.2/24"]}
Please upgrade. |
Wow, that's brilliant. I upgraded docker-ce-cli to 19.03.1, encountered another parsing issue:
|
Same issue encountered here.
|
That parse error is different, it's about the missing value for MTU
It should output as 0 (zero), and not as nothing - which doesn't parse.
|
I noticed there're the following network, only bridge has MTU set when inspected
My docker version is still old ? |
I just found my seems it automatically download a Docker 20.10.0 for minikube, while my installed docker is Docker CE 17.12.1 since it's the latest version I can get for CentOS 7.3 any help will be great. many thx! |
@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" |
@baiwfg2 do u mind sharing
|
should we warn the user if their docke is older than 18.09.8 or warn them specifically for this version ? |
Hmm, in my case, it's running on CI so the environment should be "fresh" every time. I was able to get around the error by upgrading docker client version before running minikube as suggested by other helpful people in the thread. |
@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
And this time minikube network was created. Anyway deleting the previous network minikube created by older version is correct @medyagh |
seems like this issue has been fixed by #10369. I'm going to close this issue since we also have the following solutions for users running older versions of minikube:
If anyone continues to see this issue, feel free to reopen at any time by including /reopen in your comment! |
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:
minikube start
with minikube from masterFull output of
minikube start
command used, if not already included:The text was updated successfully, but these errors were encountered: