{"action":"created","comment":{"url":"https://api.github.com/repos/ceph/ceph/pulls/comments/59266550","id":59266550,"diff_hunk":"@@ -399,7 +403,17 @@ bool Replayer::stop_image_replayer(unique_ptr<ImageReplayer<> > &image_replayer)\n   }\n \n   if (image_replayer->is_running()) {\n-    image_replayer->stop();\n+    LambdaContext *ctx = new LambdaContext(\n+        [&image_replayer, this] (int r) {\n+          if (m_image_deleter) {\n+            m_image_deleter->schedule_image_delete(\n+                          image_replayer->get_local_pool_id(),\n+                          image_replayer->get_local_image_id(),\n+                          image_replayer->get_global_image_id());\n+          }\n+        }\n+    );\n+    image_replayer->stop(ctx);","path":"src/tools/rbd_mirror/Replayer.cc","position":181,"original_position":33,"commit_id":"ce64bcfa7ee53d872b59e01221f5fa399e9f5005","original_commit_id":"e6919beb445bf8f629f672b3cedb0ec18fa68fea","user":{"login":"dillaman","id":4739042,"avatar_url":"https://avatars.githubusercontent.com/u/4739042?v=3","gravatar_id":"","url":"https://api.github.com/users/dillaman","html_url":"https://github.com/dillaman","followers_url":"https://api.github.com/users/dillaman/followers","following_url":"https://api.github.com/users/dillaman/following{/other_user}","gists_url":"https://api.github.com/users/dillaman/gists{/gist_id}","starred_url":"https://api.github.com/users/dillaman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dillaman/subscriptions","organizations_url":"https://api.github.com/users/dillaman/orgs","repos_url":"https://api.github.com/users/dillaman/repos","events_url":"https://api.github.com/users/dillaman/events{/privacy}","received_events_url":"https://api.github.com/users/dillaman/received_events","type":"User","site_admin":false},"body":"We probably also want to guard to make sure we cannot create a new ImageReplayer if there is a pending delete scheduled for an image.  I am worried about the case where a user quickly deletes an image and recreates it.  ","created_at":"2016-04-11T19:34:51Z","updated_at":"2016-04-11T19:34:51Z","html_url":"https://github.com/ceph/ceph/pull/8473#discussion_r59266550","pull_request_url":"https://api.github.com/repos/ceph/ceph/pulls/8473","_links":{"self":{"href":"https://api.github.com/repos/ceph/ceph/pulls/comments/59266550"},"html":{"href":"https://github.com/ceph/ceph/pull/8473#discussion_r59266550"},"pull_request":{"href":"https://api.github.com/repos/ceph/ceph/pulls/8473"}}},"pull_request":{"url":"https://api.github.com/repos/ceph/ceph/pulls/8473","id":65480013,"html_url":"https://github.com/ceph/ceph/pull/8473","diff_url":"https://github.com/ceph/ceph/pull/8473.diff","patch_url":"https://github.com/ceph/ceph/pull/8473.patch","issue_url":"https://api.github.com/repos/ceph/ceph/issues/8473","number":8473,"state":"open","locked":false,"title":"[DNM] rbd-mirror: Propagate image deletes from remote pool to local pool","user":{"login":"rjfd","id":17119885,"avatar_url":"https://avatars.githubusercontent.com/u/17119885?v=3","gravatar_id":"","url":"https://api.github.com/users/rjfd","html_url":"https://github.com/rjfd","followers_url":"https://api.github.com/users/rjfd/followers","following_url":"https://api.github.com/users/rjfd/following{/other_user}","gists_url":"https://api.github.com/users/rjfd/gists{/gist_id}","starred_url":"https://api.github.com/users/rjfd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjfd/subscriptions","organizations_url":"https://api.github.com/users/rjfd/orgs","repos_url":"https://api.github.com/users/rjfd/repos","events_url":"https://api.github.com/users/rjfd/events{/privacy}","received_events_url":"https://api.github.com/users/rjfd/received_events","type":"User","site_admin":false},"body":"The implementation of the main functionality is more or less complete, but I still haven't fully tested yet.\r\n\r\nTicket url: http://tracker.ceph.com/issues/14421","created_at":"2016-04-06T14:52:16Z","updated_at":"2016-04-11T19:34:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6c3ca66d107be6395dc63c2186247949350aed6f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ceph/ceph/pulls/8473/commits","review_comments_url":"https://api.github.com/repos/ceph/ceph/pulls/8473/comments","review_comment_url":"https://api.github.com/repos/ceph/ceph/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ceph/ceph/issues/8473/comments","statuses_url":"https://api.github.com/repos/ceph/ceph/statuses/ce64bcfa7ee53d872b59e01221f5fa399e9f5005","head":{"label":"rjfd:wip-14421","ref":"wip-14421","sha":"ce64bcfa7ee53d872b59e01221f5fa399e9f5005","user":{"login":"rjfd","id":17119885,"avatar_url":"https://avatars.githubusercontent.com/u/17119885?v=3","gravatar_id":"","url":"https://api.github.com/users/rjfd","html_url":"https://github.com/rjfd","followers_url":"https://api.github.com/users/rjfd/followers","following_url":"https://api.github.com/users/rjfd/following{/other_user}","gists_url":"https://api.github.com/users/rjfd/gists{/gist_id}","starred_url":"https://api.github.com/users/rjfd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjfd/subscriptions","organizations_url":"https://api.github.com/users/rjfd/orgs","repos_url":"https://api.github.com/users/rjfd/repos","events_url":"https://api.github.com/users/rjfd/events{/privacy}","received_events_url":"https://api.github.com/users/rjfd/received_events","type":"User","site_admin":false},"repo":{"id":51286925,"name":"ceph","full_name":"rjfd/ceph","owner":{"login":"rjfd","id":17119885,"avatar_url":"https://avatars.githubusercontent.com/u/17119885?v=3","gravatar_id":"","url":"https://api.github.com/users/rjfd","html_url":"https://github.com/rjfd","followers_url":"https://api.github.com/users/rjfd/followers","following_url":"https://api.github.com/users/rjfd/following{/other_user}","gists_url":"https://api.github.com/users/rjfd/gists{/gist_id}","starred_url":"https://api.github.com/users/rjfd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjfd/subscriptions","organizations_url":"https://api.github.com/users/rjfd/orgs","repos_url":"https://api.github.com/users/rjfd/repos","events_url":"https://api.github.com/users/rjfd/events{/privacy}","received_events_url":"https://api.github.com/users/rjfd/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rjfd/ceph","description":"Ceph is a distributed object, block, and file storage platform ","fork":true,"url":"https://api.github.com/repos/rjfd/ceph","forks_url":"https://api.github.com/repos/rjfd/ceph/forks","keys_url":"https://api.github.com/repos/rjfd/ceph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rjfd/ceph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rjfd/ceph/teams","hooks_url":"https://api.github.com/repos/rjfd/ceph/hooks","issue_events_url":"https://api.github.com/repos/rjfd/ceph/issues/events{/number}","events_url":"https://api.github.com/repos/rjfd/ceph/events","assignees_url":"https://api.github.com/repos/rjfd/ceph/assignees{/user}","branches_url":"https://api.github.com/repos/rjfd/ceph/branches{/branch}","tags_url":"https://api.github.com/repos/rjfd/ceph/tags","blobs_url":"https://api.github.com/repos/rjfd/ceph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rjfd/ceph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rjfd/ceph/git/refs{/sha}","trees_url":"https://api.github.com/repos/rjfd/ceph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rjfd/ceph/statuses/{sha}","languages_url":"https://api.github.com/repos/rjfd/ceph/languages","stargazers_url":"https://api.github.com/repos/rjfd/ceph/stargazers","contributors_url":"https://api.github.com/repos/rjfd/ceph/contributors","subscribers_url":"https://api.github.com/repos/rjfd/ceph/subscribers","subscription_url":"https://api.github.com/repos/rjfd/ceph/subscription","commits_url":"https://api.github.com/repos/rjfd/ceph/commits{/sha}","git_commits_url":"https://api.github.com/repos/rjfd/ceph/git/commits{/sha}","comments_url":"https://api.github.com/repos/rjfd/ceph/comments{/number}","issue_comment_url":"https://api.github.com/repos/rjfd/ceph/issues/comments{/number}","contents_url":"https://api.github.com/repos/rjfd/ceph/contents/{+path}","compare_url":"https://api.github.com/repos/rjfd/ceph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rjfd/ceph/merges","archive_url":"https://api.github.com/repos/rjfd/ceph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rjfd/ceph/downloads","issues_url":"https://api.github.com/repos/rjfd/ceph/issues{/number}","pulls_url":"https://api.github.com/repos/rjfd/ceph/pulls{/number}","milestones_url":"https://api.github.com/repos/rjfd/ceph/milestones{/number}","notifications_url":"https://api.github.com/repos/rjfd/ceph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rjfd/ceph/labels{/name}","releases_url":"https://api.github.com/repos/rjfd/ceph/releases{/id}","deployments_url":"https://api.github.com/repos/rjfd/ceph/deployments","created_at":"2016-02-08T08:44:21Z","updated_at":"2016-02-08T08:44:38Z","pushed_at":"2016-04-11T14:46:19Z","git_url":"git://github.com/rjfd/ceph.git","ssh_url":"git@github.com:rjfd/ceph.git","clone_url":"https://github.com/rjfd/ceph.git","svn_url":"https://github.com/rjfd/ceph","homepage":"http://ceph.com","size":170131,"stargazers_count":0,"watchers_count":0,"language":"C++","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":"ceph:master","ref":"master","sha":"7a94d9767b3dde5b9cdde2a438ba288944a1a7a6","user":{"login":"ceph","id":1015767,"avatar_url":"https://avatars.githubusercontent.com/u/1015767?v=3","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"repo":{"id":2310495,"name":"ceph","full_name":"ceph/ceph","owner":{"login":"ceph","id":1015767,"avatar_url":"https://avatars.githubusercontent.com/u/1015767?v=3","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ceph/ceph","description":"Ceph is a distributed object, block, and file storage platform ","fork":false,"url":"https://api.github.com/repos/ceph/ceph","forks_url":"https://api.github.com/repos/ceph/ceph/forks","keys_url":"https://api.github.com/repos/ceph/ceph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ceph/ceph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ceph/ceph/teams","hooks_url":"https://api.github.com/repos/ceph/ceph/hooks","issue_events_url":"https://api.github.com/repos/ceph/ceph/issues/events{/number}","events_url":"https://api.github.com/repos/ceph/ceph/events","assignees_url":"https://api.github.com/repos/ceph/ceph/assignees{/user}","branches_url":"https://api.github.com/repos/ceph/ceph/branches{/branch}","tags_url":"https://api.github.com/repos/ceph/ceph/tags","blobs_url":"https://api.github.com/repos/ceph/ceph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ceph/ceph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ceph/ceph/git/refs{/sha}","trees_url":"https://api.github.com/repos/ceph/ceph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ceph/ceph/statuses/{sha}","languages_url":"https://api.github.com/repos/ceph/ceph/languages","stargazers_url":"https://api.github.com/repos/ceph/ceph/stargazers","contributors_url":"https://api.github.com/repos/ceph/ceph/contributors","subscribers_url":"https://api.github.com/repos/ceph/ceph/subscribers","subscription_url":"https://api.github.com/repos/ceph/ceph/subscription","commits_url":"https://api.github.com/repos/ceph/ceph/commits{/sha}","git_commits_url":"https://api.github.com/repos/ceph/ceph/git/commits{/sha}","comments_url":"https://api.github.com/repos/ceph/ceph/comments{/number}","issue_comment_url":"https://api.github.com/repos/ceph/ceph/issues/comments{/number}","contents_url":"https://api.github.com/repos/ceph/ceph/contents/{+path}","compare_url":"https://api.github.com/repos/ceph/ceph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ceph/ceph/merges","archive_url":"https://api.github.com/repos/ceph/ceph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ceph/ceph/downloads","issues_url":"https://api.github.com/repos/ceph/ceph/issues{/number}","pulls_url":"https://api.github.com/repos/ceph/ceph/pulls{/number}","milestones_url":"https://api.github.com/repos/ceph/ceph/milestones{/number}","notifications_url":"https://api.github.com/repos/ceph/ceph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ceph/ceph/labels{/name}","releases_url":"https://api.github.com/repos/ceph/ceph/releases{/id}","deployments_url":"https://api.github.com/repos/ceph/ceph/deployments","created_at":"2011-09-01T21:41:26Z","updated_at":"2016-04-11T17:19:02Z","pushed_at":"2016-04-11T19:29:55Z","git_url":"git://github.com/ceph/ceph.git","ssh_url":"git@github.com:ceph/ceph.git","clone_url":"https://github.com/ceph/ceph.git","svn_url":"https://github.com/ceph/ceph","homepage":"http://ceph.com","size":212201,"stargazers_count":2042,"watchers_count":2042,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1218,"mirror_url":null,"open_issues_count":322,"forks":1218,"open_issues":322,"watchers":2042,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ceph/ceph/pulls/8473"},"html":{"href":"https://github.com/ceph/ceph/pull/8473"},"issue":{"href":"https://api.github.com/repos/ceph/ceph/issues/8473"},"comments":{"href":"https://api.github.com/repos/ceph/ceph/issues/8473/comments"},"review_comments":{"href":"https://api.github.com/repos/ceph/ceph/pulls/8473/comments"},"review_comment":{"href":"https://api.github.com/repos/ceph/ceph/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ceph/ceph/pulls/8473/commits"},"statuses":{"href":"https://api.github.com/repos/ceph/ceph/statuses/ce64bcfa7ee53d872b59e01221f5fa399e9f5005"}}}}