{"action":"created","comment":{"url":"https://api.github.com/repos/ClusterHQ/flocker/pulls/comments/51642581","id":51642581,"diff_hunk":"@@ -703,6 +729,59 @@ def current_nodes(self):\n         return request\n \n     @log_method\n+    def install_flocker_version(self, package_source):\n+        \"\"\"\n+        Change the version of flocker installed on all of the nodes to the\n+        version indicated by `package_source`.\n+        \"\"\"\n+        control_node_address = self.control_node.public_address\n+        all_cluster_nodes = set([x.public_address for x in self.nodes] +\n+                                [control_node_address])\n+        distribution = self.distribution\n+\n+        def get_flocker_version():\n+            # Retry getting the flocker version for 10 seconds. Flocker might\n+            # not be running yet on the control node when this is called.\n+            d = timeout(\n+                self.reactor,\n+                retry_failure(\n+                    self.reactor,\n+                    self.client.version\n+                ),\n+                10\n+            )\n+            d.addCallback(lambda v: str(v.get('flocker')) or None)\n+            return d\n+\n+        d = get_flocker_version()\n+\n+        # If we fail to get the current version, assume we must reinstall\n+        # flocker.\n+        d.addErrback(write_failure)\n+\n+        def reinstall_if_needed(v):\n+            if v and v == package_source.version:\n+                return v\n+            return reinstall_flocker_at_version(\n+                reactor, all_cluster_nodes, control_node_address,\n+                package_source, distribution)","path":"flocker/acceptance/testtools.py","position":133,"original_position":133,"commit_id":"875d1f32b3b0604bcc4fc0a49c45bddfb622159e","original_commit_id":"875d1f32b3b0604bcc4fc0a49c45bddfb622159e","user":{"login":"wallrj","id":978965,"avatar_url":"https://avatars.githubusercontent.com/u/978965?v=3","gravatar_id":"","url":"https://api.github.com/users/wallrj","html_url":"https://github.com/wallrj","followers_url":"https://api.github.com/users/wallrj/followers","following_url":"https://api.github.com/users/wallrj/following{/other_user}","gists_url":"https://api.github.com/users/wallrj/gists{/gist_id}","starred_url":"https://api.github.com/users/wallrj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wallrj/subscriptions","organizations_url":"https://api.github.com/users/wallrj/orgs","repos_url":"https://api.github.com/users/wallrj/repos","events_url":"https://api.github.com/users/wallrj/events{/privacy}","received_events_url":"https://api.github.com/users/wallrj/received_events","type":"User","site_admin":false},"body":":question: I looked at the name of this function and expected it to require a ``version`` argument. ","created_at":"2016-02-02T21:57:46Z","updated_at":"2016-02-02T21:57:46Z","html_url":"https://github.com/ClusterHQ/flocker/pull/2547#discussion_r51642581","pull_request_url":"https://api.github.com/repos/ClusterHQ/flocker/pulls/2547","_links":{"self":{"href":"https://api.github.com/repos/ClusterHQ/flocker/pulls/comments/51642581"},"html":{"href":"https://github.com/ClusterHQ/flocker/pull/2547#discussion_r51642581"},"pull_request":{"href":"https://api.github.com/repos/ClusterHQ/flocker/pulls/2547"}}},"pull_request":{"url":"https://api.github.com/repos/ClusterHQ/flocker/pulls/2547","id":57583705,"html_url":"https://github.com/ClusterHQ/flocker/pull/2547","diff_url":"https://github.com/ClusterHQ/flocker/pull/2547.diff","patch_url":"https://github.com/ClusterHQ/flocker/pull/2547.patch","issue_url":"https://api.github.com/repos/ClusterHQ/flocker/issues/2547","number":2547,"state":"open","locked":false,"title":"[FLOC-3525] Roll forward flocker upgrade acceptance test ","user":{"login":"sarum90","id":604129,"avatar_url":"https://avatars.githubusercontent.com/u/604129?v=3","gravatar_id":"","url":"https://api.github.com/users/sarum90","html_url":"https://github.com/sarum90","followers_url":"https://api.github.com/users/sarum90/followers","following_url":"https://api.github.com/users/sarum90/following{/other_user}","gists_url":"https://api.github.com/users/sarum90/gists{/gist_id}","starred_url":"https://api.github.com/users/sarum90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarum90/subscriptions","organizations_url":"https://api.github.com/users/sarum90/orgs","repos_url":"https://api.github.com/users/sarum90/repos","events_url":"https://api.github.com/users/sarum90/events{/privacy}","received_events_url":"https://api.github.com/users/sarum90/received_events","type":"User","site_admin":false},"body":"This branch is mostly a re-submission of a branch that caused a regression in Centos7 on rackspace.\r\n\r\nThus http://ci-live.clusterhq.com:8080/job/ClusterHQ-flocker/job/reapply-flocker-acceptance-test-FLOC-3525/job/_run_acceptance_on_Rackspace_CentOS_7_with_Cinder/ is probably the most interesting test to review.\r\n\r\nTo assist in your review I will annotate those results below:\r\n\r\n1-18: Me trying things. Instead I probably should have used buildbot to build the package and iterated on run_acceptance_tests in my local checkout\r\n\r\n19-25: Flaky results because I was restarting the control agent in parallel with the dataset agent. Because of firewalld rule ordering and restarting docker, it is actually important to restart the dataset agent (and docker) _after_ the control agent is restarted.\r\n\r\n26+: runs on the final code.\r\n\r\n27: A flake in node creation, presumed to be rackspace slowness.\r\n\r\nSummary of changes since last submit:\r\n\r\n- Retry version getting, something about the firewall/networking setup in Rackspace meant that sometimes when the trial process was trying to get the version of flocker from the control node before the control agent had restarted it would fail. Simple retry until the control agent is restarted seems to have improved that.\r\n- Re-opening the firewall after the control agent and docker were restarted. This seems to be required only on Rackspace,CentOS7 and not on other distros/providers.\r\n- Figured out the order in which docker, the control agents, and firewalld needed to be restarted in order for flocker to function.\r\n- Some review notes on getting environment variables.\r\n","created_at":"2016-01-28T23:29:11Z","updated_at":"2016-02-02T21:57:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"73853adc0df44f1a3350fe9d16fa3469772b3b82","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ClusterHQ/flocker/pulls/2547/commits","review_comments_url":"https://api.github.com/repos/ClusterHQ/flocker/pulls/2547/comments","review_comment_url":"https://api.github.com/repos/ClusterHQ/flocker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ClusterHQ/flocker/issues/2547/comments","statuses_url":"https://api.github.com/repos/ClusterHQ/flocker/statuses/875d1f32b3b0604bcc4fc0a49c45bddfb622159e","head":{"label":"ClusterHQ:reapply-flocker-acceptance-test-FLOC-3525","ref":"reapply-flocker-acceptance-test-FLOC-3525","sha":"875d1f32b3b0604bcc4fc0a49c45bddfb622159e","user":{"login":"ClusterHQ","id":7913449,"avatar_url":"https://avatars.githubusercontent.com/u/7913449?v=3","gravatar_id":"","url":"https://api.github.com/users/ClusterHQ","html_url":"https://github.com/ClusterHQ","followers_url":"https://api.github.com/users/ClusterHQ/followers","following_url":"https://api.github.com/users/ClusterHQ/following{/other_user}","gists_url":"https://api.github.com/users/ClusterHQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ClusterHQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClusterHQ/subscriptions","organizations_url":"https://api.github.com/users/ClusterHQ/orgs","repos_url":"https://api.github.com/users/ClusterHQ/repos","events_url":"https://api.github.com/users/ClusterHQ/events{/privacy}","received_events_url":"https://api.github.com/users/ClusterHQ/received_events","type":"Organization","site_admin":false},"repo":{"id":19248542,"name":"flocker","full_name":"ClusterHQ/flocker","owner":{"login":"ClusterHQ","id":7913449,"avatar_url":"https://avatars.githubusercontent.com/u/7913449?v=3","gravatar_id":"","url":"https://api.github.com/users/ClusterHQ","html_url":"https://github.com/ClusterHQ","followers_url":"https://api.github.com/users/ClusterHQ/followers","following_url":"https://api.github.com/users/ClusterHQ/following{/other_user}","gists_url":"https://api.github.com/users/ClusterHQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ClusterHQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClusterHQ/subscriptions","organizations_url":"https://api.github.com/users/ClusterHQ/orgs","repos_url":"https://api.github.com/users/ClusterHQ/repos","events_url":"https://api.github.com/users/ClusterHQ/events{/privacy}","received_events_url":"https://api.github.com/users/ClusterHQ/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ClusterHQ/flocker","description":"Container data volume manager for your Dockerized application","fork":false,"url":"https://api.github.com/repos/ClusterHQ/flocker","forks_url":"https://api.github.com/repos/ClusterHQ/flocker/forks","keys_url":"https://api.github.com/repos/ClusterHQ/flocker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ClusterHQ/flocker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ClusterHQ/flocker/teams","hooks_url":"https://api.github.com/repos/ClusterHQ/flocker/hooks","issue_events_url":"https://api.github.com/repos/ClusterHQ/flocker/issues/events{/number}","events_url":"https://api.github.com/repos/ClusterHQ/flocker/events","assignees_url":"https://api.github.com/repos/ClusterHQ/flocker/assignees{/user}","branches_url":"https://api.github.com/repos/ClusterHQ/flocker/branches{/branch}","tags_url":"https://api.github.com/repos/ClusterHQ/flocker/tags","blobs_url":"https://api.github.com/repos/ClusterHQ/flocker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ClusterHQ/flocker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ClusterHQ/flocker/git/refs{/sha}","trees_url":"https://api.github.com/repos/ClusterHQ/flocker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ClusterHQ/flocker/statuses/{sha}","languages_url":"https://api.github.com/repos/ClusterHQ/flocker/languages","stargazers_url":"https://api.github.com/repos/ClusterHQ/flocker/stargazers","contributors_url":"https://api.github.com/repos/ClusterHQ/flocker/contributors","subscribers_url":"https://api.github.com/repos/ClusterHQ/flocker/subscribers","subscription_url":"https://api.github.com/repos/ClusterHQ/flocker/subscription","commits_url":"https://api.github.com/repos/ClusterHQ/flocker/commits{/sha}","git_commits_url":"https://api.github.com/repos/ClusterHQ/flocker/git/commits{/sha}","comments_url":"https://api.github.com/repos/ClusterHQ/flocker/comments{/number}","issue_comment_url":"https://api.github.com/repos/ClusterHQ/flocker/issues/comments{/number}","contents_url":"https://api.github.com/repos/ClusterHQ/flocker/contents/{+path}","compare_url":"https://api.github.com/repos/ClusterHQ/flocker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ClusterHQ/flocker/merges","archive_url":"https://api.github.com/repos/ClusterHQ/flocker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ClusterHQ/flocker/downloads","issues_url":"https://api.github.com/repos/ClusterHQ/flocker/issues{/number}","pulls_url":"https://api.github.com/repos/ClusterHQ/flocker/pulls{/number}","milestones_url":"https://api.github.com/repos/ClusterHQ/flocker/milestones{/number}","notifications_url":"https://api.github.com/repos/ClusterHQ/flocker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ClusterHQ/flocker/labels{/name}","releases_url":"https://api.github.com/repos/ClusterHQ/flocker/releases{/id}","deployments_url":"https://api.github.com/repos/ClusterHQ/flocker/deployments","created_at":"2014-04-28T18:02:14Z","updated_at":"2016-02-02T13:58:16Z","pushed_at":"2016-02-02T19:36:36Z","git_url":"git://github.com/ClusterHQ/flocker.git","ssh_url":"git@github.com:ClusterHQ/flocker.git","clone_url":"https://github.com/ClusterHQ/flocker.git","svn_url":"https://github.com/ClusterHQ/flocker","homepage":"https://clusterhq.com","size":57626,"stargazers_count":2124,"watchers_count":2124,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":154,"mirror_url":null,"open_issues_count":60,"forks":154,"open_issues":60,"watchers":2124,"default_branch":"master"}},"base":{"label":"ClusterHQ:master","ref":"master","sha":"fa29ba39883055370e17a0294b3ae7fd57924901","user":{"login":"ClusterHQ","id":7913449,"avatar_url":"https://avatars.githubusercontent.com/u/7913449?v=3","gravatar_id":"","url":"https://api.github.com/users/ClusterHQ","html_url":"https://github.com/ClusterHQ","followers_url":"https://api.github.com/users/ClusterHQ/followers","following_url":"https://api.github.com/users/ClusterHQ/following{/other_user}","gists_url":"https://api.github.com/users/ClusterHQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ClusterHQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClusterHQ/subscriptions","organizations_url":"https://api.github.com/users/ClusterHQ/orgs","repos_url":"https://api.github.com/users/ClusterHQ/repos","events_url":"https://api.github.com/users/ClusterHQ/events{/privacy}","received_events_url":"https://api.github.com/users/ClusterHQ/received_events","type":"Organization","site_admin":false},"repo":{"id":19248542,"name":"flocker","full_name":"ClusterHQ/flocker","owner":{"login":"ClusterHQ","id":7913449,"avatar_url":"https://avatars.githubusercontent.com/u/7913449?v=3","gravatar_id":"","url":"https://api.github.com/users/ClusterHQ","html_url":"https://github.com/ClusterHQ","followers_url":"https://api.github.com/users/ClusterHQ/followers","following_url":"https://api.github.com/users/ClusterHQ/following{/other_user}","gists_url":"https://api.github.com/users/ClusterHQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ClusterHQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClusterHQ/subscriptions","organizations_url":"https://api.github.com/users/ClusterHQ/orgs","repos_url":"https://api.github.com/users/ClusterHQ/repos","events_url":"https://api.github.com/users/ClusterHQ/events{/privacy}","received_events_url":"https://api.github.com/users/ClusterHQ/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ClusterHQ/flocker","description":"Container data volume manager for your Dockerized application","fork":false,"url":"https://api.github.com/repos/ClusterHQ/flocker","forks_url":"https://api.github.com/repos/ClusterHQ/flocker/forks","keys_url":"https://api.github.com/repos/ClusterHQ/flocker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ClusterHQ/flocker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ClusterHQ/flocker/teams","hooks_url":"https://api.github.com/repos/ClusterHQ/flocker/hooks","issue_events_url":"https://api.github.com/repos/ClusterHQ/flocker/issues/events{/number}","events_url":"https://api.github.com/repos/ClusterHQ/flocker/events","assignees_url":"https://api.github.com/repos/ClusterHQ/flocker/assignees{/user}","branches_url":"https://api.github.com/repos/ClusterHQ/flocker/branches{/branch}","tags_url":"https://api.github.com/repos/ClusterHQ/flocker/tags","blobs_url":"https://api.github.com/repos/ClusterHQ/flocker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ClusterHQ/flocker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ClusterHQ/flocker/git/refs{/sha}","trees_url":"https://api.github.com/repos/ClusterHQ/flocker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ClusterHQ/flocker/statuses/{sha}","languages_url":"https://api.github.com/repos/ClusterHQ/flocker/languages","stargazers_url":"https://api.github.com/repos/ClusterHQ/flocker/stargazers","contributors_url":"https://api.github.com/repos/ClusterHQ/flocker/contributors","subscribers_url":"https://api.github.com/repos/ClusterHQ/flocker/subscribers","subscription_url":"https://api.github.com/repos/ClusterHQ/flocker/subscription","commits_url":"https://api.github.com/repos/ClusterHQ/flocker/commits{/sha}","git_commits_url":"https://api.github.com/repos/ClusterHQ/flocker/git/commits{/sha}","comments_url":"https://api.github.com/repos/ClusterHQ/flocker/comments{/number}","issue_comment_url":"https://api.github.com/repos/ClusterHQ/flocker/issues/comments{/number}","contents_url":"https://api.github.com/repos/ClusterHQ/flocker/contents/{+path}","compare_url":"https://api.github.com/repos/ClusterHQ/flocker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ClusterHQ/flocker/merges","archive_url":"https://api.github.com/repos/ClusterHQ/flocker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ClusterHQ/flocker/downloads","issues_url":"https://api.github.com/repos/ClusterHQ/flocker/issues{/number}","pulls_url":"https://api.github.com/repos/ClusterHQ/flocker/pulls{/number}","milestones_url":"https://api.github.com/repos/ClusterHQ/flocker/milestones{/number}","notifications_url":"https://api.github.com/repos/ClusterHQ/flocker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ClusterHQ/flocker/labels{/name}","releases_url":"https://api.github.com/repos/ClusterHQ/flocker/releases{/id}","deployments_url":"https://api.github.com/repos/ClusterHQ/flocker/deployments","created_at":"2014-04-28T18:02:14Z","updated_at":"2016-02-02T13:58:16Z","pushed_at":"2016-02-02T19:36:36Z","git_url":"git://github.com/ClusterHQ/flocker.git","ssh_url":"git@github.com:ClusterHQ/flocker.git","clone_url":"https://github.com/ClusterHQ/flocker.git","svn_url":"https://github.com/ClusterHQ/flocker","homepage":"https://clusterhq.com","size":57626,"stargazers_count":2124,"watchers_count":2124,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":154,"mirror_url":null,"open_issues_count":60,"forks":154,"open_issues":60,"watchers":2124,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ClusterHQ/flocker/pulls/2547"},"html":{"href":"https://github.com/ClusterHQ/flocker/pull/2547"},"issue":{"href":"https://api.github.com/repos/ClusterHQ/flocker/issues/2547"},"comments":{"href":"https://api.github.com/repos/ClusterHQ/flocker/issues/2547/comments"},"review_comments":{"href":"https://api.github.com/repos/ClusterHQ/flocker/pulls/2547/comments"},"review_comment":{"href":"https://api.github.com/repos/ClusterHQ/flocker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ClusterHQ/flocker/pulls/2547/commits"},"statuses":{"href":"https://api.github.com/repos/ClusterHQ/flocker/statuses/875d1f32b3b0604bcc4fc0a49c45bddfb622159e"}}}}