{"action":"created","comment":{"url":"https://api.github.com/repos/openebs/maya/pulls/comments/237431523","pull_request_review_id":179725495,"id":237431523,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNzQzMTUyMw==","diff_hunk":"@@ -306,3 +312,21 @@ func (c *CStorVolumeReplicaController) getCVRStatus(cVR *apis.CStorVolumeReplica\n \t}\n \treturn poolStatus, nil\n }\n+\n+// syncCsp updates field on CSP object after fetching the values from zpool utility.","path":"cmd/cstor-pool-mgmt/controller/replica-controller/handler.go","position":18,"original_position":18,"commit_id":"88700035f3d45d464f604650a7265be6f8309f79","original_commit_id":"88700035f3d45d464f604650a7265be6f8309f79","user":{"login":"prateekpandey14","id":7140415,"node_id":"MDQ6VXNlcjcxNDA0MTU=","avatar_url":"https://avatars0.githubusercontent.com/u/7140415?v=4","gravatar_id":"","url":"https://api.github.com/users/prateekpandey14","html_url":"https://github.com/prateekpandey14","followers_url":"https://api.github.com/users/prateekpandey14/followers","following_url":"https://api.github.com/users/prateekpandey14/following{/other_user}","gists_url":"https://api.github.com/users/prateekpandey14/gists{/gist_id}","starred_url":"https://api.github.com/users/prateekpandey14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prateekpandey14/subscriptions","organizations_url":"https://api.github.com/users/prateekpandey14/orgs","repos_url":"https://api.github.com/users/prateekpandey14/repos","events_url":"https://api.github.com/users/prateekpandey14/events{/privacy}","received_events_url":"https://api.github.com/users/prateekpandey14/received_events","type":"User","site_admin":false},"body":"nit: `syncCvr`","created_at":"2018-11-29T10:34:13Z","updated_at":"2018-11-29T10:35:03Z","html_url":"https://github.com/openebs/maya/pull/846#discussion_r237431523","pull_request_url":"https://api.github.com/repos/openebs/maya/pulls/846","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/openebs/maya/pulls/comments/237431523"},"html":{"href":"https://github.com/openebs/maya/pull/846#discussion_r237431523"},"pull_request":{"href":"https://api.github.com/repos/openebs/maya/pulls/846"}}},"pull_request":{"url":"https://api.github.com/repos/openebs/maya/pulls/846","id":234565978,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM0NTY1OTc4","html_url":"https://github.com/openebs/maya/pull/846","diff_url":"https://github.com/openebs/maya/pull/846.diff","patch_url":"https://github.com/openebs/maya/pull/846.patch","issue_url":"https://api.github.com/repos/openebs/maya/issues/846","number":846,"state":"open","locked":false,"title":"feat(cvr): put zfs volume capacity on cvr object.","user":{"login":"sonasingh46","id":24835120,"node_id":"MDQ6VXNlcjI0ODM1MTIw","avatar_url":"https://avatars3.githubusercontent.com/u/24835120?v=4","gravatar_id":"","url":"https://api.github.com/users/sonasingh46","html_url":"https://github.com/sonasingh46","followers_url":"https://api.github.com/users/sonasingh46/followers","following_url":"https://api.github.com/users/sonasingh46/following{/other_user}","gists_url":"https://api.github.com/users/sonasingh46/gists{/gist_id}","starred_url":"https://api.github.com/users/sonasingh46/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonasingh46/subscriptions","organizations_url":"https://api.github.com/users/sonasingh46/orgs","repos_url":"https://api.github.com/users/sonasingh46/repos","events_url":"https://api.github.com/users/sonasingh46/events{/privacy}","received_events_url":"https://api.github.com/users/sonasingh46/received_events","type":"User","site_admin":false},"body":"**This PR add volume capacity on CVR object.**\r\nThe command that is used to fetch the capacity of cstor volume is `zfs get used,logicalused <zfs-vol-name>`\r\nFollowing is the CVR object :\r\n```json\r\n{\r\n    \"apiVersion\": \"openebs.io/v1alpha1\",\r\n    \"kind\": \"CStorVolumeReplica\",\r\n    \"metadata\": {\r\n        \"annotations\": {\r\n            \"cstorpool.openebs.io/hostname\": \"gke-cstor-it-default-pool-e84f5225-95w0\"\r\n        },\r\n        \"creationTimestamp\": \"2018-11-29T07:33:46Z\",\r\n        \"finalizers\": [\r\n            \"cstorvolumereplica.openebs.io/finalizer\"\r\n        ],\r\n        \"generation\": 1,\r\n        \"labels\": {\r\n            \"cstorpool.openebs.io/name\": \"cstor-sparse-pool-6dft\",\r\n            \"cstorpool.openebs.io/uid\": \"d82bd105-f3a8-11e8-87fd-42010a800087\",\r\n            \"cstorvolume.openebs.io/name\": \"pvc-1b2a7d4b-f3a9-11e8-87fd-42010a800087\",\r\n            \"openebs.io/cas-template-name\": \"cstor-volume-create-default-0.8.0\",\r\n            \"openebs.io/persistent-volume\": \"pvc-1b2a7d4b-f3a9-11e8-87fd-42010a800087\",\r\n            \"openebs.io/version\": \"0.8.0\"\r\n        },\r\n        \"name\": \"pvc-1b2a7d4b-f3a9-11e8-87fd-42010a800087-cstor-sparse-pool-6dft\",\r\n        \"namespace\": \"openebs\",\r\n        \"resourceVersion\": \"10173930\",\r\n        \"selfLink\": \"/apis/openebs.io/v1alpha1/namespaces/openebs/cstorvolumereplicas/pvc-1b2a7d4b-f3a9-11e8-87fd-42010a800087-cstor-sparse-pool-6dft\",\r\n        \"uid\": \"1b547f86-f3a9-11e8-87fd-42010a800087\"\r\n    },\r\n    \"spec\": {\r\n        \"capacity\": \"1G\",\r\n        \"targetIP\": \"10.43.252.248\"\r\n    },\r\n    \"status\": {\r\n        \"capacity\": {\r\n            \"totalAllocated\": \"6K\",\r\n            \"used\": \"6K\"\r\n        },\r\n        \"phase\": \"Healthy\"\r\n    }\r\n}\r\n\r\n```\r\n**Note: See the field status.capacity field on CVR object.**\r\n**List of modified files:**\r\n1. cmd/cstor-pool-mgmt/controller/replica-controller/handler.go\r\n```\r\nAdded syncCvr function for syncing cvr object.\r\n```\r\n\r\n2. cmd/cstor-pool-mgmt/volumereplica/volumereplica.go\r\n```\r\nAdded Capacity function which fetches the cpacity from zfs utility.\r\n```\r\n\r\n3. cmd/cstor-pool-mgmt/volumereplica/volumereplica_test.go\r\n```\r\nAdd unit tests for the newly introduced funtion in volumereplica.go\r\n```\r\n\r\n4. pkg/apis/openebs.io/v1alpha1/cstor_volume_replica.go\r\n```\r\nUpdate the CVR object structure.\r\n```\r\n\r\n5. pkg/task/v1alpha1/runtask_command_test.go\r\n```\r\nThe new CVR object has two 'capacity' fields. \r\nFully qualified path for the two fileds are : \r\n      I. spec.capacity\r\n      II. status.capcity\r\nDue to this '..' operator of json path will return an array of string which contains the value from each capacity field.\r\nRefer to the change in the test case.\r\n```\r\n\r\n6. pkg/apis/openebs.io/v1alpha1/zz_generated.deepcopy.go ( AUTO_GEN)\r\n```\r\nAuto generated deep copy function due to change in CVR API\r\n```\r\n\r\nSigned-off-by: sonasingh46 <sonasingh46@gmail.com>","created_at":"2018-11-29T09:34:38Z","updated_at":"2018-11-29T10:35:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"83de09478d3ed9e8fb7b19c8ec82bd62a8ee5fc2","assignee":null,"assignees":[],"requested_reviewers":[{"login":"kmova","id":12488783,"node_id":"MDQ6VXNlcjEyNDg4Nzgz","avatar_url":"https://avatars2.githubusercontent.com/u/12488783?v=4","gravatar_id":"","url":"https://api.github.com/users/kmova","html_url":"https://github.com/kmova","followers_url":"https://api.github.com/users/kmova/followers","following_url":"https://api.github.com/users/kmova/following{/other_user}","gists_url":"https://api.github.com/users/kmova/gists{/gist_id}","starred_url":"https://api.github.com/users/kmova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmova/subscriptions","organizations_url":"https://api.github.com/users/kmova/orgs","repos_url":"https://api.github.com/users/kmova/repos","events_url":"https://api.github.com/users/kmova/events{/privacy}","received_events_url":"https://api.github.com/users/kmova/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/openebs/maya/pulls/846/commits","review_comments_url":"https://api.github.com/repos/openebs/maya/pulls/846/comments","review_comment_url":"https://api.github.com/repos/openebs/maya/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openebs/maya/issues/846/comments","statuses_url":"https://api.github.com/repos/openebs/maya/statuses/88700035f3d45d464f604650a7265be6f8309f79","head":{"label":"sonasingh46:cvr_capacity","ref":"cvr_capacity","sha":"88700035f3d45d464f604650a7265be6f8309f79","user":{"login":"sonasingh46","id":24835120,"node_id":"MDQ6VXNlcjI0ODM1MTIw","avatar_url":"https://avatars3.githubusercontent.com/u/24835120?v=4","gravatar_id":"","url":"https://api.github.com/users/sonasingh46","html_url":"https://github.com/sonasingh46","followers_url":"https://api.github.com/users/sonasingh46/followers","following_url":"https://api.github.com/users/sonasingh46/following{/other_user}","gists_url":"https://api.github.com/users/sonasingh46/gists{/gist_id}","starred_url":"https://api.github.com/users/sonasingh46/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonasingh46/subscriptions","organizations_url":"https://api.github.com/users/sonasingh46/orgs","repos_url":"https://api.github.com/users/sonasingh46/repos","events_url":"https://api.github.com/users/sonasingh46/events{/privacy}","received_events_url":"https://api.github.com/users/sonasingh46/received_events","type":"User","site_admin":false},"repo":{"id":133943383,"node_id":"MDEwOlJlcG9zaXRvcnkxMzM5NDMzODM=","name":"maya","full_name":"sonasingh46/maya","private":false,"owner":{"login":"sonasingh46","id":24835120,"node_id":"MDQ6VXNlcjI0ODM1MTIw","avatar_url":"https://avatars3.githubusercontent.com/u/24835120?v=4","gravatar_id":"","url":"https://api.github.com/users/sonasingh46","html_url":"https://github.com/sonasingh46","followers_url":"https://api.github.com/users/sonasingh46/followers","following_url":"https://api.github.com/users/sonasingh46/following{/other_user}","gists_url":"https://api.github.com/users/sonasingh46/gists{/gist_id}","starred_url":"https://api.github.com/users/sonasingh46/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonasingh46/subscriptions","organizations_url":"https://api.github.com/users/sonasingh46/orgs","repos_url":"https://api.github.com/users/sonasingh46/repos","events_url":"https://api.github.com/users/sonasingh46/events{/privacy}","received_events_url":"https://api.github.com/users/sonasingh46/received_events","type":"User","site_admin":false},"html_url":"https://github.com/sonasingh46/maya","description":"OpenEBS Maya extends Kubernetes capabilities to orchestrate CAS containers.","fork":true,"url":"https://api.github.com/repos/sonasingh46/maya","forks_url":"https://api.github.com/repos/sonasingh46/maya/forks","keys_url":"https://api.github.com/repos/sonasingh46/maya/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sonasingh46/maya/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sonasingh46/maya/teams","hooks_url":"https://api.github.com/repos/sonasingh46/maya/hooks","issue_events_url":"https://api.github.com/repos/sonasingh46/maya/issues/events{/number}","events_url":"https://api.github.com/repos/sonasingh46/maya/events","assignees_url":"https://api.github.com/repos/sonasingh46/maya/assignees{/user}","branches_url":"https://api.github.com/repos/sonasingh46/maya/branches{/branch}","tags_url":"https://api.github.com/repos/sonasingh46/maya/tags","blobs_url":"https://api.github.com/repos/sonasingh46/maya/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sonasingh46/maya/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sonasingh46/maya/git/refs{/sha}","trees_url":"https://api.github.com/repos/sonasingh46/maya/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sonasingh46/maya/statuses/{sha}","languages_url":"https://api.github.com/repos/sonasingh46/maya/languages","stargazers_url":"https://api.github.com/repos/sonasingh46/maya/stargazers","contributors_url":"https://api.github.com/repos/sonasingh46/maya/contributors","subscribers_url":"https://api.github.com/repos/sonasingh46/maya/subscribers","subscription_url":"https://api.github.com/repos/sonasingh46/maya/subscription","commits_url":"https://api.github.com/repos/sonasingh46/maya/commits{/sha}","git_commits_url":"https://api.github.com/repos/sonasingh46/maya/git/commits{/sha}","comments_url":"https://api.github.com/repos/sonasingh46/maya/comments{/number}","issue_comment_url":"https://api.github.com/repos/sonasingh46/maya/issues/comments{/number}","contents_url":"https://api.github.com/repos/sonasingh46/maya/contents/{+path}","compare_url":"https://api.github.com/repos/sonasingh46/maya/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sonasingh46/maya/merges","archive_url":"https://api.github.com/repos/sonasingh46/maya/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sonasingh46/maya/downloads","issues_url":"https://api.github.com/repos/sonasingh46/maya/issues{/number}","pulls_url":"https://api.github.com/repos/sonasingh46/maya/pulls{/number}","milestones_url":"https://api.github.com/repos/sonasingh46/maya/milestones{/number}","notifications_url":"https://api.github.com/repos/sonasingh46/maya/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sonasingh46/maya/labels{/name}","releases_url":"https://api.github.com/repos/sonasingh46/maya/releases{/id}","deployments_url":"https://api.github.com/repos/sonasingh46/maya/deployments","created_at":"2018-05-18T11:05:02Z","updated_at":"2018-10-07T08:40:32Z","pushed_at":"2018-11-29T09:44:39Z","git_url":"git://github.com/sonasingh46/maya.git","ssh_url":"git@github.com:sonasingh46/maya.git","clone_url":"https://github.com/sonasingh46/maya.git","svn_url":"https://github.com/sonasingh46/maya","homepage":"https://docs.openebs.io","size":113500,"stargazers_count":0,"watchers_count":0,"language":"Go","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":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"spc_resyn_lease"}},"base":{"label":"openebs:master","ref":"master","sha":"c39699b76218e7ae18a462e58df427722becb2d9","user":{"login":"openebs","id":20769039,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNzY5MDM5","avatar_url":"https://avatars0.githubusercontent.com/u/20769039?v=4","gravatar_id":"","url":"https://api.github.com/users/openebs","html_url":"https://github.com/openebs","followers_url":"https://api.github.com/users/openebs/followers","following_url":"https://api.github.com/users/openebs/following{/other_user}","gists_url":"https://api.github.com/users/openebs/gists{/gist_id}","starred_url":"https://api.github.com/users/openebs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openebs/subscriptions","organizations_url":"https://api.github.com/users/openebs/orgs","repos_url":"https://api.github.com/users/openebs/repos","events_url":"https://api.github.com/users/openebs/events{/privacy}","received_events_url":"https://api.github.com/users/openebs/received_events","type":"Organization","site_admin":false},"repo":{"id":70136587,"node_id":"MDEwOlJlcG9zaXRvcnk3MDEzNjU4Nw==","name":"maya","full_name":"openebs/maya","private":false,"owner":{"login":"openebs","id":20769039,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNzY5MDM5","avatar_url":"https://avatars0.githubusercontent.com/u/20769039?v=4","gravatar_id":"","url":"https://api.github.com/users/openebs","html_url":"https://github.com/openebs","followers_url":"https://api.github.com/users/openebs/followers","following_url":"https://api.github.com/users/openebs/following{/other_user}","gists_url":"https://api.github.com/users/openebs/gists{/gist_id}","starred_url":"https://api.github.com/users/openebs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openebs/subscriptions","organizations_url":"https://api.github.com/users/openebs/orgs","repos_url":"https://api.github.com/users/openebs/repos","events_url":"https://api.github.com/users/openebs/events{/privacy}","received_events_url":"https://api.github.com/users/openebs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/openebs/maya","description":"OpenEBS Maya extends Kubernetes capabilities to orchestrate CAS containers.","fork":false,"url":"https://api.github.com/repos/openebs/maya","forks_url":"https://api.github.com/repos/openebs/maya/forks","keys_url":"https://api.github.com/repos/openebs/maya/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openebs/maya/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openebs/maya/teams","hooks_url":"https://api.github.com/repos/openebs/maya/hooks","issue_events_url":"https://api.github.com/repos/openebs/maya/issues/events{/number}","events_url":"https://api.github.com/repos/openebs/maya/events","assignees_url":"https://api.github.com/repos/openebs/maya/assignees{/user}","branches_url":"https://api.github.com/repos/openebs/maya/branches{/branch}","tags_url":"https://api.github.com/repos/openebs/maya/tags","blobs_url":"https://api.github.com/repos/openebs/maya/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openebs/maya/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openebs/maya/git/refs{/sha}","trees_url":"https://api.github.com/repos/openebs/maya/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openebs/maya/statuses/{sha}","languages_url":"https://api.github.com/repos/openebs/maya/languages","stargazers_url":"https://api.github.com/repos/openebs/maya/stargazers","contributors_url":"https://api.github.com/repos/openebs/maya/contributors","subscribers_url":"https://api.github.com/repos/openebs/maya/subscribers","subscription_url":"https://api.github.com/repos/openebs/maya/subscription","commits_url":"https://api.github.com/repos/openebs/maya/commits{/sha}","git_commits_url":"https://api.github.com/repos/openebs/maya/git/commits{/sha}","comments_url":"https://api.github.com/repos/openebs/maya/comments{/number}","issue_comment_url":"https://api.github.com/repos/openebs/maya/issues/comments{/number}","contents_url":"https://api.github.com/repos/openebs/maya/contents/{+path}","compare_url":"https://api.github.com/repos/openebs/maya/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openebs/maya/merges","archive_url":"https://api.github.com/repos/openebs/maya/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openebs/maya/downloads","issues_url":"https://api.github.com/repos/openebs/maya/issues{/number}","pulls_url":"https://api.github.com/repos/openebs/maya/pulls{/number}","milestones_url":"https://api.github.com/repos/openebs/maya/milestones{/number}","notifications_url":"https://api.github.com/repos/openebs/maya/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openebs/maya/labels{/name}","releases_url":"https://api.github.com/repos/openebs/maya/releases{/id}","deployments_url":"https://api.github.com/repos/openebs/maya/deployments","created_at":"2016-10-06T08:34:13Z","updated_at":"2018-11-29T08:37:06Z","pushed_at":"2018-11-29T10:05:41Z","git_url":"git://github.com/openebs/maya.git","ssh_url":"git@github.com:openebs/maya.git","clone_url":"https://github.com/openebs/maya.git","svn_url":"https://github.com/openebs/maya","homepage":"https://docs.openebs.io","size":98885,"stargazers_count":121,"watchers_count":121,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":213,"mirror_url":null,"archived":false,"open_issues_count":45,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":213,"open_issues":45,"watchers":121,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openebs/maya/pulls/846"},"html":{"href":"https://github.com/openebs/maya/pull/846"},"issue":{"href":"https://api.github.com/repos/openebs/maya/issues/846"},"comments":{"href":"https://api.github.com/repos/openebs/maya/issues/846/comments"},"review_comments":{"href":"https://api.github.com/repos/openebs/maya/pulls/846/comments"},"review_comment":{"href":"https://api.github.com/repos/openebs/maya/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openebs/maya/pulls/846/commits"},"statuses":{"href":"https://api.github.com/repos/openebs/maya/statuses/88700035f3d45d464f604650a7265be6f8309f79"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"prateekpandey14"}}