)]}'
{"cinder/scheduler/filters/capacity_filter.py":[{"author":{"_account_id":13157,"name":"Zhao Chao","email":"zhaochao1984@gmail.com","username":"zhaochao"},"change_message_id":"48b52aff6486feaa05cd510c078aa45610c2711b","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                # accommodate the volume. Adjusted free virtual capacity is"},{"line_number":155,"context_line":"                # the currently available free capacity (taking into account"},{"line_number":156,"context_line":"                # of reserved space) which we can over-subscribe."},{"line_number":157,"context_line":"                adjusted_free_virtual \u003d utils.calculate_virtual_free_capacity("},{"line_number":158,"context_line":"                    total_space,"},{"line_number":159,"context_line":"                    free_space,"},{"line_number":160,"context_line":"                    backend_state.provisioned_capacity_gb,"},{"line_number":161,"context_line":"                    backend_state.thin_provisioning_support,"},{"line_number":162,"context_line":"                    backend_state.max_over_subscription_ratio,"},{"line_number":163,"context_line":"                    backend_state.reserved_percentage,"},{"line_number":164,"context_line":"                    thin)"},{"line_number":165,"context_line":"                res \u003d adjusted_free_virtual \u003e\u003d requested_size"},{"line_number":166,"context_line":"                if not res:"},{"line_number":167,"context_line":"                    msg_args \u003d {\"available\": adjusted_free_virtual,"}],"source_content_type":"text/x-python","patch_set":1,"id":"df7087c5_cbf3c709","line":164,"range":{"start_line":157,"start_character":0,"end_line":164,"end_character":25},"updated":"2018-03-12 13:03:19.000000000","message":"If you also think the calculation of adjusted_free_virtual is right here, then it shouldn\u0027t be changed.\n\nIt seems there are quite a lot discussions about this before:\n\nhttps://bugs.launchpad.net/cinder/+bug/1704786\nhttps://review.openstack.org/#/c/490116\n\nSo this is a problem of consume_from_volume, i.e. when a backend supports thin provision, creating a volume or extending the size of a volume should not affect the free_capacity_gb of backendstat inside scheduler(which should be the same with the volume driver).\n\nBesides, new unittests are needed for changes like this.","commit_id":"b6cce113beb12367ed11f5b29ae8e06cda0ab798"}],"cinder/scheduler/host_manager.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"513fdac7c15215763f87c6c9f1e755a2d5dc4321","unresolved":false,"context_lines":[{"line_number":658,"context_line":"            for key in state.pools:"},{"line_number":659,"context_line":"                pool_state \u003d state.pools[key]"},{"line_number":660,"context_line":"                if pool_name \u003d\u003d \u0027#\u0027.join([backend_key, pool_state.pool_name]):"},{"line_number":661,"context_line":"                    pool_state.consume_from_volume({\u0027size\u0027: -size},"},{"line_number":662,"context_line":"                                                   update_time\u003dFalse)"},{"line_number":663,"context_line":""},{"line_number":664,"context_line":"    def get_all_backend_states(self, context):"}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_6303b743","line":661,"updated":"2018-03-22 10:32:22.000000000","message":"-1: Here\u0027s one of the cases where we don\u0027t pass all the information we need for the `consume_from_volume` method to do the right thing.","commit_id":"de813ef3d50f1dad31c3f5f6e6f096b94e3a47e7"}]}
