[Feature Request] ls should report daemon availability
Currently the ls command reports whether a host is active, but it does not report daemon availability. machine ls should check using something like net.DialTimeout to see if the daemon is responding to requests as well as if the host is up.
What's the use case for this? I'm concerned it would slow down machine ls for something that is not often used.
Use case is if the instance has started but the daemon is not available. Examples where that might be possible:
- Instance has started but something went wrong with daemon provisioning or startup that didn't get caught by
machine(e.g. daemon just randomly goes down or has been stopped by an admin) - Port 2376 is blocked by a firewall when user changes networks etc.
Shouldn't be too bad of a slowdown if the calls are done concurrently with polling host status.
I like the idea, but I'm trying to figure out why this might be useful for the user when viewing machine ls.
If machine ls says the machine is running, then they run a Docker command which can't connect to the Docker daemon, doesn't that imply one of those two things you said above? Why does it need to be in machine ls too?
I can see it would be clearer to display this in ls, but I'm trying to figure out how useful it is so we can weigh it up against slowing down machine ls.
I can see this being useful from a user's perspective; in the case where you can clearly see what hosts are available and what aren't.
Hm, perhaps it could go in a separate command or as an optional flag? The ultimate goal is simply to provide a way to quickly query daemon availability as well as machine status.
What about something like inspect to show availability and anything else in the future while ls is kept simple?
On Monday, December 8, 2014, Nathan LeClaire [email protected] wrote:
Hm, perhaps it could go in a separate command or as an optional flag? The ultimate goal is simply to provide a way to quickly query daemon availability as well as machine status.
— Reply to this email directly or view it on GitHub https://github.com/docker/machine/issues/46#issuecomment-66218662.
How about "machine diagnostics" that runs through a bunch of expensive checks. It could even call out to the drivers and they could check things like: is vbox installed, is my cloud service reachable, is my instance healthy, is the daemon running etc? Purely for debug.
+1 to @johngossman -- maybe something like machine health staging that would report all of those -- daemon status, cloud service, etc.
+1 @ehazlett like the sound of it
This is fixed with https://github.com/docker/machine/pull/2442
docker-machine ls now displays the docker daemon version or an error if the daemon is not responding.
:+1: :+1: :+1: