This repository has been archived by the owner on Sep 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2k
"active" and "ls" use different checks for active machine #1651
Comments
Good catch. They should definitely use the same, shared method. |
👍 I'd love to call #dibs on this if that's cool (idk if machine uses #dibs like docker) - been looking to get involved with this project for a while and this seems like a good first issue. |
If you're interested, go for it @mattjmcnaughton ! I've been treating the "help-wanted" tag as kind of a "Hey, these issues are relatively non-controversial and might be worth looking into for someone wanting to contribute to Machine". |
afbjorklund
pushed a commit
to minikube-machine/machine
that referenced
this issue
Jun 10, 2023
Fix docker/machine#1651 As pointed out in the issue above, the `active` and `ls` commands used different methods for determing the active machine. This commit defines a single method on the `host` struct called `IsActive` which provides a uniform check for machine activness. `IsActive` returns true only if `DOCKER_HOST == url` and the state is not stopped - previously the `active` command only checked the url. * Add a single `host` method `IsActive` for determining if a machine is active. Signed-off-by: Matt McNaughton <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Just noticed when commenting on brikis98/docker-osx-dev#77 that the "active" and "ls" commands use different methods for determining if a machine is active or not. Don't know if this is intentional, but for "active" using Filestore, only the value of DOCKER_HOST is checked against the host's URL. For "ls",
attemptGetHostState
in libmachine/host checks both the URL and also that the machine is not in state "Stopped". When DOCKER_HOST is set but e.g. the VM it points to is stopped, the commands now report slightly confusing results.The text was updated successfully, but these errors were encountered: