)]}'
{"nova/compute/api.py":[{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"05b590b5fb9c0de48690bcbdf87c3eb7b729a92c","unresolved":false,"context_lines":[{"line_number":1034,"context_line":"            # NOTE(comstud): If we delete the instance locally, we\u0027ll"},{"line_number":1035,"context_line":"            # commit the reservations here.  Otherwise, the manager side"},{"line_number":1036,"context_line":"            # will commit or rollback the reservations based on success."},{"line_number":1037,"context_line":"            reservations \u003d self._create_reservations(context,"},{"line_number":1038,"context_line":"                                                     old,"},{"line_number":1039,"context_line":"                                                     updated,"},{"line_number":1040,"context_line":"                                                     project_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAN3%2F%2F0Vc%3D","line":1037,"updated":"2013-03-11 16:06:55.000000000","message":"It looks like this might be susceptible to a race and create multiple \"delete\" reservations.  I think that\u0027s what the state checks where doing here previously.","commit_id":"20a039896bdbe2a2206bc3cc7ae8031266f126a0"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"5e5822c4e9e105d37ac1d65adb75d623bc48ff7e","unresolved":false,"context_lines":[{"line_number":1034,"context_line":"            # NOTE(comstud): If we delete the instance locally, we\u0027ll"},{"line_number":1035,"context_line":"            # commit the reservations here.  Otherwise, the manager side"},{"line_number":1036,"context_line":"            # will commit or rollback the reservations based on success."},{"line_number":1037,"context_line":"            reservations \u003d self._create_reservations(context,"},{"line_number":1038,"context_line":"                                                     old,"},{"line_number":1039,"context_line":"                                                     updated,"},{"line_number":1040,"context_line":"                                                     project_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAN3%2F%2F0Po%3D","line":1037,"in_reply_to":"AAAAN3%2F%2F0Vc%3D","updated":"2013-03-11 16:24:10.000000000","message":"Since the manager side is responsible for rolling back or committing, you have to create the reservations on every single attempt.  Only *1* will get committed.  The rest will get rolled back (or worst case in the event of compute restarting, will time out).   There\u0027s one thing that\u0027s not quite right in this patch yet, which is soft deletes.  They are a little funky.","commit_id":"20a039896bdbe2a2206bc3cc7ae8031266f126a0"}],"nova/compute/manager.py":[{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"85b5bad27c742349b78870e5461f4c4af9903243","unresolved":false,"context_lines":[{"line_number":1244,"context_line":""},{"line_number":1245,"context_line":"        try:"},{"line_number":1246,"context_line":"            do_terminate_instance(instance, bdms)"},{"line_number":1247,"context_line":"            if reservations:"},{"line_number":1248,"context_line":"                QUOTAS.commit(reservations)"},{"line_number":1249,"context_line":"        except Exception:"},{"line_number":1250,"context_line":"            with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2BtyE%3D","line":1247,"updated":"2013-02-20 21:27:02.000000000","message":"I guess this isn\u0027t quite right.  If TerminationFailure gets hit above... the quotas have been rolled back.  May need to move this commit to the above method.","commit_id":"7921c68eb44adb95bbbaefad37b56defa23c7e7a"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"05b590b5fb9c0de48690bcbdf87c3eb7b729a92c","unresolved":false,"context_lines":[{"line_number":1268,"context_line":"                                                           instance, bdms)"},{"line_number":1269,"context_line":"        except Exception:"},{"line_number":1270,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1271,"context_line":"                self._quota_rollback(context, reservations,"},{"line_number":1272,"context_line":"                                     project_id\u003dproject_id)"},{"line_number":1273,"context_line":""},{"line_number":1274,"context_line":"        self._quota_commit(context, reservations, project_id\u003dproject_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAN3%2F%2F0R4%3D","line":1271,"updated":"2013-03-11 16:06:55.000000000","message":"Is rolling back the reservations the right behavior?\n\nAssume that the delete gets half-done, rendering the instance unusable.  Rolling back the reservation here means continuing to count a broken instance against the user\u0027s quotas, right?\n\nI\u0027m wondering if it would make more sense to err on the side of the user and commit the reservations.","commit_id":"20a039896bdbe2a2206bc3cc7ae8031266f126a0"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"5e5822c4e9e105d37ac1d65adb75d623bc48ff7e","unresolved":false,"context_lines":[{"line_number":1268,"context_line":"                                                           instance, bdms)"},{"line_number":1269,"context_line":"        except Exception:"},{"line_number":1270,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1271,"context_line":"                self._quota_rollback(context, reservations,"},{"line_number":1272,"context_line":"                                     project_id\u003dproject_id)"},{"line_number":1273,"context_line":""},{"line_number":1274,"context_line":"        self._quota_commit(context, reservations, project_id\u003dproject_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAN3%2F%2F0PE%3D","line":1271,"in_reply_to":"AAAAN3%2F%2F0R4%3D","updated":"2013-03-11 16:24:10.000000000","message":"Yeah, I\u0027m not sure which is technically correct.  However, this is the best way to make sure quotas remain in sync without significant overhaul to the quota stuff.  I\u0027m using the deleting of the instance record as a way to determine if the quota has been applied.  If I were to change the above to decrement the quota counts on a failure to delete... A future \u0027delete\u0027 that succeeds would try to decrement the quota again.  Right now there\u0027s no marker in the DB to say whether or not the quota is applied for this instance.  We could use system_metadata for that... but I\u0027m not sure that\u0027s the right solution... and either way, is probably best held back for H.","commit_id":"20a039896bdbe2a2206bc3cc7ae8031266f126a0"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"05b590b5fb9c0de48690bcbdf87c3eb7b729a92c","unresolved":false,"context_lines":[{"line_number":1379,"context_line":"                                         project_id\u003dproject_id)"},{"line_number":1380,"context_line":"        except Exception:"},{"line_number":1381,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1382,"context_line":"                self._quota_rollback(context, reservations,"},{"line_number":1383,"context_line":"                                     project_id\u003dproject_id)"},{"line_number":1384,"context_line":"        try:"},{"line_number":1385,"context_line":"            current_power_state \u003d self._get_power_state(context, instance)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAN3%2F%2F0Ro%3D","line":1382,"updated":"2013-03-11 16:06:55.000000000","message":"Same comment about rollback","commit_id":"20a039896bdbe2a2206bc3cc7ae8031266f126a0"}],"nova/compute/rpcapi.py":[{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"abb74e49b283519997ff3432d72bda515da5c70d","unresolved":false,"context_lines":[{"line_number":597,"context_line":"                instance\u003dinstance_p, bdms\u003dbdms_p,"},{"line_number":598,"context_line":"                reservations\u003dreservations),"},{"line_number":599,"context_line":"                topic\u003d_compute_topic(self.topic, ctxt, None, instance),"},{"line_number":600,"context_line":"                version\u003d\u00272.27\u0027)"},{"line_number":601,"context_line":""},{"line_number":602,"context_line":"    def unpause_instance(self, ctxt, instance):"},{"line_number":603,"context_line":"        instance_p \u003d jsonutils.to_primitive(instance)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAN3%2F%2Fze4%3D","line":600,"updated":"2013-03-11 23:22:04.000000000","message":"learned something new...looks like 2.4 is *older* than 2.27 :)","commit_id":"19fddc2e479fcfbaa3b4e62d1b67318c17fe0283"}]}
