{"action":"created","comment":{"url":"https://api.github.com/repos/apache/incubator-brooklyn/pulls/comments/29918457","id":29918457,"diff_hunk":"@@ -1764,24 +1769,57 @@ public void release(SshMachineLocation machine) {\n         LOG.info(\"Releasing machine {} in {}, instance id {}\", new Object[] {machine, this, instanceId});\n \n         Exception tothrow = null;\n+\n+        if (machine instanceof JcloudsSshMachineLocation) {\n+            ConfigBag setup = config().getBag();\n+            for (JcloudsLocationCustomizer customizer : getCustomizers(setup)) {\n+                try {\n+                    customizer.preRelease((JcloudsSshMachineLocation) machine);\n+                } catch (Exception e) {\n+                    LOG.error(\"Problem invoking pre-release customizer \"+customizer+\" for machine \"+machine+\" in \"+this+\", instance id \"+instanceId+","path":"locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsLocation.java","position":96,"original_position":96,"commit_id":"fc4d4f799c33e837a8973cd98a11d4b50eb072f0","original_commit_id":"fc4d4f799c33e837a8973cd98a11d4b50eb072f0","user":{"login":"neykov","id":3612111,"avatar_url":"https://avatars.githubusercontent.com/u/3612111?v=3","gravatar_id":"","url":"https://api.github.com/users/neykov","html_url":"https://github.com/neykov","followers_url":"https://api.github.com/users/neykov/followers","following_url":"https://api.github.com/users/neykov/following{/other_user}","gists_url":"https://api.github.com/users/neykov/gists{/gist_id}","starred_url":"https://api.github.com/users/neykov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neykov/subscriptions","organizations_url":"https://api.github.com/users/neykov/orgs","repos_url":"https://api.github.com/users/neykov/repos","events_url":"https://api.github.com/users/neykov/events{/privacy}","received_events_url":"https://api.github.com/users/neykov/received_events","type":"User","site_admin":false},"body":"Or is the code trying to release aggressively and throwing here will lead to machine leaks...","created_at":"2015-05-08T05:57:41Z","updated_at":"2015-05-08T05:57:41Z","html_url":"https://github.com/apache/incubator-brooklyn/pull/630#discussion_r29918457","pull_request_url":"https://api.github.com/repos/apache/incubator-brooklyn/pulls/630","_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-brooklyn/pulls/comments/29918457"},"html":{"href":"https://github.com/apache/incubator-brooklyn/pull/630#discussion_r29918457"},"pull_request":{"href":"https://api.github.com/repos/apache/incubator-brooklyn/pulls/630"}}},"pull_request":{"url":"https://api.github.com/repos/apache/incubator-brooklyn/pulls/630","id":34796569,"html_url":"https://github.com/apache/incubator-brooklyn/pull/630","diff_url":"https://github.com/apache/incubator-brooklyn/pull/630.diff","patch_url":"https://github.com/apache/incubator-brooklyn/pull/630.patch","issue_url":"https://api.github.com/repos/apache/incubator-brooklyn/issues/630","number":630,"state":"open","locked":false,"title":"jclouds location customizer supports pre-release and post-release callback","user":{"login":"ahgittin","id":496540,"avatar_url":"https://avatars.githubusercontent.com/u/496540?v=3","gravatar_id":"","url":"https://api.github.com/users/ahgittin","html_url":"https://github.com/ahgittin","followers_url":"https://api.github.com/users/ahgittin/followers","following_url":"https://api.github.com/users/ahgittin/following{/other_user}","gists_url":"https://api.github.com/users/ahgittin/gists{/gist_id}","starred_url":"https://api.github.com/users/ahgittin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahgittin/subscriptions","organizations_url":"https://api.github.com/users/ahgittin/orgs","repos_url":"https://api.github.com/users/ahgittin/repos","events_url":"https://api.github.com/users/ahgittin/events{/privacy}","received_events_url":"https://api.github.com/users/ahgittin/received_events","type":"User","site_admin":false},"body":"useful when the customizer is e.g. setting up then clearing external setup, e.g. DNS","created_at":"2015-05-06T08:23:23Z","updated_at":"2015-05-08T05:57:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e63b82f781a1b300d31d2a3efe014f0f6a442303","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/incubator-brooklyn/pulls/630/commits","review_comments_url":"https://api.github.com/repos/apache/incubator-brooklyn/pulls/630/comments","review_comment_url":"https://api.github.com/repos/apache/incubator-brooklyn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/incubator-brooklyn/issues/630/comments","statuses_url":"https://api.github.com/repos/apache/incubator-brooklyn/statuses/fc4d4f799c33e837a8973cd98a11d4b50eb072f0","head":{"label":"ahgittin:jclouds-release-customizers","ref":"jclouds-release-customizers","sha":"fc4d4f799c33e837a8973cd98a11d4b50eb072f0","user":{"login":"ahgittin","id":496540,"avatar_url":"https://avatars.githubusercontent.com/u/496540?v=3","gravatar_id":"","url":"https://api.github.com/users/ahgittin","html_url":"https://github.com/ahgittin","followers_url":"https://api.github.com/users/ahgittin/followers","following_url":"https://api.github.com/users/ahgittin/following{/other_user}","gists_url":"https://api.github.com/users/ahgittin/gists{/gist_id}","starred_url":"https://api.github.com/users/ahgittin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahgittin/subscriptions","organizations_url":"https://api.github.com/users/ahgittin/orgs","repos_url":"https://api.github.com/users/ahgittin/repos","events_url":"https://api.github.com/users/ahgittin/events{/privacy}","received_events_url":"https://api.github.com/users/ahgittin/received_events","type":"User","site_admin":false},"repo":{"id":21164564,"name":"incubator-brooklyn","full_name":"ahgittin/incubator-brooklyn","owner":{"login":"ahgittin","id":496540,"avatar_url":"https://avatars.githubusercontent.com/u/496540?v=3","gravatar_id":"","url":"https://api.github.com/users/ahgittin","html_url":"https://github.com/ahgittin","followers_url":"https://api.github.com/users/ahgittin/followers","following_url":"https://api.github.com/users/ahgittin/following{/other_user}","gists_url":"https://api.github.com/users/ahgittin/gists{/gist_id}","starred_url":"https://api.github.com/users/ahgittin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahgittin/subscriptions","organizations_url":"https://api.github.com/users/ahgittin/orgs","repos_url":"https://api.github.com/users/ahgittin/repos","events_url":"https://api.github.com/users/ahgittin/events{/privacy}","received_events_url":"https://api.github.com/users/ahgittin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ahgittin/incubator-brooklyn","description":"Mirror of Apache Brooklyn","fork":true,"url":"https://api.github.com/repos/ahgittin/incubator-brooklyn","forks_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/forks","keys_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/teams","hooks_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/hooks","issue_events_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/issues/events{/number}","events_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/events","assignees_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/assignees{/user}","branches_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/branches{/branch}","tags_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/tags","blobs_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/statuses/{sha}","languages_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/languages","stargazers_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/stargazers","contributors_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/contributors","subscribers_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/subscribers","subscription_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/subscription","commits_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/contents/{+path}","compare_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/merges","archive_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/downloads","issues_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/issues{/number}","pulls_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/pulls{/number}","milestones_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/milestones{/number}","notifications_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/labels{/name}","releases_url":"https://api.github.com/repos/ahgittin/incubator-brooklyn/releases{/id}","created_at":"2014-06-24T12:59:32Z","updated_at":"2015-02-06T14:02:59Z","pushed_at":"2015-05-07T09:44:44Z","git_url":"git://github.com/ahgittin/incubator-brooklyn.git","ssh_url":"git@github.com:ahgittin/incubator-brooklyn.git","clone_url":"https://github.com/ahgittin/incubator-brooklyn.git","svn_url":"https://github.com/ahgittin/incubator-brooklyn","homepage":null,"size":238749,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"d0cbcf36cf701d9162be74a144cf1bd26741637e","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":19368221,"name":"incubator-brooklyn","full_name":"apache/incubator-brooklyn","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/incubator-brooklyn","description":"Mirror of Apache Brooklyn","fork":false,"url":"https://api.github.com/repos/apache/incubator-brooklyn","forks_url":"https://api.github.com/repos/apache/incubator-brooklyn/forks","keys_url":"https://api.github.com/repos/apache/incubator-brooklyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/incubator-brooklyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/incubator-brooklyn/teams","hooks_url":"https://api.github.com/repos/apache/incubator-brooklyn/hooks","issue_events_url":"https://api.github.com/repos/apache/incubator-brooklyn/issues/events{/number}","events_url":"https://api.github.com/repos/apache/incubator-brooklyn/events","assignees_url":"https://api.github.com/repos/apache/incubator-brooklyn/assignees{/user}","branches_url":"https://api.github.com/repos/apache/incubator-brooklyn/branches{/branch}","tags_url":"https://api.github.com/repos/apache/incubator-brooklyn/tags","blobs_url":"https://api.github.com/repos/apache/incubator-brooklyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/incubator-brooklyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/incubator-brooklyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/incubator-brooklyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/incubator-brooklyn/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/incubator-brooklyn/languages","stargazers_url":"https://api.github.com/repos/apache/incubator-brooklyn/stargazers","contributors_url":"https://api.github.com/repos/apache/incubator-brooklyn/contributors","subscribers_url":"https://api.github.com/repos/apache/incubator-brooklyn/subscribers","subscription_url":"https://api.github.com/repos/apache/incubator-brooklyn/subscription","commits_url":"https://api.github.com/repos/apache/incubator-brooklyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/incubator-brooklyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/incubator-brooklyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/incubator-brooklyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/incubator-brooklyn/contents/{+path}","compare_url":"https://api.github.com/repos/apache/incubator-brooklyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/incubator-brooklyn/merges","archive_url":"https://api.github.com/repos/apache/incubator-brooklyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/incubator-brooklyn/downloads","issues_url":"https://api.github.com/repos/apache/incubator-brooklyn/issues{/number}","pulls_url":"https://api.github.com/repos/apache/incubator-brooklyn/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/incubator-brooklyn/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/incubator-brooklyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/incubator-brooklyn/labels{/name}","releases_url":"https://api.github.com/repos/apache/incubator-brooklyn/releases{/id}","created_at":"2014-05-02T07:00:07Z","updated_at":"2015-05-07T16:33:14Z","pushed_at":"2015-05-07T19:24:16Z","git_url":"git://github.com/apache/incubator-brooklyn.git","ssh_url":"git@github.com:apache/incubator-brooklyn.git","clone_url":"https://github.com/apache/incubator-brooklyn.git","svn_url":"https://github.com/apache/incubator-brooklyn","homepage":null,"size":248291,"stargazers_count":76,"watchers_count":76,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":58,"mirror_url":"git://git.apache.org/incubator-brooklyn.git","open_issues_count":23,"forks":58,"open_issues":23,"watchers":76,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-brooklyn/pulls/630"},"html":{"href":"https://github.com/apache/incubator-brooklyn/pull/630"},"issue":{"href":"https://api.github.com/repos/apache/incubator-brooklyn/issues/630"},"comments":{"href":"https://api.github.com/repos/apache/incubator-brooklyn/issues/630/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/incubator-brooklyn/pulls/630/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/incubator-brooklyn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/incubator-brooklyn/pulls/630/commits"},"statuses":{"href":"https://api.github.com/repos/apache/incubator-brooklyn/statuses/fc4d4f799c33e837a8973cd98a11d4b50eb072f0"}}}}