)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"74121fec46c5a28a88325ca9c2a8d69a351d99ea","unresolved":false,"context_lines":[{"line_number":19,"context_line":"This change fixes the above bug by using quota object while"},{"line_number":20,"context_line":"reserving quota deltas."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Another bug in auto confirmation is also fixed in this commit,"},{"line_number":23,"context_line":"it is that, if the confirmation is launched through periodic task,"},{"line_number":24,"context_line":"then the project_id and user_id in context are all None, which"},{"line_number":25,"context_line":"result in reservations in DB are also have `NULL` project_id and"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"AAAAUH%2F%2Bzbc%3D","line":22,"updated":"2014-01-21 23:04:53.000000000","message":"If there is a separate bug, it should be in a separate patch.  Is there something preventing that?","commit_id":"c7e918df453caf449b9718f5ad9cffa547904168"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"c1cfbaacc64a35e301a958d95ea82adbfd9afef7","unresolved":false,"context_lines":[{"line_number":15,"context_line":"But if the confirm operation is launched from nova-compute"},{"line_number":16,"context_line":"through periodic task \u0027_poll_unconfirmed_resizes\u0027, this direct"},{"line_number":17,"context_line":"DB access is forbidden and the auto confirmation is failed."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"This change fixes the above bug by using quota object while"},{"line_number":20,"context_line":"reserving quota deltas."},{"line_number":21,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"AAAAUH%2F%2BwGg%3D","line":18,"updated":"2014-01-22 14:31:19.000000000","message":"based on the changes separated, update this commit message is needed","commit_id":"7bd92d7da2c707f02b164d309d4c853afa5f1c10"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c3f8c156e1cfbccddc34503c521e2f2762d5c982","unresolved":false,"context_lines":[{"line_number":15,"context_line":"But if the confirm operation is launched from nova-compute"},{"line_number":16,"context_line":"through periodic task \u0027_poll_unconfirmed_resizes\u0027, this direct"},{"line_number":17,"context_line":"DB access is forbidden and the auto confirmation is failed."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"This change fixes the above bug by using quota object while"},{"line_number":20,"context_line":"reserving quota deltas."},{"line_number":21,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"AAAAUH%2F%2BmRU%3D","line":18,"in_reply_to":"AAAAUH%2F%2BszQ%3D","updated":"2014-01-24 00:34:41.000000000","message":"I think the commit message is OK as far as the other problem is split into a different bug/patch.","commit_id":"7bd92d7da2c707f02b164d309d4c853afa5f1c10"},{"author":{"_account_id":4468,"name":"Wangpan","email":"hzwangpan@corp.netease.com","username":"hzwangpan"},"change_message_id":"931cd66f76517f1f17eb8b286965b641e6ea1f3d","unresolved":false,"context_lines":[{"line_number":15,"context_line":"But if the confirm operation is launched from nova-compute"},{"line_number":16,"context_line":"through periodic task \u0027_poll_unconfirmed_resizes\u0027, this direct"},{"line_number":17,"context_line":"DB access is forbidden and the auto confirmation is failed."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"This change fixes the above bug by using quota object while"},{"line_number":20,"context_line":"reserving quota deltas."},{"line_number":21,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"AAAAUH%2F%2BszQ%3D","line":18,"in_reply_to":"AAAAUH%2F%2BwGg%3D","updated":"2014-01-23 01:50:19.000000000","message":"I think I have changed the commit message, if I miss something, please tell me.","commit_id":"7bd92d7da2c707f02b164d309d4c853afa5f1c10"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c3f8c156e1cfbccddc34503c521e2f2762d5c982","unresolved":false,"context_lines":[{"line_number":16,"context_line":"through periodic task \u0027_poll_unconfirmed_resizes\u0027, this direct"},{"line_number":17,"context_line":"DB access is forbidden and the auto confirmation is failed."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"This change fixes the above bug by using quota object while"},{"line_number":20,"context_line":"reserving quota deltas."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Closes-bug: #1262461"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"AAAAUH%2F%2BmRA%3D","line":19,"updated":"2014-01-24 00:34:41.000000000","message":"I\u0027d like a bit of an explanation of why using the object over the direct DB access makes this work now because it\u0027s a bit of a mystery to me at this point.  Granted, I haven\u0027t dug into both flows to compare them to see what the difference is, but if it\u0027s a trivial/straight-forward explanation, it\u0027d be good to call it out here.","commit_id":"7bd92d7da2c707f02b164d309d4c853afa5f1c10"},{"author":{"_account_id":4468,"name":"Wangpan","email":"hzwangpan@corp.netease.com","username":"hzwangpan"},"change_message_id":"0ad54a5e00bc9e659dc0bca9631cb1cbbc7f10e9","unresolved":false,"context_lines":[{"line_number":16,"context_line":"through periodic task \u0027_poll_unconfirmed_resizes\u0027, this direct"},{"line_number":17,"context_line":"DB access is forbidden and the auto confirmation is failed."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"This change fixes the above bug by using quota object while"},{"line_number":20,"context_line":"reserving quota deltas."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Closes-bug: #1262461"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"AAAAUH%2F%2Bl8I%3D","line":19,"in_reply_to":"AAAAUH%2F%2BmRA%3D","updated":"2014-01-24 02:17:44.000000000","message":"you can refer to this commit for the quota object: https://review.openstack.org/#/c/39988","commit_id":"7bd92d7da2c707f02b164d309d4c853afa5f1c10"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"572f3142d9f33bb4ccc010807eabf1dee25bd7c8","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Wangpan \u003chzwangpan@corp.netease.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-02-06 11:14:08 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fixes auto comfirmation failed because db access"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The _reserve_quota_delta() method in compute/api.py reserves"},{"line_number":10,"context_line":"quotas in DB if deltas is not empty, and it will be called by"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"AAAAUH%2F9ims%3D","line":7,"updated":"2014-02-06 06:58:11.000000000","message":"comfirmation \u003d\u003e confirmation\n\nbecause db  \u003d\u003e because of db","commit_id":"7f5b5f5761b8c667082c639ddf9a6a94e74b587e"},{"author":{"_account_id":4468,"name":"Wangpan","email":"hzwangpan@corp.netease.com","username":"hzwangpan"},"change_message_id":"66b3379328023a2bb5471039dc5cd68afb562319","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Wangpan \u003chzwangpan@corp.netease.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-02-06 11:14:08 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fixes auto comfirmation failed because db access"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The _reserve_quota_delta() method in compute/api.py reserves"},{"line_number":10,"context_line":"quotas in DB if deltas is not empty, and it will be called by"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"AAAAUX%2F%2F8Tw%3D","line":7,"in_reply_to":"AAAAUH%2F9ims%3D","updated":"2014-02-09 01:44:58.000000000","message":"Done","commit_id":"7f5b5f5761b8c667082c639ddf9a6a94e74b587e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"572f3142d9f33bb4ccc010807eabf1dee25bd7c8","unresolved":false,"context_lines":[{"line_number":11,"context_line":"confirm_resize method."},{"line_number":12,"context_line":"If the confirm resize operation is launched from users through"},{"line_number":13,"context_line":"RESTful API, this direct DB access is allowed, and the confirm"},{"line_number":14,"context_line":"operation will success."},{"line_number":15,"context_line":"But if the confirm operation is launched from nova-compute"},{"line_number":16,"context_line":"through periodic task \u0027_poll_unconfirmed_resizes\u0027, this direct"},{"line_number":17,"context_line":"DB access is forbidden and the auto confirmation is failed."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"AAAAUH%2F9img%3D","line":14,"updated":"2014-02-06 06:58:11.000000000","message":"success \u003d\u003e succeed","commit_id":"7f5b5f5761b8c667082c639ddf9a6a94e74b587e"},{"author":{"_account_id":4468,"name":"Wangpan","email":"hzwangpan@corp.netease.com","username":"hzwangpan"},"change_message_id":"66b3379328023a2bb5471039dc5cd68afb562319","unresolved":false,"context_lines":[{"line_number":11,"context_line":"confirm_resize method."},{"line_number":12,"context_line":"If the confirm resize operation is launched from users through"},{"line_number":13,"context_line":"RESTful API, this direct DB access is allowed, and the confirm"},{"line_number":14,"context_line":"operation will success."},{"line_number":15,"context_line":"But if the confirm operation is launched from nova-compute"},{"line_number":16,"context_line":"through periodic task \u0027_poll_unconfirmed_resizes\u0027, this direct"},{"line_number":17,"context_line":"DB access is forbidden and the auto confirmation is failed."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"AAAAUX%2F%2F8T0%3D","line":14,"in_reply_to":"AAAAUH%2F9img%3D","updated":"2014-02-09 01:44:58.000000000","message":"Done","commit_id":"7f5b5f5761b8c667082c639ddf9a6a94e74b587e"}],"nova/compute/api.py":[{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"5cb0296a32248a34101cb9c05173a2d424b6fe4e","unresolved":false,"context_lines":[{"line_number":2245,"context_line":"    def _reserve_quota_delta(context, deltas, project_id\u003dNone,"},{"line_number":2246,"context_line":"                             conductor_api\u003dNone):"},{"line_number":2247,"context_line":"        if not deltas:"},{"line_number":2248,"context_line":"            return"},{"line_number":2249,"context_line":""},{"line_number":2250,"context_line":"        if conductor_api:"},{"line_number":2251,"context_line":"            return conductor_api.quota_reserve(context,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAT3%2F%2F4C0%3D","line":2248,"updated":"2013-12-28 18:55:23.000000000","message":"A fix using quotas object would look something like this:\n\n from nova.objects import quotas as quotas_obj\n\n quotas \u003d quotas_obj.Quotas()\n quotas.reserve(context, project_id\u003dproject_id, **deltas)\n return quotas.reservations","commit_id":"2d620451e614c710cb1d152a239dbacf9d60511f"},{"author":{"_account_id":4468,"name":"Wangpan","email":"hzwangpan@corp.netease.com","username":"hzwangpan"},"change_message_id":"6a16e6962764baee5701765566d372c776242a77","unresolved":false,"context_lines":[{"line_number":2245,"context_line":"    def _reserve_quota_delta(context, deltas, project_id\u003dNone,"},{"line_number":2246,"context_line":"                             conductor_api\u003dNone):"},{"line_number":2247,"context_line":"        if not deltas:"},{"line_number":2248,"context_line":"            return"},{"line_number":2249,"context_line":""},{"line_number":2250,"context_line":"        if conductor_api:"},{"line_number":2251,"context_line":"            return conductor_api.quota_reserve(context,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAT3%2F%2F2yU%3D","line":2248,"in_reply_to":"AAAAT3%2F%2F4C0%3D","updated":"2013-12-30 03:41:38.000000000","message":"Thanks Hans, I thought the quotas object is not added in Havana, but it has been added there, I\u0027ll change it.","commit_id":"2d620451e614c710cb1d152a239dbacf9d60511f"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"572f3142d9f33bb4ccc010807eabf1dee25bd7c8","unresolved":false,"context_lines":[{"line_number":2304,"context_line":"            return"},{"line_number":2305,"context_line":""},{"line_number":2306,"context_line":"        quotas \u003d quotas_obj.Quotas()"},{"line_number":2307,"context_line":"        quotas.reserve(context, project_id\u003dproject_id, **deltas)"},{"line_number":2308,"context_line":"        return quotas.reservations"},{"line_number":2309,"context_line":""},{"line_number":2310,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F9il8%3D","line":2307,"updated":"2014-02-06 06:58:11.000000000","message":"do we need to do a quatas.save()?","commit_id":"7f5b5f5761b8c667082c639ddf9a6a94e74b587e"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"4a57f9b020788876dc1d592271a35361cc45c331","unresolved":false,"context_lines":[{"line_number":2304,"context_line":"            return"},{"line_number":2305,"context_line":""},{"line_number":2306,"context_line":"        quotas \u003d quotas_obj.Quotas()"},{"line_number":2307,"context_line":"        quotas.reserve(context, project_id\u003dproject_id, **deltas)"},{"line_number":2308,"context_line":"        return quotas.reservations"},{"line_number":2309,"context_line":""},{"line_number":2310,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F9eHs%3D","line":2307,"in_reply_to":"AAAAUH%2F9il8%3D","updated":"2014-02-06 17:31:37.000000000","message":"I don\u0027t think so.\nThe reserve method ends up making a db call that creates the reservation and it will be stored in the quotas object.\n\nSee https://github.com/openstack/nova/blob/master/nova/objects/quotas.py#L68","commit_id":"7f5b5f5761b8c667082c639ddf9a6a94e74b587e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"634fcdb4e99c71e06caa105734915d032ae6a87f","unresolved":false,"context_lines":[{"line_number":2285,"context_line":"        return API._resize_quota_delta(context, new_flavor, old_flavor, 1, -1)"},{"line_number":2286,"context_line":""},{"line_number":2287,"context_line":"    @staticmethod"},{"line_number":2288,"context_line":"    def _reserve_quota_delta(context, deltas, project_id\u003dNone):"},{"line_number":2289,"context_line":"        if not deltas:"},{"line_number":2290,"context_line":"            return"},{"line_number":2291,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAWH%2F%2FVzo%3D","line":2288,"updated":"2014-03-18 14:20:33.000000000","message":"I actually prefer my change https://review.openstack.org/#/c/81099/ because it\u0027s scaffolding the changes for using objects in other methods, not just working around them, i.e. when returning the object back to confirm_resize we can commit it in the cells case.","commit_id":"62d09b62b88cee958c7f67276dc667cee9491ec1"}],"nova/compute/manager.py":[{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"170838fc7485f73fa5aa12e96864b015a3bcb634","unresolved":false,"context_lines":[{"line_number":4544,"context_line":"                                                migration\u003dmigration)"},{"line_number":4545,"context_line":"            except Exception as e:"},{"line_number":4546,"context_line":"                LOG.error(_(\"Error auto-confirming resize: %s. \""},{"line_number":4547,"context_line":"                            \"Will retry later.\") % e, context\u003dcopied_ctxt,"},{"line_number":4548,"context_line":"                            instance\u003dinstance)"},{"line_number":4549,"context_line":""},{"line_number":4550,"context_line":"    @periodic_task.periodic_task(spacing\u003dCONF.shelved_poll_interval)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2By3Y%3D","line":4547,"updated":"2014-01-22 03:04:04.000000000","message":"Why do we need to put \"context\" here?","commit_id":"fa759d6b25a27be75ef1e5b4884e46aecf0bf7bf"},{"author":{"_account_id":4468,"name":"Wangpan","email":"hzwangpan@corp.netease.com","username":"hzwangpan"},"change_message_id":"c476b77d4231f4efe6aeb764ef1551fa71f16d13","unresolved":false,"context_lines":[{"line_number":4544,"context_line":"                                                migration\u003dmigration)"},{"line_number":4545,"context_line":"            except Exception as e:"},{"line_number":4546,"context_line":"                LOG.error(_(\"Error auto-confirming resize: %s. \""},{"line_number":4547,"context_line":"                            \"Will retry later.\") % e, context\u003dcopied_ctxt,"},{"line_number":4548,"context_line":"                            instance\u003dinstance)"},{"line_number":4549,"context_line":""},{"line_number":4550,"context_line":"    @periodic_task.periodic_task(spacing\u003dCONF.shelved_poll_interval)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2ByKY%3D","line":4547,"in_reply_to":"AAAAUH%2F%2By3Y%3D","updated":"2014-01-22 06:57:01.000000000","message":"I just want to log more info, but it may be not so useful, I will remove it.","commit_id":"fa759d6b25a27be75ef1e5b4884e46aecf0bf7bf"}],"nova/tests/compute/test_compute_api.py":[{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"75945ed116e0f3c9158da4a1fd71410dbc7a2766","unresolved":false,"context_lines":[{"line_number":790,"context_line":"                    self.context, fake_inst[\u0027uuid\u0027], \u0027finished\u0027).AndReturn("},{"line_number":791,"context_line":"                            fake_mig)"},{"line_number":792,"context_line":""},{"line_number":793,"context_line":"        deltas \u003d {\u0027ram\u0027: -128}"},{"line_number":794,"context_line":"        self.compute_api._downsize_quota_delta(self.context,"},{"line_number":795,"context_line":"                                               fake_inst).AndReturn(deltas)"},{"line_number":796,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAWH%2F%2FrC0%3D","line":793,"updated":"2014-03-14 15:21:09.000000000","message":"Is this value used, or is it basically just chosen randomly?","commit_id":"69fe8ce690c64c392c1ff6edeebbe07ddba34853"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"75945ed116e0f3c9158da4a1fd71410dbc7a2766","unresolved":false,"context_lines":[{"line_number":802,"context_line":""},{"line_number":803,"context_line":"            def reserve(cls, context, expire\u003dNone, project_id\u003dNone,"},{"line_number":804,"context_line":"                        user_id\u003dNone, **deltas):"},{"line_number":805,"context_line":"                self.assertIsNone(project_id)"},{"line_number":806,"context_line":""},{"line_number":807,"context_line":"        quotas_obj.Quotas().AndReturn(FakeQuotaObj())"},{"line_number":808,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAWH%2F%2FrCQ%3D","line":805,"updated":"2014-03-14 15:21:09.000000000","message":"Seems like you could at least assert the deltas or something?","commit_id":"69fe8ce690c64c392c1ff6edeebbe07ddba34853"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"634fcdb4e99c71e06caa105734915d032ae6a87f","unresolved":false,"context_lines":[{"line_number":804,"context_line":""},{"line_number":805,"context_line":"        resvs \u003d [\u0027resvs\u0027]"},{"line_number":806,"context_line":""},{"line_number":807,"context_line":"        class FakeQuotaObj():"},{"line_number":808,"context_line":"            def __init__(self):"},{"line_number":809,"context_line":"                self.reservations \u003d resvs"},{"line_number":810,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAWH%2F%2FV0U%3D","line":807,"updated":"2014-03-18 14:20:33.000000000","message":"Why is this all needed?  See how I\u0027m handling the tests in my change:\n\nhttps://review.openstack.org/#/c/81099/","commit_id":"62d09b62b88cee958c7f67276dc667cee9491ec1"}]}
