)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"d26138443a8d790e9a6222204d81536df983450e","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"I0f3ab6604d8b79bdb75cf67571e359cfecc039d8 then landed in Rocky and"},{"line_number":16,"context_line":"introduced additional logic for cleaning up pre_live_migration failures."},{"line_number":17,"context_line":"Specifically a new _cleanup_pre_live_migration method that called an"},{"line_number":18,"context_line":"existing _rollback_live_migration method. The latter already containing"},{"line_number":19,"context_line":"volume attachment rollback logic from"},{"line_number":20,"context_line":"I0bfb11296430dfffe9b091ae7c3a793617bd9d0d."},{"line_number":21,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9f560f44_bca36e4f","line":18,"range":{"start_line":17,"start_character":0,"end_line":18,"end_character":40},"updated":"2020-07-27 19:50:20.000000000","message":"Technically that wasn\u0027t new behaviour. Looking at [1], _rollback_live_migration() was already being called if pre_live_migration() failed.\n\n[1] https://review.opendev.org/#/c/558001/10/nova/compute/manager.py@a6106","commit_id":"fee8eaaf6463886f66637fe3710482f3b5615024"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"f5dceef62166ab73de213cdcecf8e34ba3dc512d","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"I0f3ab6604d8b79bdb75cf67571e359cfecc039d8 then landed in Rocky and"},{"line_number":16,"context_line":"introduced additional logic for cleaning up pre_live_migration failures."},{"line_number":17,"context_line":"Specifically a new _cleanup_pre_live_migration method that called an"},{"line_number":18,"context_line":"existing _rollback_live_migration method. The latter already containing"},{"line_number":19,"context_line":"volume attachment rollback logic from"},{"line_number":20,"context_line":"I0bfb11296430dfffe9b091ae7c3a793617bd9d0d."},{"line_number":21,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9f560f44_173b55d1","line":18,"range":{"start_line":17,"start_character":0,"end_line":18,"end_character":40},"in_reply_to":"9f560f44_bca36e4f","updated":"2020-07-27 19:55:39.000000000","message":"Gah! Thanks, I\u0027ll remove references to this when I respin.","commit_id":"fee8eaaf6463886f66637fe3710482f3b5615024"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8dca14ed62f2c239202a740d083952b08bc32f8a","unresolved":false,"context_lines":[{"line_number":18,"context_line":"As a result after a failure in pre_live_migration"},{"line_number":19,"context_line":"_rollback_live_migration will attempt to delete the source host volume"},{"line_number":20,"context_line":"attachments referenced by the bdm before updating the bdms with the now"},{"line_number":21,"context_line":"non-existent attachment ids. Leaving the volumes in an `available` state"},{"line_number":22,"context_line":"in Cinder as they have no attachment records associated with them"},{"line_number":23,"context_line":"anymore."},{"line_number":24,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9f560f44_7f809e8c","line":21,"range":{"start_line":21,"start_character":27,"end_line":21,"end_character":30},"updated":"2020-07-28 10:21:15.000000000","message":", l","commit_id":"46fcc2303d161203769814a60339229a31fe5dc9"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"74f39946af8cc39e3a02557a6769e712152b502f","unresolved":false,"context_lines":[{"line_number":42,"context_line":"* I6bc73e8c8f98d9955f33f309beb8a7c56981b553 then refactored"},{"line_number":43,"context_line":"  _rollback_live_migration, moving the logic into a self contained"},{"line_number":44,"context_line":"  _rollback_volume_bdms method."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"Closes-Bug: #1889108"},{"line_number":47,"context_line":"Change-Id: I9edb36c4df1cc0d8b529e669f06540de71766085"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"9f560f44_6f8435d5","line":45,"updated":"2020-07-30 23:16:56.000000000","message":"Excellent commit message ++","commit_id":"76362fad58b8a19871fdb531e9921192078689c8"}],"nova/compute/manager.py":[{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"d26138443a8d790e9a6222204d81536df983450e","unresolved":false,"context_lines":[{"line_number":7810,"context_line":"                                bdms\u003dbdms)"},{"line_number":7811,"context_line":""},{"line_number":7812,"context_line":"            # The driver pre_live_migration will plug vifs on the host"},{"line_number":7813,"context_line":"            migrate_data \u003d self.driver.pre_live_migration(context,"},{"line_number":7814,"context_line":"                                           instance,"},{"line_number":7815,"context_line":"                                           block_device_info,"},{"line_number":7816,"context_line":"                                           network_info,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_5c769208","line":7813,"range":{"start_line":7813,"start_character":39,"end_line":7813,"end_character":57},"updated":"2020-07-27 19:50:20.000000000","message":"So if this fails...","commit_id":"fee8eaaf6463886f66637fe3710482f3b5615024"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"d26138443a8d790e9a6222204d81536df983450e","unresolved":false,"context_lines":[{"line_number":7839,"context_line":"                for bdm in bdms:"},{"line_number":7840,"context_line":"                    if (bdm.is_volume and bdm.attachment_id is not None and"},{"line_number":7841,"context_line":"                            bdm.volume_id in old_attachments):"},{"line_number":7842,"context_line":"                        self.volume_api.attachment_delete(context,"},{"line_number":7843,"context_line":"                                                          bdm.attachment_id)"},{"line_number":7844,"context_line":"                        bdm.attachment_id \u003d old_attachments[bdm.volume_id]"},{"line_number":7845,"context_line":"                        bdm.save()"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_fc516664","line":7842,"range":{"start_line":7842,"start_character":40,"end_line":7842,"end_character":57},"updated":"2020-07-27 19:50:20.000000000","message":"We delete the new attachments on the destination here...","commit_id":"fee8eaaf6463886f66637fe3710482f3b5615024"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"d26138443a8d790e9a6222204d81536df983450e","unresolved":false,"context_lines":[{"line_number":7841,"context_line":"                            bdm.volume_id in old_attachments):"},{"line_number":7842,"context_line":"                        self.volume_api.attachment_delete(context,"},{"line_number":7843,"context_line":"                                                          bdm.attachment_id)"},{"line_number":7844,"context_line":"                        bdm.attachment_id \u003d old_attachments[bdm.volume_id]"},{"line_number":7845,"context_line":"                        bdm.save()"},{"line_number":7846,"context_line":""},{"line_number":7847,"context_line":"        # Volume connections are complete, tell cinder that all the"},{"line_number":7848,"context_line":"        # attachments have completed."}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_dcd0e2cc","line":7845,"range":{"start_line":7844,"start_character":24,"end_line":7845,"end_character":34},"updated":"2020-07-27 19:50:20.000000000","message":"And set the bdms to the old (source) attachments here.","commit_id":"fee8eaaf6463886f66637fe3710482f3b5615024"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"d26138443a8d790e9a6222204d81536df983450e","unresolved":false,"context_lines":[{"line_number":8613,"context_line":"            try:"},{"line_number":8614,"context_line":"                original_bdm \u003d original_bdms_by_volid[bdm.volume_id]"},{"line_number":8615,"context_line":"                if (bdm.attachment_id and original_bdm.attachment_id and"},{"line_number":8616,"context_line":"                    bdm.attachment_id !\u003d original_bdm.attachment_id):"},{"line_number":8617,"context_line":"                    # NOTE(lyarwood): 3.44 cinder api flow. Delete the"},{"line_number":8618,"context_line":"                    # attachment used by the bdm and reset it to that of"},{"line_number":8619,"context_line":"                    # the original bdm."}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_7c671627","line":8616,"updated":"2020-07-27 19:50:20.000000000","message":"I mean this is pure hax, and at some point we\u0027ll have to untangle all of this pre-post-over-under-super-hyper-live-migration stuff, but in the interest of fixing this and backporting the fix, OK.","commit_id":"fee8eaaf6463886f66637fe3710482f3b5615024"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"d26138443a8d790e9a6222204d81536df983450e","unresolved":false,"context_lines":[{"line_number":8617,"context_line":"                    # NOTE(lyarwood): 3.44 cinder api flow. Delete the"},{"line_number":8618,"context_line":"                    # attachment used by the bdm and reset it to that of"},{"line_number":8619,"context_line":"                    # the original bdm."},{"line_number":8620,"context_line":"                    self.volume_api.attachment_delete(context,"},{"line_number":8621,"context_line":"                                                      bdm.attachment_id)"},{"line_number":8622,"context_line":"                    bdm.attachment_id \u003d original_bdm.attachment_id"},{"line_number":8623,"context_line":"                # NOTE(lyarwood): Reset the connection_info to the original"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_7cf4365c","line":8620,"updated":"2020-07-27 19:50:20.000000000","message":"And here. And we delete the attachments again, except by this time they\u0027re the source ones.","commit_id":"fee8eaaf6463886f66637fe3710482f3b5615024"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"d26138443a8d790e9a6222204d81536df983450e","unresolved":false,"context_lines":[{"line_number":8637,"context_line":""},{"line_number":8638,"context_line":"    @wrap_exception()"},{"line_number":8639,"context_line":"    @wrap_instance_fault"},{"line_number":8640,"context_line":"    def _rollback_live_migration(self, context, instance,"},{"line_number":8641,"context_line":"                                 dest, migrate_data\u003dNone,"},{"line_number":8642,"context_line":"                                 migration_status\u003d\u0027error\u0027,"},{"line_number":8643,"context_line":"                                 source_bdms\u003dNone):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_fcd686c3","line":8640,"updated":"2020-07-27 19:50:20.000000000","message":"Except then we get here...","commit_id":"fee8eaaf6463886f66637fe3710482f3b5615024"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"d26138443a8d790e9a6222204d81536df983450e","unresolved":false,"context_lines":[{"line_number":8702,"context_line":"        # TODO(lyarwood): Turn the following into a lookup method within"},{"line_number":8703,"context_line":"        # BlockDeviceMappingList."},{"line_number":8704,"context_line":"        vol_bdms \u003d [bdm for bdm in bdms if bdm.is_volume]"},{"line_number":8705,"context_line":""},{"line_number":8706,"context_line":"        self._remove_remote_volume_connections(context, dest, vol_bdms,"},{"line_number":8707,"context_line":"                                               instance)"},{"line_number":8708,"context_line":"        self._rollback_volume_bdms(context, vol_bdms, source_bdms, instance)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_fcccc662","line":8705,"updated":"2020-07-27 19:50:20.000000000","message":"ninja whitespace","commit_id":"fee8eaaf6463886f66637fe3710482f3b5615024"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"f5dceef62166ab73de213cdcecf8e34ba3dc512d","unresolved":false,"context_lines":[{"line_number":8702,"context_line":"        # TODO(lyarwood): Turn the following into a lookup method within"},{"line_number":8703,"context_line":"        # BlockDeviceMappingList."},{"line_number":8704,"context_line":"        vol_bdms \u003d [bdm for bdm in bdms if bdm.is_volume]"},{"line_number":8705,"context_line":""},{"line_number":8706,"context_line":"        self._remove_remote_volume_connections(context, dest, vol_bdms,"},{"line_number":8707,"context_line":"                                               instance)"},{"line_number":8708,"context_line":"        self._rollback_volume_bdms(context, vol_bdms, source_bdms, instance)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_1797d592","line":8705,"in_reply_to":"9f560f44_fcccc662","updated":"2020-07-27 19:55:39.000000000","message":"Gah! Thanks, I\u0027ll remove in a respin.","commit_id":"fee8eaaf6463886f66637fe3710482f3b5615024"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"d26138443a8d790e9a6222204d81536df983450e","unresolved":false,"context_lines":[{"line_number":8705,"context_line":""},{"line_number":8706,"context_line":"        self._remove_remote_volume_connections(context, dest, vol_bdms,"},{"line_number":8707,"context_line":"                                               instance)"},{"line_number":8708,"context_line":"        self._rollback_volume_bdms(context, vol_bdms, source_bdms, instance)"},{"line_number":8709,"context_line":""},{"line_number":8710,"context_line":"        self._notify_about_instance_usage(context, instance,"},{"line_number":8711,"context_line":"                                          \"live_migration._rollback.start\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_5ce4d2ac","line":8708,"range":{"start_line":8708,"start_character":13,"end_line":8708,"end_character":34},"updated":"2020-07-27 19:50:20.000000000","message":"And here...","commit_id":"fee8eaaf6463886f66637fe3710482f3b5615024"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"e839ebc623447c8afc7f5a23038dec9169f3e94e","unresolved":false,"context_lines":[{"line_number":8615,"context_line":"                # NOTE(lyarwood): Only delete the referenced attachment if it"},{"line_number":8616,"context_line":"                # is different to the original in order to avoid accidentally"},{"line_number":8617,"context_line":"                # removing the source host volume attachment after it has"},{"line_number":8618,"context_line":"                # already been rolled back by a failure in pre_live_migration."},{"line_number":8619,"context_line":"                if (bdm.attachment_id and original_bdm.attachment_id and"},{"line_number":8620,"context_line":"                    bdm.attachment_id !\u003d original_bdm.attachment_id):"},{"line_number":8621,"context_line":"                    # NOTE(lyarwood): 3.44 cinder api flow. Delete the"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f560f44_3324ac0d","line":8618,"updated":"2020-07-27 21:00:27.000000000","message":"Thanks for the note!","commit_id":"b924fb6c84234986cd3da95d034aa7635d55f103"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"74f39946af8cc39e3a02557a6769e712152b502f","unresolved":false,"context_lines":[{"line_number":8613,"context_line":"            try:"},{"line_number":8614,"context_line":"                original_bdm \u003d original_bdms_by_volid[bdm.volume_id]"},{"line_number":8615,"context_line":"                # NOTE(lyarwood): Only delete the referenced attachment if it"},{"line_number":8616,"context_line":"                # is different to the original in order to avoid accidentally"},{"line_number":8617,"context_line":"                # removing the source host volume attachment after it has"},{"line_number":8618,"context_line":"                # already been rolled back by a failure in pre_live_migration."},{"line_number":8619,"context_line":"                if (bdm.attachment_id and original_bdm.attachment_id and"}],"source_content_type":"text/x-python","patch_set":7,"id":"9f560f44_ef77a501","line":8616,"range":{"start_line":8616,"start_character":31,"end_line":8616,"end_character":33},"updated":"2020-07-30 23:16:56.000000000","message":"than?","commit_id":"76362fad58b8a19871fdb531e9921192078689c8"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"74f39946af8cc39e3a02557a6769e712152b502f","unresolved":false,"context_lines":[{"line_number":8617,"context_line":"                # removing the source host volume attachment after it has"},{"line_number":8618,"context_line":"                # already been rolled back by a failure in pre_live_migration."},{"line_number":8619,"context_line":"                if (bdm.attachment_id and original_bdm.attachment_id and"},{"line_number":8620,"context_line":"                    bdm.attachment_id !\u003d original_bdm.attachment_id):"},{"line_number":8621,"context_line":"                    # NOTE(lyarwood): 3.44 cinder api flow. Delete the"},{"line_number":8622,"context_line":"                    # attachment used by the bdm and reset it to that of"},{"line_number":8623,"context_line":"                    # the original bdm."}],"source_content_type":"text/x-python","patch_set":7,"id":"9f560f44_4f7171e0","line":8620,"updated":"2020-07-30 23:16:56.000000000","message":"Having a look through the code so I understand:\n\nAttachments rolled back on the dest and re-raised here during a pre_live_migration fail:\n\nhttps://github.com/openstack/nova/blob/2f3a380c3c081fb022c8a2dcfdcc365733161cac/nova/compute/manager.py#L7833-L7845\n\nThen we catch the re-raised exception on the source and call _cleanup_pre_live_migration:\n\nhttps://github.com/openstack/nova/blob/2f3a380c3c081fb022c8a2dcfdcc365733161cac/nova/compute/manager.py#L8023-L8029\n\nWhich calls _rollback_live_migration:\n\nhttps://github.com/openstack/nova/blob/2f3a380c3c081fb022c8a2dcfdcc365733161cac/nova/compute/manager.py#L7911-L7913\n\nWhich calls _rollback_volume_bdms:\n\nhttps://github.com/openstack/nova/blob/2f3a380c3c081fb022c8a2dcfdcc365733161cac/nova/compute/manager.py#L8706\n\nand that\u0027s where this logic comes in to make sure we don\u0027t delete the attachments if they are the originals.\n\nMakes sense, nice and simple change.","commit_id":"76362fad58b8a19871fdb531e9921192078689c8"}],"nova/tests/unit/compute/test_compute_mgr.py":[{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"761719dd8132bacd60e922e7d960a9125efcd6e4","unresolved":false,"context_lines":[{"line_number":10084,"context_line":"            self, mock_delete_attachment):"},{"line_number":10085,"context_line":"        instance \u003d fake_instance.fake_instance_obj("},{"line_number":10086,"context_line":"            self.context, uuid\u003duuids.instance)"},{"line_number":10087,"context_line":"        original_bdms \u003d bdms \u003d self._generate_volume_bdm_list(instance)"},{"line_number":10088,"context_line":"        self.compute._rollback_volume_bdms("},{"line_number":10089,"context_line":"            self.context, bdms, original_bdms, instance)"},{"line_number":10090,"context_line":"        # Assert that attachment_delete isn\u0027t called when the bdms have already"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_bcbc0e6a","line":10087,"updated":"2020-07-27 19:47:08.000000000","message":"original\u003dTrue would create more realistic bdms here but I\u0027m not sure that it really matters in terms of the logic being tested.","commit_id":"fee8eaaf6463886f66637fe3710482f3b5615024"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"d26138443a8d790e9a6222204d81536df983450e","unresolved":false,"context_lines":[{"line_number":10084,"context_line":"            self, mock_delete_attachment):"},{"line_number":10085,"context_line":"        instance \u003d fake_instance.fake_instance_obj("},{"line_number":10086,"context_line":"            self.context, uuid\u003duuids.instance)"},{"line_number":10087,"context_line":"        original_bdms \u003d bdms \u003d self._generate_volume_bdm_list(instance)"},{"line_number":10088,"context_line":"        self.compute._rollback_volume_bdms("},{"line_number":10089,"context_line":"            self.context, bdms, original_bdms, instance)"},{"line_number":10090,"context_line":"        # Assert that attachment_delete isn\u0027t called when the bdms have already"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_3c563e2b","line":10087,"in_reply_to":"9f560f44_bcbc0e6a","updated":"2020-07-27 19:50:20.000000000","message":"This seems perfectly readable to me.","commit_id":"fee8eaaf6463886f66637fe3710482f3b5615024"}]}
