{"action":"closed","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/16996","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/16996/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/16996/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/16996/events","html_url":"https://github.com/kubernetes/kubernetes/issues/16996","id":115785524,"number":16996,"title":"master::setDefaults: when PublicAddress get error, `continue` should after the `Sleep` func to assure try again in 5 seconds","user":{"login":"ZhuPeng","id":4994339,"avatar_url":"https://avatars.githubusercontent.com/u/4994339?v=3","gravatar_id":"","url":"https://api.github.com/users/ZhuPeng","html_url":"https://github.com/ZhuPeng","followers_url":"https://api.github.com/users/ZhuPeng/followers","following_url":"https://api.github.com/users/ZhuPeng/following{/other_user}","gists_url":"https://api.github.com/users/ZhuPeng/gists{/gist_id}","starred_url":"https://api.github.com/users/ZhuPeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZhuPeng/subscriptions","organizations_url":"https://api.github.com/users/ZhuPeng/orgs","repos_url":"https://api.github.com/users/ZhuPeng/repos","events_url":"https://api.github.com/users/ZhuPeng/events{/privacy}","received_events_url":"https://api.github.com/users/ZhuPeng/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-09T03:40:09Z","updated_at":"2015-11-09T06:50:56Z","closed_at":"2015-11-09T06:50:56Z","body":"I was just beginning to read the Kubernetes source code. In the package of `Master`, I think this code will raise some error in `setDefaults` method, `continue` should execute after `Sleep` function.\r\n```\r\nfor c.PublicAddress == nil || c.PublicAddress.IsUnspecified() || c.PublicAddress.IsLoopback() {\r\n\t\t// TODO: This should be done in the caller and just require a\r\n\t\t// valid value to be passed in.\r\n\t\thostIP, err := util.ChooseHostInterface()\r\n\t\tif err != nil {\r\n\t\t\tglog.Fatalf(\"Unable to find suitable network address.error='%v' . \"+\r\n\t\t\t\t\"Will try again in 5 seconds. Set the public address directly to avoid this wait.\", err)\r\n\t\t\ttime.Sleep(5 * time.Second)\r\n\t\t}\r\n\t\tc.PublicAddress = hostIP\r\n\t\tglog.Infof(\"Will report %v as public IP address.\", c.PublicAddress)\r\n\t}\r\n```"}}