{"action":"created","issue":{"url":"https://api.github.com/repos/gravitational/teleport/issues/421","repository_url":"https://api.github.com/repos/gravitational/teleport","labels_url":"https://api.github.com/repos/gravitational/teleport/issues/421/labels{/name}","comments_url":"https://api.github.com/repos/gravitational/teleport/issues/421/comments","events_url":"https://api.github.com/repos/gravitational/teleport/issues/421/events","html_url":"https://github.com/gravitational/teleport/pull/421","id":156079707,"number":421,"title":"TunClient changes","user":{"login":"kontsevoy","id":461020,"avatar_url":"https://avatars.githubusercontent.com/u/461020?v=3","gravatar_id":"","url":"https://api.github.com/users/kontsevoy","html_url":"https://github.com/kontsevoy","followers_url":"https://api.github.com/users/kontsevoy/followers","following_url":"https://api.github.com/users/kontsevoy/following{/other_user}","gists_url":"https://api.github.com/users/kontsevoy/gists{/gist_id}","starred_url":"https://api.github.com/users/kontsevoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kontsevoy/subscriptions","organizations_url":"https://api.github.com/users/kontsevoy/orgs","repos_url":"https://api.github.com/users/kontsevoy/repos","events_url":"https://api.github.com/users/kontsevoy/events{/privacy}","received_events_url":"https://api.github.com/users/kontsevoy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"klizhentas","id":13717,"avatar_url":"https://avatars.githubusercontent.com/u/13717?v=3","gravatar_id":"","url":"https://api.github.com/users/klizhentas","html_url":"https://github.com/klizhentas","followers_url":"https://api.github.com/users/klizhentas/followers","following_url":"https://api.github.com/users/klizhentas/following{/other_user}","gists_url":"https://api.github.com/users/klizhentas/gists{/gist_id}","starred_url":"https://api.github.com/users/klizhentas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klizhentas/subscriptions","organizations_url":"https://api.github.com/users/klizhentas/orgs","repos_url":"https://api.github.com/users/klizhentas/repos","events_url":"https://api.github.com/users/klizhentas/events{/privacy}","received_events_url":"https://api.github.com/users/klizhentas/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-05-21T02:42:47Z","updated_at":"2016-05-21T03:02:22Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/gravitational/teleport/pulls/421","html_url":"https://github.com/gravitational/teleport/pull/421","diff_url":"https://github.com/gravitational/teleport/pull/421.diff","patch_url":"https://github.com/gravitational/teleport/pull/421.patch"},"body":"TunClient had two problems:\r\n\r\n1. It was hard-coded to always `Dial(authClients[0])` instead of trying all auth servers.\r\n2. It was ignoring `--auth` CLI flag, relying entirely on \"auto-discovery\" of the auth servers.\r\n\r\nThe second part led to the issue of nodes not seeing auth servers without `advertise-ip` properly set.\r\n\r\n## Changes\r\n\r\n* auth-server tries to auto-detect a viable IPv4 address to advertize _if-and-only-if_ it starts with a listening address of 0.0.0.0 and no advertise-ip.\r\n* tun-client always tries the value of `--auth` flag first, before trying auto-discovered auth servers, this leads to a zero-surprise behaviour of \"CLI flags override everything else\"\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/gravitational/teleport/issues/comments/220755112","html_url":"https://github.com/gravitational/teleport/pull/421#issuecomment-220755112","issue_url":"https://api.github.com/repos/gravitational/teleport/issues/421","id":220755112,"user":{"login":"klizhentas","id":13717,"avatar_url":"https://avatars.githubusercontent.com/u/13717?v=3","gravatar_id":"","url":"https://api.github.com/users/klizhentas","html_url":"https://github.com/klizhentas","followers_url":"https://api.github.com/users/klizhentas/followers","following_url":"https://api.github.com/users/klizhentas/following{/other_user}","gists_url":"https://api.github.com/users/klizhentas/gists{/gist_id}","starred_url":"https://api.github.com/users/klizhentas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klizhentas/subscriptions","organizations_url":"https://api.github.com/users/klizhentas/orgs","repos_url":"https://api.github.com/users/klizhentas/repos","events_url":"https://api.github.com/users/klizhentas/events{/privacy}","received_events_url":"https://api.github.com/users/klizhentas/received_events","type":"User","site_admin":false},"created_at":"2016-05-21T03:02:22Z","updated_at":"2016-05-21T03:02:22Z","body":"It also seems that there's a broken test:\r\n\r\n```\r\n?   \tgithub.com/gravitational/teleport/lib/teleagent\t[no test files]\r\n=== RUN   TestAddrSturct\r\n\r\n----------------------------------------------------------------------\r\nFAIL: addr_test.go:124: AddrTestSuite.TestGuess\r\n\r\naddr_test.go:128:\r\n    c.Assert(ip[12] == 10 || ip[12] == 192 || ip[12] == 172, Equals, true)\r\n... obtained bool = false\r\n... expected bool = true\r\n\r\nOOPS: 14 passed, 1 FAILED\r\n--- FAIL: TestAddrSturct (1.19s)\r\nFAIL\r\ncoverage: 31.9% of statements\r\nFAIL\tgithub.com/gravitational/teleport/lib/utils\t1.250s\r\n=== RUN   TestWeb\r\ntime=\"0001-01-01T00:00:00Z\" level=info msg=\"cre\r\n```"}}
{"actor":{"display_login":"klizhentas"}}