)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":17405,"name":"Jacob Gregor","email":"jgregor@us.ibm.com","username":"jgregor"},"change_message_id":"84895c015af867d00cc6fe982bfacaeeab81e089","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Retyping volume got error under max vol limit"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Create volume until arriving max volume limit,"},{"line_number":10,"context_line":"and then retype one of volumes, cinder will raise"},{"line_number":11,"context_line":"error: \"VolumelimitExceeded\". The volume type limit"},{"line_number":12,"context_line":"is -1, so this should not get this error because retyping"},{"line_number":13,"context_line":"don\u0027t change the volume quota, just volume type quota."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7a2fa921_44622118","line":10,"updated":"2015-10-12 15:51:19.000000000","message":"Suggestion: \u0027After reaching the max volume limit and retyping one of the volumes,\u0027","commit_id":"70134d723245d2f9a82ac00d9ec58b42df4e8aad"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"d3ed6275c0cdfcf8f3828b2e71aa11a02d522cad","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Retyping volume got error under max vol limit"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Create volume until arriving max volume limit,"},{"line_number":10,"context_line":"and then retype one of volumes, cinder will raise"},{"line_number":11,"context_line":"error: \"VolumelimitExceeded\". The volume type limit"},{"line_number":12,"context_line":"is -1, so this should not get this error because retyping"},{"line_number":13,"context_line":"don\u0027t change the volume quota, just volume type quota."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa80f949_53f12b00","line":10,"in_reply_to":"7a2fa921_44622118","updated":"2015-11-06 08:24:39.000000000","message":"Done","commit_id":"70134d723245d2f9a82ac00d9ec58b42df4e8aad"},{"author":{"_account_id":17405,"name":"Jacob Gregor","email":"jgregor@us.ibm.com","username":"jgregor"},"change_message_id":"84895c015af867d00cc6fe982bfacaeeab81e089","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Create volume until arriving max volume limit,"},{"line_number":10,"context_line":"and then retype one of volumes, cinder will raise"},{"line_number":11,"context_line":"error: \"VolumelimitExceeded\". The volume type limit"},{"line_number":12,"context_line":"is -1, so this should not get this error because retyping"},{"line_number":13,"context_line":"don\u0027t change the volume quota, just volume type quota."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7a2fa921_5f9f4eb4","line":11,"updated":"2015-10-12 15:51:19.000000000","message":"VolumelimitExceeded -\u003e VolumeLimitExceeded","commit_id":"70134d723245d2f9a82ac00d9ec58b42df4e8aad"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"d3ed6275c0cdfcf8f3828b2e71aa11a02d522cad","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Create volume until arriving max volume limit,"},{"line_number":10,"context_line":"and then retype one of volumes, cinder will raise"},{"line_number":11,"context_line":"error: \"VolumelimitExceeded\". The volume type limit"},{"line_number":12,"context_line":"is -1, so this should not get this error because retyping"},{"line_number":13,"context_line":"don\u0027t change the volume quota, just volume type quota."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa80f949_73f6affa","line":11,"in_reply_to":"7a2fa921_5f9f4eb4","updated":"2015-11-06 08:24:39.000000000","message":"Done","commit_id":"70134d723245d2f9a82ac00d9ec58b42df4e8aad"},{"author":{"_account_id":17405,"name":"Jacob Gregor","email":"jgregor@us.ibm.com","username":"jgregor"},"change_message_id":"84895c015af867d00cc6fe982bfacaeeab81e089","unresolved":false,"context_lines":[{"line_number":10,"context_line":"and then retype one of volumes, cinder will raise"},{"line_number":11,"context_line":"error: \"VolumelimitExceeded\". The volume type limit"},{"line_number":12,"context_line":"is -1, so this should not get this error because retyping"},{"line_number":13,"context_line":"don\u0027t change the volume quota, just volume type quota."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I5f25c47158ac24bef94078457a84248daa67e80f"},{"line_number":16,"context_line":"Closes-Bug: #1504719"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7a2fa921_e421edb5","line":13,"updated":"2015-10-12 15:51:19.000000000","message":"don\u0027t -\u003e doesn\u0027t","commit_id":"70134d723245d2f9a82ac00d9ec58b42df4e8aad"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"d3ed6275c0cdfcf8f3828b2e71aa11a02d522cad","unresolved":false,"context_lines":[{"line_number":10,"context_line":"and then retype one of volumes, cinder will raise"},{"line_number":11,"context_line":"error: \"VolumelimitExceeded\". The volume type limit"},{"line_number":12,"context_line":"is -1, so this should not get this error because retyping"},{"line_number":13,"context_line":"don\u0027t change the volume quota, just volume type quota."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I5f25c47158ac24bef94078457a84248daa67e80f"},{"line_number":16,"context_line":"Closes-Bug: #1504719"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa80f949_73446f1a","line":13,"in_reply_to":"7a2fa921_e421edb5","updated":"2015-11-06 08:24:39.000000000","message":"Done","commit_id":"70134d723245d2f9a82ac00d9ec58b42df4e8aad"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"49b1a98b88cc05f785326ead640142b1654d2e1c","unresolved":false,"context_lines":[{"line_number":10,"context_line":"one of volumes, cinder will raise"},{"line_number":11,"context_line":"error: \"VolumeLimitExceeded\". The volume type limit"},{"line_number":12,"context_line":"is -1, so this should not get this error because retyping"},{"line_number":13,"context_line":"doesn\u0027t change the volume quota, just volume type quota."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I5f25c47158ac24bef94078457a84248daa67e80f"},{"line_number":16,"context_line":"Closes-Bug: #1504719"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"da85f559_57a3e49e","line":13,"updated":"2015-11-06 22:10:29.000000000","message":"The last sentence here is a little confusing. I suggest: \"This error should not be occurring since the volume type limit is -1 and retyping doesn\u0027t change the volume quota, it changes the volume type quota.\" Or something to that effect.","commit_id":"b8e7c67647ea9bbed8dd065bfb8bb8fd5967a9a7"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"876e97b24e78339f9d6fe90e7de8fb5173034339","unresolved":false,"context_lines":[{"line_number":10,"context_line":"one of volumes, cinder will raise"},{"line_number":11,"context_line":"error: \"VolumeLimitExceeded\". The volume type limit"},{"line_number":12,"context_line":"is -1, so this should not get this error because retyping"},{"line_number":13,"context_line":"doesn\u0027t change the volume quota, just volume type quota."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I5f25c47158ac24bef94078457a84248daa67e80f"},{"line_number":16,"context_line":"Closes-Bug: #1504719"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"da85f559_3335f445","line":13,"in_reply_to":"da85f559_57a3e49e","updated":"2015-11-09 07:25:43.000000000","message":"Thanks Kendall, it\u0027s better.","commit_id":"b8e7c67647ea9bbed8dd065bfb8bb8fd5967a9a7"}],"cinder/quota_utils.py":[{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"26d8996f1bb4029d469ab44da80e0d2d18556a48","unresolved":false,"context_lines":[{"line_number":24,"context_line":"QUOTAS \u003d quota.QUOTAS"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def get_volume_type_reservation(ctxt, volume, type_id, only_type\u003dFalse):"},{"line_number":28,"context_line":"    # Reserve quotas for the given volume type"},{"line_number":29,"context_line":"    try:"},{"line_number":30,"context_line":"        reserve_opts \u003d {\u0027volumes\u0027: 1, \u0027gigabytes\u0027: volume[\u0027size\u0027]}"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_5c29cce4","line":27,"updated":"2015-11-20 09:32:09.000000000","message":"From the name \"only_type\" it is hard to know what it means. How about \"reserve_vol_type_only\"?","commit_id":"33d346fdcc84ff1349c85f5e3a7d602ab46bfe3e"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"0fc34b02ef6d2101ef57fa1a82fb93265a9ffe1e","unresolved":false,"context_lines":[{"line_number":24,"context_line":"QUOTAS \u003d quota.QUOTAS"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def get_volume_type_reservation(ctxt, volume, type_id, only_type\u003dFalse):"},{"line_number":28,"context_line":"    # Reserve quotas for the given volume type"},{"line_number":29,"context_line":"    try:"},{"line_number":30,"context_line":"        reserve_opts \u003d {\u0027volumes\u0027: 1, \u0027gigabytes\u0027: volume[\u0027size\u0027]}"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_633aa19a","line":27,"in_reply_to":"ba8a016a_5c29cce4","updated":"2015-11-23 12:03:13.000000000","message":"Sounds great!","commit_id":"33d346fdcc84ff1349c85f5e3a7d602ab46bfe3e"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"26d8996f1bb4029d469ab44da80e0d2d18556a48","unresolved":false,"context_lines":[{"line_number":32,"context_line":"                                    reserve_opts,"},{"line_number":33,"context_line":"                                    type_id)"},{"line_number":34,"context_line":"        # If only_type is True, just reserve volume_type quota,"},{"line_number":35,"context_line":"        # Not volume quota."},{"line_number":36,"context_line":"        if only_type:"},{"line_number":37,"context_line":"            reserve_opts.pop(\u0027volumes\u0027)"},{"line_number":38,"context_line":"            reserve_opts.pop(\u0027gigabytes\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_a10a1377","line":35,"updated":"2015-11-20 09:32:09.000000000","message":"Not \u003d\u003e not","commit_id":"33d346fdcc84ff1349c85f5e3a7d602ab46bfe3e"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"0fc34b02ef6d2101ef57fa1a82fb93265a9ffe1e","unresolved":false,"context_lines":[{"line_number":32,"context_line":"                                    reserve_opts,"},{"line_number":33,"context_line":"                                    type_id)"},{"line_number":34,"context_line":"        # If only_type is True, just reserve volume_type quota,"},{"line_number":35,"context_line":"        # Not volume quota."},{"line_number":36,"context_line":"        if only_type:"},{"line_number":37,"context_line":"            reserve_opts.pop(\u0027volumes\u0027)"},{"line_number":38,"context_line":"            reserve_opts.pop(\u0027gigabytes\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_a36729b6","line":35,"in_reply_to":"ba8a016a_a10a1377","updated":"2015-11-23 12:03:13.000000000","message":"Done","commit_id":"33d346fdcc84ff1349c85f5e3a7d602ab46bfe3e"}],"cinder/tests/unit/test_volume.py":[{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"49b1a98b88cc05f785326ead640142b1654d2e1c","unresolved":false,"context_lines":[{"line_number":4849,"context_line":"        if only_type:"},{"line_number":4850,"context_line":"            self.assertEqual(total_volumes_in_use, new_total_volumes_in_use)"},{"line_number":4851,"context_line":"            self.assertEqual(total_gigabytes_in_use,"},{"line_number":4852,"context_line":"                             new_total_gigabytes_in_use)"},{"line_number":4853,"context_line":""},{"line_number":4854,"context_line":"    def test_retype_volume_driver_success(self):"},{"line_number":4855,"context_line":"        self._retype_volume_exec(True)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_f3d366d3","line":4852,"updated":"2015-11-06 22:10:29.000000000","message":"Can this get moved up into the line 4823 if statement? After the try/except blocks?","commit_id":"b8e7c67647ea9bbed8dd065bfb8bb8fd5967a9a7"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"876e97b24e78339f9d6fe90e7de8fb5173034339","unresolved":false,"context_lines":[{"line_number":4849,"context_line":"        if only_type:"},{"line_number":4850,"context_line":"            self.assertEqual(total_volumes_in_use, new_total_volumes_in_use)"},{"line_number":4851,"context_line":"            self.assertEqual(total_gigabytes_in_use,"},{"line_number":4852,"context_line":"                             new_total_gigabytes_in_use)"},{"line_number":4853,"context_line":""},{"line_number":4854,"context_line":"    def test_retype_volume_driver_success(self):"},{"line_number":4855,"context_line":"        self._retype_volume_exec(True)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da85f559_33b094dd","line":4852,"in_reply_to":"fa80f949_f3d366d3","updated":"2015-11-09 07:25:43.000000000","message":"Sure.","commit_id":"b8e7c67647ea9bbed8dd065bfb8bb8fd5967a9a7"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"26d8996f1bb4029d469ab44da80e0d2d18556a48","unresolved":false,"context_lines":[{"line_number":4837,"context_line":"                new_total_gigabytes_in_use \u003d 0"},{"line_number":4838,"context_line":""},{"line_number":4839,"context_line":"                self.assertEqual(total_volumes_in_use,"},{"line_number":4840,"context_line":"                                 new_total_volumes_in_use)"},{"line_number":4841,"context_line":"                self.assertEqual(total_gigabytes_in_use,"},{"line_number":4842,"context_line":"                                 new_total_gigabytes_in_use)"},{"line_number":4843,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_b721f19f","line":4840,"updated":"2015-11-20 09:32:09.000000000","message":"Why not just write `self.assertEqual(0total_volumes_in_use)`? Also, the expected value should be put as the first parameter.","commit_id":"33d346fdcc84ff1349c85f5e3a7d602ab46bfe3e"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"634cf3b571d0d719ebeca785cad68598dbf8dac6","unresolved":false,"context_lines":[{"line_number":4837,"context_line":"                new_total_gigabytes_in_use \u003d 0"},{"line_number":4838,"context_line":""},{"line_number":4839,"context_line":"                self.assertEqual(total_volumes_in_use,"},{"line_number":4840,"context_line":"                                 new_total_volumes_in_use)"},{"line_number":4841,"context_line":"                self.assertEqual(total_gigabytes_in_use,"},{"line_number":4842,"context_line":"                                 new_total_gigabytes_in_use)"},{"line_number":4843,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_bea0bba6","line":4840,"in_reply_to":"ba8a016a_b721f19f","updated":"2015-11-21 16:47:27.000000000","message":"+1","commit_id":"33d346fdcc84ff1349c85f5e3a7d602ab46bfe3e"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"0fc34b02ef6d2101ef57fa1a82fb93265a9ffe1e","unresolved":false,"context_lines":[{"line_number":4837,"context_line":"                new_total_gigabytes_in_use \u003d 0"},{"line_number":4838,"context_line":""},{"line_number":4839,"context_line":"                self.assertEqual(total_volumes_in_use,"},{"line_number":4840,"context_line":"                                 new_total_volumes_in_use)"},{"line_number":4841,"context_line":"                self.assertEqual(total_gigabytes_in_use,"},{"line_number":4842,"context_line":"                                 new_total_gigabytes_in_use)"},{"line_number":4843,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_a3ede9b8","line":4840,"in_reply_to":"ba8a016a_bea0bba6","updated":"2015-11-23 12:03:13.000000000","message":"since the in_use may not be 0, so I get them from db for safety, and total_volumes_in_use is the expected value, I want to see the new_total_volumes_in_use which is got after retype is equal to total_volumes_in_use before retype.","commit_id":"33d346fdcc84ff1349c85f5e3a7d602ab46bfe3e"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"dbba03d44af8db4e3b526fdf8f85131d35a7d89f","unresolved":false,"context_lines":[{"line_number":4836,"context_line":"            except exception.QuotaUsageNotFound:"},{"line_number":4837,"context_line":"                new_total_volumes_in_use \u003d 0"},{"line_number":4838,"context_line":"                new_total_gigabytes_in_use \u003d 0"},{"line_number":4839,"context_line":""},{"line_number":4840,"context_line":"                self.assertEqual(total_volumes_in_use,"},{"line_number":4841,"context_line":"                                 new_total_volumes_in_use)"},{"line_number":4842,"context_line":"                self.assertEqual(total_gigabytes_in_use,"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a710552_79d132fb","line":4839,"updated":"2015-12-14 20:19:26.000000000","message":"Shouldn\u0027t these assertEquals be outside of the except block? They seem to be indented one too far.","commit_id":"982fd3daa4a34747b8f4fb0dad8b59b7d7b83a4e"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"76f9d0c79de230b2fde9fd2afbf9a5eca78987e7","unresolved":false,"context_lines":[{"line_number":4836,"context_line":"            except exception.QuotaUsageNotFound:"},{"line_number":4837,"context_line":"                new_total_volumes_in_use \u003d 0"},{"line_number":4838,"context_line":"                new_total_gigabytes_in_use \u003d 0"},{"line_number":4839,"context_line":""},{"line_number":4840,"context_line":"                self.assertEqual(total_volumes_in_use,"},{"line_number":4841,"context_line":"                                 new_total_volumes_in_use)"},{"line_number":4842,"context_line":"                self.assertEqual(total_gigabytes_in_use,"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a710552_24a4d155","line":4839,"in_reply_to":"5a710552_79d132fb","updated":"2015-12-15 03:12:12.000000000","message":"Good catch! I miss this...","commit_id":"982fd3daa4a34747b8f4fb0dad8b59b7d7b83a4e"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"ebaf92db12f311de6964442dba6bbba75fcc254b","unresolved":false,"context_lines":[{"line_number":4838,"context_line":"                new_total_gigabytes_in_use \u003d 0"},{"line_number":4839,"context_line":""},{"line_number":4840,"context_line":"                self.assertEqual(total_volumes_in_use,"},{"line_number":4841,"context_line":"                                 new_total_volumes_in_use)"},{"line_number":4842,"context_line":"                self.assertEqual(total_gigabytes_in_use,"},{"line_number":4843,"context_line":"                                 new_total_gigabytes_in_use)"},{"line_number":4844,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_2c296f9e","line":4841,"updated":"2015-11-27 16:02:48.000000000","message":"The new_total_volumes_in_use is always assigned zero. So is the reason of not writing assertEqual(total_volumes_in_use, 0) to make the code clearer?","commit_id":"982fd3daa4a34747b8f4fb0dad8b59b7d7b83a4e"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"7de8c44f16cd2e79b489e7ff5a12a72feaf310db","unresolved":false,"context_lines":[{"line_number":4838,"context_line":"                new_total_gigabytes_in_use \u003d 0"},{"line_number":4839,"context_line":""},{"line_number":4840,"context_line":"                self.assertEqual(total_volumes_in_use,"},{"line_number":4841,"context_line":"                                 new_total_volumes_in_use)"},{"line_number":4842,"context_line":"                self.assertEqual(total_gigabytes_in_use,"},{"line_number":4843,"context_line":"                                 new_total_gigabytes_in_use)"},{"line_number":4844,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_48828cc9","line":4841,"in_reply_to":"9a8ffd7b_2c296f9e","updated":"2015-11-28 10:04:07.000000000","message":"since the new_total_volumes_in_use may not be 0, so I get them from db for safety.","commit_id":"982fd3daa4a34747b8f4fb0dad8b59b7d7b83a4e"}],"cinder/volume/manager.py":[{"author":{"_account_id":14305,"name":"Yuriy Nesenenko","email":"ynesenenko@mirantis.com","username":"yuriy_n"},"change_message_id":"f132a69288406f8223ba17a9e7be9d09569f5cf4","unresolved":false,"context_lines":[{"line_number":2070,"context_line":"            # operation since they didn\u0027t changed, just reduce volume_type and"},{"line_number":2071,"context_line":"            # type gigabytes is fine."},{"line_number":2072,"context_line":"            reserve_opts.pop(\u0027volumes\u0027)"},{"line_number":2073,"context_line":"            reserve_opts.pop(\u0027gigabytes\u0027)"},{"line_number":2074,"context_line":"            old_reservations \u003d QUOTAS.reserve(context,"},{"line_number":2075,"context_line":"                                              project_id\u003dproject_id,"},{"line_number":2076,"context_line":"                                              **reserve_opts)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a29b11f_4e71d0df","line":2073,"updated":"2015-10-26 12:15:33.000000000","message":"What sense to remove the keys of reserve_opts to get reserve_opts\u003d{} if it can be done just by reserve_opts\u003d{}?","commit_id":"70134d723245d2f9a82ac00d9ec58b42df4e8aad"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"d3ed6275c0cdfcf8f3828b2e71aa11a02d522cad","unresolved":false,"context_lines":[{"line_number":2070,"context_line":"            # operation since they didn\u0027t changed, just reduce volume_type and"},{"line_number":2071,"context_line":"            # type gigabytes is fine."},{"line_number":2072,"context_line":"            reserve_opts.pop(\u0027volumes\u0027)"},{"line_number":2073,"context_line":"            reserve_opts.pop(\u0027gigabytes\u0027)"},{"line_number":2074,"context_line":"            old_reservations \u003d QUOTAS.reserve(context,"},{"line_number":2075,"context_line":"                                              project_id\u003dproject_id,"},{"line_number":2076,"context_line":"                                              **reserve_opts)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa80f949_dd01acb0","line":2073,"in_reply_to":"3a29b11f_4e71d0df","updated":"2015-11-06 08:24:39.000000000","message":"You can\u0027t do it just by reserver_opts\u003d{}, since we have add other volume type quota to it in line 2066.","commit_id":"70134d723245d2f9a82ac00d9ec58b42df4e8aad"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"26d8996f1bb4029d469ab44da80e0d2d18556a48","unresolved":false,"context_lines":[{"line_number":2080,"context_line":""},{"line_number":2081,"context_line":"        # Get old reservations"},{"line_number":2082,"context_line":"        try:"},{"line_number":2083,"context_line":"            reserve_opts \u003d {\u0027volumes\u0027: -1, \u0027gigabytes\u0027: -volume.size}"},{"line_number":2084,"context_line":"            QUOTAS.add_volume_type_opts(context,"},{"line_number":2085,"context_line":"                                        reserve_opts,"},{"line_number":2086,"context_line":"                                        volume.volume_type_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_3c4f2835","line":2083,"updated":"2015-11-20 09:32:09.000000000","message":"This part looks a bit redundant with get_volume_type_reservation (with slight difference). Same for the reserve_opts.pop(..) parts. It would be good if they can be extracted and merged.","commit_id":"33d346fdcc84ff1349c85f5e3a7d602ab46bfe3e"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"634cf3b571d0d719ebeca785cad68598dbf8dac6","unresolved":false,"context_lines":[{"line_number":2080,"context_line":""},{"line_number":2081,"context_line":"        # Get old reservations"},{"line_number":2082,"context_line":"        try:"},{"line_number":2083,"context_line":"            reserve_opts \u003d {\u0027volumes\u0027: -1, \u0027gigabytes\u0027: -volume.size}"},{"line_number":2084,"context_line":"            QUOTAS.add_volume_type_opts(context,"},{"line_number":2085,"context_line":"                                        reserve_opts,"},{"line_number":2086,"context_line":"                                        volume.volume_type_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_9eaff793","line":2083,"in_reply_to":"ba8a016a_3c4f2835","updated":"2015-11-21 16:47:27.000000000","message":"We need it to for add_volume_type_opts to correctly calculate volume type\u0027s quotas. It\u0027s correct.","commit_id":"33d346fdcc84ff1349c85f5e3a7d602ab46bfe3e"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"cac787b8e590551e23aad1642ef69d20ce368bfc","unresolved":false,"context_lines":[{"line_number":2080,"context_line":""},{"line_number":2081,"context_line":"        # Get old reservations"},{"line_number":2082,"context_line":"        try:"},{"line_number":2083,"context_line":"            reserve_opts \u003d {\u0027volumes\u0027: -1, \u0027gigabytes\u0027: -volume.size}"},{"line_number":2084,"context_line":"            QUOTAS.add_volume_type_opts(context,"},{"line_number":2085,"context_line":"                                        reserve_opts,"},{"line_number":2086,"context_line":"                                        volume.volume_type_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_60945b42","line":2083,"in_reply_to":"ba8a016a_9eaff793","updated":"2015-11-27 16:02:34.000000000","message":"I mean, it\u0027s good if we have a common method like get/release_volume_type_reservation to wrap line 2083 to 2091. How we use reserve_opts.pop(\u0027xxx\u0027) here is duplicated with get_volume_type_reservation line 37 to 38.","commit_id":"33d346fdcc84ff1349c85f5e3a7d602ab46bfe3e"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"26d8996f1bb4029d469ab44da80e0d2d18556a48","unresolved":false,"context_lines":[{"line_number":2084,"context_line":"            QUOTAS.add_volume_type_opts(context,"},{"line_number":2085,"context_line":"                                        reserve_opts,"},{"line_number":2086,"context_line":"                                        volume.volume_type_id)"},{"line_number":2087,"context_line":"            # We don\u0027t need to reduce volumes and gigabytes quota for retyping"},{"line_number":2088,"context_line":"            # operation since they didn\u0027t changed, just reduce volume_type and"},{"line_number":2089,"context_line":"            # type gigabytes is fine."},{"line_number":2090,"context_line":"            reserve_opts.pop(\u0027volumes\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_fcd8c054","line":2087,"updated":"2015-11-20 09:32:09.000000000","message":"The above quota is -1. So it looks a bit confusing to say \"to reduce ...\".","commit_id":"33d346fdcc84ff1349c85f5e3a7d602ab46bfe3e"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"0fc34b02ef6d2101ef57fa1a82fb93265a9ffe1e","unresolved":false,"context_lines":[{"line_number":2084,"context_line":"            QUOTAS.add_volume_type_opts(context,"},{"line_number":2085,"context_line":"                                        reserve_opts,"},{"line_number":2086,"context_line":"                                        volume.volume_type_id)"},{"line_number":2087,"context_line":"            # We don\u0027t need to reduce volumes and gigabytes quota for retyping"},{"line_number":2088,"context_line":"            # operation since they didn\u0027t changed, just reduce volume_type and"},{"line_number":2089,"context_line":"            # type gigabytes is fine."},{"line_number":2090,"context_line":"            reserve_opts.pop(\u0027volumes\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_23b9f979","line":2087,"in_reply_to":"ba8a016a_fcd8c054","updated":"2015-11-23 12:03:13.000000000","message":"Ah, \u0027to reserve\u0027 looks better.","commit_id":"33d346fdcc84ff1349c85f5e3a7d602ab46bfe3e"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"26d8996f1bb4029d469ab44da80e0d2d18556a48","unresolved":false,"context_lines":[{"line_number":2190,"context_line":"                model_update.update(retype_model_update)"},{"line_number":2191,"context_line":"            volume.update(model_update)"},{"line_number":2192,"context_line":"            volume.save()"},{"line_number":2193,"context_line":""},{"line_number":2194,"context_line":"        if old_reservations:"},{"line_number":2195,"context_line":"            QUOTAS.commit(context, old_reservations, project_id\u003dproject_id)"},{"line_number":2196,"context_line":"        if new_reservations:"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_97a38dff","line":2193,"updated":"2015-11-20 09:32:09.000000000","message":"The old_reservations, which give -1 volume quota, are committed first. After that it is the new_reservations, which give +1 volume quota. So -1 first, then +1. How does the bug happens with VolumelimitExceeded?","commit_id":"33d346fdcc84ff1349c85f5e3a7d602ab46bfe3e"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"cac787b8e590551e23aad1642ef69d20ce368bfc","unresolved":false,"context_lines":[{"line_number":2190,"context_line":"                model_update.update(retype_model_update)"},{"line_number":2191,"context_line":"            volume.update(model_update)"},{"line_number":2192,"context_line":"            volume.save()"},{"line_number":2193,"context_line":""},{"line_number":2194,"context_line":"        if old_reservations:"},{"line_number":2195,"context_line":"            QUOTAS.commit(context, old_reservations, project_id\u003dproject_id)"},{"line_number":2196,"context_line":"        if new_reservations:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_43eb61df","line":2193,"in_reply_to":"ba8a016a_5e8bb21e","updated":"2015-11-27 16:02:34.000000000","message":"Do you mean cinder/volume/api.py#L1542? It is a bit weird that exception is thrown even before we actually commit.","commit_id":"33d346fdcc84ff1349c85f5e3a7d602ab46bfe3e"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"634cf3b571d0d719ebeca785cad68598dbf8dac6","unresolved":false,"context_lines":[{"line_number":2190,"context_line":"                model_update.update(retype_model_update)"},{"line_number":2191,"context_line":"            volume.update(model_update)"},{"line_number":2192,"context_line":"            volume.save()"},{"line_number":2193,"context_line":""},{"line_number":2194,"context_line":"        if old_reservations:"},{"line_number":2195,"context_line":"            QUOTAS.commit(context, old_reservations, project_id\u003dproject_id)"},{"line_number":2196,"context_line":"        if new_reservations:"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_fe9e4362","line":2193,"in_reply_to":"ba8a016a_97a38dff","updated":"2015-11-21 16:47:27.000000000","message":"Until you commit -1 quota, you\u0027re unable to reserve +1. Am I wrong?","commit_id":"33d346fdcc84ff1349c85f5e3a7d602ab46bfe3e"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"0fc34b02ef6d2101ef57fa1a82fb93265a9ffe1e","unresolved":false,"context_lines":[{"line_number":2190,"context_line":"                model_update.update(retype_model_update)"},{"line_number":2191,"context_line":"            volume.update(model_update)"},{"line_number":2192,"context_line":"            volume.save()"},{"line_number":2193,"context_line":""},{"line_number":2194,"context_line":"        if old_reservations:"},{"line_number":2195,"context_line":"            QUOTAS.commit(context, old_reservations, project_id\u003dproject_id)"},{"line_number":2196,"context_line":"        if new_reservations:"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_5e8bb21e","line":2193,"in_reply_to":"ba8a016a_fe9e4362","updated":"2015-11-23 12:03:13.000000000","message":"Michal is right, the exception is not raised here, it\u0027s in cinder/api.py when cinder reserve this new_reservations for retyping.","commit_id":"33d346fdcc84ff1349c85f5e3a7d602ab46bfe3e"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"ebaf92db12f311de6964442dba6bbba75fcc254b","unresolved":false,"context_lines":[{"line_number":2091,"context_line":""},{"line_number":2092,"context_line":"        # Get old reservations"},{"line_number":2093,"context_line":"        try:"},{"line_number":2094,"context_line":"            reserve_opts \u003d {\u0027volumes\u0027: -1, \u0027gigabytes\u0027: -volume.size}"},{"line_number":2095,"context_line":"            QUOTAS.add_volume_type_opts(context,"},{"line_number":2096,"context_line":"                                        reserve_opts,"},{"line_number":2097,"context_line":"                                        volume.volume_type_id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_40cef763","line":2094,"updated":"2015-11-27 16:02:48.000000000","message":"Good to see line 2094 to 2102 be extracted into a common method. Because they duplicate with get_volume_type_reservation. But I\u0027m OK with what it is now.","commit_id":"982fd3daa4a34747b8f4fb0dad8b59b7d7b83a4e"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"7de8c44f16cd2e79b489e7ff5a12a72feaf310db","unresolved":false,"context_lines":[{"line_number":2091,"context_line":""},{"line_number":2092,"context_line":"        # Get old reservations"},{"line_number":2093,"context_line":"        try:"},{"line_number":2094,"context_line":"            reserve_opts \u003d {\u0027volumes\u0027: -1, \u0027gigabytes\u0027: -volume.size}"},{"line_number":2095,"context_line":"            QUOTAS.add_volume_type_opts(context,"},{"line_number":2096,"context_line":"                                        reserve_opts,"},{"line_number":2097,"context_line":"                                        volume.volume_type_id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_c8767c05","line":2094,"in_reply_to":"9a8ffd7b_40cef763","updated":"2015-11-28 10:04:07.000000000","message":"Since there are many places to use this block of codes, if we want to extract them, it\u0027s better to be another patch IMO.","commit_id":"982fd3daa4a34747b8f4fb0dad8b59b7d7b83a4e"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"00aa5e5157fc689d1a92643271b5d42df90ef408","unresolved":false,"context_lines":[{"line_number":2096,"context_line":"                                        reserve_opts,"},{"line_number":2097,"context_line":"                                        volume.volume_type_id)"},{"line_number":2098,"context_line":"            # We don\u0027t need to reserve volumes and gigabytes quota for retyping"},{"line_number":2099,"context_line":"            # operation since they didn\u0027t changed, just reserver volume_type"},{"line_number":2100,"context_line":"            # and type gigabytes is fine."},{"line_number":2101,"context_line":"            reserve_opts.pop(\u0027volumes\u0027)"},{"line_number":2102,"context_line":"            reserve_opts.pop(\u0027gigabytes\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba8a016a_233492dc","line":2099,"updated":"2015-11-23 13:32:36.000000000","message":"s/reserver/reserve","commit_id":"982fd3daa4a34747b8f4fb0dad8b59b7d7b83a4e"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"76f9d0c79de230b2fde9fd2afbf9a5eca78987e7","unresolved":false,"context_lines":[{"line_number":2096,"context_line":"                                        reserve_opts,"},{"line_number":2097,"context_line":"                                        volume.volume_type_id)"},{"line_number":2098,"context_line":"            # We don\u0027t need to reserve volumes and gigabytes quota for retyping"},{"line_number":2099,"context_line":"            # operation since they didn\u0027t changed, just reserver volume_type"},{"line_number":2100,"context_line":"            # and type gigabytes is fine."},{"line_number":2101,"context_line":"            reserve_opts.pop(\u0027volumes\u0027)"},{"line_number":2102,"context_line":"            reserve_opts.pop(\u0027gigabytes\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a710552_e451e963","line":2099,"in_reply_to":"ba8a016a_233492dc","updated":"2015-12-15 03:12:12.000000000","message":"Done","commit_id":"982fd3daa4a34747b8f4fb0dad8b59b7d7b83a4e"}]}
