{"action":"created","comment":{"url":"https://api.github.com/repos/rackerlabs/otter/pulls/comments/23706090","id":23706090,"diff_hunk":"@@ -222,4 +226,46 @@ def as_effect(self):\n         Produce a :obj:`Effect` to remove some nodes from some RCv3 load\n         balancers.\n         \"\"\"\n-        return _rackconnect_bulk_request(self.lb_node_pairs, \"DELETE\", (204,))\n+        eff = _rackconnect_bulk_request(self.lb_node_pairs, \"DELETE\",\n+                                        success_pred=_CONSTANTLY_TRUE)\n+        return eff.on(_rcv3_check_bulk_delete)\n+\n+\n+_CONSTANTLY_TRUE = lambda _: True\n+_UUID4_REGEX = (\"[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}\"\n+                \"-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\")\n+_RCV3_NODE_NOT_A_MEMBER_PATTERN = re.compile(\n+    \"Node (?P<node_id>{uuid}) is not a member of Load Balancer Pool \"\n+    \"(?P<lb_id>{uuid})\".format(uuid=_UUID4_REGEX),\n+    re.IGNORECASE)\n+\n+\n+def _rcv3_check_bulk_delete(result):\n+    \"\"\"\n+    Checks if the RCv3 bulk deletion command was successful.\n+\n+    The request is considered successful if the response code\n+    indicated unambiguous success, or the machine we're trying to\n+    remove is already removed anyway.\n+\n+    If the machine was already removed, returns the next step to try\n+    and remove the remaining pairs, unless a fatal error *also*\n+    occurred. This is necessary because RCv3 bulk requests are\n+    atomic-ish.\n+    \"\"\"\n+    response, body = result\n+\n+    if response.code == 204:  # All done!","path":"otter/convergence/steps.py","position":82,"original_position":82,"commit_id":"efa64c15cc84324294df5849436bc38515df9f0c","original_commit_id":"efa64c15cc84324294df5849436bc38515df9f0c","user":{"login":"lvh","id":97816,"avatar_url":"https://avatars.githubusercontent.com/u/97816?v=3","gravatar_id":"","url":"https://api.github.com/users/lvh","html_url":"https://github.com/lvh","followers_url":"https://api.github.com/users/lvh/followers","following_url":"https://api.github.com/users/lvh/following{/other_user}","gists_url":"https://api.github.com/users/lvh/gists{/gist_id}","starred_url":"https://api.github.com/users/lvh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lvh/subscriptions","organizations_url":"https://api.github.com/users/lvh/orgs","repos_url":"https://api.github.com/users/lvh/repos","events_url":"https://api.github.com/users/lvh/events{/privacy}","received_events_url":"https://api.github.com/users/lvh/received_events","type":"User","site_admin":false},"body":"So, you're concerned about non-empty, non-JSON bodies?\r\n\r\nI guess now the order doesn't really matter for me anymore anyway, because I can't do what I want in `success_pred`, so I won't be parsing the errors there. I'll just pretend 409 is a \"success\" which really just means \"defer to the callback to tell you which effect to execute instead\".","created_at":"2015-01-28T17:46:44Z","updated_at":"2015-01-28T17:46:44Z","html_url":"https://github.com/rackerlabs/otter/pull/967#discussion_r23706090","pull_request_url":"https://api.github.com/repos/rackerlabs/otter/pulls/967","_links":{"self":{"href":"https://api.github.com/repos/rackerlabs/otter/pulls/comments/23706090"},"html":{"href":"https://github.com/rackerlabs/otter/pull/967#discussion_r23706090"},"pull_request":{"href":"https://api.github.com/repos/rackerlabs/otter/pulls/967"}}},"pull_request":{"url":"https://api.github.com/repos/rackerlabs/otter/pulls/967","id":28080029,"html_url":"https://github.com/rackerlabs/otter/pull/967","diff_url":"https://github.com/rackerlabs/otter/pull/967.diff","patch_url":"https://github.com/rackerlabs/otter/pull/967.patch","issue_url":"https://api.github.com/repos/rackerlabs/otter/issues/967","number":967,"state":"open","locked":false,"title":"Support RCv3 out-of-band deletes","user":{"login":"lvh","id":97816,"avatar_url":"https://avatars.githubusercontent.com/u/97816?v=3","gravatar_id":"","url":"https://api.github.com/users/lvh","html_url":"https://github.com/lvh","followers_url":"https://api.github.com/users/lvh/followers","following_url":"https://api.github.com/users/lvh/following{/other_user}","gists_url":"https://api.github.com/users/lvh/gists{/gist_id}","starred_url":"https://api.github.com/users/lvh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lvh/subscriptions","organizations_url":"https://api.github.com/users/lvh/orgs","repos_url":"https://api.github.com/users/lvh/repos","events_url":"https://api.github.com/users/lvh/events{/privacy}","received_events_url":"https://api.github.com/users/lvh/received_events","type":"User","site_admin":false},"body":"Implements #820.","created_at":"2015-01-27T02:55:17Z","updated_at":"2015-01-28T17:46:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e96926fe5ff091013c3e1ae571527ea04d92dae4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rackerlabs/otter/pulls/967/commits","review_comments_url":"https://api.github.com/repos/rackerlabs/otter/pulls/967/comments","review_comment_url":"https://api.github.com/repos/rackerlabs/otter/pulls/comments/{number}","comments_url":"https://api.github.com/repos/rackerlabs/otter/issues/967/comments","statuses_url":"https://api.github.com/repos/rackerlabs/otter/statuses/efa64c15cc84324294df5849436bc38515df9f0c","head":{"label":"rackerlabs:rcv3-oob-delete","ref":"rcv3-oob-delete","sha":"efa64c15cc84324294df5849436bc38515df9f0c","user":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":6097139,"name":"otter","full_name":"rackerlabs/otter","owner":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rackerlabs/otter","description":"Rackspace Auto Scale","fork":false,"url":"https://api.github.com/repos/rackerlabs/otter","forks_url":"https://api.github.com/repos/rackerlabs/otter/forks","keys_url":"https://api.github.com/repos/rackerlabs/otter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rackerlabs/otter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rackerlabs/otter/teams","hooks_url":"https://api.github.com/repos/rackerlabs/otter/hooks","issue_events_url":"https://api.github.com/repos/rackerlabs/otter/issues/events{/number}","events_url":"https://api.github.com/repos/rackerlabs/otter/events","assignees_url":"https://api.github.com/repos/rackerlabs/otter/assignees{/user}","branches_url":"https://api.github.com/repos/rackerlabs/otter/branches{/branch}","tags_url":"https://api.github.com/repos/rackerlabs/otter/tags","blobs_url":"https://api.github.com/repos/rackerlabs/otter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rackerlabs/otter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rackerlabs/otter/git/refs{/sha}","trees_url":"https://api.github.com/repos/rackerlabs/otter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rackerlabs/otter/statuses/{sha}","languages_url":"https://api.github.com/repos/rackerlabs/otter/languages","stargazers_url":"https://api.github.com/repos/rackerlabs/otter/stargazers","contributors_url":"https://api.github.com/repos/rackerlabs/otter/contributors","subscribers_url":"https://api.github.com/repos/rackerlabs/otter/subscribers","subscription_url":"https://api.github.com/repos/rackerlabs/otter/subscription","commits_url":"https://api.github.com/repos/rackerlabs/otter/commits{/sha}","git_commits_url":"https://api.github.com/repos/rackerlabs/otter/git/commits{/sha}","comments_url":"https://api.github.com/repos/rackerlabs/otter/comments{/number}","issue_comment_url":"https://api.github.com/repos/rackerlabs/otter/issues/comments/{number}","contents_url":"https://api.github.com/repos/rackerlabs/otter/contents/{+path}","compare_url":"https://api.github.com/repos/rackerlabs/otter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rackerlabs/otter/merges","archive_url":"https://api.github.com/repos/rackerlabs/otter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rackerlabs/otter/downloads","issues_url":"https://api.github.com/repos/rackerlabs/otter/issues{/number}","pulls_url":"https://api.github.com/repos/rackerlabs/otter/pulls{/number}","milestones_url":"https://api.github.com/repos/rackerlabs/otter/milestones{/number}","notifications_url":"https://api.github.com/repos/rackerlabs/otter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rackerlabs/otter/labels{/name}","releases_url":"https://api.github.com/repos/rackerlabs/otter/releases{/id}","created_at":"2012-10-05T21:35:59Z","updated_at":"2015-01-28T01:33:23Z","pushed_at":"2015-01-28T02:59:14Z","git_url":"git://github.com/rackerlabs/otter.git","ssh_url":"git@github.com:rackerlabs/otter.git","clone_url":"https://github.com/rackerlabs/otter.git","svn_url":"https://github.com/rackerlabs/otter","homepage":"http://www.rackspace.com/cloud/auto-scale/","size":37216,"stargazers_count":40,"watchers_count":40,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":62,"forks":15,"open_issues":62,"watchers":40,"default_branch":"master"}},"base":{"label":"rackerlabs:master","ref":"master","sha":"a5055abc7a8f366fc3c911a7cd11d821c097f9c2","user":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":6097139,"name":"otter","full_name":"rackerlabs/otter","owner":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rackerlabs/otter","description":"Rackspace Auto Scale","fork":false,"url":"https://api.github.com/repos/rackerlabs/otter","forks_url":"https://api.github.com/repos/rackerlabs/otter/forks","keys_url":"https://api.github.com/repos/rackerlabs/otter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rackerlabs/otter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rackerlabs/otter/teams","hooks_url":"https://api.github.com/repos/rackerlabs/otter/hooks","issue_events_url":"https://api.github.com/repos/rackerlabs/otter/issues/events{/number}","events_url":"https://api.github.com/repos/rackerlabs/otter/events","assignees_url":"https://api.github.com/repos/rackerlabs/otter/assignees{/user}","branches_url":"https://api.github.com/repos/rackerlabs/otter/branches{/branch}","tags_url":"https://api.github.com/repos/rackerlabs/otter/tags","blobs_url":"https://api.github.com/repos/rackerlabs/otter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rackerlabs/otter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rackerlabs/otter/git/refs{/sha}","trees_url":"https://api.github.com/repos/rackerlabs/otter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rackerlabs/otter/statuses/{sha}","languages_url":"https://api.github.com/repos/rackerlabs/otter/languages","stargazers_url":"https://api.github.com/repos/rackerlabs/otter/stargazers","contributors_url":"https://api.github.com/repos/rackerlabs/otter/contributors","subscribers_url":"https://api.github.com/repos/rackerlabs/otter/subscribers","subscription_url":"https://api.github.com/repos/rackerlabs/otter/subscription","commits_url":"https://api.github.com/repos/rackerlabs/otter/commits{/sha}","git_commits_url":"https://api.github.com/repos/rackerlabs/otter/git/commits{/sha}","comments_url":"https://api.github.com/repos/rackerlabs/otter/comments{/number}","issue_comment_url":"https://api.github.com/repos/rackerlabs/otter/issues/comments/{number}","contents_url":"https://api.github.com/repos/rackerlabs/otter/contents/{+path}","compare_url":"https://api.github.com/repos/rackerlabs/otter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rackerlabs/otter/merges","archive_url":"https://api.github.com/repos/rackerlabs/otter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rackerlabs/otter/downloads","issues_url":"https://api.github.com/repos/rackerlabs/otter/issues{/number}","pulls_url":"https://api.github.com/repos/rackerlabs/otter/pulls{/number}","milestones_url":"https://api.github.com/repos/rackerlabs/otter/milestones{/number}","notifications_url":"https://api.github.com/repos/rackerlabs/otter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rackerlabs/otter/labels{/name}","releases_url":"https://api.github.com/repos/rackerlabs/otter/releases{/id}","created_at":"2012-10-05T21:35:59Z","updated_at":"2015-01-28T01:33:23Z","pushed_at":"2015-01-28T02:59:14Z","git_url":"git://github.com/rackerlabs/otter.git","ssh_url":"git@github.com:rackerlabs/otter.git","clone_url":"https://github.com/rackerlabs/otter.git","svn_url":"https://github.com/rackerlabs/otter","homepage":"http://www.rackspace.com/cloud/auto-scale/","size":37216,"stargazers_count":40,"watchers_count":40,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":62,"forks":15,"open_issues":62,"watchers":40,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rackerlabs/otter/pulls/967"},"html":{"href":"https://github.com/rackerlabs/otter/pull/967"},"issue":{"href":"https://api.github.com/repos/rackerlabs/otter/issues/967"},"comments":{"href":"https://api.github.com/repos/rackerlabs/otter/issues/967/comments"},"review_comments":{"href":"https://api.github.com/repos/rackerlabs/otter/pulls/967/comments"},"review_comment":{"href":"https://api.github.com/repos/rackerlabs/otter/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/rackerlabs/otter/pulls/967/commits"},"statuses":{"href":"https://api.github.com/repos/rackerlabs/otter/statuses/efa64c15cc84324294df5849436bc38515df9f0c"}}}}