)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"38cd0869fa6ff6ad73762958a703991897cf59cc","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"so once share choose one host, then the host\u0027s provisioned_capacity_gb"},{"line_number":18,"context_line":"shoud be provisioned_capacity_gb+\u003dshare\u0027s size."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: Ic239abafcb68063f3a6b007487141e5bb8315e0d"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"df33271e_b86ba4ee","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":0},"updated":"2020-04-02 18:08:57.000000000","message":"Thanks, this lgtm - but can you please report a bug on launchpad?\n\nhttps://bugs.launchpad.net/manila\n\nAfter doing so, you can use:\n\nCloses-Bug: #{LP_BUG_ID}\n\nIt\u0027d also be prudent to write a release note: https://docs.openstack.org/manila/latest/contributor/adding_release_notes.html\nExample: https://opendev.org/openstack/manila/src/commit/3be50ced7a57ab84fcc2b65c52213d339424ec17/releasenotes/notes/bug-1578328-fix-replica-deletion-in-cDOT-7e4502fb50b69507.yaml\n\nI ask these because this bugfix is worth back porting to stable releases, and these would be nice trackers","commit_id":"b7b58a3ef9bde829ed04225c27f54cbeba425674"},{"author":{"_account_id":29539,"name":"zhangqing","email":"zhangqing_yewu@cmss.chinamobile.com","username":"zhangqing"},"change_message_id":"72e84a45de11f1f6ed584a3b2b78ae8f9efeb162","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"so once share choose one host, then the host\u0027s provisioned_capacity_gb"},{"line_number":18,"context_line":"shoud be provisioned_capacity_gb+\u003dshare\u0027s size."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: Ic239abafcb68063f3a6b007487141e5bb8315e0d"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3f4c43b2_0863161c","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":0},"in_reply_to":"df33271e_b86ba4ee","updated":"2020-04-15 09:48:13.000000000","message":"I reported a bug and add release note, please review it again, thanks.","commit_id":"b7b58a3ef9bde829ed04225c27f54cbeba425674"}],"manila/scheduler/host_manager.py":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"38cd0869fa6ff6ad73762958a703991897cf59cc","unresolved":false,"context_lines":[{"line_number":367,"context_line":"    def consume_from_share(self, share):"},{"line_number":368,"context_line":"        \"\"\"Incrementally update host state from an share.\"\"\""},{"line_number":369,"context_line":"        self.provisioned_capacity_gb +\u003d share[\u0027size\u0027]"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"        if (isinstance(self.free_capacity_gb, six.string_types)"},{"line_number":372,"context_line":"                and self.free_capacity_gb !\u003d \u0027unknown\u0027):"},{"line_number":373,"context_line":"            raise exception.InvalidCapacity("}],"source_content_type":"text/x-python","patch_set":1,"id":"df33271e_5819b8d4","line":370,"range":{"start_line":370,"start_character":0,"end_line":370,"end_character":0},"updated":"2020-04-02 18:08:57.000000000","message":"This is true of self.allocated_capacity_gb as well..","commit_id":"b7b58a3ef9bde829ed04225c27f54cbeba425674"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"d1ce9be5742116939eb2e51b913a396c6674d909","unresolved":false,"context_lines":[{"line_number":366,"context_line":""},{"line_number":367,"context_line":"    def consume_from_share(self, share):"},{"line_number":368,"context_line":"        \"\"\"Incrementally update host state from an share.\"\"\""},{"line_number":369,"context_line":"        self.provisioned_capacity_gb +\u003d share[\u0027size\u0027]"},{"line_number":370,"context_line":"        self.allocated_capacity_gb +\u003d share[\u0027size\u0027]"},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"        if (isinstance(self.free_capacity_gb, six.string_types)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_0e9837be","line":369,"range":{"start_line":369,"start_character":8,"end_line":369,"end_character":53},"updated":"2020-04-15 16:41:05.000000000","message":"This can be None.\nPlease handle that situation","commit_id":"3a584cc0a8cea61d7f5fb2f51557ba3d951fd699"},{"author":{"_account_id":29539,"name":"zhangqing","email":"zhangqing_yewu@cmss.chinamobile.com","username":"zhangqing"},"change_message_id":"6b5a3d1030f15dea8fecb0a98b17d16bc6a74e5b","unresolved":false,"context_lines":[{"line_number":366,"context_line":""},{"line_number":367,"context_line":"    def consume_from_share(self, share):"},{"line_number":368,"context_line":"        \"\"\"Incrementally update host state from an share.\"\"\""},{"line_number":369,"context_line":"        self.provisioned_capacity_gb +\u003d share[\u0027size\u0027]"},{"line_number":370,"context_line":"        self.allocated_capacity_gb +\u003d share[\u0027size\u0027]"},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"        if (isinstance(self.free_capacity_gb, six.string_types)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_a98f732c","line":369,"range":{"start_line":369,"start_character":8,"end_line":369,"end_character":53},"in_reply_to":"3f4c43b2_0e9837be","updated":"2020-04-16 07:48:33.000000000","message":"You mean self.provisioned_capacity_gb can be none or share[\u0027size\u0027] can be none?\nIn my opinion,share[\u0027size\u0027] can\u0027t be none,because when we create share,the size must be integer,otherwise it will raise exception in parameter check.\nAnd,self.provisioned_capacity_gb was from capability or _estimate_provisioned_capacity. if provisioned_capacity_gb is none in capability, the value will be zero.In another way,the value alse would be zero or an integer.","commit_id":"3a584cc0a8cea61d7f5fb2f51557ba3d951fd699"},{"author":{"_account_id":29539,"name":"zhangqing","email":"zhangqing_yewu@cmss.chinamobile.com","username":"zhangqing"},"change_message_id":"381e64b72a889b9c9588aee5da36345287794ffe","unresolved":false,"context_lines":[{"line_number":366,"context_line":""},{"line_number":367,"context_line":"    def consume_from_share(self, share):"},{"line_number":368,"context_line":"        \"\"\"Incrementally update host state from an share.\"\"\""},{"line_number":369,"context_line":"        self.provisioned_capacity_gb +\u003d share[\u0027size\u0027]"},{"line_number":370,"context_line":"        self.allocated_capacity_gb +\u003d share[\u0027size\u0027]"},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"        if (isinstance(self.free_capacity_gb, six.string_types)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_49634f1b","line":369,"range":{"start_line":369,"start_character":8,"end_line":369,"end_character":53},"in_reply_to":"3f4c43b2_0e9837be","updated":"2020-04-16 08:00:58.000000000","message":"so, I don\u0027t think it could be none, please give me some tips, thanks.","commit_id":"3a584cc0a8cea61d7f5fb2f51557ba3d951fd699"},{"author":{"_account_id":29539,"name":"zhangqing","email":"zhangqing_yewu@cmss.chinamobile.com","username":"zhangqing"},"change_message_id":"d40e3e9e6c440429af173738f3920a4b703626b9","unresolved":false,"context_lines":[{"line_number":366,"context_line":""},{"line_number":367,"context_line":"    def consume_from_share(self, share):"},{"line_number":368,"context_line":"        \"\"\"Incrementally update host state from an share.\"\"\""},{"line_number":369,"context_line":"        self.provisioned_capacity_gb +\u003d share[\u0027size\u0027]"},{"line_number":370,"context_line":"        self.allocated_capacity_gb +\u003d share[\u0027size\u0027]"},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"        if (isinstance(self.free_capacity_gb, six.string_types)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_8c83a5cc","line":369,"range":{"start_line":369,"start_character":8,"end_line":369,"end_character":53},"in_reply_to":"3f4c43b2_0e9837be","updated":"2020-04-16 08:49:57.000000000","message":"sorry, It can be None, I\u0027ll fix it.","commit_id":"3a584cc0a8cea61d7f5fb2f51557ba3d951fd699"}],"manila/tests/scheduler/test_host_manager.py":[{"author":{"_account_id":29539,"name":"zhangqing","email":"zhangqing_yewu@cmss.chinamobile.com","username":"zhangqing"},"change_message_id":"664e9e8b81f04c18e5712c0a01a2d11a22e0cf5d","unresolved":false,"context_lines":[{"line_number":821,"context_line":"            \u0027total_capacity_gb\u0027: \u0027unknown\u0027,"},{"line_number":822,"context_line":"            \u0027free_capacity_gb\u0027: \u0027unknown\u0027,"},{"line_number":823,"context_line":"            \u0027provisioned_capacity_gb\u0027: None,"},{"line_number":824,"context_line":"            \u0027allocated_capacity_gb\u0027: 0,"},{"line_number":825,"context_line":"            \u0027reserved_percentage\u0027: 0,"},{"line_number":826,"context_line":"            \u0027timestamp\u0027: None"},{"line_number":827,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4c43b2_ea7302b0","line":824,"range":{"start_line":824,"start_character":12,"end_line":824,"end_character":39},"updated":"2020-04-18 14:26:12.000000000","message":"I am not sure allocated_capacity_gb should be \u0027unknow\u0027 or \u0027None\u0027 or something, because there is no check for the volume of allocated_capacity_gb.","commit_id":"7e805bfe3fc318ae9747c672fbc58ceede18dd0a"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"2d3a7a40867450aca2462862b39251df3f5f2656","unresolved":false,"context_lines":[{"line_number":835,"context_line":"        fake_host.consume_from_share(fake_share)"},{"line_number":836,"context_line":"        self.assertEqual(fake_host.total_capacity_gb, \u0027unknown\u0027)"},{"line_number":837,"context_line":"        self.assertEqual(fake_host.free_capacity_gb, \u0027unknown\u0027)"},{"line_number":838,"context_line":"        self.assertEqual(fake_host.provisioned_capacity_gb, None)"},{"line_number":839,"context_line":"        self.assertEqual(fake_host.allocated_capacity_gb, share_size)"},{"line_number":840,"context_line":""},{"line_number":841,"context_line":"    def test_consume_from_share_invalid_capacity(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f4c43b2_c1c8a023","line":838,"updated":"2020-04-20 05:08:12.000000000","message":"pep8: H203: Use assertIs(Not)None to check for None","commit_id":"c8ddf2623f7ab35d2f792b9fb5a5ff5a42e89a97"}],"releasenotes/notes/bug-1872873-fix-consume-from-share-eea5941de17a5bcc.yaml":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"d1ce9be5742116939eb2e51b913a396c6674d909","unresolved":false,"context_lines":[{"line_number":1,"context_line":""},{"line_number":2,"context_line":"---"},{"line_number":3,"context_line":"fixes:"},{"line_number":4,"context_line":"  - Update host provisioned_capacity_gb  and allocated_capacity_gb in consume from share"},{"line_number":5,"context_line":"    after scheduler one host."},{"line_number":6,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":2,"id":"3f4c43b2_4ee7df41","line":5,"range":{"start_line":4,"start_character":4,"end_line":5,"end_character":29},"updated":"2020-04-15 16:41:05.000000000","message":"Suggest a rewrite: \n\n - Updated the scheduler pool attributes  ``provisioned_capacity_gb`` and\n   ``allocated_capacity_gb``  to accommodate shares being created. This \n   helps maintain an approximate tally of these attributes in between back end \n   scheduler updates.","commit_id":"3a584cc0a8cea61d7f5fb2f51557ba3d951fd699"}]}
