)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d2c176009b7350584964b70c63a67d77d2bb41cd","unresolved":true,"context_lines":[{"line_number":7,"context_line":"libvirt: Abort live-migration job when monitoring fails"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"During live migration process, a _live_migration_monitor thread"},{"line_number":10,"context_line":"check progress of migration on source host, if for any reason"},{"line_number":11,"context_line":"we hit infrastructure issue involving a DB/RPC/libvirt-timeout"},{"line_number":12,"context_line":"failure, Exception raises to manager and instance/migration"},{"line_number":13,"context_line":"is set to ERROR state."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"d3b369a0_0519d580","line":10,"range":{"start_line":10,"start_character":0,"end_line":10,"end_character":5},"updated":"2021-07-20 10:54:41.000000000","message":"nit: checks the","commit_id":"f83ee41677feb2eb74077f48668bb2517105a75c"},{"author":{"_account_id":28332,"name":"Alexandre arents","email":"alexandre.arents@corp.ovh.com","username":"aarents"},"change_message_id":"1c70e1a11c40a511a7312301b9a2c2a26aa2e8cd","unresolved":false,"context_lines":[{"line_number":7,"context_line":"libvirt: Abort live-migration job when monitoring fails"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"During live migration process, a _live_migration_monitor thread"},{"line_number":10,"context_line":"check progress of migration on source host, if for any reason"},{"line_number":11,"context_line":"we hit infrastructure issue involving a DB/RPC/libvirt-timeout"},{"line_number":12,"context_line":"failure, Exception raises to manager and instance/migration"},{"line_number":13,"context_line":"is set to ERROR state."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"06cbb9f1_c8f417df","line":10,"range":{"start_line":10,"start_character":0,"end_line":10,"end_character":5},"in_reply_to":"d3b369a0_0519d580","updated":"2021-08-06 08:03:32.000000000","message":"Done","commit_id":"f83ee41677feb2eb74077f48668bb2517105a75c"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d2c176009b7350584964b70c63a67d77d2bb41cd","unresolved":true,"context_lines":[{"line_number":9,"context_line":"During live migration process, a _live_migration_monitor thread"},{"line_number":10,"context_line":"check progress of migration on source host, if for any reason"},{"line_number":11,"context_line":"we hit infrastructure issue involving a DB/RPC/libvirt-timeout"},{"line_number":12,"context_line":"failure, Exception raises to manager and instance/migration"},{"line_number":13,"context_line":"is set to ERROR state."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"The issue is that we may let live-migration job running out of nova"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"a83e3589_32ea3119","line":12,"range":{"start_line":12,"start_character":9,"end_line":12,"end_character":37},"updated":"2021-07-20 10:54:41.000000000","message":"nit: an Exception (which one ? just a standard Exception ?) is raised to the nova-compute service","commit_id":"f83ee41677feb2eb74077f48668bb2517105a75c"},{"author":{"_account_id":28332,"name":"Alexandre arents","email":"alexandre.arents@corp.ovh.com","username":"aarents"},"change_message_id":"1c70e1a11c40a511a7312301b9a2c2a26aa2e8cd","unresolved":false,"context_lines":[{"line_number":9,"context_line":"During live migration process, a _live_migration_monitor thread"},{"line_number":10,"context_line":"check progress of migration on source host, if for any reason"},{"line_number":11,"context_line":"we hit infrastructure issue involving a DB/RPC/libvirt-timeout"},{"line_number":12,"context_line":"failure, Exception raises to manager and instance/migration"},{"line_number":13,"context_line":"is set to ERROR state."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"The issue is that we may let live-migration job running out of nova"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"cfe804cc_9cd16656","line":12,"range":{"start_line":12,"start_character":9,"end_line":12,"end_character":37},"in_reply_to":"a83e3589_32ea3119","updated":"2021-08-06 08:03:32.000000000","message":"Done","commit_id":"f83ee41677feb2eb74077f48668bb2517105a75c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"30156b0e70837ca4413ac4614d54cad6168d83a5","unresolved":true,"context_lines":[{"line_number":21,"context_line":"during _live_migration_monitor."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Change-Id: Ia593b500425c81e54eb401e38264db5cc5fc1f93"},{"line_number":24,"context_line":"Closes-Bug: #1905944"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"e53fad38_f9d64e27","line":24,"range":{"start_line":24,"start_character":0,"end_line":24,"end_character":20},"updated":"2021-08-17 14:23:21.000000000","message":"i dont know if we want a release not for this to make it more visable?","commit_id":"39f0af5d18d6bea34fa15b8f7778115b25432749"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"22ee83b489a316a5f6a1115b3bca7c341781a958","unresolved":true,"context_lines":[{"line_number":9989,"context_line":"        except Exception as ex:"},{"line_number":9990,"context_line":"            LOG.warning(\"Error monitoring migration: %(ex)s\","},{"line_number":9991,"context_line":"                        {\"ex\": ex}, instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":9992,"context_line":"            # NOTE(aarents): Ensure job is aborted if any, before going back"},{"line_number":9993,"context_line":"            # to manager, this will avoid the job to complete with a guest"},{"line_number":9994,"context_line":"            # resumed on target, while nova still consider it on source."},{"line_number":9995,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"846d626f_d1a0b77d","line":9992,"range":{"start_line":9992,"start_character":51,"end_line":9992,"end_character":57},"updated":"2021-07-08 10:13:12.000000000","message":"nit - if still running,","commit_id":"0a6e0ca87eeb4a5135654dcf7772e84f7668618f"},{"author":{"_account_id":28332,"name":"Alexandre arents","email":"alexandre.arents@corp.ovh.com","username":"aarents"},"change_message_id":"fd5b8d0c28207db3ac0bcb171bee19b5e2a583f5","unresolved":false,"context_lines":[{"line_number":9989,"context_line":"        except Exception as ex:"},{"line_number":9990,"context_line":"            LOG.warning(\"Error monitoring migration: %(ex)s\","},{"line_number":9991,"context_line":"                        {\"ex\": ex}, instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":9992,"context_line":"            # NOTE(aarents): Ensure job is aborted if any, before going back"},{"line_number":9993,"context_line":"            # to manager, this will avoid the job to complete with a guest"},{"line_number":9994,"context_line":"            # resumed on target, while nova still consider it on source."},{"line_number":9995,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"a3476433_9a3a8302","line":9992,"range":{"start_line":9992,"start_character":51,"end_line":9992,"end_character":57},"in_reply_to":"846d626f_d1a0b77d","updated":"2021-07-15 14:11:11.000000000","message":"Done","commit_id":"0a6e0ca87eeb4a5135654dcf7772e84f7668618f"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"22ee83b489a316a5f6a1115b3bca7c341781a958","unresolved":true,"context_lines":[{"line_number":9990,"context_line":"            LOG.warning(\"Error monitoring migration: %(ex)s\","},{"line_number":9991,"context_line":"                        {\"ex\": ex}, instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":9992,"context_line":"            # NOTE(aarents): Ensure job is aborted if any, before going back"},{"line_number":9993,"context_line":"            # to manager, this will avoid the job to complete with a guest"},{"line_number":9994,"context_line":"            # resumed on target, while nova still consider it on source."},{"line_number":9995,"context_line":"            try:"},{"line_number":9996,"context_line":"                self.live_migration_abort(instance)"}],"source_content_type":"text/x-python","patch_set":2,"id":"c99c0b4a_e8cd344d","line":9993,"range":{"start_line":9993,"start_character":50,"end_line":9993,"end_character":61},"updated":"2021-07-08 10:13:12.000000000","message":"nit - completing","commit_id":"0a6e0ca87eeb4a5135654dcf7772e84f7668618f"},{"author":{"_account_id":28332,"name":"Alexandre arents","email":"alexandre.arents@corp.ovh.com","username":"aarents"},"change_message_id":"fd5b8d0c28207db3ac0bcb171bee19b5e2a583f5","unresolved":false,"context_lines":[{"line_number":9990,"context_line":"            LOG.warning(\"Error monitoring migration: %(ex)s\","},{"line_number":9991,"context_line":"                        {\"ex\": ex}, instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":9992,"context_line":"            # NOTE(aarents): Ensure job is aborted if any, before going back"},{"line_number":9993,"context_line":"            # to manager, this will avoid the job to complete with a guest"},{"line_number":9994,"context_line":"            # resumed on target, while nova still consider it on source."},{"line_number":9995,"context_line":"            try:"},{"line_number":9996,"context_line":"                self.live_migration_abort(instance)"}],"source_content_type":"text/x-python","patch_set":2,"id":"cc6baa2c_379a9de0","line":9993,"range":{"start_line":9993,"start_character":50,"end_line":9993,"end_character":61},"in_reply_to":"c99c0b4a_e8cd344d","updated":"2021-07-15 14:11:11.000000000","message":"Done","commit_id":"0a6e0ca87eeb4a5135654dcf7772e84f7668618f"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"22ee83b489a316a5f6a1115b3bca7c341781a958","unresolved":true,"context_lines":[{"line_number":9995,"context_line":"            try:"},{"line_number":9996,"context_line":"                self.live_migration_abort(instance)"},{"line_number":9997,"context_line":"            except Exception:"},{"line_number":9998,"context_line":"                pass"},{"line_number":9999,"context_line":"            raise"},{"line_number":10000,"context_line":"        finally:"},{"line_number":10001,"context_line":"            LOG.debug(\"Live migration monitoring is all done\","}],"source_content_type":"text/x-python","patch_set":2,"id":"186e607b_fce93d9b","line":9998,"range":{"start_line":9998,"start_character":16,"end_line":9998,"end_character":20},"updated":"2021-07-08 10:13:12.000000000","message":"nit - can you at least log a warning that we are ignoring the failure to abort the migration?","commit_id":"0a6e0ca87eeb4a5135654dcf7772e84f7668618f"},{"author":{"_account_id":28332,"name":"Alexandre arents","email":"alexandre.arents@corp.ovh.com","username":"aarents"},"change_message_id":"fd5b8d0c28207db3ac0bcb171bee19b5e2a583f5","unresolved":true,"context_lines":[{"line_number":9995,"context_line":"            try:"},{"line_number":9996,"context_line":"                self.live_migration_abort(instance)"},{"line_number":9997,"context_line":"            except Exception:"},{"line_number":9998,"context_line":"                pass"},{"line_number":9999,"context_line":"            raise"},{"line_number":10000,"context_line":"        finally:"},{"line_number":10001,"context_line":"            LOG.debug(\"Live migration monitoring is all done\","}],"source_content_type":"text/x-python","patch_set":2,"id":"35849d38_ca17a418","line":9998,"range":{"start_line":9998,"start_character":16,"end_line":9998,"end_character":20},"in_reply_to":"186e607b_fce93d9b","updated":"2021-07-15 14:11:11.000000000","message":"Makes sense","commit_id":"0a6e0ca87eeb4a5135654dcf7772e84f7668618f"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d2c176009b7350584964b70c63a67d77d2bb41cd","unresolved":true,"context_lines":[{"line_number":9963,"context_line":"            LOG.warning(\"Error monitoring migration: %(ex)s\","},{"line_number":9964,"context_line":"                        {\"ex\": ex}, instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":9965,"context_line":"            # NOTE(aarents): Ensure job is aborted if still running, before"},{"line_number":9966,"context_line":"            # going back to manager, this will avoid the job completing"},{"line_number":9967,"context_line":"            # with a guest resumed on target, while nova still consider it"},{"line_number":9968,"context_line":"            # on source."},{"line_number":9969,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"468b9d22_ce01453a","line":9966,"range":{"start_line":9966,"start_character":28,"end_line":9966,"end_character":35},"updated":"2021-07-20 10:54:41.000000000","message":"we don\u0027t really \"go back to the \"manager\". It\u0027s just the same service running, here the source nova-compute one. \n\nYou could sat \"Ensure job is aborted if still running before raising the exception so this would avoid the migration to be done and the libvirt guest to be resumed on the target while the instance record would still related to the source host.","commit_id":"f83ee41677feb2eb74077f48668bb2517105a75c"},{"author":{"_account_id":28332,"name":"Alexandre arents","email":"alexandre.arents@corp.ovh.com","username":"aarents"},"change_message_id":"1c70e1a11c40a511a7312301b9a2c2a26aa2e8cd","unresolved":false,"context_lines":[{"line_number":9963,"context_line":"            LOG.warning(\"Error monitoring migration: %(ex)s\","},{"line_number":9964,"context_line":"                        {\"ex\": ex}, instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":9965,"context_line":"            # NOTE(aarents): Ensure job is aborted if still running, before"},{"line_number":9966,"context_line":"            # going back to manager, this will avoid the job completing"},{"line_number":9967,"context_line":"            # with a guest resumed on target, while nova still consider it"},{"line_number":9968,"context_line":"            # on source."},{"line_number":9969,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"edcbc438_e4afa939","line":9966,"range":{"start_line":9966,"start_character":28,"end_line":9966,"end_character":35},"in_reply_to":"468b9d22_ce01453a","updated":"2021-08-06 08:03:32.000000000","message":"Done, I\u0027m fine with this repharing too.","commit_id":"f83ee41677feb2eb74077f48668bb2517105a75c"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d2c176009b7350584964b70c63a67d77d2bb41cd","unresolved":true,"context_lines":[{"line_number":9970,"context_line":"                self.live_migration_abort(instance)"},{"line_number":9971,"context_line":"            except Exception:"},{"line_number":9972,"context_line":"                LOG.warning(\"Error occured when trying to abort live \","},{"line_number":9973,"context_line":"                            \"migration job, ignoring it.\", instance\u003dinstance)"},{"line_number":9974,"context_line":"            raise"},{"line_number":9975,"context_line":"        finally:"},{"line_number":9976,"context_line":"            LOG.debug(\"Live migration monitoring is all done\","}],"source_content_type":"text/x-python","patch_set":3,"id":"39801a5a_05b28c08","line":9973,"updated":"2021-07-20 10:54:41.000000000","message":"we\u0027re then in a terrible situation if we wanted to abort the migration but we got an exception, because we don\u0027t know where and when it was having a problem, but that\u0027s fair enough, the instance will get an ERROR status.","commit_id":"f83ee41677feb2eb74077f48668bb2517105a75c"},{"author":{"_account_id":28332,"name":"Alexandre arents","email":"alexandre.arents@corp.ovh.com","username":"aarents"},"change_message_id":"1c70e1a11c40a511a7312301b9a2c2a26aa2e8cd","unresolved":false,"context_lines":[{"line_number":9970,"context_line":"                self.live_migration_abort(instance)"},{"line_number":9971,"context_line":"            except Exception:"},{"line_number":9972,"context_line":"                LOG.warning(\"Error occured when trying to abort live \","},{"line_number":9973,"context_line":"                            \"migration job, ignoring it.\", instance\u003dinstance)"},{"line_number":9974,"context_line":"            raise"},{"line_number":9975,"context_line":"        finally:"},{"line_number":9976,"context_line":"            LOG.debug(\"Live migration monitoring is all done\","}],"source_content_type":"text/x-python","patch_set":3,"id":"02830b41_50e89208","line":9973,"in_reply_to":"39801a5a_05b28c08","updated":"2021-08-06 08:03:32.000000000","message":"Ack","commit_id":"f83ee41677feb2eb74077f48668bb2517105a75c"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e8e6c9326a6019cd6ccc9d4f928145abdd4feebf","unresolved":true,"context_lines":[{"line_number":9967,"context_line":"            # done and the libvirt guest to be resumed on the target while"},{"line_number":9968,"context_line":"            # the instance record would still related to the source host."},{"line_number":9969,"context_line":"            try:"},{"line_number":9970,"context_line":"                self.live_migration_abort(instance)"},{"line_number":9971,"context_line":"            except Exception:"},{"line_number":9972,"context_line":"                LOG.warning(\"Error occured when trying to abort live \","},{"line_number":9973,"context_line":"                            \"migration job, ignoring it.\", instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":5,"id":"166819d8_b8b921ac","line":9970,"updated":"2021-08-06 09:06:15.000000000","message":"there is a recover_method passed in that is used to by the monitor when libvirt report errors, could we reuse that in case of other errors as well? Interestingly nova passes in nova.compute.manager.ComputeManager._rollback_live_migration() as recover_method so I\u0027m also wondering what is better here live_migration_abort or _rollback_live_migration .","commit_id":"b8c005d34245739571de342aab6726051e521be3"},{"author":{"_account_id":28332,"name":"Alexandre arents","email":"alexandre.arents@corp.ovh.com","username":"aarents"},"change_message_id":"d07ee8199fc721967b8ab67d812b417a5dc5ba0f","unresolved":true,"context_lines":[{"line_number":9967,"context_line":"            # done and the libvirt guest to be resumed on the target while"},{"line_number":9968,"context_line":"            # the instance record would still related to the source host."},{"line_number":9969,"context_line":"            try:"},{"line_number":9970,"context_line":"                self.live_migration_abort(instance)"},{"line_number":9971,"context_line":"            except Exception:"},{"line_number":9972,"context_line":"                LOG.warning(\"Error occured when trying to abort live \","},{"line_number":9973,"context_line":"                            \"migration job, ignoring it.\", instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":5,"id":"55215361_8bea7a6a","line":9970,"in_reply_to":"166819d8_b8b921ac","updated":"2021-08-10 16:04:39.000000000","message":"I see, but _rollback_live_migration job is mainly doing db/infra cleanup via RPC,\nWhich will probably fail because we are here mainly due to DB / RPC / network failure.\n\nSo we can either:\n-keep the change as it is because of that.\n\n-eventually use call _rollback_live_migration instead of live_migration_abort\n but by adding live_migration_abort() at the beginning of _rollback_live_migration()\n with an additional flag _rollback_live_migration(..., force_abort\u003dFalse)? I did not test.\n\nLet me know if that way deserves to be explored.\n\nWhere _rollback_live_migration is called:\ndef _do_live_migration (before start of livemigration)\n    try:                                                                                                                                                                                                                             \n\tself._waiting_live_migrations.pop(instance.uuid)                                                                                                                                                                             \n    except KeyError:  \n\t\t  _rollback_live_migration\ndef _live_migration_monitor: (during jobstat monitor loop)\n\telif info.type \u003d\u003d libvirt.VIR_DOMAIN_JOB_FAILED:\n\t   recover_method(...)\n\telif info.type \u003d\u003d libvirt.VIR_DOMAIN_JOB_CANCELLED:\n\t   recover_method(...)","commit_id":"b8c005d34245739571de342aab6726051e521be3"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"28485e46bafbba1f08523c200e028b1d25306908","unresolved":true,"context_lines":[{"line_number":9967,"context_line":"            # done and the libvirt guest to be resumed on the target while"},{"line_number":9968,"context_line":"            # the instance record would still related to the source host."},{"line_number":9969,"context_line":"            try:"},{"line_number":9970,"context_line":"                self.live_migration_abort(instance)"},{"line_number":9971,"context_line":"            except Exception:"},{"line_number":9972,"context_line":"                LOG.warning(\"Error occured when trying to abort live \","},{"line_number":9973,"context_line":"                            \"migration job, ignoring it.\", instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5d71a3bd_7a26c0ba","line":9970,"in_reply_to":"55215361_8bea7a6a","updated":"2021-08-17 11:57:06.000000000","message":"If the DB or the RPC is down then self.live_migration_abort(instance) will fail at _set_migration_status() as that tries to update the database via RPC. Therefore live_migration_abort will never call self.driver.live_migration_abort(). So I don\u0027t think this patch actually solves the problem it intended to solve. If the DB or the RPC is down this patch will not cancel the ongoing migration on libvirt level.","commit_id":"b8c005d34245739571de342aab6726051e521be3"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"de1a912ebcf2a5c0ddbe454bee2a7445bb391ba2","unresolved":true,"context_lines":[{"line_number":9967,"context_line":"            # done and the libvirt guest to be resumed on the target while"},{"line_number":9968,"context_line":"            # the instance record would still related to the source host."},{"line_number":9969,"context_line":"            try:"},{"line_number":9970,"context_line":"                self.live_migration_abort(instance)"},{"line_number":9971,"context_line":"            except Exception:"},{"line_number":9972,"context_line":"                LOG.warning(\"Error occured when trying to abort live \","},{"line_number":9973,"context_line":"                            \"migration job, ignoring it.\", instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":5,"id":"c8aee7d1_2abcc8c4","line":9970,"in_reply_to":"5d71a3bd_7a26c0ba","updated":"2021-08-17 12:25:40.000000000","message":"oop. I mixed the live_migration_abort calls. Ignore my above comment.","commit_id":"b8c005d34245739571de342aab6726051e521be3"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"b05e824492009708642cdc30ec6d73e8da7aa05a","unresolved":true,"context_lines":[{"line_number":9967,"context_line":"            # done and the libvirt guest to be resumed on the target while"},{"line_number":9968,"context_line":"            # the instance record would still related to the source host."},{"line_number":9969,"context_line":"            try:"},{"line_number":9970,"context_line":"                self.live_migration_abort(instance)"},{"line_number":9971,"context_line":"            except Exception:"},{"line_number":9972,"context_line":"                LOG.warning(\"Error occured when trying to abort live \","},{"line_number":9973,"context_line":"                            \"migration job, ignoring it.\", instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":5,"id":"78c6a825_baa7b71a","line":9970,"in_reply_to":"5d71a3bd_7a26c0ba","updated":"2021-08-17 12:24:36.000000000","message":"this is calling the dirver metod https://review.opendev.org/plugins/gitiles/openstack/nova/+/refs/changes/35/764435/5/nova/virt/libvirt/driver.py#9434\n\naddint this abort here likely will funciton but im worried what that will mean if we we are using post copy and we are already in the post copy phase where the isntance is already running on the dest.\n\nthis only feels safe to me if the instance is still running on the source node","commit_id":"b8c005d34245739571de342aab6726051e521be3"},{"author":{"_account_id":28332,"name":"Alexandre arents","email":"alexandre.arents@corp.ovh.com","username":"aarents"},"change_message_id":"f97d5c3aca5dc43dd9d3f913f402b6577d2b62ae","unresolved":false,"context_lines":[{"line_number":9967,"context_line":"            # done and the libvirt guest to be resumed on the target while"},{"line_number":9968,"context_line":"            # the instance record would still related to the source host."},{"line_number":9969,"context_line":"            try:"},{"line_number":9970,"context_line":"                self.live_migration_abort(instance)"},{"line_number":9971,"context_line":"            except Exception:"},{"line_number":9972,"context_line":"                LOG.warning(\"Error occured when trying to abort live \","},{"line_number":9973,"context_line":"                            \"migration job, ignoring it.\", instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":5,"id":"6640741a_720cbb19","line":9970,"in_reply_to":"666ba33b_3be1b724","updated":"2021-08-17 14:04:48.000000000","message":"comment added about POSTCOPY case, thanks","commit_id":"b8c005d34245739571de342aab6726051e521be3"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"d93befad51a9f85119d06a4c64a160dff832a079","unresolved":true,"context_lines":[{"line_number":9967,"context_line":"            # done and the libvirt guest to be resumed on the target while"},{"line_number":9968,"context_line":"            # the instance record would still related to the source host."},{"line_number":9969,"context_line":"            try:"},{"line_number":9970,"context_line":"                self.live_migration_abort(instance)"},{"line_number":9971,"context_line":"            except Exception:"},{"line_number":9972,"context_line":"                LOG.warning(\"Error occured when trying to abort live \","},{"line_number":9973,"context_line":"                            \"migration job, ignoring it.\", instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":5,"id":"666ba33b_3be1b724","line":9970,"in_reply_to":"c8aee7d1_2abcc8c4","updated":"2021-08-17 12:47:24.000000000","message":"As discussed on IRC the request to abort will fail for post live migrations:\n\nhttps://libvirt.org/html/libvirt-libvirt-domain.html#virDomainAbortJob\n\n\u003e In case the job is a migration in a post-copy mode, virDomainAbortJob will report an error (see virDomainMigrateStartPostCopy for more details).\n\nhttps://libvirt.org/html/libvirt-libvirt-domain.html#virDomainMigrateStartPostCopy\n\n\u003e On the other hand once the guest is running on the destination host, the migration can no longer be rolled back because none of the hosts has complete state. \n\u003e If this happens, libvirt will leave the domain paused on both hosts with VIR_DOMAIN_PAUSED_POSTCOPY_FAILED reason. It\u0027s up to the upper layer to decide what \n\u003e to do in such case. Because of this, libvirt will refuse to cancel post-copy migration via virDomainAbortJob.\n\nA comment here referencing this would be useful.","commit_id":"b8c005d34245739571de342aab6726051e521be3"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"b05e824492009708642cdc30ec6d73e8da7aa05a","unresolved":true,"context_lines":[{"line_number":9968,"context_line":"            # the instance record would still related to the source host."},{"line_number":9969,"context_line":"            try:"},{"line_number":9970,"context_line":"                self.live_migration_abort(instance)"},{"line_number":9971,"context_line":"            except Exception:"},{"line_number":9972,"context_line":"                LOG.warning(\"Error occured when trying to abort live \","},{"line_number":9973,"context_line":"                            \"migration job, ignoring it.\", instance\u003dinstance)"},{"line_number":9974,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":5,"id":"5010f7ca_cf4207cf","line":9971,"range":{"start_line":9971,"start_character":0,"end_line":9971,"end_character":3},"updated":"2021-08-17 12:24:36.000000000","message":"this should proably be \n except libvirt.libvirtError:\n\ninstead\n\nhttps://review.opendev.org/plugins/gitiles/openstack/nova/+/refs/changes/35/764435/5/nova/virt/libvirt/driver.py#9446","commit_id":"b8c005d34245739571de342aab6726051e521be3"},{"author":{"_account_id":28332,"name":"Alexandre arents","email":"alexandre.arents@corp.ovh.com","username":"aarents"},"change_message_id":"f97d5c3aca5dc43dd9d3f913f402b6577d2b62ae","unresolved":false,"context_lines":[{"line_number":9968,"context_line":"            # the instance record would still related to the source host."},{"line_number":9969,"context_line":"            try:"},{"line_number":9970,"context_line":"                self.live_migration_abort(instance)"},{"line_number":9971,"context_line":"            except Exception:"},{"line_number":9972,"context_line":"                LOG.warning(\"Error occured when trying to abort live \","},{"line_number":9973,"context_line":"                            \"migration job, ignoring it.\", instance\u003dinstance)"},{"line_number":9974,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":5,"id":"b14af469_5fe31a8f","line":9971,"range":{"start_line":9971,"start_character":0,"end_line":9971,"end_character":3},"in_reply_to":"5010f7ca_cf4207cf","updated":"2021-08-17 14:04:48.000000000","message":"Done","commit_id":"b8c005d34245739571de342aab6726051e521be3"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"30156b0e70837ca4413ac4614d54cad6168d83a5","unresolved":true,"context_lines":[{"line_number":9969,"context_line":"            try:"},{"line_number":9970,"context_line":"                # If migration is running in post-copy mode and guest"},{"line_number":9971,"context_line":"                # already running on dest host, libvirt will refuse to"},{"line_number":9972,"context_line":"                # cancel migration job."},{"line_number":9973,"context_line":"                self.live_migration_abort(instance)"},{"line_number":9974,"context_line":"            except libvirt.libvirtError:"},{"line_number":9975,"context_line":"                LOG.warning(\"Error occured when trying to abort live \","}],"source_content_type":"text/x-python","patch_set":6,"id":"dd7f9fe6_ec043a44","line":9972,"updated":"2021-08-17 14:23:21.000000000","message":"ack, thanks for the note +1","commit_id":"39f0af5d18d6bea34fa15b8f7778115b25432749"}]}
