{"action":"created","issue":{"url":"https://api.github.com/repos/apache/brooklyn-server/issues/497","repository_url":"https://api.github.com/repos/apache/brooklyn-server","labels_url":"https://api.github.com/repos/apache/brooklyn-server/issues/497/labels{/name}","comments_url":"https://api.github.com/repos/apache/brooklyn-server/issues/497/comments","events_url":"https://api.github.com/repos/apache/brooklyn-server/issues/497/events","html_url":"https://github.com/apache/brooklyn-server/pull/497","id":196724284,"number":497,"title":"Add findOpenSocketsOnNode to ReachableSocketFinder","user":{"login":"sjcorbett","id":837527,"avatar_url":"https://avatars.githubusercontent.com/u/837527?v=3","gravatar_id":"","url":"https://api.github.com/users/sjcorbett","html_url":"https://github.com/sjcorbett","followers_url":"https://api.github.com/users/sjcorbett/followers","following_url":"https://api.github.com/users/sjcorbett/following{/other_user}","gists_url":"https://api.github.com/users/sjcorbett/gists{/gist_id}","starred_url":"https://api.github.com/users/sjcorbett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjcorbett/subscriptions","organizations_url":"https://api.github.com/users/sjcorbett/orgs","repos_url":"https://api.github.com/users/sjcorbett/repos","events_url":"https://api.github.com/users/sjcorbett/events{/privacy}","received_events_url":"https://api.github.com/users/sjcorbett/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-20T16:56:09Z","updated_at":"2016-12-22T13:01:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/brooklyn-server/pulls/497","html_url":"https://github.com/apache/brooklyn-server/pull/497","diff_url":"https://github.com/apache/brooklyn-server/pull/497.diff","patch_url":"https://github.com/apache/brooklyn-server/pull/497.patch"},"body":"This changes the semantics of ReachableSocketFinder. Previously it would return as soon as any host+port was reached. Now it determines the status of each socket in order. The checks are concurrent but, for example, if the third of five sockets is reachable the status of the first and second will also be determined.\r\n\r\nThese changes are motivated by some other work on JcloudsLocation that I will open a pull request for shortly."},"comment":{"url":"https://api.github.com/repos/apache/brooklyn-server/issues/comments/268794945","html_url":"https://github.com/apache/brooklyn-server/pull/497#issuecomment-268794945","issue_url":"https://api.github.com/repos/apache/brooklyn-server/issues/497","id":268794945,"user":{"login":"aledsage","id":593113,"avatar_url":"https://avatars.githubusercontent.com/u/593113?v=3","gravatar_id":"","url":"https://api.github.com/users/aledsage","html_url":"https://github.com/aledsage","followers_url":"https://api.github.com/users/aledsage/followers","following_url":"https://api.github.com/users/aledsage/following{/other_user}","gists_url":"https://api.github.com/users/aledsage/gists{/gist_id}","starred_url":"https://api.github.com/users/aledsage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aledsage/subscriptions","organizations_url":"https://api.github.com/users/aledsage/orgs","repos_url":"https://api.github.com/users/aledsage/repos","events_url":"https://api.github.com/users/aledsage/events{/privacy}","received_events_url":"https://api.github.com/users/aledsage/received_events","type":"User","site_admin":false},"created_at":"2016-12-22T13:01:02Z","updated_at":"2016-12-22T13:01:02Z","body":"LGTM. It's slightly concerning that `JcloudsUtil.getFirstReachableAddress` might now block until the reachability check on the VM's private (unreachable) address times out. But I presume that is what you're alluding to for \"some other work on JcloudsLocation\".\r\n\r\nTo elaborate on my concern, imagine we are (somehow) given the IPs in order: `[10.0.0.1, 10.0.0.2]` but where only 10.0.0.2 is reachable. We might very quickly establish that `10.0.0.2` is reachable (in its future), while the check for `10.0.0.1` might take a really long time (e.g. because it's behind a firewall that just doesn't respond at all). When iterating over the the results of `tryReachable()` in-order, we'll pause for a long time on the future.get() of `10.0.0.1`, before we move onto `10.0.0.2` (which will have been evaluated really quickly).\r\n\r\nI don't know whether it's worth trying to avoid that. One way we could do it is for `getReachableAddresses()` to take a callback argument, so it can be told immediately about each success/fail/timeout, and also told when everything has been attempted. That would be a more complicated (internal) API to use. Is it worth it?"}}
{"actor":{"display_login":"aledsage"}}