{"action":"created","comment":{"url":"https://api.github.com/repos/Tendrl/node-agent/pulls/comments/178041257","pull_request_review_id":108029565,"id":178041257,"diff_hunk":"@@ -164,10 +153,40 @@ def run(self):\n                 sync_cluster_contexts_thread.daemon = True\n                 sync_cluster_contexts_thread.start()\n                 sync_cluster_contexts_thread.join()\n-\n+            # Update node alert count\n+            if not NS.tendrl.objects.NodeAlertCounters().exists():","path":"tendrl/node_agent/node_sync/__init__.py","position":35,"original_position":35,"commit_id":"0be73f38854eec12d9597658ed54d540964cd266","original_commit_id":"0be73f38854eec12d9597658ed54d540964cd266","user":{"login":"GowthamShanmugam","id":15073590,"avatar_url":"https://avatars0.githubusercontent.com/u/15073590?v=4","gravatar_id":"","url":"https://api.github.com/users/GowthamShanmugam","html_url":"https://github.com/GowthamShanmugam","followers_url":"https://api.github.com/users/GowthamShanmugam/followers","following_url":"https://api.github.com/users/GowthamShanmugam/following{/other_user}","gists_url":"https://api.github.com/users/GowthamShanmugam/gists{/gist_id}","starred_url":"https://api.github.com/users/GowthamShanmugam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GowthamShanmugam/subscriptions","organizations_url":"https://api.github.com/users/GowthamShanmugam/orgs","repos_url":"https://api.github.com/users/GowthamShanmugam/repos","events_url":"https://api.github.com/users/GowthamShanmugam/events{/privacy}","received_events_url":"https://api.github.com/users/GowthamShanmugam/received_events","type":"User","site_admin":false},"body":"What i feel is let it calculate alert count in every sync because it calculating alert count only for that node only, it is not reading all alerts. So whatever happens alert count won't goes wrong\r\n\r\n@shtripat @r0h4n ","created_at":"2018-03-29T12:36:02Z","updated_at":"2018-03-29T12:36:02Z","html_url":"https://github.com/Tendrl/node-agent/pull/754#discussion_r178041257","pull_request_url":"https://api.github.com/repos/Tendrl/node-agent/pulls/754","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Tendrl/node-agent/pulls/comments/178041257"},"html":{"href":"https://github.com/Tendrl/node-agent/pull/754#discussion_r178041257"},"pull_request":{"href":"https://api.github.com/repos/Tendrl/node-agent/pulls/754"}},"in_reply_to_id":178039255},"pull_request":{"url":"https://api.github.com/repos/Tendrl/node-agent/pulls/754","id":178100186,"html_url":"https://github.com/Tendrl/node-agent/pull/754","diff_url":"https://github.com/Tendrl/node-agent/pull/754.diff","patch_url":"https://github.com/Tendrl/node-agent/pull/754.patch","issue_url":"https://api.github.com/repos/Tendrl/node-agent/issues/754","number":754,"state":"open","locked":false,"title":"Calculating and updtating alert_count in every node sync","user":{"login":"GowthamShanmugam","id":15073590,"avatar_url":"https://avatars0.githubusercontent.com/u/15073590?v=4","gravatar_id":"","url":"https://api.github.com/users/GowthamShanmugam","html_url":"https://github.com/GowthamShanmugam","followers_url":"https://api.github.com/users/GowthamShanmugam/followers","following_url":"https://api.github.com/users/GowthamShanmugam/following{/other_user}","gists_url":"https://api.github.com/users/GowthamShanmugam/gists{/gist_id}","starred_url":"https://api.github.com/users/GowthamShanmugam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GowthamShanmugam/subscriptions","organizations_url":"https://api.github.com/users/GowthamShanmugam/orgs","repos_url":"https://api.github.com/users/GowthamShanmugam/repos","events_url":"https://api.github.com/users/GowthamShanmugam/events{/privacy}","received_events_url":"https://api.github.com/users/GowthamShanmugam/received_events","type":"User","site_admin":false},"body":"tendrl-bug-id: Tendrl/node-agent#753\r\n\r\nSigned-off-by: GowthamShanmugasundaram <gshanmug@redhat.com>","created_at":"2018-03-28T16:51:15Z","updated_at":"2018-03-29T12:36:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"afed63c9f3246bdaed9177a8a43a113fcc543433","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Tendrl/node-agent/pulls/754/commits","review_comments_url":"https://api.github.com/repos/Tendrl/node-agent/pulls/754/comments","review_comment_url":"https://api.github.com/repos/Tendrl/node-agent/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Tendrl/node-agent/issues/754/comments","statuses_url":"https://api.github.com/repos/Tendrl/node-agent/statuses/0be73f38854eec12d9597658ed54d540964cd266","head":{"label":"GowthamShanmugam:alert_count_moved","ref":"alert_count_moved","sha":"0be73f38854eec12d9597658ed54d540964cd266","user":{"login":"GowthamShanmugam","id":15073590,"avatar_url":"https://avatars0.githubusercontent.com/u/15073590?v=4","gravatar_id":"","url":"https://api.github.com/users/GowthamShanmugam","html_url":"https://github.com/GowthamShanmugam","followers_url":"https://api.github.com/users/GowthamShanmugam/followers","following_url":"https://api.github.com/users/GowthamShanmugam/following{/other_user}","gists_url":"https://api.github.com/users/GowthamShanmugam/gists{/gist_id}","starred_url":"https://api.github.com/users/GowthamShanmugam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GowthamShanmugam/subscriptions","organizations_url":"https://api.github.com/users/GowthamShanmugam/orgs","repos_url":"https://api.github.com/users/GowthamShanmugam/repos","events_url":"https://api.github.com/users/GowthamShanmugam/events{/privacy}","received_events_url":"https://api.github.com/users/GowthamShanmugam/received_events","type":"User","site_admin":false},"repo":{"id":82191259,"name":"node-agent","full_name":"GowthamShanmugam/node-agent","owner":{"login":"GowthamShanmugam","id":15073590,"avatar_url":"https://avatars0.githubusercontent.com/u/15073590?v=4","gravatar_id":"","url":"https://api.github.com/users/GowthamShanmugam","html_url":"https://github.com/GowthamShanmugam","followers_url":"https://api.github.com/users/GowthamShanmugam/followers","following_url":"https://api.github.com/users/GowthamShanmugam/following{/other_user}","gists_url":"https://api.github.com/users/GowthamShanmugam/gists{/gist_id}","starred_url":"https://api.github.com/users/GowthamShanmugam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GowthamShanmugam/subscriptions","organizations_url":"https://api.github.com/users/GowthamShanmugam/orgs","repos_url":"https://api.github.com/users/GowthamShanmugam/repos","events_url":"https://api.github.com/users/GowthamShanmugam/events{/privacy}","received_events_url":"https://api.github.com/users/GowthamShanmugam/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/GowthamShanmugam/node-agent","description":"A python agent local to every managed storage node in the sds cluster","fork":true,"url":"https://api.github.com/repos/GowthamShanmugam/node-agent","forks_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/forks","keys_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/teams","hooks_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/hooks","issue_events_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/issues/events{/number}","events_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/events","assignees_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/assignees{/user}","branches_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/branches{/branch}","tags_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/tags","blobs_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/git/refs{/sha}","trees_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/statuses/{sha}","languages_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/languages","stargazers_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/stargazers","contributors_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/contributors","subscribers_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/subscribers","subscription_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/subscription","commits_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/commits{/sha}","git_commits_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/git/commits{/sha}","comments_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/comments{/number}","issue_comment_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/issues/comments{/number}","contents_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/contents/{+path}","compare_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/merges","archive_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/downloads","issues_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/issues{/number}","pulls_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/pulls{/number}","milestones_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/milestones{/number}","notifications_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/labels{/name}","releases_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/releases{/id}","deployments_url":"https://api.github.com/repos/GowthamShanmugam/node-agent/deployments","created_at":"2017-02-16T14:47:36Z","updated_at":"2017-02-16T14:47:38Z","pushed_at":"2018-03-29T08:31:58Z","git_url":"git://github.com/GowthamShanmugam/node-agent.git","ssh_url":"git@github.com:GowthamShanmugam/node-agent.git","clone_url":"https://github.com/GowthamShanmugam/node-agent.git","svn_url":"https://github.com/GowthamShanmugam/node-agent","homepage":null,"size":1145,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"Tendrl:master","ref":"master","sha":"9a2f43a92c799475ba6c2f3fb6abac602133daa3","user":{"login":"Tendrl","id":19151627,"avatar_url":"https://avatars0.githubusercontent.com/u/19151627?v=4","gravatar_id":"","url":"https://api.github.com/users/Tendrl","html_url":"https://github.com/Tendrl","followers_url":"https://api.github.com/users/Tendrl/followers","following_url":"https://api.github.com/users/Tendrl/following{/other_user}","gists_url":"https://api.github.com/users/Tendrl/gists{/gist_id}","starred_url":"https://api.github.com/users/Tendrl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tendrl/subscriptions","organizations_url":"https://api.github.com/users/Tendrl/orgs","repos_url":"https://api.github.com/users/Tendrl/repos","events_url":"https://api.github.com/users/Tendrl/events{/privacy}","received_events_url":"https://api.github.com/users/Tendrl/received_events","type":"Organization","site_admin":false},"repo":{"id":67720080,"name":"node-agent","full_name":"Tendrl/node-agent","owner":{"login":"Tendrl","id":19151627,"avatar_url":"https://avatars0.githubusercontent.com/u/19151627?v=4","gravatar_id":"","url":"https://api.github.com/users/Tendrl","html_url":"https://github.com/Tendrl","followers_url":"https://api.github.com/users/Tendrl/followers","following_url":"https://api.github.com/users/Tendrl/following{/other_user}","gists_url":"https://api.github.com/users/Tendrl/gists{/gist_id}","starred_url":"https://api.github.com/users/Tendrl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tendrl/subscriptions","organizations_url":"https://api.github.com/users/Tendrl/orgs","repos_url":"https://api.github.com/users/Tendrl/repos","events_url":"https://api.github.com/users/Tendrl/events{/privacy}","received_events_url":"https://api.github.com/users/Tendrl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Tendrl/node-agent","description":"A python agent local to every managed storage node in the sds cluster","fork":false,"url":"https://api.github.com/repos/Tendrl/node-agent","forks_url":"https://api.github.com/repos/Tendrl/node-agent/forks","keys_url":"https://api.github.com/repos/Tendrl/node-agent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Tendrl/node-agent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Tendrl/node-agent/teams","hooks_url":"https://api.github.com/repos/Tendrl/node-agent/hooks","issue_events_url":"https://api.github.com/repos/Tendrl/node-agent/issues/events{/number}","events_url":"https://api.github.com/repos/Tendrl/node-agent/events","assignees_url":"https://api.github.com/repos/Tendrl/node-agent/assignees{/user}","branches_url":"https://api.github.com/repos/Tendrl/node-agent/branches{/branch}","tags_url":"https://api.github.com/repos/Tendrl/node-agent/tags","blobs_url":"https://api.github.com/repos/Tendrl/node-agent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Tendrl/node-agent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Tendrl/node-agent/git/refs{/sha}","trees_url":"https://api.github.com/repos/Tendrl/node-agent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Tendrl/node-agent/statuses/{sha}","languages_url":"https://api.github.com/repos/Tendrl/node-agent/languages","stargazers_url":"https://api.github.com/repos/Tendrl/node-agent/stargazers","contributors_url":"https://api.github.com/repos/Tendrl/node-agent/contributors","subscribers_url":"https://api.github.com/repos/Tendrl/node-agent/subscribers","subscription_url":"https://api.github.com/repos/Tendrl/node-agent/subscription","commits_url":"https://api.github.com/repos/Tendrl/node-agent/commits{/sha}","git_commits_url":"https://api.github.com/repos/Tendrl/node-agent/git/commits{/sha}","comments_url":"https://api.github.com/repos/Tendrl/node-agent/comments{/number}","issue_comment_url":"https://api.github.com/repos/Tendrl/node-agent/issues/comments{/number}","contents_url":"https://api.github.com/repos/Tendrl/node-agent/contents/{+path}","compare_url":"https://api.github.com/repos/Tendrl/node-agent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Tendrl/node-agent/merges","archive_url":"https://api.github.com/repos/Tendrl/node-agent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Tendrl/node-agent/downloads","issues_url":"https://api.github.com/repos/Tendrl/node-agent/issues{/number}","pulls_url":"https://api.github.com/repos/Tendrl/node-agent/pulls{/number}","milestones_url":"https://api.github.com/repos/Tendrl/node-agent/milestones{/number}","notifications_url":"https://api.github.com/repos/Tendrl/node-agent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Tendrl/node-agent/labels{/name}","releases_url":"https://api.github.com/repos/Tendrl/node-agent/releases{/id}","deployments_url":"https://api.github.com/repos/Tendrl/node-agent/deployments","created_at":"2016-09-08T16:18:28Z","updated_at":"2018-03-24T03:44:30Z","pushed_at":"2018-03-29T08:32:00Z","git_url":"git://github.com/Tendrl/node-agent.git","ssh_url":"git@github.com:Tendrl/node-agent.git","clone_url":"https://github.com/Tendrl/node-agent.git","svn_url":"https://github.com/Tendrl/node-agent","homepage":null,"size":1132,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"lgpl-2.1","name":"GNU Lesser General Public License v2.1","spdx_id":"LGPL-2.1","url":"https://api.github.com/licenses/lgpl-2.1"},"forks":16,"open_issues":11,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Tendrl/node-agent/pulls/754"},"html":{"href":"https://github.com/Tendrl/node-agent/pull/754"},"issue":{"href":"https://api.github.com/repos/Tendrl/node-agent/issues/754"},"comments":{"href":"https://api.github.com/repos/Tendrl/node-agent/issues/754/comments"},"review_comments":{"href":"https://api.github.com/repos/Tendrl/node-agent/pulls/754/comments"},"review_comment":{"href":"https://api.github.com/repos/Tendrl/node-agent/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Tendrl/node-agent/pulls/754/commits"},"statuses":{"href":"https://api.github.com/repos/Tendrl/node-agent/statuses/0be73f38854eec12d9597658ed54d540964cd266"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"GowthamShanmugam"}}