Closed cnzg closed 9 years ago
Yes it is possible to work around this issue. But let me give it some more thought to make sure there're no situations where the IP and port are valid when the container is not up.
I'm inclined to not do anything about this issue as there's no harm to display the meta data we get from Docker inspect. Any reason why this has to be fixed?
Yes, this issue is low severity, but confuse users such as following:
I pushed a fix and updated the ranchervm image. Please give it a try.
Yes, it's OK now:)
I had mentioned this issue in https://github.com/rancherio/vm/issues/42
but now i find how to reproduce it.
step1, create and start a instance
step2, kill docker process or restart host os
step3, start docker and ranchervm
The instance which is up status in step1, its ip and ports still display on web ui, but it is down status, such as following pic:
I read the code of this file: vm/mgmt/ranchervm, docker object contain the value of ip and ports, so maybe there was same cahe or temp file which record the ip and ports not been deleted while docker service killed?
if not, i think we can workaroud this issue.
if status.startswith("Up"): ....... else: ip = "" ports = ""
PS: my machine env is, zhaoguang@zgvm3:/tmp$ uname -a Linux zgvm3 3.16.0-30-generic #40~14.04.1-Ubuntu SMP Thu Jan 15 17:43:14 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux zhaoguang@zgvm3:/tmp$ sudo docker version Client version: 1.6.2 Client API version: 1.18 Go version (client): go1.4.2 Git commit (client): 7c8fca2 OS/Arch (client): linux/amd64 Server version: 1.6.2 Server API version: 1.18 Go version (server): go1.4.2 Git commit (server): 7c8fca2 OS/Arch (server): linux/amd64 zhaoguang@zgvm3:/tmp$