)]}'
{"nova/tests/functional/compute/test_init_host.py":[{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"f336f983da291718d9e941cd3ce1cc10447804c6","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        context \u003d nova_context.get_admin_context()"},{"line_number":80,"context_line":"        objects.Migration.get_by_instance_and_status("},{"line_number":81,"context_line":"            context, server[\u0027id\u0027], \u0027migrating\u0027)"},{"line_number":82,"context_line":"        # FIXME(mriedem): This is a bug because we would normally expect"},{"line_number":83,"context_line":"        # Migration.get_by_instance_and_status to raise"},{"line_number":84,"context_line":"        # MigrationNotFoundByStatus since the status should be \"error\"."},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_1cf10d96","line":82,"updated":"2019-07-11 23:50:24.000000000","message":"OK, I thought you\u0027d forgotten something on L80, but you\u0027re saying that we get an exception if we look for migrations in \u0027error\u0027 (reproduced that locally), which is a bug in _init_instance() itself because it doesn\u0027t actually error out the migration.\n\nAny chance for a more verbose explanation?","commit_id":"24c7466c1c519ddb6103a3c9b7cb94cb09fe881a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"76f5af4a1a9c0df839d1dc88548e4ec6bb2600b9","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        context \u003d nova_context.get_admin_context()"},{"line_number":80,"context_line":"        objects.Migration.get_by_instance_and_status("},{"line_number":81,"context_line":"            context, server[\u0027id\u0027], \u0027migrating\u0027)"},{"line_number":82,"context_line":"        # FIXME(mriedem): This is a bug because we would normally expect"},{"line_number":83,"context_line":"        # Migration.get_by_instance_and_status to raise"},{"line_number":84,"context_line":"        # MigrationNotFoundByStatus since the status should be \"error\"."},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_d61029ab","line":82,"in_reply_to":"7faddb67_1cf10d96","updated":"2019-07-12 13:16:21.000000000","message":"Would move the fixme comment just above the method call make it more clear?","commit_id":"24c7466c1c519ddb6103a3c9b7cb94cb09fe881a"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"b7bed9775aaeb8f1188548e28c0e749b8598d7aa","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        context \u003d nova_context.get_admin_context()"},{"line_number":80,"context_line":"        objects.Migration.get_by_instance_and_status("},{"line_number":81,"context_line":"            context, server[\u0027id\u0027], \u0027migrating\u0027)"},{"line_number":82,"context_line":"        # FIXME(mriedem): This is a bug because we would normally expect"},{"line_number":83,"context_line":"        # Migration.get_by_instance_and_status to raise"},{"line_number":84,"context_line":"        # MigrationNotFoundByStatus since the status should be \"error\"."},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_d6d349d4","line":82,"in_reply_to":"7faddb67_d61029ab","updated":"2019-07-12 13:19:37.000000000","message":"Yes please :)","commit_id":"24c7466c1c519ddb6103a3c9b7cb94cb09fe881a"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"4a1f1267279d8af51b364d2c91979632bf420f63","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            )"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        # Assert we went through the _init_instance processing we expect."},{"line_number":74,"context_line":"        self.assertIn(\u0027Instance found in migrating state during startup. \u0027"},{"line_number":75,"context_line":"                      \u0027Resetting task_state\u0027, self.stdlog.logger.output)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        # The migration status should be \"error\" rather than stuck as"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_0449a489","line":74,"updated":"2019-07-12 17:38:52.000000000","message":"Having rebased by broken \"Pass migration to finish_revert_migration\" on top of this, this test still passed. That\u0027s because even if something fails, we have a catch all at [1], and we just log and continue. So I think this test should assert that \"Failed to revert crashed migration\" is not logged. I added that locally, and it correctly detected my broken call to objects.Migration.get_by_id_and_instance(), and then passed once I added the correct \u0027context\u0027 arg.\n\n[1] https://review.opendev.org/#/c/670393/2/nova/compute/manager.py@1046","commit_id":"31648e636d70b9159da7aea52e72b0728622b3da"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"686344dc336f45b8f9e13daa46ec61b5fc702796","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            )"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        # Assert we went through the _init_instance processing we expect."},{"line_number":74,"context_line":"        self.assertIn(\u0027Instance found in migrating state during startup. \u0027"},{"line_number":75,"context_line":"                      \u0027Resetting task_state\u0027, self.stdlog.logger.output)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        # The migration status should be \"error\" rather than stuck as"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_86d51f46","line":74,"in_reply_to":"7faddb67_0449a489","updated":"2019-07-22 14:05:37.000000000","message":"Done - added the assertNotIn for the error handler.","commit_id":"31648e636d70b9159da7aea52e72b0728622b3da"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b7f3dc9fee483ccc731418733a6726dd34e0ae4a","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            )"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        # Assert we went through the _init_instance processing we expect."},{"line_number":74,"context_line":"        self.assertIn(\u0027Instance found in migrating state during startup. \u0027"},{"line_number":75,"context_line":"                      \u0027Resetting task_state\u0027, self.stdlog.logger.output)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        # The migration status should be \"error\" rather than stuck as"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_245a9529","line":74,"in_reply_to":"7faddb67_0449a489","updated":"2019-07-14 12:37:03.000000000","message":"Sure. Another thing I thought about was stubbing the driver method to assert the migration context was still set on the instance. I\u0027m out for the week so you\u0027ll have to update this.","commit_id":"31648e636d70b9159da7aea52e72b0728622b3da"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"2e9352415d8b966cf4bc6981c3f242c64f7b956a","unresolved":false,"context_lines":[{"line_number":30,"context_line":"        driver\u0027s migrate_disk_and_power_off method is running (we could be"},{"line_number":31,"context_line":"        slow transferring disks or something when it crashed) and on restart"},{"line_number":32,"context_line":"        of the compute service the driver\u0027s finish_revert_migration method"},{"line_number":33,"context_line":"        is called to cleanup the source host and reset the instnace task_state."},{"line_number":34,"context_line":"        \"\"\""},{"line_number":35,"context_line":"        # Start two compute service so we migrate across hosts."},{"line_number":36,"context_line":"        for x in range(2):"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_9379ca30","line":33,"range":{"start_line":33,"start_character":21,"end_line":33,"end_character":28},"updated":"2019-08-06 18:45:25.000000000","message":"clean up","commit_id":"8db712fe040b15f2b8bc5538338658d3aac246e3"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"2e9352415d8b966cf4bc6981c3f242c64f7b956a","unresolved":false,"context_lines":[{"line_number":30,"context_line":"        driver\u0027s migrate_disk_and_power_off method is running (we could be"},{"line_number":31,"context_line":"        slow transferring disks or something when it crashed) and on restart"},{"line_number":32,"context_line":"        of the compute service the driver\u0027s finish_revert_migration method"},{"line_number":33,"context_line":"        is called to cleanup the source host and reset the instnace task_state."},{"line_number":34,"context_line":"        \"\"\""},{"line_number":35,"context_line":"        # Start two compute service so we migrate across hosts."},{"line_number":36,"context_line":"        for x in range(2):"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_3376d640","line":33,"range":{"start_line":33,"start_character":59,"end_line":33,"end_character":67},"updated":"2019-08-06 18:45:25.000000000","message":"instance","commit_id":"8db712fe040b15f2b8bc5538338658d3aac246e3"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"2e9352415d8b966cf4bc6981c3f242c64f7b956a","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        of the compute service the driver\u0027s finish_revert_migration method"},{"line_number":33,"context_line":"        is called to cleanup the source host and reset the instnace task_state."},{"line_number":34,"context_line":"        \"\"\""},{"line_number":35,"context_line":"        # Start two compute service so we migrate across hosts."},{"line_number":36,"context_line":"        for x in range(2):"},{"line_number":37,"context_line":"            self._start_compute(\u0027host%d\u0027 % x)"},{"line_number":38,"context_line":"        # Create a server, it does not matter on which host it lands."}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_13939a51","line":35,"range":{"start_line":35,"start_character":28,"end_line":35,"end_character":35},"updated":"2019-08-06 18:45:25.000000000","message":"services","commit_id":"8db712fe040b15f2b8bc5538338658d3aac246e3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cd89c7921c713ebc4bb20f4a6da6c36b263d6805","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        def fake_migrate_disk_and_power_off(*args, **kwargs):"},{"line_number":49,"context_line":"            # Simulate the source compute service crashing by restarting it."},{"line_number":50,"context_line":"            self.restart_compute_service(self.computes[source_host])"},{"line_number":51,"context_line":"            # We have to keep the method from returning before asserting the"},{"line_number":52,"context_line":"            # _init_instance restart behavior otherwise resize_instance will"},{"line_number":53,"context_line":"            # fail and set the instance to ERROR status, revert allocations,"},{"line_number":54,"context_line":"            # etc which is not realistic if the service actually crashed while"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_1eec0128","line":51,"updated":"2019-08-08 17:11:19.000000000","message":"We likely need some kind of thread wait/notify rather than just orphaning this.","commit_id":"8db712fe040b15f2b8bc5538338658d3aac246e3"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"2e9352415d8b966cf4bc6981c3f242c64f7b956a","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            # fail and set the instance to ERROR status, revert allocations,"},{"line_number":54,"context_line":"            # etc which is not realistic if the service actually crashed while"},{"line_number":55,"context_line":"            # migrate_disk_and_power_off was running."},{"line_number":56,"context_line":"            time.sleep(30)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        source_driver \u003d self.computes[source_host].manager.driver"},{"line_number":59,"context_line":"        with mock.patch.object(source_driver, \u0027migrate_disk_and_power_off\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_33ab3676","line":56,"range":{"start_line":56,"start_character":12,"end_line":56,"end_character":26},"updated":"2019-08-06 18:45:25.000000000","message":"okay, this doesn\u0027t actually make the test take 30+s","commit_id":"8db712fe040b15f2b8bc5538338658d3aac246e3"}]}
