{"action":"created","comment":{"url":"https://api.github.com/repos/apache/incubator-brooklyn/pulls/comments/23767951","id":23767951,"diff_hunk":"@@ -132,44 +193,34 @@ public Void call(ConfigBag parametersO) {\n             Predicates.equalTo(ManagementNodeState.HOT_STANDBY), Duration.FIVE_MINUTES));\n \n         // 3 stop new version\n-        // 4 stop old version\n-        ConfigBag stopParameters = ConfigBag.newInstance();\n-        stopParameters.put(StopSoftwareParameters.STOP_MACHINE, Boolean.FALSE);\n-        DynamicTasks.queue(Tasks.builder().name(\"shutdown original and transient nodes\")\n-            .add(Effectors.invocation(dryRunChild, BrooklynNode.STOP_NODE_BUT_LEAVE_APPS, stopParameters))\n-            .add(Effectors.invocation(entity(), BrooklynNode.STOP_NODE_BUT_LEAVE_APPS, stopParameters))\n+        DynamicTasks.queue(Tasks.builder().name(\"shutdown transient node\")\n+            .add(Effectors.invocation(dryRunChild, BrooklynNode.STOP_NODE_BUT_LEAVE_APPS, ImmutableMap.of(StopSoftwareParameters.STOP_MACHINE, Boolean.FALSE)))\n             .build());\n \n-        // 5 move old files, and move new files\n-        DynamicTasks.queue(Tasks.builder().name(\"setup new version\").body(new Runnable() {\n-            @Override\n-            public void run() {\n-                String runDir = entity().getAttribute(SoftwareProcess.RUN_DIR);\n-                String bkDir = Urls.mergePaths(runDir, \"..\", Urls.getBasename(runDir)+\"-backups\", dryRunNodeUid);\n-                String dryRunDir = Preconditions.checkNotNull(dryRunChild.getAttribute(SoftwareProcess.RUN_DIR));\n-                log.debug(this+\" storing backup of previous version in \"+bkDir);\n-                DynamicTasks.queue(SshEffectorTasks.ssh(\n-                    \"cd \"+runDir,\n-                    \"mkdir -p \"+bkDir,\n-                    \"mv * \"+bkDir,\n-                    \"cd \"+dryRunDir,\n-                    \"mv * \"+runDir","path":"software/base/src/main/java/brooklyn/entity/brooklynnode/effector/BrooklynNodeUpgradeEffectorBody.java","position":161,"original_position":161,"commit_id":"36245f5cec67399e98b30f0164c2336614bbcef8","original_commit_id":"36245f5cec67399e98b30f0164c2336614bbcef8","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":"looks like we lose the two lines above?  i think that's fine, but wanted to check.\r\n\r\nit means the `runDir` contents will have to be repopulated from the (already downloaded) `installDir`, costing perhaps a few extra seconds of downtime.  should be easy enough to add these two statements back in the case where dryRun has just been done if we wanted to.  but it does feel a bit dodgy.  no strong feelings...","created_at":"2015-01-29T13:48:21Z","updated_at":"2015-01-29T13:48:21Z","html_url":"https://github.com/apache/incubator-brooklyn/pull/370#discussion_r23767951","pull_request_url":"https://api.github.com/repos/apache/incubator-brooklyn/pulls/370","_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-brooklyn/pulls/comments/23767951"},"html":{"href":"https://github.com/apache/incubator-brooklyn/pull/370#discussion_r23767951"},"pull_request":{"href":"https://api.github.com/repos/apache/incubator-brooklyn/pulls/370"}}},"pull_request":{"url":"https://api.github.com/repos/apache/incubator-brooklyn/pulls/370","id":25275047,"html_url":"https://github.com/apache/incubator-brooklyn/pull/370","diff_url":"https://github.com/apache/incubator-brooklyn/pull/370.diff","patch_url":"https://github.com/apache/incubator-brooklyn/pull/370.patch","issue_url":"https://api.github.com/repos/apache/incubator-brooklyn/issues/370","number":370,"state":"open","locked":false,"title":"Skip dry run on node upgrade.","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":"Add parameter to choose whether to launch a dry run node or to upgrade directly.\r\nAllow extending classes to customize the effector parameters by overriding a method.\r\n\r\nDepends on https://github.com/apache/incubator-brooklyn/pull/413","created_at":"2014-12-01T15:24:37Z","updated_at":"2015-01-29T13:48:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"02f1325276d530691ae20970972bbd0241cd290d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/incubator-brooklyn/pulls/370/commits","review_comments_url":"https://api.github.com/repos/apache/incubator-brooklyn/pulls/370/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/370/comments","statuses_url":"https://api.github.com/repos/apache/incubator-brooklyn/statuses/36245f5cec67399e98b30f0164c2336614bbcef8","head":{"label":"neykov:direct-upgrade","ref":"direct-upgrade","sha":"36245f5cec67399e98b30f0164c2336614bbcef8","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},"repo":{"id":21119097,"name":"incubator-brooklyn","full_name":"neykov/incubator-brooklyn","owner":{"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},"private":false,"html_url":"https://github.com/neykov/incubator-brooklyn","description":"Mirror of Apache Brooklyn","fork":true,"url":"https://api.github.com/repos/neykov/incubator-brooklyn","forks_url":"https://api.github.com/repos/neykov/incubator-brooklyn/forks","keys_url":"https://api.github.com/repos/neykov/incubator-brooklyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neykov/incubator-brooklyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neykov/incubator-brooklyn/teams","hooks_url":"https://api.github.com/repos/neykov/incubator-brooklyn/hooks","issue_events_url":"https://api.github.com/repos/neykov/incubator-brooklyn/issues/events{/number}","events_url":"https://api.github.com/repos/neykov/incubator-brooklyn/events","assignees_url":"https://api.github.com/repos/neykov/incubator-brooklyn/assignees{/user}","branches_url":"https://api.github.com/repos/neykov/incubator-brooklyn/branches{/branch}","tags_url":"https://api.github.com/repos/neykov/incubator-brooklyn/tags","blobs_url":"https://api.github.com/repos/neykov/incubator-brooklyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neykov/incubator-brooklyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neykov/incubator-brooklyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/neykov/incubator-brooklyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neykov/incubator-brooklyn/statuses/{sha}","languages_url":"https://api.github.com/repos/neykov/incubator-brooklyn/languages","stargazers_url":"https://api.github.com/repos/neykov/incubator-brooklyn/stargazers","contributors_url":"https://api.github.com/repos/neykov/incubator-brooklyn/contributors","subscribers_url":"https://api.github.com/repos/neykov/incubator-brooklyn/subscribers","subscription_url":"https://api.github.com/repos/neykov/incubator-brooklyn/subscription","commits_url":"https://api.github.com/repos/neykov/incubator-brooklyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/neykov/incubator-brooklyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/neykov/incubator-brooklyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/neykov/incubator-brooklyn/issues/comments/{number}","contents_url":"https://api.github.com/repos/neykov/incubator-brooklyn/contents/{+path}","compare_url":"https://api.github.com/repos/neykov/incubator-brooklyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neykov/incubator-brooklyn/merges","archive_url":"https://api.github.com/repos/neykov/incubator-brooklyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neykov/incubator-brooklyn/downloads","issues_url":"https://api.github.com/repos/neykov/incubator-brooklyn/issues{/number}","pulls_url":"https://api.github.com/repos/neykov/incubator-brooklyn/pulls{/number}","milestones_url":"https://api.github.com/repos/neykov/incubator-brooklyn/milestones{/number}","notifications_url":"https://api.github.com/repos/neykov/incubator-brooklyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neykov/incubator-brooklyn/labels{/name}","releases_url":"https://api.github.com/repos/neykov/incubator-brooklyn/releases{/id}","created_at":"2014-06-23T08:28:52Z","updated_at":"2014-07-10T06:45:07Z","pushed_at":"2015-01-29T13:42:37Z","git_url":"git://github.com/neykov/incubator-brooklyn.git","ssh_url":"git@github.com:neykov/incubator-brooklyn.git","clone_url":"https://github.com/neykov/incubator-brooklyn.git","svn_url":"https://github.com/neykov/incubator-brooklyn","homepage":null,"size":234474,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"apache:master","ref":"master","sha":"ec74489472d10a893f383e9010eccd47c8afa566","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-01-29T12:14:14Z","pushed_at":"2015-01-29T12:14:14Z","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":244375,"stargazers_count":40,"watchers_count":40,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":42,"mirror_url":"git://git.apache.org/incubator-brooklyn.git","open_issues_count":24,"forks":42,"open_issues":24,"watchers":40,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-brooklyn/pulls/370"},"html":{"href":"https://github.com/apache/incubator-brooklyn/pull/370"},"issue":{"href":"https://api.github.com/repos/apache/incubator-brooklyn/issues/370"},"comments":{"href":"https://api.github.com/repos/apache/incubator-brooklyn/issues/370/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/incubator-brooklyn/pulls/370/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/370/commits"},"statuses":{"href":"https://api.github.com/repos/apache/incubator-brooklyn/statuses/36245f5cec67399e98b30f0164c2336614bbcef8"}}}}