{"action":"created","comment":{"url":"https://api.github.com/repos/pcmanus/ccm/pulls/comments/55398454","id":55398454,"diff_hunk":"@@ -314,6 +315,15 @@ def start(self, no_wait=False, verbose=False, wait_for_binary_proto=False,\n \n         common.assert_jdk_valid_for_cassandra_version(self.cassandra_version())\n \n+        # check whether all loopback aliases are available before starting any nodes\n+        for node in self.nodes.values():\n+            for itf in node.network_interfaces.values():\n+                if itf is not None:\n+                    if not common.check_socket_available(itf, return_on_error=True):\n+                        addr, port = itf\n+                        print \"Inet address %s:%s is not available; a cluster may already be running or you may need to add the loopback alias\" % (addr, port)","path":"ccmlib/cluster.py","position":18,"original_position":18,"commit_id":"4408bb92b8897592c913e46a88a809580bfd6f8e","original_commit_id":"4408bb92b8897592c913e46a88a809580bfd6f8e","user":{"login":"ptnapoleon","id":3408144,"avatar_url":"https://avatars.githubusercontent.com/u/3408144?v=3","gravatar_id":"","url":"https://api.github.com/users/ptnapoleon","html_url":"https://github.com/ptnapoleon","followers_url":"https://api.github.com/users/ptnapoleon/followers","following_url":"https://api.github.com/users/ptnapoleon/following{/other_user}","gists_url":"https://api.github.com/users/ptnapoleon/gists{/gist_id}","starred_url":"https://api.github.com/users/ptnapoleon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptnapoleon/subscriptions","organizations_url":"https://api.github.com/users/ptnapoleon/orgs","repos_url":"https://api.github.com/users/ptnapoleon/repos","events_url":"https://api.github.com/users/ptnapoleon/events{/privacy}","received_events_url":"https://api.github.com/users/ptnapoleon/received_events","type":"User","site_admin":false},"body":"You will need to `from six import print_`, and then use the `print_` function here, to maintain compatibility across python 2 and 3.","created_at":"2016-03-08T17:56:16Z","updated_at":"2016-03-08T17:56:16Z","html_url":"https://github.com/pcmanus/ccm/pull/461#discussion_r55398454","pull_request_url":"https://api.github.com/repos/pcmanus/ccm/pulls/461","_links":{"self":{"href":"https://api.github.com/repos/pcmanus/ccm/pulls/comments/55398454"},"html":{"href":"https://github.com/pcmanus/ccm/pull/461#discussion_r55398454"},"pull_request":{"href":"https://api.github.com/repos/pcmanus/ccm/pulls/461"}}},"pull_request":{"url":"https://api.github.com/repos/pcmanus/ccm/pulls/461","id":61959007,"html_url":"https://github.com/pcmanus/ccm/pull/461","diff_url":"https://github.com/pcmanus/ccm/pull/461.diff","patch_url":"https://github.com/pcmanus/ccm/pull/461.patch","issue_url":"https://api.github.com/repos/pcmanus/ccm/issues/461","number":461,"state":"open","locked":false,"title":"Improve handling when not all loopback addresses are available","user":{"login":"bcantoni","id":58372,"avatar_url":"https://avatars.githubusercontent.com/u/58372?v=3","gravatar_id":"","url":"https://api.github.com/users/bcantoni","html_url":"https://github.com/bcantoni","followers_url":"https://api.github.com/users/bcantoni/followers","following_url":"https://api.github.com/users/bcantoni/following{/other_user}","gists_url":"https://api.github.com/users/bcantoni/gists{/gist_id}","starred_url":"https://api.github.com/users/bcantoni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcantoni/subscriptions","organizations_url":"https://api.github.com/users/bcantoni/orgs","repos_url":"https://api.github.com/users/bcantoni/repos","events_url":"https://api.github.com/users/bcantoni/events{/privacy}","received_events_url":"https://api.github.com/users/bcantoni/received_events","type":"User","site_admin":false},"body":"On Mac the user needs to make sure the loopback addresses (127.0.0.2, 127.0.0.3, etc.)\r\nare created. Currently if they aren't created, ccm fails when creating the cluster,\r\nbut leaves it in a partial state (usually just the first node is running).\r\n\r\nThis change does a pre-flight check to make sure all loopbacks are available, print\r\na better warning, and exit before starting any nodes.","created_at":"2016-03-07T18:30:25Z","updated_at":"2016-03-08T17:56:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"47debfccc71a34b633b5d36649bdcf6482e1cf30","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pcmanus/ccm/pulls/461/commits","review_comments_url":"https://api.github.com/repos/pcmanus/ccm/pulls/461/comments","review_comment_url":"https://api.github.com/repos/pcmanus/ccm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pcmanus/ccm/issues/461/comments","statuses_url":"https://api.github.com/repos/pcmanus/ccm/statuses/4408bb92b8897592c913e46a88a809580bfd6f8e","head":{"label":"bcantoni:improve-loopback-error","ref":"improve-loopback-error","sha":"4408bb92b8897592c913e46a88a809580bfd6f8e","user":{"login":"bcantoni","id":58372,"avatar_url":"https://avatars.githubusercontent.com/u/58372?v=3","gravatar_id":"","url":"https://api.github.com/users/bcantoni","html_url":"https://github.com/bcantoni","followers_url":"https://api.github.com/users/bcantoni/followers","following_url":"https://api.github.com/users/bcantoni/following{/other_user}","gists_url":"https://api.github.com/users/bcantoni/gists{/gist_id}","starred_url":"https://api.github.com/users/bcantoni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcantoni/subscriptions","organizations_url":"https://api.github.com/users/bcantoni/orgs","repos_url":"https://api.github.com/users/bcantoni/repos","events_url":"https://api.github.com/users/bcantoni/events{/privacy}","received_events_url":"https://api.github.com/users/bcantoni/received_events","type":"User","site_admin":false},"repo":{"id":38343479,"name":"ccm","full_name":"bcantoni/ccm","owner":{"login":"bcantoni","id":58372,"avatar_url":"https://avatars.githubusercontent.com/u/58372?v=3","gravatar_id":"","url":"https://api.github.com/users/bcantoni","html_url":"https://github.com/bcantoni","followers_url":"https://api.github.com/users/bcantoni/followers","following_url":"https://api.github.com/users/bcantoni/following{/other_user}","gists_url":"https://api.github.com/users/bcantoni/gists{/gist_id}","starred_url":"https://api.github.com/users/bcantoni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcantoni/subscriptions","organizations_url":"https://api.github.com/users/bcantoni/orgs","repos_url":"https://api.github.com/users/bcantoni/repos","events_url":"https://api.github.com/users/bcantoni/events{/privacy}","received_events_url":"https://api.github.com/users/bcantoni/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bcantoni/ccm","description":"A script to easily create and destroy an Apache Cassandra cluster on localhost","fork":true,"url":"https://api.github.com/repos/bcantoni/ccm","forks_url":"https://api.github.com/repos/bcantoni/ccm/forks","keys_url":"https://api.github.com/repos/bcantoni/ccm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bcantoni/ccm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bcantoni/ccm/teams","hooks_url":"https://api.github.com/repos/bcantoni/ccm/hooks","issue_events_url":"https://api.github.com/repos/bcantoni/ccm/issues/events{/number}","events_url":"https://api.github.com/repos/bcantoni/ccm/events","assignees_url":"https://api.github.com/repos/bcantoni/ccm/assignees{/user}","branches_url":"https://api.github.com/repos/bcantoni/ccm/branches{/branch}","tags_url":"https://api.github.com/repos/bcantoni/ccm/tags","blobs_url":"https://api.github.com/repos/bcantoni/ccm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bcantoni/ccm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bcantoni/ccm/git/refs{/sha}","trees_url":"https://api.github.com/repos/bcantoni/ccm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bcantoni/ccm/statuses/{sha}","languages_url":"https://api.github.com/repos/bcantoni/ccm/languages","stargazers_url":"https://api.github.com/repos/bcantoni/ccm/stargazers","contributors_url":"https://api.github.com/repos/bcantoni/ccm/contributors","subscribers_url":"https://api.github.com/repos/bcantoni/ccm/subscribers","subscription_url":"https://api.github.com/repos/bcantoni/ccm/subscription","commits_url":"https://api.github.com/repos/bcantoni/ccm/commits{/sha}","git_commits_url":"https://api.github.com/repos/bcantoni/ccm/git/commits{/sha}","comments_url":"https://api.github.com/repos/bcantoni/ccm/comments{/number}","issue_comment_url":"https://api.github.com/repos/bcantoni/ccm/issues/comments{/number}","contents_url":"https://api.github.com/repos/bcantoni/ccm/contents/{+path}","compare_url":"https://api.github.com/repos/bcantoni/ccm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bcantoni/ccm/merges","archive_url":"https://api.github.com/repos/bcantoni/ccm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bcantoni/ccm/downloads","issues_url":"https://api.github.com/repos/bcantoni/ccm/issues{/number}","pulls_url":"https://api.github.com/repos/bcantoni/ccm/pulls{/number}","milestones_url":"https://api.github.com/repos/bcantoni/ccm/milestones{/number}","notifications_url":"https://api.github.com/repos/bcantoni/ccm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bcantoni/ccm/labels{/name}","releases_url":"https://api.github.com/repos/bcantoni/ccm/releases{/id}","deployments_url":"https://api.github.com/repos/bcantoni/ccm/deployments","created_at":"2015-07-01T01:58:33Z","updated_at":"2016-02-10T19:34:53Z","pushed_at":"2016-03-07T20:43:20Z","git_url":"git://github.com/bcantoni/ccm.git","ssh_url":"git@github.com:bcantoni/ccm.git","clone_url":"https://github.com/bcantoni/ccm.git","svn_url":"https://github.com/bcantoni/ccm","homepage":"","size":1395,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pcmanus:master","ref":"master","sha":"c7f534ee281e2ae7b8eb02b092e56158ebdba966","user":{"login":"pcmanus","id":479957,"avatar_url":"https://avatars.githubusercontent.com/u/479957?v=3","gravatar_id":"","url":"https://api.github.com/users/pcmanus","html_url":"https://github.com/pcmanus","followers_url":"https://api.github.com/users/pcmanus/followers","following_url":"https://api.github.com/users/pcmanus/following{/other_user}","gists_url":"https://api.github.com/users/pcmanus/gists{/gist_id}","starred_url":"https://api.github.com/users/pcmanus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcmanus/subscriptions","organizations_url":"https://api.github.com/users/pcmanus/orgs","repos_url":"https://api.github.com/users/pcmanus/repos","events_url":"https://api.github.com/users/pcmanus/events{/privacy}","received_events_url":"https://api.github.com/users/pcmanus/received_events","type":"User","site_admin":false},"repo":{"id":1425437,"name":"ccm","full_name":"pcmanus/ccm","owner":{"login":"pcmanus","id":479957,"avatar_url":"https://avatars.githubusercontent.com/u/479957?v=3","gravatar_id":"","url":"https://api.github.com/users/pcmanus","html_url":"https://github.com/pcmanus","followers_url":"https://api.github.com/users/pcmanus/followers","following_url":"https://api.github.com/users/pcmanus/following{/other_user}","gists_url":"https://api.github.com/users/pcmanus/gists{/gist_id}","starred_url":"https://api.github.com/users/pcmanus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcmanus/subscriptions","organizations_url":"https://api.github.com/users/pcmanus/orgs","repos_url":"https://api.github.com/users/pcmanus/repos","events_url":"https://api.github.com/users/pcmanus/events{/privacy}","received_events_url":"https://api.github.com/users/pcmanus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pcmanus/ccm","description":"A script to easily create and destroy an Apache Cassandra cluster on localhost","fork":false,"url":"https://api.github.com/repos/pcmanus/ccm","forks_url":"https://api.github.com/repos/pcmanus/ccm/forks","keys_url":"https://api.github.com/repos/pcmanus/ccm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pcmanus/ccm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pcmanus/ccm/teams","hooks_url":"https://api.github.com/repos/pcmanus/ccm/hooks","issue_events_url":"https://api.github.com/repos/pcmanus/ccm/issues/events{/number}","events_url":"https://api.github.com/repos/pcmanus/ccm/events","assignees_url":"https://api.github.com/repos/pcmanus/ccm/assignees{/user}","branches_url":"https://api.github.com/repos/pcmanus/ccm/branches{/branch}","tags_url":"https://api.github.com/repos/pcmanus/ccm/tags","blobs_url":"https://api.github.com/repos/pcmanus/ccm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pcmanus/ccm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pcmanus/ccm/git/refs{/sha}","trees_url":"https://api.github.com/repos/pcmanus/ccm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pcmanus/ccm/statuses/{sha}","languages_url":"https://api.github.com/repos/pcmanus/ccm/languages","stargazers_url":"https://api.github.com/repos/pcmanus/ccm/stargazers","contributors_url":"https://api.github.com/repos/pcmanus/ccm/contributors","subscribers_url":"https://api.github.com/repos/pcmanus/ccm/subscribers","subscription_url":"https://api.github.com/repos/pcmanus/ccm/subscription","commits_url":"https://api.github.com/repos/pcmanus/ccm/commits{/sha}","git_commits_url":"https://api.github.com/repos/pcmanus/ccm/git/commits{/sha}","comments_url":"https://api.github.com/repos/pcmanus/ccm/comments{/number}","issue_comment_url":"https://api.github.com/repos/pcmanus/ccm/issues/comments{/number}","contents_url":"https://api.github.com/repos/pcmanus/ccm/contents/{+path}","compare_url":"https://api.github.com/repos/pcmanus/ccm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pcmanus/ccm/merges","archive_url":"https://api.github.com/repos/pcmanus/ccm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pcmanus/ccm/downloads","issues_url":"https://api.github.com/repos/pcmanus/ccm/issues{/number}","pulls_url":"https://api.github.com/repos/pcmanus/ccm/pulls{/number}","milestones_url":"https://api.github.com/repos/pcmanus/ccm/milestones{/number}","notifications_url":"https://api.github.com/repos/pcmanus/ccm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pcmanus/ccm/labels{/name}","releases_url":"https://api.github.com/repos/pcmanus/ccm/releases{/id}","deployments_url":"https://api.github.com/repos/pcmanus/ccm/deployments","created_at":"2011-03-01T09:42:18Z","updated_at":"2016-03-04T21:22:25Z","pushed_at":"2016-03-07T20:43:21Z","git_url":"git://github.com/pcmanus/ccm.git","ssh_url":"git@github.com:pcmanus/ccm.git","clone_url":"https://github.com/pcmanus/ccm.git","svn_url":"https://github.com/pcmanus/ccm","homepage":"","size":1509,"stargazers_count":637,"watchers_count":637,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":175,"mirror_url":null,"open_issues_count":37,"forks":175,"open_issues":37,"watchers":637,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pcmanus/ccm/pulls/461"},"html":{"href":"https://github.com/pcmanus/ccm/pull/461"},"issue":{"href":"https://api.github.com/repos/pcmanus/ccm/issues/461"},"comments":{"href":"https://api.github.com/repos/pcmanus/ccm/issues/461/comments"},"review_comments":{"href":"https://api.github.com/repos/pcmanus/ccm/pulls/461/comments"},"review_comment":{"href":"https://api.github.com/repos/pcmanus/ccm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pcmanus/ccm/pulls/461/commits"},"statuses":{"href":"https://api.github.com/repos/pcmanus/ccm/statuses/4408bb92b8897592c913e46a88a809580bfd6f8e"}}}}