{"action":"created","issue":{"url":"https://api.github.com/repos/docker/machine/issues/832","labels_url":"https://api.github.com/repos/docker/machine/issues/832/labels{/name}","comments_url":"https://api.github.com/repos/docker/machine/issues/832/comments","events_url":"https://api.github.com/repos/docker/machine/issues/832/events","html_url":"https://github.com/docker/machine/pull/832","id":63438779,"number":832,"title":"fixes issue #831 and issue #771 by checking for unset machine name","user":{"login":"slashk","id":9674,"avatar_url":"https://avatars.githubusercontent.com/u/9674?v=3","gravatar_id":"","url":"https://api.github.com/users/slashk","html_url":"https://github.com/slashk","followers_url":"https://api.github.com/users/slashk/followers","following_url":"https://api.github.com/users/slashk/following{/other_user}","gists_url":"https://api.github.com/users/slashk/gists{/gist_id}","starred_url":"https://api.github.com/users/slashk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slashk/subscriptions","organizations_url":"https://api.github.com/users/slashk/orgs","repos_url":"https://api.github.com/users/slashk/repos","events_url":"https://api.github.com/users/slashk/events{/privacy}","received_events_url":"https://api.github.com/users/slashk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-03-21T18:39:16Z","updated_at":"2015-03-24T23:14:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docker/machine/pulls/832","html_url":"https://github.com/docker/machine/pull/832","diff_url":"https://github.com/docker/machine/pull/832.diff","patch_url":"https://github.com/docker/machine/pull/832.patch"},"body":"Catches unset host in CmdSsh before issuing SSH command\r\nCatches unset active host in runActionWithContext before issuing start, stop, restart, upgrade\r\n\r\ncloses issue #831 \r\nfixes issue #771 \r\n\r\n```\r\n$ docker-machine ls\r\nNAME      ACTIVE   DRIVER       STATE     URL                         SWARM\r\nbuilder            virtualbox   Running   tcp://192.168.99.100:2376\r\ndev                virtualbox   Stopped\r\n$ ./docker-machine_darwin-amd64 ssh\r\nFATA[0000] There is no active host. Please set it with docker-machine active <machine name>\r\n$ ./docker-machine_darwin-amd64 active builder\r\n$ ./docker-machine_darwin-amd64 ssh\r\n                        ##        .\r\n                  ## ## ##       ==\r\n               ## ## ## ##      ===\r\n           /\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\\___/ ===\r\n      ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~\r\n           \\______ o          __/\r\n             \\    \\        __/\r\n              \\____\\______/\r\n _                 _   ____     _            _\r\n| |__   ___   ___ | |_|___ \\ __| | ___   ___| | _____ _ __\r\n| '_ \\ / _ \\ / _ \\| __| __) / _` |/ _ \\ / __| |/ / _ \\ '__|\r\n| |_) | (_) | (_) | |_ / __/ (_| | (_) | (__|   <  __/ |\r\n|_.__/ \\___/ \\___/ \\__|_____\\__,_|\\___/ \\___|_|\\_\\___|_|\r\nBoot2Docker version 1.5.0, build master : a66bce5 - Tue Feb 10 23:31:27 UTC 2015\r\nDocker version 1.5.0, build a8a31ef\r\ndocker@builder:~$ exit\r\n$ docker-machine ls\r\nNAME      ACTIVE   DRIVER       STATE     URL                         SWARM\r\nbuilder            virtualbox   Running   tcp://192.168.99.100:2376\r\ndev                virtualbox   Stopped\r\n$ ./docker-machine_darwin-amd64 start\r\nFATA[0000] There is no active host. Please set it with docker-machine active <machine name>\r\n$ ./docker-machine_darwin-amd64 stop\r\nFATA[0000] There is no active host. Please set it with docker-machine active <machine name>\r\n$ ./docker-machine_darwin-amd64 kill\r\nFATA[0000] There is no active host. Please set it with docker-machine active <machine name>\r\n$ ./docker-machine_darwin-amd64 upgrade\r\nFATA[0000] There is no active host. Please set it with docker-machine active <machine name>\r\n$ ./docker-machine_darwin-amd64 restart\r\nFATA[0000] There is no active host. Please set it with docker-machine active <machine name>\r\n$ ./docker-machine_darwin-amd64 active builder\r\n$ ./docker-machine_darwin-amd64 ls\r\nNAME      ACTIVE   DRIVER       STATE     URL                         SWARM\r\nbuilder   *        virtualbox   Running   tcp://192.168.99.100:2376\r\ndev                virtualbox   Stopped\r\n$ ./docker-machine_darwin-amd64 stop builder\r\n$ ./docker-machine_darwin-amd64 ls\r\nNAME      ACTIVE   DRIVER       STATE     URL   SWARM\r\nbuilder   *        virtualbox   Stopped\r\ndev                virtualbox   Stopped\r\n```\r\n\r\nSigned-off-by: Ken Pepple <ken@solinea.com>"},"comment":{"url":"https://api.github.com/repos/docker/machine/issues/comments/85735479","html_url":"https://github.com/docker/machine/pull/832#issuecomment-85735479","issue_url":"https://api.github.com/repos/docker/machine/issues/832","id":85735479,"user":{"login":"slashk","id":9674,"avatar_url":"https://avatars.githubusercontent.com/u/9674?v=3","gravatar_id":"","url":"https://api.github.com/users/slashk","html_url":"https://github.com/slashk","followers_url":"https://api.github.com/users/slashk/followers","following_url":"https://api.github.com/users/slashk/following{/other_user}","gists_url":"https://api.github.com/users/slashk/gists{/gist_id}","starred_url":"https://api.github.com/users/slashk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slashk/subscriptions","organizations_url":"https://api.github.com/users/slashk/orgs","repos_url":"https://api.github.com/users/slashk/repos","events_url":"https://api.github.com/users/slashk/events{/privacy}","received_events_url":"https://api.github.com/users/slashk/received_events","type":"User","site_admin":false},"created_at":"2015-03-24T23:14:58Z","updated_at":"2015-03-24T23:14:58Z","body":"@ehazlett ok, i think this handles the ssh use case errors:\r\n\r\n```\r\n$ ./docker-machine_darwin-amd64 ls\r\nNAME      ACTIVE   DRIVER       STATE     URL                         SWARM\r\nbuilder            virtualbox   Running   tcp://192.168.99.100:2376\r\ndev                virtualbox   Stopped\r\n$ ./docker-machine_darwin-amd64 ssh dev\r\nFATA[0000] dev is not running. Please start this with docker-machine start dev\r\n$ ./docker-machine_darwin-amd64 ssh\r\nFATA[0000] There is no active host. Please set it with docker-machine_darwin-amd64 active <machine name>.\r\n```\r\n"}}