{"action":"created","issue":{"url":"https://api.github.com/repos/tsuru/tsuru/issues/1472","repository_url":"https://api.github.com/repos/tsuru/tsuru","labels_url":"https://api.github.com/repos/tsuru/tsuru/issues/1472/labels{/name}","comments_url":"https://api.github.com/repos/tsuru/tsuru/issues/1472/comments","events_url":"https://api.github.com/repos/tsuru/tsuru/issues/1472/events","html_url":"https://github.com/tsuru/tsuru/issues/1472","id":180749873,"number":1472,"title":"installer: wait for required components before checking the API","user":{"login":"andrestc","id":2944739,"avatar_url":"https://avatars.githubusercontent.com/u/2944739?v=3","gravatar_id":"","url":"https://api.github.com/users/andrestc","html_url":"https://github.com/andrestc","followers_url":"https://api.github.com/users/andrestc/followers","following_url":"https://api.github.com/users/andrestc/following{/other_user}","gists_url":"https://api.github.com/users/andrestc/gists{/gist_id}","starred_url":"https://api.github.com/users/andrestc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrestc/subscriptions","organizations_url":"https://api.github.com/users/andrestc/orgs","repos_url":"https://api.github.com/users/andrestc/repos","events_url":"https://api.github.com/users/andrestc/events{/privacy}","received_events_url":"https://api.github.com/users/andrestc/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tsuru/tsuru/labels/hacktoberfest","name":"hacktoberfest","color":"0e8a16"},{"url":"https://api.github.com/repos/tsuru/tsuru/labels/installer","name":"installer","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-10-03T21:18:59Z","updated_at":"2016-10-04T23:24:06Z","closed_at":null,"body":"When running `tsuru install`, we rely on docker swarm to pull and start our services from docker images. Sometimes pulling the images take too long (because of slow internet or docker hub rate limits) and the API is not able to start because it's required components are running ([as reported here](https://github.com/tsuru/tsuru/issues/1470#issuecomment-251207643)).\r\n\r\nWe should add some checks before [this](https://github.com/tsuru/tsuru-client/blob/master/tsuru/installer/components.go#L368) to verify if the required components are stuck having their images being pulled (`preparing` state in swam), inform the user every x seconds which components are still in that state and wait until they are done before proceding.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/tsuru/tsuru/issues/comments/251542069","html_url":"https://github.com/tsuru/tsuru/issues/1472#issuecomment-251542069","issue_url":"https://api.github.com/repos/tsuru/tsuru/issues/1472","id":251542069,"user":{"login":"andrestc","id":2944739,"avatar_url":"https://avatars.githubusercontent.com/u/2944739?v=3","gravatar_id":"","url":"https://api.github.com/users/andrestc","html_url":"https://github.com/andrestc","followers_url":"https://api.github.com/users/andrestc/followers","following_url":"https://api.github.com/users/andrestc/following{/other_user}","gists_url":"https://api.github.com/users/andrestc/gists{/gist_id}","starred_url":"https://api.github.com/users/andrestc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrestc/subscriptions","organizations_url":"https://api.github.com/users/andrestc/orgs","repos_url":"https://api.github.com/users/andrestc/repos","events_url":"https://api.github.com/users/andrestc/events{/privacy}","received_events_url":"https://api.github.com/users/andrestc/received_events","type":"User","site_admin":false},"created_at":"2016-10-04T23:24:06Z","updated_at":"2016-10-04T23:24:06Z","body":"@IngCr3at1on I agree with you, we should have timeouts of both cases. I just said it would be trickier to have them configured if we decided to do the healthchecks inside the goroutines because of the dependencies between the services(some of them will require a longer timeout). If we do the checking on the main goroutine, its essentially the same for both of my suggestions.\r\n\r\nMaybe we can go with a 'not so long timeout' as default and expose it as some configuration for users with slow connection for e.g."}}
{"actor":{"display_login":"andrestc"}}