)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":25562,"name":"Chen","email":"dstbtgagt@foxmail.com","username":"chenn2"},"change_message_id":"fe775885a42b87c5c88409a7eaf64c0e93fc3426","unresolved":false,"context_lines":[{"line_number":6107,"context_line":"        \"\"\""},{"line_number":6108,"context_line":"        LOG.debug(\u0027pre_live_migration data is %s\u0027, migrate_data)"},{"line_number":6109,"context_line":""},{"line_number":6110,"context_line":"        network_info \u003d self.network_api.get_instance_nw_info(context, instance)"},{"line_number":6111,"context_line":"        self._notify_about_instance_usage("},{"line_number":6112,"context_line":"                     context, instance, \"live_migration.pre.start\","},{"line_number":6113,"context_line":"                     network_info\u003dnetwork_info)"},{"line_number":6114,"context_line":"        compute_utils.notify_about_instance_action("},{"line_number":6115,"context_line":"            context, instance, self.host,"},{"line_number":6116,"context_line":"            action\u003dfields.NotificationAction.LIVE_MIGRATION_PRE,"},{"line_number":6117,"context_line":"            phase\u003dfields.NotificationPhase.START)"},{"line_number":6118,"context_line":""},{"line_number":6119,"context_line":"        migrate_data.old_vol_attachment_ids \u003d {}"},{"line_number":6120,"context_line":"        bdms \u003d objects.BlockDeviceMappingList.get_by_instance_uuid("}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_fc03440f","line":6117,"range":{"start_line":6110,"start_character":8,"end_line":6117,"end_character":49},"updated":"2018-09-11 13:19:41.000000000","message":"Isn\u0027t it better to move this inside the try block just before migrate_data \u003d self.driver.pre_live_migration, so taht pre_live_migration is executed as soon as notifications are sent?","commit_id":"cc29af482a863a5a761422d1549a70ba73f8da21"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"5ca34a8c39a0570b8e88f980d4c378a16c7ac940","unresolved":false,"context_lines":[{"line_number":6107,"context_line":"        \"\"\""},{"line_number":6108,"context_line":"        LOG.debug(\u0027pre_live_migration data is %s\u0027, migrate_data)"},{"line_number":6109,"context_line":""},{"line_number":6110,"context_line":"        network_info \u003d self.network_api.get_instance_nw_info(context, instance)"},{"line_number":6111,"context_line":"        self._notify_about_instance_usage("},{"line_number":6112,"context_line":"                     context, instance, \"live_migration.pre.start\","},{"line_number":6113,"context_line":"                     network_info\u003dnetwork_info)"},{"line_number":6114,"context_line":"        compute_utils.notify_about_instance_action("},{"line_number":6115,"context_line":"            context, instance, self.host,"},{"line_number":6116,"context_line":"            action\u003dfields.NotificationAction.LIVE_MIGRATION_PRE,"},{"line_number":6117,"context_line":"            phase\u003dfields.NotificationPhase.START)"},{"line_number":6118,"context_line":""},{"line_number":6119,"context_line":"        migrate_data.old_vol_attachment_ids \u003d {}"},{"line_number":6120,"context_line":"        bdms \u003d objects.BlockDeviceMappingList.get_by_instance_uuid("}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_d7de610f","line":6117,"range":{"start_line":6110,"start_character":8,"end_line":6117,"end_character":49},"in_reply_to":"3f79a3b5_fc03440f","updated":"2018-09-11 13:57:42.000000000","message":"I think I\u0027d rather keep as much as possible out of the Pokemon exception catching? I don\u0027t have strong feelings one way or the other, if others agree with you I\u0027ll happily change it.","commit_id":"cc29af482a863a5a761422d1549a70ba73f8da21"},{"author":{"_account_id":25562,"name":"Chen","email":"dstbtgagt@foxmail.com","username":"chenn2"},"change_message_id":"fe775885a42b87c5c88409a7eaf64c0e93fc3426","unresolved":false,"context_lines":[{"line_number":6192,"context_line":"                        bdm.attachment_id \u003d old_attachments[bdm.volume_id]"},{"line_number":6193,"context_line":"                        bdm.save()"},{"line_number":6194,"context_line":""},{"line_number":6195,"context_line":"        # Volume connections are complete, tell cinder that all the"},{"line_number":6196,"context_line":"        # attachments have completed."},{"line_number":6197,"context_line":"        for bdm in bdms:"},{"line_number":6198,"context_line":"            if bdm.is_volume and bdm.attachment_id is not None:"},{"line_number":6199,"context_line":"                self.volume_api.attachment_complete(context,"},{"line_number":6200,"context_line":"                                                    bdm.attachment_id)"},{"line_number":6201,"context_line":""},{"line_number":6202,"context_line":"        self._notify_about_instance_usage("},{"line_number":6203,"context_line":"                     context, instance, \"live_migration.pre.end\","},{"line_number":6204,"context_line":"                     network_info\u003dnetwork_info)"},{"line_number":6205,"context_line":"        compute_utils.notify_about_instance_action("},{"line_number":6206,"context_line":"            context, instance, self.host,"},{"line_number":6207,"context_line":"            action\u003dfields.NotificationAction.LIVE_MIGRATION_PRE,"},{"line_number":6208,"context_line":"            phase\u003dfields.NotificationPhase.END)"},{"line_number":6209,"context_line":""},{"line_number":6210,"context_line":"        LOG.debug(\u0027pre_live_migration result data is %s\u0027, migrate_data)"},{"line_number":6211,"context_line":"        return migrate_data"},{"line_number":6212,"context_line":""},{"line_number":6213,"context_line":"    @staticmethod"},{"line_number":6214,"context_line":"    def _neutron_failed_live_migration_callback(event_name, instance):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_576331de","line":6211,"range":{"start_line":6195,"start_character":8,"end_line":6211,"end_character":27},"updated":"2018-09-11 13:19:41.000000000","message":"If I am not mistaken, these lines are not to be executed if anything wrong happens to self.driver.pre_live_migration in the original code, but after this change, these are anyway to be walked through within the method, which looks like a behavior change to me.","commit_id":"cc29af482a863a5a761422d1549a70ba73f8da21"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"5ca34a8c39a0570b8e88f980d4c378a16c7ac940","unresolved":false,"context_lines":[{"line_number":6192,"context_line":"                        bdm.attachment_id \u003d old_attachments[bdm.volume_id]"},{"line_number":6193,"context_line":"                        bdm.save()"},{"line_number":6194,"context_line":""},{"line_number":6195,"context_line":"        # Volume connections are complete, tell cinder that all the"},{"line_number":6196,"context_line":"        # attachments have completed."},{"line_number":6197,"context_line":"        for bdm in bdms:"},{"line_number":6198,"context_line":"            if bdm.is_volume and bdm.attachment_id is not None:"},{"line_number":6199,"context_line":"                self.volume_api.attachment_complete(context,"},{"line_number":6200,"context_line":"                                                    bdm.attachment_id)"},{"line_number":6201,"context_line":""},{"line_number":6202,"context_line":"        self._notify_about_instance_usage("},{"line_number":6203,"context_line":"                     context, instance, \"live_migration.pre.end\","},{"line_number":6204,"context_line":"                     network_info\u003dnetwork_info)"},{"line_number":6205,"context_line":"        compute_utils.notify_about_instance_action("},{"line_number":6206,"context_line":"            context, instance, self.host,"},{"line_number":6207,"context_line":"            action\u003dfields.NotificationAction.LIVE_MIGRATION_PRE,"},{"line_number":6208,"context_line":"            phase\u003dfields.NotificationPhase.END)"},{"line_number":6209,"context_line":""},{"line_number":6210,"context_line":"        LOG.debug(\u0027pre_live_migration result data is %s\u0027, migrate_data)"},{"line_number":6211,"context_line":"        return migrate_data"},{"line_number":6212,"context_line":""},{"line_number":6213,"context_line":"    @staticmethod"},{"line_number":6214,"context_line":"    def _neutron_failed_live_migration_callback(event_name, instance):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_b7b405d6","line":6211,"range":{"start_line":6195,"start_character":8,"end_line":6211,"end_character":27},"in_reply_to":"3f79a3b5_576331de","updated":"2018-09-11 13:57:42.000000000","message":"We re-raise, because of the use of excutils.save_and_reraise_exception in the except block above.","commit_id":"cc29af482a863a5a761422d1549a70ba73f8da21"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"abe5b6df5b4ddfc62843bc9b127330961bc17f7b","unresolved":false,"context_lines":[{"line_number":6111,"context_line":"        self._notify_about_instance_usage("},{"line_number":6112,"context_line":"                     context, instance, \"live_migration.pre.start\","},{"line_number":6113,"context_line":"                     network_info\u003dnetwork_info)"},{"line_number":6114,"context_line":"        compute_utils.notify_about_instance_action("},{"line_number":6115,"context_line":"            context, instance, self.host,"},{"line_number":6116,"context_line":"            action\u003dfields.NotificationAction.LIVE_MIGRATION_PRE,"},{"line_number":6117,"context_line":"            phase\u003dfields.NotificationPhase.START)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_74954b87","line":6114,"range":{"start_line":6114,"start_character":22,"end_line":6114,"end_character":50},"updated":"2018-10-15 21:47:18.000000000","message":"It\u0027s not really related to this change, but since we\u0027re getting the bdms anyway, we should pass those to notify_about_instance_action so it doesn\u0027t have to look them up if configured to do so. That could be part of the suggested change below.","commit_id":"3df7ab14ed1f6fc391bd7c748bb9cf9465ec7e59"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"cf59b242194a7c6afb8e7fdf054f3c57558ab810","unresolved":false,"context_lines":[{"line_number":6111,"context_line":"        self._notify_about_instance_usage("},{"line_number":6112,"context_line":"                     context, instance, \"live_migration.pre.start\","},{"line_number":6113,"context_line":"                     network_info\u003dnetwork_info)"},{"line_number":6114,"context_line":"        compute_utils.notify_about_instance_action("},{"line_number":6115,"context_line":"            context, instance, self.host,"},{"line_number":6116,"context_line":"            action\u003dfields.NotificationAction.LIVE_MIGRATION_PRE,"},{"line_number":6117,"context_line":"            phase\u003dfields.NotificationPhase.START)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_8ac80275","line":6114,"range":{"start_line":6114,"start_character":22,"end_line":6114,"end_character":50},"in_reply_to":"3f79a3b5_74954b87","updated":"2018-10-16 00:47:27.000000000","message":"I\u0027ve rebased on top of your https://review.openstack.org/#/c/610739/","commit_id":"3df7ab14ed1f6fc391bd7c748bb9cf9465ec7e59"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"abe5b6df5b4ddfc62843bc9b127330961bc17f7b","unresolved":false,"context_lines":[{"line_number":6108,"context_line":"        LOG.debug(\u0027pre_live_migration data is %s\u0027, migrate_data)"},{"line_number":6109,"context_line":""},{"line_number":6110,"context_line":"        network_info \u003d self.network_api.get_instance_nw_info(context, instance)"},{"line_number":6111,"context_line":"        self._notify_about_instance_usage("},{"line_number":6112,"context_line":"                     context, instance, \"live_migration.pre.start\","},{"line_number":6113,"context_line":"                     network_info\u003dnetwork_info)"},{"line_number":6114,"context_line":"        compute_utils.notify_about_instance_action("},{"line_number":6115,"context_line":"            context, instance, self.host,"},{"line_number":6116,"context_line":"            action\u003dfields.NotificationAction.LIVE_MIGRATION_PRE,"},{"line_number":6117,"context_line":"            phase\u003dfields.NotificationPhase.START)"},{"line_number":6118,"context_line":""},{"line_number":6119,"context_line":"        migrate_data.old_vol_attachment_ids \u003d {}"},{"line_number":6120,"context_line":"        bdms \u003d objects.BlockDeviceMappingList.get_by_instance_uuid("}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_54adafe4","line":6117,"range":{"start_line":6111,"start_character":8,"end_line":6117,"end_character":49},"updated":"2018-10-15 21:47:18.000000000","message":"As artom mentioned in comments, this is unrelated. This is really more about bug 1763051 which if you wanted to make this diff smaller, push a separate change before this which refactors and moves this up as a partial fix for that bug and then stack your try/except changes here on top.","commit_id":"3df7ab14ed1f6fc391bd7c748bb9cf9465ec7e59"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e558688b59422b4baf68954b5b96bd0c2068a117","unresolved":false,"context_lines":[{"line_number":6108,"context_line":"        LOG.debug(\u0027pre_live_migration data is %s\u0027, migrate_data)"},{"line_number":6109,"context_line":""},{"line_number":6110,"context_line":"        network_info \u003d self.network_api.get_instance_nw_info(context, instance)"},{"line_number":6111,"context_line":"        self._notify_about_instance_usage("},{"line_number":6112,"context_line":"                     context, instance, \"live_migration.pre.start\","},{"line_number":6113,"context_line":"                     network_info\u003dnetwork_info)"},{"line_number":6114,"context_line":"        compute_utils.notify_about_instance_action("},{"line_number":6115,"context_line":"            context, instance, self.host,"},{"line_number":6116,"context_line":"            action\u003dfields.NotificationAction.LIVE_MIGRATION_PRE,"},{"line_number":6117,"context_line":"            phase\u003dfields.NotificationPhase.START)"},{"line_number":6118,"context_line":""},{"line_number":6119,"context_line":"        migrate_data.old_vol_attachment_ids \u003d {}"},{"line_number":6120,"context_line":"        bdms \u003d objects.BlockDeviceMappingList.get_by_instance_uuid("}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_f4c4fb0f","line":6117,"range":{"start_line":6111,"start_character":8,"end_line":6117,"end_character":49},"in_reply_to":"3f79a3b5_54adafe4","updated":"2018-10-15 22:21:02.000000000","message":"Done: https://review.openstack.org/#/c/610739/","commit_id":"3df7ab14ed1f6fc391bd7c748bb9cf9465ec7e59"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"cf59b242194a7c6afb8e7fdf054f3c57558ab810","unresolved":false,"context_lines":[{"line_number":6108,"context_line":"        LOG.debug(\u0027pre_live_migration data is %s\u0027, migrate_data)"},{"line_number":6109,"context_line":""},{"line_number":6110,"context_line":"        network_info \u003d self.network_api.get_instance_nw_info(context, instance)"},{"line_number":6111,"context_line":"        self._notify_about_instance_usage("},{"line_number":6112,"context_line":"                     context, instance, \"live_migration.pre.start\","},{"line_number":6113,"context_line":"                     network_info\u003dnetwork_info)"},{"line_number":6114,"context_line":"        compute_utils.notify_about_instance_action("},{"line_number":6115,"context_line":"            context, instance, self.host,"},{"line_number":6116,"context_line":"            action\u003dfields.NotificationAction.LIVE_MIGRATION_PRE,"},{"line_number":6117,"context_line":"            phase\u003dfields.NotificationPhase.START)"},{"line_number":6118,"context_line":""},{"line_number":6119,"context_line":"        migrate_data.old_vol_attachment_ids \u003d {}"},{"line_number":6120,"context_line":"        bdms \u003d objects.BlockDeviceMappingList.get_by_instance_uuid("}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_4abe6ace","line":6117,"range":{"start_line":6111,"start_character":8,"end_line":6117,"end_character":49},"in_reply_to":"3f79a3b5_f4c4fb0f","updated":"2018-10-16 00:47:27.000000000","message":"Ditto.","commit_id":"3df7ab14ed1f6fc391bd7c748bb9cf9465ec7e59"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"abe5b6df5b4ddfc62843bc9b127330961bc17f7b","unresolved":false,"context_lines":[{"line_number":6121,"context_line":"            context, instance.uuid)"},{"line_number":6122,"context_line":""},{"line_number":6123,"context_line":"        connector \u003d self.driver.get_volume_connector(instance)"},{"line_number":6124,"context_line":"        try:"},{"line_number":6125,"context_line":"            for bdm in bdms:"},{"line_number":6126,"context_line":"                if bdm.is_volume and bdm.attachment_id is not None:"},{"line_number":6127,"context_line":"                    # This bdm uses the new cinder v3.44 API."}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_f425dbae","line":6124,"updated":"2018-10-15 21:47:18.000000000","message":"Could be done in a follow up, but long-term we should break this method down and do the pre/post bdm stuff in separate private methods, so we could move the bdm attachment create stuff into a new private method, and then call that from this pre_live_migration method. That\u0027s similar to what I suggested in artom\u0027s other change here: https://review.openstack.org/#/c/609517/\n\nIt just gets to be too much damn code in one method, and makes unit testing very tedious.","commit_id":"3df7ab14ed1f6fc391bd7c748bb9cf9465ec7e59"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"cf59b242194a7c6afb8e7fdf054f3c57558ab810","unresolved":false,"context_lines":[{"line_number":6121,"context_line":"            context, instance.uuid)"},{"line_number":6122,"context_line":""},{"line_number":6123,"context_line":"        connector \u003d self.driver.get_volume_connector(instance)"},{"line_number":6124,"context_line":"        try:"},{"line_number":6125,"context_line":"            for bdm in bdms:"},{"line_number":6126,"context_line":"                if bdm.is_volume and bdm.attachment_id is not None:"},{"line_number":6127,"context_line":"                    # This bdm uses the new cinder v3.44 API."}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_ea9e5667","line":6124,"in_reply_to":"3f79a3b5_f425dbae","updated":"2018-10-16 00:47:27.000000000","message":"I\u0027ll happily take up the refactoring once we have the backportable bugfixes in place :)","commit_id":"3df7ab14ed1f6fc391bd7c748bb9cf9465ec7e59"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"abe5b6df5b4ddfc62843bc9b127330961bc17f7b","unresolved":false,"context_lines":[{"line_number":6151,"context_line":"                                context, instance, refresh_conn_info\u003dTrue,"},{"line_number":6152,"context_line":"                                bdms\u003dbdms)"},{"line_number":6153,"context_line":""},{"line_number":6154,"context_line":"            # NOTE(artom) driver.pre_live_migration() used to be outside the"},{"line_number":6155,"context_line":"            # try block. It\u0027s moved here to ensure volume attachment cleanup in"},{"line_number":6156,"context_line":"            # the event of driver.pre_live_migration() failing. The compute"},{"line_number":6157,"context_line":"            # manager has its own _rollback_live_migration() cleanup in case"},{"line_number":6158,"context_line":"            # the pre_live_migration() RPC call to the destination fails. There"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_f960760f","line":6155,"range":{"start_line":6154,"start_character":26,"end_line":6155,"end_character":40},"updated":"2018-10-15 21:47:18.000000000","message":"This seems very commit message worthy, but not really code comment worthy. I mean, it\u0027s clear enough if you just say, we do everything inside the try/except so we can rollback any volume attachments on any failure.","commit_id":"3df7ab14ed1f6fc391bd7c748bb9cf9465ec7e59"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"cf59b242194a7c6afb8e7fdf054f3c57558ab810","unresolved":false,"context_lines":[{"line_number":6151,"context_line":"                                context, instance, refresh_conn_info\u003dTrue,"},{"line_number":6152,"context_line":"                                bdms\u003dbdms)"},{"line_number":6153,"context_line":""},{"line_number":6154,"context_line":"            # NOTE(artom) driver.pre_live_migration() used to be outside the"},{"line_number":6155,"context_line":"            # try block. It\u0027s moved here to ensure volume attachment cleanup in"},{"line_number":6156,"context_line":"            # the event of driver.pre_live_migration() failing. The compute"},{"line_number":6157,"context_line":"            # manager has its own _rollback_live_migration() cleanup in case"},{"line_number":6158,"context_line":"            # the pre_live_migration() RPC call to the destination fails. There"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_4a93ca59","line":6155,"range":{"start_line":6154,"start_character":26,"end_line":6155,"end_character":40},"in_reply_to":"3f79a3b5_f960760f","updated":"2018-10-16 00:47:27.000000000","message":"I was trying to address the other Matt\u0027s concerns about possible conflicts somewhere other than a review comment. I can move this to the commit message.","commit_id":"3df7ab14ed1f6fc391bd7c748bb9cf9465ec7e59"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"abe5b6df5b4ddfc62843bc9b127330961bc17f7b","unresolved":false,"context_lines":[{"line_number":6153,"context_line":""},{"line_number":6154,"context_line":"            # NOTE(artom) driver.pre_live_migration() used to be outside the"},{"line_number":6155,"context_line":"            # try block. It\u0027s moved here to ensure volume attachment cleanup in"},{"line_number":6156,"context_line":"            # the event of driver.pre_live_migration() failing. The compute"},{"line_number":6157,"context_line":"            # manager has its own _rollback_live_migration() cleanup in case"},{"line_number":6158,"context_line":"            # the pre_live_migration() RPC call to the destination fails. There"},{"line_number":6159,"context_line":"            # should be no conflicts between the cleanup in there and the"},{"line_number":6160,"context_line":"            # cleanup in the except block below. The remove_volume_connection()"},{"line_number":6161,"context_line":"            # -\u003e driver_detach() -\u003e detach_volume() call catches the"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_5975eac7","line":6158,"range":{"start_line":6156,"start_character":64,"end_line":6158,"end_character":73},"updated":"2018-10-15 21:47:18.000000000","message":"Ack, which happens here:\n\nhttps://github.com/openstack/nova/blob/f8727c411273e5c762a9ccd341cc26a0ff0dea37/nova/compute/manager.py#L6359","commit_id":"3df7ab14ed1f6fc391bd7c748bb9cf9465ec7e59"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"abe5b6df5b4ddfc62843bc9b127330961bc17f7b","unresolved":false,"context_lines":[{"line_number":6182,"context_line":"                CONF.compute.live_migration_wait_for_vif_plug)"},{"line_number":6183,"context_line":""},{"line_number":6184,"context_line":"            # NOTE(tr3buchet): setup networks on destination host"},{"line_number":6185,"context_line":"            self.network_api.setup_networks_on_host(context, instance,"},{"line_number":6186,"context_line":"                                                             self.host)"},{"line_number":6187,"context_line":""},{"line_number":6188,"context_line":"            # Creating filters to hypervisors and firewalls."}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_795d4646","line":6185,"range":{"start_line":6185,"start_character":29,"end_line":6185,"end_character":51},"updated":"2018-10-15 21:47:18.000000000","message":"We could also fail after this, but that\u0027s handled in rollback:\n\nhttps://github.com/openstack/nova/blob/f8727c411273e5c762a9ccd341cc26a0ff0dea37/nova/compute/manager.py#L6930","commit_id":"3df7ab14ed1f6fc391bd7c748bb9cf9465ec7e59"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"abe5b6df5b4ddfc62843bc9b127330961bc17f7b","unresolved":false,"context_lines":[{"line_number":6211,"context_line":"        # attachments have completed."},{"line_number":6212,"context_line":"        for bdm in bdms:"},{"line_number":6213,"context_line":"            if bdm.is_volume and bdm.attachment_id is not None:"},{"line_number":6214,"context_line":"                self.volume_api.attachment_complete(context,"},{"line_number":6215,"context_line":"                                                    bdm.attachment_id)"},{"line_number":6216,"context_line":""},{"line_number":6217,"context_line":"        self._notify_about_instance_usage("}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_d9cd7a2f","line":6214,"range":{"start_line":6214,"start_character":32,"end_line":6214,"end_character":51},"updated":"2018-10-15 21:47:18.000000000","message":"What if this blows up?","commit_id":"3df7ab14ed1f6fc391bd7c748bb9cf9465ec7e59"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d4cf956922ded0a1d767208da209c4f94d609cba","unresolved":false,"context_lines":[{"line_number":6211,"context_line":"        # attachments have completed."},{"line_number":6212,"context_line":"        for bdm in bdms:"},{"line_number":6213,"context_line":"            if bdm.is_volume and bdm.attachment_id is not None:"},{"line_number":6214,"context_line":"                self.volume_api.attachment_complete(context,"},{"line_number":6215,"context_line":"                                                    bdm.attachment_id)"},{"line_number":6216,"context_line":""},{"line_number":6217,"context_line":"        self._notify_about_instance_usage("}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_5caf069c","line":6214,"range":{"start_line":6214,"start_character":32,"end_line":6214,"end_character":51},"in_reply_to":"3f79a3b5_cae35ad6","updated":"2018-10-16 14:50:51.000000000","message":"Yeah I think a follow up is OK. This shouldn\u0027t really ever fail unless Cinder is down. It\u0027s just a simple DB status update on the attachment record and the related volume (it marks the volume as in-use again and changes the attach_status from attaching to attached). The volume is already in-use during a live migration anyway. If this fails because of intermittent cinder server issues, we could always just put a retry loop on it. The only other cases that would be bad would be if the attachment record or volume are gone when we call this, and in that case we definitely blow up hard.","commit_id":"3df7ab14ed1f6fc391bd7c748bb9cf9465ec7e59"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"cf59b242194a7c6afb8e7fdf054f3c57558ab810","unresolved":false,"context_lines":[{"line_number":6211,"context_line":"        # attachments have completed."},{"line_number":6212,"context_line":"        for bdm in bdms:"},{"line_number":6213,"context_line":"            if bdm.is_volume and bdm.attachment_id is not None:"},{"line_number":6214,"context_line":"                self.volume_api.attachment_complete(context,"},{"line_number":6215,"context_line":"                                                    bdm.attachment_id)"},{"line_number":6216,"context_line":""},{"line_number":6217,"context_line":"        self._notify_about_instance_usage("}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_cae35ad6","line":6214,"range":{"start_line":6214,"start_character":32,"end_line":6214,"end_character":51},"in_reply_to":"3f79a3b5_d9cd7a2f","updated":"2018-10-16 00:47:27.000000000","message":"Good question - can we address this in a follow up? I\u0027d feel like we\u0027d have to call rollback, maybe in addition to cleaning up volumes?","commit_id":"3df7ab14ed1f6fc391bd7c748bb9cf9465ec7e59"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"92acfcdca8f5f9de1d2ead3f3dcc323e23218466","unresolved":false,"context_lines":[{"line_number":6172,"context_line":"                                context, instance, refresh_conn_info\u003dTrue,"},{"line_number":6173,"context_line":"                                bdms\u003dbdms)"},{"line_number":6174,"context_line":""},{"line_number":6175,"context_line":"            # NOTE(artom) driver.pre_live_migration() used to be outside the"},{"line_number":6176,"context_line":"            # try block. It\u0027s moved here to ensure volume attachment cleanup in"},{"line_number":6177,"context_line":"            # the event of driver.pre_live_migration() failing."},{"line_number":6178,"context_line":"            migrate_data \u003d self.driver.pre_live_migration(context,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_e92a9695","line":6175,"range":{"start_line":6175,"start_character":54,"end_line":6175,"end_character":64},"updated":"2018-10-18 19:20:19.000000000","message":"nit: again, I don\u0027t think this note probably needs to be in here - people can figure out the way things used to be (if they need to) based on git commit history. If anything, I\u0027d just leave a comment by the \"try:\" saying we put everything in a big try/except so we can rollback volume attachments in case driver.pre_live_migration() fails for any reason.","commit_id":"c0d0f4740021a194587e45fc3cb4c0f2a0e3a867"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"109aa7f970f5ff95f44506141a6e3033000e3821","unresolved":false,"context_lines":[{"line_number":6172,"context_line":"                                context, instance, refresh_conn_info\u003dTrue,"},{"line_number":6173,"context_line":"                                bdms\u003dbdms)"},{"line_number":6174,"context_line":""},{"line_number":6175,"context_line":"            # NOTE(artom) driver.pre_live_migration() used to be outside the"},{"line_number":6176,"context_line":"            # try block. It\u0027s moved here to ensure volume attachment cleanup in"},{"line_number":6177,"context_line":"            # the event of driver.pre_live_migration() failing."},{"line_number":6178,"context_line":"            migrate_data \u003d self.driver.pre_live_migration(context,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_c4b69f8a","line":6175,"range":{"start_line":6175,"start_character":54,"end_line":6175,"end_character":64},"in_reply_to":"3f79a3b5_e92a9695","updated":"2018-10-18 20:09:01.000000000","message":"Removed :)","commit_id":"c0d0f4740021a194587e45fc3cb4c0f2a0e3a867"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"25633d5345b41476a35e6dbadaca47cf9403ba0b","unresolved":false,"context_lines":[{"line_number":6188,"context_line":"            # determine if it should wait for a \u0027network-vif-plugged\u0027 event"},{"line_number":6189,"context_line":"            # from neutron before starting the actual guest transfer in the"},{"line_number":6190,"context_line":"            # hypervisor"},{"line_number":6191,"context_line":"            migrate_data.wait_for_vif_plugged \u003d ("},{"line_number":6192,"context_line":"                CONF.compute.live_migration_wait_for_vif_plug)"},{"line_number":6193,"context_line":""},{"line_number":6194,"context_line":"            # NOTE(tr3buchet): setup networks on destination host"},{"line_number":6195,"context_line":"            self.network_api.setup_networks_on_host(context, instance,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_b02cfa93","line":6192,"range":{"start_line":6191,"start_character":12,"end_line":6192,"end_character":62},"updated":"2018-10-22 17:17:13.000000000","message":"I don\u0027t see that the migrate_data.wait_for_vif_plugged flag gets rolled back in _cleanup_pre_live_migration or _rollback_live_migration if something were to fail between this and the except block. Does the flag not need to be reset during a rollback?\n\nBut, I guess that\u0027s not related to this patch because there wasn\u0027t rollback of the flag before this patch either.","commit_id":"1a29248d5e688ba1d4f806895dccd45fcb34b833"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"96881a412d197fd0ca19a81879a730f55213c666","unresolved":false,"context_lines":[{"line_number":6188,"context_line":"            # determine if it should wait for a \u0027network-vif-plugged\u0027 event"},{"line_number":6189,"context_line":"            # from neutron before starting the actual guest transfer in the"},{"line_number":6190,"context_line":"            # hypervisor"},{"line_number":6191,"context_line":"            migrate_data.wait_for_vif_plugged \u003d ("},{"line_number":6192,"context_line":"                CONF.compute.live_migration_wait_for_vif_plug)"},{"line_number":6193,"context_line":""},{"line_number":6194,"context_line":"            # NOTE(tr3buchet): setup networks on destination host"},{"line_number":6195,"context_line":"            self.network_api.setup_networks_on_host(context, instance,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_2ad84422","line":6192,"range":{"start_line":6191,"start_character":12,"end_line":6192,"end_character":62},"in_reply_to":"3f79a3b5_079d4108","updated":"2018-10-22 18:41:03.000000000","message":"Ah, I see. I was thinking since the object attribute was changed, something else might use it, but I now see pre_live_migration is called over rpc and the migrate_data returned that way. Thanks.","commit_id":"1a29248d5e688ba1d4f806895dccd45fcb34b833"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"799401e064a3d37fd53a5a2b8e5bbc220e906691","unresolved":false,"context_lines":[{"line_number":6188,"context_line":"            # determine if it should wait for a \u0027network-vif-plugged\u0027 event"},{"line_number":6189,"context_line":"            # from neutron before starting the actual guest transfer in the"},{"line_number":6190,"context_line":"            # hypervisor"},{"line_number":6191,"context_line":"            migrate_data.wait_for_vif_plugged \u003d ("},{"line_number":6192,"context_line":"                CONF.compute.live_migration_wait_for_vif_plug)"},{"line_number":6193,"context_line":""},{"line_number":6194,"context_line":"            # NOTE(tr3buchet): setup networks on destination host"},{"line_number":6195,"context_line":"            self.network_api.setup_networks_on_host(context, instance,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_079d4108","line":6192,"range":{"start_line":6191,"start_character":12,"end_line":6192,"end_character":62},"in_reply_to":"3f79a3b5_b02cfa93","updated":"2018-10-22 18:11:18.000000000","message":"I don\u0027t think it would matter because we don\u0027t return migrate_data since we re-raise the exception.","commit_id":"1a29248d5e688ba1d4f806895dccd45fcb34b833"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"25633d5345b41476a35e6dbadaca47cf9403ba0b","unresolved":false,"context_lines":[{"line_number":6201,"context_line":"            # This nwfilter is necessary on the destination host."},{"line_number":6202,"context_line":"            # In addition, this method is creating filtering rule"},{"line_number":6203,"context_line":"            # onto destination host."},{"line_number":6204,"context_line":"            self.driver.ensure_filtering_rules_for_instance(instance,"},{"line_number":6205,"context_line":"                                                network_info)"},{"line_number":6206,"context_line":"        except Exception:"},{"line_number":6207,"context_line":"            # If we raise, migrate_data with the updated attachment ids"},{"line_number":6208,"context_line":"            # will not be returned to the source host for rollback."}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_d0d65655","line":6205,"range":{"start_line":6204,"start_character":12,"end_line":6205,"end_character":61},"updated":"2018-10-22 17:17:13.000000000","message":"Same here.","commit_id":"1a29248d5e688ba1d4f806895dccd45fcb34b833"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"489af4521bd40c76392401a268ee273ecad5916a","unresolved":false,"context_lines":[{"line_number":6217,"context_line":"                        bdm.attachment_id \u003d old_attachments[bdm.volume_id]"},{"line_number":6218,"context_line":"                        bdm.save()"},{"line_number":6219,"context_line":""},{"line_number":6220,"context_line":"        # Volume connections are complete, tell cinder that all the"},{"line_number":6221,"context_line":"        # attachments have completed."},{"line_number":6222,"context_line":"        for bdm in bdms:"},{"line_number":6223,"context_line":"            if bdm.is_volume and bdm.attachment_id is not None:"},{"line_number":6224,"context_line":"                self.volume_api.attachment_complete(context,"},{"line_number":6225,"context_line":"                                                    bdm.attachment_id)"},{"line_number":6226,"context_line":""},{"line_number":6227,"context_line":"        self._notify_about_instance_usage("},{"line_number":6228,"context_line":"                     context, instance, \"live_migration.pre.end\","}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_babb45bc","line":6225,"range":{"start_line":6220,"start_character":0,"end_line":6225,"end_character":70},"updated":"2018-10-22 16:44:04.000000000","message":"I was going to ask if there\u0027s any issues with delaying this call, given how long setting up networks can take. However, even if there was (which I\u0027m guessing there isn\u0027t), we\u0027d have to do it anyway since the instance isn\u0027t actually ready til then anyway","commit_id":"1a29248d5e688ba1d4f806895dccd45fcb34b833"}],"nova/tests/unit/compute/test_compute_mgr.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"abe5b6df5b4ddfc62843bc9b127330961bc17f7b","unresolved":false,"context_lines":[{"line_number":7436,"context_line":"            # Meta: ensure un-asserted mocks are still required"},{"line_number":7437,"context_line":"            for m in (mock_nwapi, mock_get_bdms, mock_notify_action,"},{"line_number":7438,"context_line":"                      mock_notify_usage, mock_bdm_save, mock_exception):"},{"line_number":7439,"context_line":"                self.assertGreater(len(m.mock_calls), 0)"},{"line_number":7440,"context_line":"        _test()"},{"line_number":7441,"context_line":""},{"line_number":7442,"context_line":"    def test_pre_live_migration_exceptions_delete_attachments(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_144e576d","line":7439,"range":{"start_line":7439,"start_character":16,"end_line":7439,"end_character":56},"updated":"2018-10-15 21:47:18.000000000","message":"This could just be m.assert_called().","commit_id":"3df7ab14ed1f6fc391bd7c748bb9cf9465ec7e59"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"cf59b242194a7c6afb8e7fdf054f3c57558ab810","unresolved":false,"context_lines":[{"line_number":7436,"context_line":"            # Meta: ensure un-asserted mocks are still required"},{"line_number":7437,"context_line":"            for m in (mock_nwapi, mock_get_bdms, mock_notify_action,"},{"line_number":7438,"context_line":"                      mock_notify_usage, mock_bdm_save, mock_exception):"},{"line_number":7439,"context_line":"                self.assertGreater(len(m.mock_calls), 0)"},{"line_number":7440,"context_line":"        _test()"},{"line_number":7441,"context_line":""},{"line_number":7442,"context_line":"    def test_pre_live_migration_exceptions_delete_attachments(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_0a071283","line":7439,"range":{"start_line":7439,"start_character":16,"end_line":7439,"end_character":56},"in_reply_to":"3f79a3b5_144e576d","updated":"2018-10-16 00:47:27.000000000","message":"Done","commit_id":"3df7ab14ed1f6fc391bd7c748bb9cf9465ec7e59"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"2999b929b8850cf8bccef7bf50c936225ce2dabc","unresolved":false,"context_lines":[{"line_number":7436,"context_line":"            # Meta: ensure un-asserted mocks are still required"},{"line_number":7437,"context_line":"            for m in (mock_nwapi, mock_get_bdms, mock_notify_action,"},{"line_number":7438,"context_line":"                      mock_notify_usage, mock_bdm_save, mock_exception):"},{"line_number":7439,"context_line":"                self.assertGreater(len(m.mock_calls), 0)"},{"line_number":7440,"context_line":"        _test()"},{"line_number":7441,"context_line":""},{"line_number":7442,"context_line":"    def test_pre_live_migration_exceptions_delete_attachments(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_7a6bbfef","line":7439,"range":{"start_line":7439,"start_character":16,"end_line":7439,"end_character":56},"in_reply_to":"3f79a3b5_144e576d","updated":"2018-10-17 19:55:13.000000000","message":"Hrmm, so they\u0027re not actually equivalent. For instance, for network_api isn\u0027t called itself, one of its methods is (get_instance_nw_info). So assert_called() on itself will return False, its mock_calls list, which contains calls for its methods as well [1], will be \u003e 0.\n\n[1] https://docs.python.org/3/library/unittest.mock.html#unittest.mock.Mock.mock_calls","commit_id":"3df7ab14ed1f6fc391bd7c748bb9cf9465ec7e59"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bcd0d1d8d64bec3fa37388fae50df3ac44ccb20d","unresolved":false,"context_lines":[{"line_number":7436,"context_line":"            # Meta: ensure un-asserted mocks are still required"},{"line_number":7437,"context_line":"            for m in (mock_nwapi, mock_get_bdms, mock_notify_action,"},{"line_number":7438,"context_line":"                      mock_notify_usage, mock_bdm_save, mock_exception):"},{"line_number":7439,"context_line":"                self.assertGreater(len(m.mock_calls), 0)"},{"line_number":7440,"context_line":"        _test()"},{"line_number":7441,"context_line":""},{"line_number":7442,"context_line":"    def test_pre_live_migration_exceptions_delete_attachments(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_95f8ec18","line":7439,"range":{"start_line":7439,"start_character":16,"end_line":7439,"end_character":56},"in_reply_to":"3f79a3b5_7a6bbfef","updated":"2018-10-17 20:01:22.000000000","message":"I didn\u0027t look close enough to see that mock_nwapi was on a class rather than a specific method. I guess I\u0027m not sure why we care about asserting the mocks on these at all then, but whatever.","commit_id":"3df7ab14ed1f6fc391bd7c748bb9cf9465ec7e59"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"abe5b6df5b4ddfc62843bc9b127330961bc17f7b","unresolved":false,"context_lines":[{"line_number":7458,"context_line":"        vol2_bdm \u003d fake_block_device.fake_bdm_object("},{"line_number":7459,"context_line":"            self.context,"},{"line_number":7460,"context_line":"            {\u0027source_type\u0027: \u0027volume\u0027, \u0027destination_type\u0027: \u0027volume\u0027,"},{"line_number":7461,"context_line":"             \u0027volume_id\u0027: uuids.vol2, \u0027device_name\u0027: \u0027/dev/vdb\u0027,"},{"line_number":7462,"context_line":"             \u0027instance_uuid\u0027: instance.uuid,"},{"line_number":7463,"context_line":"             \u0027connection_info\u0027: \u0027{\"test\": \"test\"}\u0027})"},{"line_number":7464,"context_line":"        vol2_bdm.attachment_id \u003d uuids.vol2_attach_orig"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_943907d0","line":7461,"range":{"start_line":7461,"start_character":59,"end_line":7461,"end_character":62},"updated":"2018-10-15 21:47:18.000000000","message":"You can\u0027t have two bdms attached to the instance at the same path silly pants.","commit_id":"3df7ab14ed1f6fc391bd7c748bb9cf9465ec7e59"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"cf59b242194a7c6afb8e7fdf054f3c57558ab810","unresolved":false,"context_lines":[{"line_number":7458,"context_line":"        vol2_bdm \u003d fake_block_device.fake_bdm_object("},{"line_number":7459,"context_line":"            self.context,"},{"line_number":7460,"context_line":"            {\u0027source_type\u0027: \u0027volume\u0027, \u0027destination_type\u0027: \u0027volume\u0027,"},{"line_number":7461,"context_line":"             \u0027volume_id\u0027: uuids.vol2, \u0027device_name\u0027: \u0027/dev/vdb\u0027,"},{"line_number":7462,"context_line":"             \u0027instance_uuid\u0027: instance.uuid,"},{"line_number":7463,"context_line":"             \u0027connection_info\u0027: \u0027{\"test\": \"test\"}\u0027})"},{"line_number":7464,"context_line":"        vol2_bdm.attachment_id \u003d uuids.vol2_attach_orig"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_6af7a68d","line":7461,"range":{"start_line":7461,"start_character":59,"end_line":7461,"end_character":62},"in_reply_to":"3f79a3b5_943907d0","updated":"2018-10-16 00:47:27.000000000","message":"My pants are the silliest.","commit_id":"3df7ab14ed1f6fc391bd7c748bb9cf9465ec7e59"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"abe5b6df5b4ddfc62843bc9b127330961bc17f7b","unresolved":false,"context_lines":[{"line_number":7485,"context_line":"                              compute.pre_live_migration,"},{"line_number":7486,"context_line":"                              self.context, instance, False, {}, migrate_data)"},{"line_number":7487,"context_line":""},{"line_number":7488,"context_line":"            self.assertEqual(mock_vol_api.attachment_create.call_count, 2)"},{"line_number":7489,"context_line":""},{"line_number":7490,"context_line":"            # Assert BDMs have original attachments restored"},{"line_number":7491,"context_line":"            self.assertEqual(uuids.vol1_attach_orig, vol1_bdm.attachment_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_d46c5fd0","line":7488,"range":{"start_line":7488,"start_character":17,"end_line":7488,"end_character":28},"updated":"2018-10-15 21:47:18.000000000","message":"switch the args, should be (expected, actual) - it matters for the MismatchError you get if it fails.","commit_id":"3df7ab14ed1f6fc391bd7c748bb9cf9465ec7e59"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"cf59b242194a7c6afb8e7fdf054f3c57558ab810","unresolved":false,"context_lines":[{"line_number":7485,"context_line":"                              compute.pre_live_migration,"},{"line_number":7486,"context_line":"                              self.context, instance, False, {}, migrate_data)"},{"line_number":7487,"context_line":""},{"line_number":7488,"context_line":"            self.assertEqual(mock_vol_api.attachment_create.call_count, 2)"},{"line_number":7489,"context_line":""},{"line_number":7490,"context_line":"            # Assert BDMs have original attachments restored"},{"line_number":7491,"context_line":"            self.assertEqual(uuids.vol1_attach_orig, vol1_bdm.attachment_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_8af2429a","line":7488,"range":{"start_line":7488,"start_character":17,"end_line":7488,"end_character":28},"in_reply_to":"3f79a3b5_d46c5fd0","updated":"2018-10-16 00:47:27.000000000","message":"Done","commit_id":"3df7ab14ed1f6fc391bd7c748bb9cf9465ec7e59"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"abe5b6df5b4ddfc62843bc9b127330961bc17f7b","unresolved":false,"context_lines":[{"line_number":7492,"context_line":"            self.assertEqual(uuids.vol2_attach_orig, vol2_bdm.attachment_id)"},{"line_number":7493,"context_line":""},{"line_number":7494,"context_line":"            # Assert attachment cleanup"},{"line_number":7495,"context_line":"            self.assertEqual(mock_vol_api.attachment_delete.call_count, 2)"},{"line_number":7496,"context_line":"            mock_vol_api.attachment_delete.assert_has_calls("},{"line_number":7497,"context_line":"                    [mock.call(self.context, uuids.vol1_attach_new),"},{"line_number":7498,"context_line":"                     mock.call(self.context, uuids.vol2_attach_new)],"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_54584f23","line":7495,"range":{"start_line":7495,"start_character":17,"end_line":7495,"end_character":28},"updated":"2018-10-15 21:47:18.000000000","message":"same","commit_id":"3df7ab14ed1f6fc391bd7c748bb9cf9465ec7e59"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"abe5b6df5b4ddfc62843bc9b127330961bc17f7b","unresolved":false,"context_lines":[{"line_number":7500,"context_line":""},{"line_number":7501,"context_line":"            # Meta: ensure un-asserted mocks are still required"},{"line_number":7502,"context_line":"            for m in (mock_net_api, mock_compute_utils):"},{"line_number":7503,"context_line":"                self.assertGreater(len(m.mock_calls), 0)"},{"line_number":7504,"context_line":"        _test()"},{"line_number":7505,"context_line":""},{"line_number":7506,"context_line":"    def test_get_neutron_events_for_live_migration_empty(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_f4987bcc","line":7503,"updated":"2018-10-15 21:47:18.000000000","message":"same as above","commit_id":"3df7ab14ed1f6fc391bd7c748bb9cf9465ec7e59"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"cf59b242194a7c6afb8e7fdf054f3c57558ab810","unresolved":false,"context_lines":[{"line_number":7500,"context_line":""},{"line_number":7501,"context_line":"            # Meta: ensure un-asserted mocks are still required"},{"line_number":7502,"context_line":"            for m in (mock_net_api, mock_compute_utils):"},{"line_number":7503,"context_line":"                self.assertGreater(len(m.mock_calls), 0)"},{"line_number":7504,"context_line":"        _test()"},{"line_number":7505,"context_line":""},{"line_number":7506,"context_line":"    def test_get_neutron_events_for_live_migration_empty(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_aa2e1ef6","line":7503,"in_reply_to":"3f79a3b5_f4987bcc","updated":"2018-10-16 00:47:27.000000000","message":"Done","commit_id":"3df7ab14ed1f6fc391bd7c748bb9cf9465ec7e59"}]}
