)]}'
{"nova/virt/xenapi/vmops.py":[{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"fb1ce3e5778841f5a757ccfe694cafbd5bf754c9","unresolved":false,"context_lines":[{"line_number":1373,"context_line":""},{"line_number":1374,"context_line":"        for migration in migrations:"},{"line_number":1375,"context_line":"            LOG.info(_(\"Automatically confirming migration %d\"), migration.id)"},{"line_number":1376,"context_line":"            instance \u003d db.instance_get_by_uuid(ctxt, migration.instance_uuid)"},{"line_number":1377,"context_line":"            self.compute_api.confirm_resize(ctxt, instance)"},{"line_number":1378,"context_line":""},{"line_number":1379,"context_line":"    def get_info(self, instance):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEn%2F%2F9cE%3D","line":1376,"updated":"2012-02-08 13:55:52.000000000","message":"Nice catch. But what if the instance was deleted already? Should you handle an exception.NotFound? Also, if we are using the compute api for the resize, is there any reason not to use it for the instance_get?","commit_id":"82700906e16d8960091af5c7eb27f9da6bd3c15d"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"a293bcbb3f7d27c7de74fb03ac2b60dcf3b5a890","unresolved":false,"context_lines":[{"line_number":1373,"context_line":""},{"line_number":1374,"context_line":"        for migration in migrations:"},{"line_number":1375,"context_line":"            LOG.info(_(\"Automatically confirming migration %d\"), migration.id)"},{"line_number":1376,"context_line":"            instance \u003d db.instance_get_by_uuid(ctxt, migration.instance_uuid)"},{"line_number":1377,"context_line":"            self.compute_api.confirm_resize(ctxt, instance)"},{"line_number":1378,"context_line":""},{"line_number":1379,"context_line":"    def get_info(self, instance):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEn%2F%2F9SY%3D","line":1376,"in_reply_to":"AAAAEn%2F%2F9Ts%3D","updated":"2012-02-08 18:17:22.000000000","message":"\u003e Seems like we could also mark it as confirmed, so that we don\u0027t hit the same migration next time we run the loop. \n\nHmm yeah, I\u0027d be worry about performing an action which destroys data when we have an inconsistent view of our state.\n\nBut I like the idea of marking the migration so that we don\u0027t hit it again and again. Perhaps we can put the migration into an ERROR state.\n\n\u003e Compute api contract is loosely defined such that you only call it with objects returned by it.\n\nAh wasn\u0027t aware of those semantics, I\u0027ll go ahead and make that change.","commit_id":"82700906e16d8960091af5c7eb27f9da6bd3c15d"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"b559099a03b032dda249db19bc8c4e1923acef0f","unresolved":false,"context_lines":[{"line_number":1373,"context_line":""},{"line_number":1374,"context_line":"        for migration in migrations:"},{"line_number":1375,"context_line":"            LOG.info(_(\"Automatically confirming migration %d\"), migration.id)"},{"line_number":1376,"context_line":"            instance \u003d db.instance_get_by_uuid(ctxt, migration.instance_uuid)"},{"line_number":1377,"context_line":"            self.compute_api.confirm_resize(ctxt, instance)"},{"line_number":1378,"context_line":""},{"line_number":1379,"context_line":"    def get_info(self, instance):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEn%2F%2F9Ts%3D","line":1376,"in_reply_to":"AAAAEn%2F%2F9XU%3D","updated":"2012-02-08 18:02:21.000000000","message":"\u003eGood question. If the instance is already deleted, I suppose the best option is to just log the mismatch and let ops recover from the bad data.\n\nSeems like we could also mark it as confirmed, so that we don\u0027t hit the same migration next time we run the loop. But I\u0027m happy with anything that doesn\u0027t prevent the non-deleted instances from getting confirmed.\n\n\u003e Is there a reason why compute_api would be better here?\n\nCompute api contract is loosely defined such that you only call it with objects returned by it.","commit_id":"82700906e16d8960091af5c7eb27f9da6bd3c15d"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"9c9065ae2a2fe9da31c6de7e132d310a826af7b5","unresolved":false,"context_lines":[{"line_number":1373,"context_line":""},{"line_number":1374,"context_line":"        for migration in migrations:"},{"line_number":1375,"context_line":"            LOG.info(_(\"Automatically confirming migration %d\"), migration.id)"},{"line_number":1376,"context_line":"            instance \u003d db.instance_get_by_uuid(ctxt, migration.instance_uuid)"},{"line_number":1377,"context_line":"            self.compute_api.confirm_resize(ctxt, instance)"},{"line_number":1378,"context_line":""},{"line_number":1379,"context_line":"    def get_info(self, instance):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEn%2F%2F9XU%3D","line":1376,"in_reply_to":"AAAAEn%2F%2F9cE%3D","updated":"2012-02-08 16:43:13.000000000","message":"\u003e But what if the instance was deleted already?\n\nGood question. If the instance is already deleted, I suppose the best option is to just log the mismatch and let ops recover from the bad data.\n\n\u003e if we are using the compute api for the resize, is there any reason not to use it for the instance_get?\n\nReally just went w/ db api directly since it was already used earlier in the method.\n\nIs there a reason why compute_api would be better here?","commit_id":"82700906e16d8960091af5c7eb27f9da6bd3c15d"}]}
