{"action":"created","comment":{"url":"https://api.github.com/repos/ceph/ceph/pulls/comments/50349384","id":50349384,"diff_hunk":"@@ -1945,8 +1945,85 @@ int PGMonitor::_warn_slow_request_histogram(const pow2_hist_t& h, string suffix,\n   return sum;\n }\n \n+namespace {\n+  enum class scrubbed_or_deepscrubbed_t { SCRUBBED, DEEPSCRUBBED };\n+\n+  void print_unscrubbed_detailed(const std::pair<const pg_t,pg_stat_t> &pg_entry,\n+\t\t\t\t list<pair<health_status_t,string> > *detail,\n+\t\t\t\t scrubbed_or_deepscrubbed_t how_scrubbed) {\n+\n+    std::stringstream ss;\n+    const auto& pg_stat(pg_entry.second);\n+\n+    ss << \"pg \" << pg_entry.first << \" is not \";\n+    if (how_scrubbed == scrubbed_or_deepscrubbed_t::SCRUBBED) {\n+      ss << \"scrubbed, last_scrub_stamp \"\n+\t<< pg_stat.last_scrub_stamp;\n+    } else if (how_scrubbed == scrubbed_or_deepscrubbed_t::DEEPSCRUBBED) {\n+      ss << \"deep-scrubbed, last_deep_scrub_stamp \"\n+\t<< pg_stat.last_deep_scrub_stamp;\n+    }\n+\n+    detail->push_back(make_pair(HEALTH_WARN, ss.str()));\n+  }\n+\n+\n+  enum class scrubbed_pgs_info_t { COUNT, DETAILED };\n+  using pg_stat_map_t = const ceph::unordered_map<pg_t,pg_stat_t>;\n+\n+  void print_unscrubbed_pgs(pg_stat_map_t& pg_stats,\n+\t\t\t    list<pair<health_status_t,string> > &summary,\n+\t\t\t    list<pair<health_status_t,string> > *detail,\n+\t\t\t    const CephContext* cct,\n+\t\t\t    scrubbed_pgs_info_t pgs_info) {","path":"src/mon/PGMonitor.cc","position":34,"original_position":34,"commit_id":"703db1dc182cec61c02c906c658578a3436db760","original_commit_id":"703db1dc182cec61c02c906c658578a3436db760","user":{"login":"liewegas","id":433031,"avatar_url":"https://avatars.githubusercontent.com/u/433031?v=3","gravatar_id":"","url":"https://api.github.com/users/liewegas","html_url":"https://github.com/liewegas","followers_url":"https://api.github.com/users/liewegas/followers","following_url":"https://api.github.com/users/liewegas/following{/other_user}","gists_url":"https://api.github.com/users/liewegas/gists{/gist_id}","starred_url":"https://api.github.com/users/liewegas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liewegas/subscriptions","organizations_url":"https://api.github.com/users/liewegas/orgs","repos_url":"https://api.github.com/users/liewegas/repos","events_url":"https://api.github.com/users/liewegas/events{/privacy}","received_events_url":"https://api.github.com/users/liewegas/received_events","type":"User","site_admin":false},"body":"the detail arg is NULL or not, so we know whether or not to inclue the detailed info without needing the pgs_info arg at all.  which means a single call to this function can populate summary and (if not null) detail with only one pass over the pg_stats map","created_at":"2016-01-21T01:34:45Z","updated_at":"2016-01-21T01:34:45Z","html_url":"https://github.com/ceph/ceph/pull/6440#discussion_r50349384","pull_request_url":"https://api.github.com/repos/ceph/ceph/pulls/6440","_links":{"self":{"href":"https://api.github.com/repos/ceph/ceph/pulls/comments/50349384"},"html":{"href":"https://github.com/ceph/ceph/pull/6440#discussion_r50349384"},"pull_request":{"href":"https://api.github.com/repos/ceph/ceph/pulls/6440"}}},"pull_request":{"url":"https://api.github.com/repos/ceph/ceph/pulls/6440","id":49378566,"html_url":"https://github.com/ceph/ceph/pull/6440","diff_url":"https://github.com/ceph/ceph/pull/6440.diff","patch_url":"https://github.com/ceph/ceph/pull/6440.patch","issue_url":"https://api.github.com/repos/ceph/ceph/issues/6440","number":6440,"state":"open","locked":false,"title":"mon/Monitor.cc:warning if pg not scrubbed","user":{"login":"stiopaa1","id":1975416,"avatar_url":"https://avatars.githubusercontent.com/u/1975416?v=3","gravatar_id":"","url":"https://api.github.com/users/stiopaa1","html_url":"https://github.com/stiopaa1","followers_url":"https://api.github.com/users/stiopaa1/followers","following_url":"https://api.github.com/users/stiopaa1/following{/other_user}","gists_url":"https://api.github.com/users/stiopaa1/gists{/gist_id}","starred_url":"https://api.github.com/users/stiopaa1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stiopaa1/subscriptions","organizations_url":"https://api.github.com/users/stiopaa1/orgs","repos_url":"https://api.github.com/users/stiopaa1/repos","events_url":"https://api.github.com/users/stiopaa1/events{/privacy}","received_events_url":"https://api.github.com/users/stiopaa1/received_events","type":"User","site_admin":false},"body":"Added 2 flags for displaying a warning when pg is not scrubbed:\r\nmon report not scrubbed\r\nmon report not deep scrubbed\r\n\r\nEach of them specifies the amount of time after which a not scrubbed pg\r\nis displayed when invoking ceph -s command.\r\n\r\nBoth of them are set to 0 by deafault, which means they are turned off.\r\n\r\nFixes: #13142\r\nSigned-off-by: Michal Jarzabek <stiopa@gmail.com>","created_at":"2015-11-01T19:23:31Z","updated_at":"2016-01-21T01:34:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"15564decf79590a60392f94b8604de28f2210cf4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ceph/ceph/pulls/6440/commits","review_comments_url":"https://api.github.com/repos/ceph/ceph/pulls/6440/comments","review_comment_url":"https://api.github.com/repos/ceph/ceph/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ceph/ceph/issues/6440/comments","statuses_url":"https://api.github.com/repos/ceph/ceph/statuses/703db1dc182cec61c02c906c658578a3436db760","head":{"label":"stiopaa1:scrubbingInfo","ref":"scrubbingInfo","sha":"703db1dc182cec61c02c906c658578a3436db760","user":{"login":"stiopaa1","id":1975416,"avatar_url":"https://avatars.githubusercontent.com/u/1975416?v=3","gravatar_id":"","url":"https://api.github.com/users/stiopaa1","html_url":"https://github.com/stiopaa1","followers_url":"https://api.github.com/users/stiopaa1/followers","following_url":"https://api.github.com/users/stiopaa1/following{/other_user}","gists_url":"https://api.github.com/users/stiopaa1/gists{/gist_id}","starred_url":"https://api.github.com/users/stiopaa1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stiopaa1/subscriptions","organizations_url":"https://api.github.com/users/stiopaa1/orgs","repos_url":"https://api.github.com/users/stiopaa1/repos","events_url":"https://api.github.com/users/stiopaa1/events{/privacy}","received_events_url":"https://api.github.com/users/stiopaa1/received_events","type":"User","site_admin":false},"repo":{"id":27046695,"name":"ceph","full_name":"stiopaa1/ceph","owner":{"login":"stiopaa1","id":1975416,"avatar_url":"https://avatars.githubusercontent.com/u/1975416?v=3","gravatar_id":"","url":"https://api.github.com/users/stiopaa1","html_url":"https://github.com/stiopaa1","followers_url":"https://api.github.com/users/stiopaa1/followers","following_url":"https://api.github.com/users/stiopaa1/following{/other_user}","gists_url":"https://api.github.com/users/stiopaa1/gists{/gist_id}","starred_url":"https://api.github.com/users/stiopaa1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stiopaa1/subscriptions","organizations_url":"https://api.github.com/users/stiopaa1/orgs","repos_url":"https://api.github.com/users/stiopaa1/repos","events_url":"https://api.github.com/users/stiopaa1/events{/privacy}","received_events_url":"https://api.github.com/users/stiopaa1/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stiopaa1/ceph","description":"Ceph is a distributed object, block, and file storage platform ","fork":true,"url":"https://api.github.com/repos/stiopaa1/ceph","forks_url":"https://api.github.com/repos/stiopaa1/ceph/forks","keys_url":"https://api.github.com/repos/stiopaa1/ceph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stiopaa1/ceph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stiopaa1/ceph/teams","hooks_url":"https://api.github.com/repos/stiopaa1/ceph/hooks","issue_events_url":"https://api.github.com/repos/stiopaa1/ceph/issues/events{/number}","events_url":"https://api.github.com/repos/stiopaa1/ceph/events","assignees_url":"https://api.github.com/repos/stiopaa1/ceph/assignees{/user}","branches_url":"https://api.github.com/repos/stiopaa1/ceph/branches{/branch}","tags_url":"https://api.github.com/repos/stiopaa1/ceph/tags","blobs_url":"https://api.github.com/repos/stiopaa1/ceph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stiopaa1/ceph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stiopaa1/ceph/git/refs{/sha}","trees_url":"https://api.github.com/repos/stiopaa1/ceph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stiopaa1/ceph/statuses/{sha}","languages_url":"https://api.github.com/repos/stiopaa1/ceph/languages","stargazers_url":"https://api.github.com/repos/stiopaa1/ceph/stargazers","contributors_url":"https://api.github.com/repos/stiopaa1/ceph/contributors","subscribers_url":"https://api.github.com/repos/stiopaa1/ceph/subscribers","subscription_url":"https://api.github.com/repos/stiopaa1/ceph/subscription","commits_url":"https://api.github.com/repos/stiopaa1/ceph/commits{/sha}","git_commits_url":"https://api.github.com/repos/stiopaa1/ceph/git/commits{/sha}","comments_url":"https://api.github.com/repos/stiopaa1/ceph/comments{/number}","issue_comment_url":"https://api.github.com/repos/stiopaa1/ceph/issues/comments{/number}","contents_url":"https://api.github.com/repos/stiopaa1/ceph/contents/{+path}","compare_url":"https://api.github.com/repos/stiopaa1/ceph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stiopaa1/ceph/merges","archive_url":"https://api.github.com/repos/stiopaa1/ceph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stiopaa1/ceph/downloads","issues_url":"https://api.github.com/repos/stiopaa1/ceph/issues{/number}","pulls_url":"https://api.github.com/repos/stiopaa1/ceph/pulls{/number}","milestones_url":"https://api.github.com/repos/stiopaa1/ceph/milestones{/number}","notifications_url":"https://api.github.com/repos/stiopaa1/ceph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stiopaa1/ceph/labels{/name}","releases_url":"https://api.github.com/repos/stiopaa1/ceph/releases{/id}","created_at":"2014-11-23T20:37:28Z","updated_at":"2016-01-16T15:01:19Z","pushed_at":"2016-01-19T22:40:09Z","git_url":"git://github.com/stiopaa1/ceph.git","ssh_url":"git@github.com:stiopaa1/ceph.git","clone_url":"https://github.com/stiopaa1/ceph.git","svn_url":"https://github.com/stiopaa1/ceph","homepage":"http://ceph.com","size":142777,"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":"65a3fde9ab530e3f984fdefbcbf7c884285a6a4e","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}","created_at":"2011-09-01T21:41:26Z","updated_at":"2016-01-20T14:12:45Z","pushed_at":"2016-01-21T01:12:19Z","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":178557,"stargazers_count":1824,"watchers_count":1824,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1098,"mirror_url":null,"open_issues_count":277,"forks":1098,"open_issues":277,"watchers":1824,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ceph/ceph/pulls/6440"},"html":{"href":"https://github.com/ceph/ceph/pull/6440"},"issue":{"href":"https://api.github.com/repos/ceph/ceph/issues/6440"},"comments":{"href":"https://api.github.com/repos/ceph/ceph/issues/6440/comments"},"review_comments":{"href":"https://api.github.com/repos/ceph/ceph/pulls/6440/comments"},"review_comment":{"href":"https://api.github.com/repos/ceph/ceph/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ceph/ceph/pulls/6440/commits"},"statuses":{"href":"https://api.github.com/repos/ceph/ceph/statuses/703db1dc182cec61c02c906c658578a3436db760"}}}}