)]}'
{"nova/api/openstack/compute/server_migrations.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"d700aaea5e28ad46e9b694640f8e2a1344730dc1","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    @wsgi.Controller.api_version(\"2.23\")"},{"line_number":62,"context_line":"    @wsgi.response(202)"},{"line_number":63,"context_line":"    @extensions.expected_errors((400, 403, 404, 409))"},{"line_number":64,"context_line":"    def delete(self, req, server_id, id):"},{"line_number":65,"context_line":"        \"\"\"Abort an in progress migration of an instance.\"\"\""},{"line_number":66,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_6527c712","line":63,"range":{"start_line":63,"start_character":38,"end_line":63,"end_character":41},"updated":"2016-02-22 07:13:55.000000000","message":"I guess you add 403 for Policy authorization failed? but that is handled by \u0027expected_errors\u0027 internally. Except that I didn\u0027t see anywhere will return 403.","commit_id":"ac26aca6fc087a14e49cc7320158733c6f5590f6"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"12507f77b7af453c8d1b67a1649437439a4ab534","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    @wsgi.Controller.api_version(\"2.23\")"},{"line_number":62,"context_line":"    @wsgi.response(202)"},{"line_number":63,"context_line":"    @extensions.expected_errors((400, 403, 404, 409))"},{"line_number":64,"context_line":"    def delete(self, req, server_id, id):"},{"line_number":65,"context_line":"        \"\"\"Abort an in progress migration of an instance.\"\"\""},{"line_number":66,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_28cc6f69","line":63,"range":{"start_line":63,"start_character":38,"end_line":63,"end_character":41},"in_reply_to":"bae84128_6527c712","updated":"2016-02-22 12:21:10.000000000","message":"yes it is for the Policy authorization failed, I\u0027ll remove it from there, thanks,","commit_id":"ac26aca6fc087a14e49cc7320158733c6f5590f6"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"d700aaea5e28ad46e9b694640f8e2a1344730dc1","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            self.compute_api.live_migrate_abort(context, instance, id)"},{"line_number":72,"context_line":"        except exception.InstanceInvalidState as state_error:"},{"line_number":73,"context_line":"            common.raise_http_conflict_for_instance_invalid_state("},{"line_number":74,"context_line":"                    state_error, \"liveMigrateAbort\", server_id)"},{"line_number":75,"context_line":"        except exception.MigrationNotFoundForInstance as e:"},{"line_number":76,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":77,"context_line":"        except exception.InvalidMigrationState as e:"}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_a578aff3","line":74,"range":{"start_line":74,"start_character":34,"end_line":74,"end_character":50},"updated":"2016-02-22 07:13:55.000000000","message":"We didn\u0027t have an action called \u0027liveMigrateAbort\u0027. To fit the error message template, how about we write like \u0027abort live migration\u0027?","commit_id":"ac26aca6fc087a14e49cc7320158733c6f5590f6"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"12507f77b7af453c8d1b67a1649437439a4ab534","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            self.compute_api.live_migrate_abort(context, instance, id)"},{"line_number":72,"context_line":"        except exception.InstanceInvalidState as state_error:"},{"line_number":73,"context_line":"            common.raise_http_conflict_for_instance_invalid_state("},{"line_number":74,"context_line":"                    state_error, \"liveMigrateAbort\", server_id)"},{"line_number":75,"context_line":"        except exception.MigrationNotFoundForInstance as e:"},{"line_number":76,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":77,"context_line":"        except exception.InvalidMigrationState as e:"}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_085b6b55","line":74,"range":{"start_line":74,"start_character":34,"end_line":74,"end_character":50},"in_reply_to":"bae84128_a578aff3","updated":"2016-02-22 12:21:10.000000000","message":"ok I\u0027ll change it.","commit_id":"ac26aca6fc087a14e49cc7320158733c6f5590f6"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"d700aaea5e28ad46e9b694640f8e2a1344730dc1","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        except exception.MigrationNotFoundForInstance as e:"},{"line_number":76,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":77,"context_line":"        except exception.InvalidMigrationState as e:"},{"line_number":78,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"class ServerMigrations(extensions.V21APIExtensionBase):"}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_a01edd60","line":78,"range":{"start_line":78,"start_character":22,"end_line":78,"end_character":36},"updated":"2016-02-22 07:13:55.000000000","message":"I feel like this should be 409","commit_id":"ac26aca6fc087a14e49cc7320158733c6f5590f6"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"12507f77b7af453c8d1b67a1649437439a4ab534","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        except exception.MigrationNotFoundForInstance as e:"},{"line_number":76,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":77,"context_line":"        except exception.InvalidMigrationState as e:"},{"line_number":78,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"class ServerMigrations(extensions.V21APIExtensionBase):"}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_83511c11","line":78,"range":{"start_line":78,"start_character":22,"end_line":78,"end_character":36},"in_reply_to":"bae84128_a01edd60","updated":"2016-02-22 12:21:10.000000000","message":"I am following what we have done for the same exception here:\nhttps://review.openstack.org/#/c/245921/39/nova/api/openstack/compute/server_migrations.py@54","commit_id":"ac26aca6fc087a14e49cc7320158733c6f5590f6"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"1539c3baeb843a3042b4d4e921e448dd384f9e55","unresolved":false,"context_lines":[{"line_number":73,"context_line":"            common.raise_http_conflict_for_instance_invalid_state("},{"line_number":74,"context_line":"                    state_error, \"abort live migration\", server_id)"},{"line_number":75,"context_line":"        except exception.MigrationNotFoundForInstance as e:"},{"line_number":76,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":77,"context_line":"        except exception.InvalidMigrationState as e:"},{"line_number":78,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":79,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_94166d53","line":76,"range":{"start_line":76,"start_character":22,"end_line":76,"end_character":34},"updated":"2016-02-22 16:29:15.000000000","message":"Here we have a mismatch with what is above (HTTPBadRequest). But let\u0027s see others opinion (I prefer consistency).","commit_id":"69a34f8ecdcc98efea8069890a7feee6cddd64f8"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"bcc06dae275b00c61f7c1676a7172686b896aa2a","unresolved":false,"context_lines":[{"line_number":73,"context_line":"            common.raise_http_conflict_for_instance_invalid_state("},{"line_number":74,"context_line":"                    state_error, \"abort live migration\", server_id)"},{"line_number":75,"context_line":"        except exception.MigrationNotFoundForInstance as e:"},{"line_number":76,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":77,"context_line":"        except exception.InvalidMigrationState as e:"},{"line_number":78,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":79,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_12a99890","line":76,"range":{"start_line":76,"start_character":22,"end_line":76,"end_character":34},"in_reply_to":"bae84128_826a81ec","updated":"2016-02-23 11:38:48.000000000","message":"I agree - go with consistency","commit_id":"69a34f8ecdcc98efea8069890a7feee6cddd64f8"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"0b69f678bdf3f6e5039ee3b2e7a59cbf2d87aedd","unresolved":false,"context_lines":[{"line_number":73,"context_line":"            common.raise_http_conflict_for_instance_invalid_state("},{"line_number":74,"context_line":"                    state_error, \"abort live migration\", server_id)"},{"line_number":75,"context_line":"        except exception.MigrationNotFoundForInstance as e:"},{"line_number":76,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":77,"context_line":"        except exception.InvalidMigrationState as e:"},{"line_number":78,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":79,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_b3eb9577","line":76,"range":{"start_line":76,"start_character":22,"end_line":76,"end_character":34},"in_reply_to":"bae84128_826a81ec","updated":"2016-02-23 11:58:34.000000000","message":"The difference between this change and the force_complete is that the force_complete is an action this is a DELETE call on the resource migrations for this reason I thought it was more correct to report HTTPNotFound but it is a subtle difference and I am happy to change it, let discuss it at the IRC meeting","commit_id":"69a34f8ecdcc98efea8069890a7feee6cddd64f8"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"949b88ba9bf06e4dbbd542be90ff12f17ac074fd","unresolved":false,"context_lines":[{"line_number":73,"context_line":"            common.raise_http_conflict_for_instance_invalid_state("},{"line_number":74,"context_line":"                    state_error, \"abort live migration\", server_id)"},{"line_number":75,"context_line":"        except exception.MigrationNotFoundForInstance as e:"},{"line_number":76,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":77,"context_line":"        except exception.InvalidMigrationState as e:"},{"line_number":78,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":79,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_826a81ec","line":76,"range":{"start_line":76,"start_character":22,"end_line":76,"end_character":34},"in_reply_to":"bae84128_94166d53","updated":"2016-02-23 10:04:15.000000000","message":"Agree with you, HTTPBadRequest is more better.\n\nforce_complete is HTTPBadRequest.\n\nHTTPBadRequest is more likely to express: the action can not apply to an resource. \n\n\nHTTPNotFound means the resource is not found.","commit_id":"69a34f8ecdcc98efea8069890a7feee6cddd64f8"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"4d495a0a2ab2289d26a4abba2c00e9b921f49c4f","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            self.compute_api.live_migrate_abort(context, instance, id)"},{"line_number":143,"context_line":"        except exception.InstanceInvalidState as state_error:"},{"line_number":144,"context_line":"            common.raise_http_conflict_for_instance_invalid_state("},{"line_number":145,"context_line":"                    state_error, \"abort live migration\", server_id)"},{"line_number":146,"context_line":"        except exception.MigrationNotFoundForInstance as e:"},{"line_number":147,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":148,"context_line":"        except exception.InvalidMigrationState as e:"}],"source_content_type":"text/x-python","patch_set":11,"id":"bae84128_85dd4fe2","line":145,"updated":"2016-02-23 17:54:08.000000000","message":"so, how do we hit this exception, I am confused?","commit_id":"37a0155bd9ed8db8b1f45d9788fb25f8f3011c4c"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"d2fcb23949275a3beccfa6969d9d7d75e36353f6","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            self.compute_api.live_migrate_abort(context, instance, id)"},{"line_number":143,"context_line":"        except exception.InstanceInvalidState as state_error:"},{"line_number":144,"context_line":"            common.raise_http_conflict_for_instance_invalid_state("},{"line_number":145,"context_line":"                    state_error, \"abort live migration\", server_id)"},{"line_number":146,"context_line":"        except exception.MigrationNotFoundForInstance as e:"},{"line_number":147,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":148,"context_line":"        except exception.InvalidMigrationState as e:"}],"source_content_type":"text/x-python","patch_set":11,"id":"bae84128_f4b82e2c","line":145,"in_reply_to":"bae84128_69e60be9","updated":"2016-02-24 07:44:57.000000000","message":"check the code. the decorator does can raise this exception.","commit_id":"37a0155bd9ed8db8b1f45d9788fb25f8f3011c4c"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"06471e9928ee232af6cca7035bbfb3baeb478fe9","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            self.compute_api.live_migrate_abort(context, instance, id)"},{"line_number":143,"context_line":"        except exception.InstanceInvalidState as state_error:"},{"line_number":144,"context_line":"            common.raise_http_conflict_for_instance_invalid_state("},{"line_number":145,"context_line":"                    state_error, \"abort live migration\", server_id)"},{"line_number":146,"context_line":"        except exception.MigrationNotFoundForInstance as e:"},{"line_number":147,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":148,"context_line":"        except exception.InvalidMigrationState as e:"}],"source_content_type":"text/x-python","patch_set":11,"id":"bae84128_69e60be9","line":145,"in_reply_to":"bae84128_85dd4fe2","updated":"2016-02-24 06:58:17.000000000","message":"There is decorator\n@check_instance_state(task_state\u003d[task_states.MIGRATING])\nin compute API that will throw this exception in case that VM is not being live migrated","commit_id":"37a0155bd9ed8db8b1f45d9788fb25f8f3011c4c"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"0f55886cd8cc0e6c56ee4346a308cb5ea5e20de4","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            self.compute_api.live_migrate_abort(context, instance, id)"},{"line_number":143,"context_line":"        except exception.InstanceInvalidState as state_error:"},{"line_number":144,"context_line":"            common.raise_http_conflict_for_instance_invalid_state("},{"line_number":145,"context_line":"                    state_error, \"abort live migration\", server_id)"},{"line_number":146,"context_line":"        except exception.MigrationNotFoundForInstance as e:"},{"line_number":147,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":148,"context_line":"        except exception.InvalidMigrationState as e:"}],"source_content_type":"text/x-python","patch_set":11,"id":"bae84128_ca573b24","line":145,"in_reply_to":"bae84128_9afd8870","updated":"2016-02-24 10:56:32.000000000","message":"Oh sorry, I am going blind, I see it now.","commit_id":"37a0155bd9ed8db8b1f45d9788fb25f8f3011c4c"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"6ffb377e1ee81c2d09f180ee7f1d4ae9db82dcbe","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            self.compute_api.live_migrate_abort(context, instance, id)"},{"line_number":143,"context_line":"        except exception.InstanceInvalidState as state_error:"},{"line_number":144,"context_line":"            common.raise_http_conflict_for_instance_invalid_state("},{"line_number":145,"context_line":"                    state_error, \"abort live migration\", server_id)"},{"line_number":146,"context_line":"        except exception.MigrationNotFoundForInstance as e:"},{"line_number":147,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":148,"context_line":"        except exception.InvalidMigrationState as e:"}],"source_content_type":"text/x-python","patch_set":11,"id":"bae84128_9afd8870","line":145,"in_reply_to":"bae84128_f4b82e2c","updated":"2016-02-24 09:57:56.000000000","message":"@John what Pawel and ShaoHe said.","commit_id":"37a0155bd9ed8db8b1f45d9788fb25f8f3011c4c"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"b9220dc26d769499d23809dc9f57c4b27c67c85a","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        except exception.MigrationNotFoundForInstance as e:"},{"line_number":147,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":148,"context_line":"        except exception.InvalidMigrationState as e:"},{"line_number":149,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"class ServerMigrations(extensions.V21APIExtensionBase):"}],"source_content_type":"text/x-python","patch_set":11,"id":"bae84128_b371bc46","line":149,"updated":"2016-02-23 17:46:48.000000000","message":"I am wondering why this is not the same as exception.InstanceInvalidState, I should dig into this more.\n\nand need to keep thinking about this:\nhttp://specs.openstack.org/openstack/api-wg/guidelines/http.html#failure-code-clarifications\n\nI can\u0027t find where InstanceInvalidState gets raised. I guess I am missing it?","commit_id":"37a0155bd9ed8db8b1f45d9788fb25f8f3011c4c"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"6ffb377e1ee81c2d09f180ee7f1d4ae9db82dcbe","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        except exception.MigrationNotFoundForInstance as e:"},{"line_number":147,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":148,"context_line":"        except exception.InvalidMigrationState as e:"},{"line_number":149,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"class ServerMigrations(extensions.V21APIExtensionBase):"}],"source_content_type":"text/x-python","patch_set":11,"id":"bae84128_35f44d59","line":149,"in_reply_to":"bae84128_b371bc46","updated":"2016-02-24 09:57:56.000000000","message":"The InstanceInvalidState is raised in the compute api by the check_instance_state decorator. We ask for the instance to have a task_state\u003dMIGRATING.\nThe InvalidMigrationState is raised in compute manager if the Migration object is not in a running state.\nDoes that answer your questions?","commit_id":"37a0155bd9ed8db8b1f45d9788fb25f8f3011c4c"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"7ce676972357145c1d97f4be89de213880ac3d54","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            self.compute_api.live_migrate_abort(context, instance, id)"},{"line_number":143,"context_line":"        except exception.InstanceInvalidState as state_error:"},{"line_number":144,"context_line":"            common.raise_http_conflict_for_instance_invalid_state("},{"line_number":145,"context_line":"                    state_error, \"abort live migration\", server_id)"},{"line_number":146,"context_line":"        except exception.MigrationNotFoundForInstance as e:"},{"line_number":147,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":148,"context_line":"        except exception.InvalidMigrationState as e:"}],"source_content_type":"text/x-python","patch_set":14,"id":"bae84128_2d008165","line":145,"updated":"2016-02-24 11:09:30.000000000","message":"not sure if this should be bad request or conflict, I always get the cases mixed up.\n\nI need to go re-read the API guidelines and things.","commit_id":"5539ef7643743ad345118152c2db18a790ea7c25"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"5656f8fec4696f61428a72646dbac19a8ff94edf","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            self.compute_api.live_migrate_abort(context, instance, id)"},{"line_number":143,"context_line":"        except exception.InstanceInvalidState as state_error:"},{"line_number":144,"context_line":"            common.raise_http_conflict_for_instance_invalid_state("},{"line_number":145,"context_line":"                    state_error, \"abort live migration\", server_id)"},{"line_number":146,"context_line":"        except exception.MigrationNotFoundForInstance as e:"},{"line_number":147,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":148,"context_line":"        except exception.InvalidMigrationState as e:"}],"source_content_type":"text/x-python","patch_set":14,"id":"bae84128_d9ac338e","line":145,"in_reply_to":"bae84128_2d008165","updated":"2016-02-24 12:03:04.000000000","message":"FWIW we do the same for _force_complete, have a look at the line #88","commit_id":"5539ef7643743ad345118152c2db18a790ea7c25"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"c9033e372df2e36a165c1da0b105c3fd2064722c","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        except exception.MigrationNotFoundForInstance as e:"},{"line_number":147,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":148,"context_line":"        except exception.InvalidMigrationState as e:"},{"line_number":149,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"class ServerMigrations(extensions.V21APIExtensionBase):"}],"source_content_type":"text/x-python","patch_set":15,"id":"bae84128_91d54d44","line":149,"range":{"start_line":149,"start_character":22,"end_line":149,"end_character":36},"updated":"2016-02-24 16:42:40.000000000","message":"This should probably be HTTPConflict. Jay, Sean, thoughts? But I believe that it can be done in a quick followup.","commit_id":"07d373d2925891d9d6862bd0724a8ad8aaaaa677"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d3456d6fa7804a2d39dac284d6df5b10dd53d4ed","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        except exception.MigrationNotFoundForInstance as e:"},{"line_number":147,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":148,"context_line":"        except exception.InvalidMigrationState as e:"},{"line_number":149,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"class ServerMigrations(extensions.V21APIExtensionBase):"}],"source_content_type":"text/x-python","patch_set":15,"id":"bae84128_f230e9ea","line":149,"range":{"start_line":149,"start_character":22,"end_line":149,"end_character":36},"in_reply_to":"bae84128_22c84e74","updated":"2016-02-25 10:49:26.000000000","message":"Honestly, I could live with either. This is constantly odd, which wins me over slightly.","commit_id":"07d373d2925891d9d6862bd0724a8ad8aaaaa677"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"f7a3f434746049f07dda21b50a24aafc93d749b0","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        except exception.MigrationNotFoundForInstance as e:"},{"line_number":147,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":148,"context_line":"        except exception.InvalidMigrationState as e:"},{"line_number":149,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"class ServerMigrations(extensions.V21APIExtensionBase):"}],"source_content_type":"text/x-python","patch_set":15,"id":"bae84128_bb2e60a3","line":149,"range":{"start_line":149,"start_character":22,"end_line":149,"end_character":36},"in_reply_to":"bae84128_86a98e27","updated":"2016-02-24 21:34:02.000000000","message":"Sure, 409 would be fine as well. It\u0027s probably slightly more consistent with API WG guidelines. Though I\u0027m personally fine either way as neither is machine recoverable.","commit_id":"07d373d2925891d9d6862bd0724a8ad8aaaaa677"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"db4b5580617826ecd0e6e755d2c8ce7d4c6e9f64","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        except exception.MigrationNotFoundForInstance as e:"},{"line_number":147,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":148,"context_line":"        except exception.InvalidMigrationState as e:"},{"line_number":149,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"class ServerMigrations(extensions.V21APIExtensionBase):"}],"source_content_type":"text/x-python","patch_set":15,"id":"bae84128_86a98e27","line":149,"range":{"start_line":149,"start_character":22,"end_line":149,"end_character":36},"in_reply_to":"bae84128_91d54d44","updated":"2016-02-24 18:17:42.000000000","message":"I think you\u0027re right - operations done against invalid states are usually HTTPConflict","commit_id":"07d373d2925891d9d6862bd0724a8ad8aaaaa677"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"71cec3bf8b50a0c47a5600b0922b7996c143b758","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        except exception.MigrationNotFoundForInstance as e:"},{"line_number":147,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":148,"context_line":"        except exception.InvalidMigrationState as e:"},{"line_number":149,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"class ServerMigrations(extensions.V21APIExtensionBase):"}],"source_content_type":"text/x-python","patch_set":15,"id":"bae84128_22c84e74","line":149,"range":{"start_line":149,"start_character":22,"end_line":149,"end_character":36},"in_reply_to":"bae84128_bb2e60a3","updated":"2016-02-25 10:16:16.000000000","message":"Bad news is we already use 400 at https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/server_migrations.py#L52\n\nSo...I didn\u0027t see clear rule for this in API WG. Only one close to this is:\n\n\"If a request is made which attempts to perform an action on a resource which is already performing that action and therefore the request cannot be fulfilled (for example, snapshotting an instance which is already in the process of snapshotting), the return code should be 409 Conflict.\"\n\nSo we didn\u0027t find one match this, I prefer keep it as 400, at least we have same behaviour for this two actions. When we have clear api-wg rule, then we fix it in future.","commit_id":"07d373d2925891d9d6862bd0724a8ad8aaaaa677"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"61c59fec31c6aaebb8da12264d7b4d4816f90402","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        except exception.MigrationNotFoundForInstance as e:"},{"line_number":147,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":148,"context_line":"        except exception.InvalidMigrationState as e:"},{"line_number":149,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"class ServerMigrations(extensions.V21APIExtensionBase):"}],"source_content_type":"text/x-python","patch_set":15,"id":"bae84128_043a5dcd","line":149,"range":{"start_line":149,"start_character":22,"end_line":149,"end_character":36},"in_reply_to":"bae84128_f230e9ea","updated":"2016-02-25 16:03:33.000000000","message":"Leaving it as is with HTTPBadRequest","commit_id":"07d373d2925891d9d6862bd0724a8ad8aaaaa677"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"2e722e9eb567fa2dc0009f029f1d5d1423cbd9f2","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        except exception.MigrationNotFoundForInstance as e:"},{"line_number":153,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":154,"context_line":"        except exception.InvalidMigrationState as e:"},{"line_number":155,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"class ServerMigrations(extensions.V21APIExtensionBase):"}],"source_content_type":"text/x-python","patch_set":18,"id":"9aed3d3a_173f2cd7","line":155,"updated":"2016-02-26 15:21:49.000000000","message":"we could argue about these some more, but they seems like a reasonable starting point, i.e. 4xx\n\nI like NotFound where its used because it mirrors the GET behaviour for the same URL.","commit_id":"d003c676a0ed1d5f1635c937133ce52d86dcadd4"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"67edfe302567f1ca442e1c0c1f95c199d107dbaa","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        except exception.MigrationNotFoundForInstance as e:"},{"line_number":153,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":154,"context_line":"        except exception.InvalidMigrationState as e:"},{"line_number":155,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"class ServerMigrations(extensions.V21APIExtensionBase):"}],"source_content_type":"text/x-python","patch_set":19,"id":"9aed3d3a_b42631cc","line":155,"updated":"2016-02-26 17:33:47.000000000","message":"we could argue about these for ever, but lets not, this seems like a good starting point.","commit_id":"fa002925460e70d988d1b4dd1ea594c680a43740"}],"nova/compute/api.py":[{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"9dd3b47245068e15121bdea3ff8ac4eeada41fd7","unresolved":false,"context_lines":[{"line_number":3330,"context_line":"        LOG.debug(\"Going to cancel live migration\", instance\u003dinstance)"},{"line_number":3331,"context_line":"        migration \u003d objects.Migration.get_by_id_and_instance(context,"},{"line_number":3332,"context_line":"                    migration_id, instance.uuid)"},{"line_number":3333,"context_line":"        if migration.migration_type !\u003d \u0027live-migration\u0027:"},{"line_number":3334,"context_line":"            raise exception.InvalidMigrationType(migration_id\u003dmigration_id,"},{"line_number":3335,"context_line":"                    instance_uuid\u003dinstance.uuid,"},{"line_number":3336,"context_line":"                    migration_type\u003dmigration.migration_type,"}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_ce73944c","line":3333,"range":{"start_line":3333,"start_character":8,"end_line":3333,"end_character":56},"updated":"2016-02-15 09:32:00.000000000","message":"Is there any case that this condition will be met? I think that other migration types won\u0027t get there because you check instance task state at line #3321","commit_id":"7ecf34a592f24d63c862150f829e1d13d02e4652"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"14790a040906d99cc1f268dde8712312e21abc36","unresolved":false,"context_lines":[{"line_number":3330,"context_line":"        LOG.debug(\"Going to cancel live migration\", instance\u003dinstance)"},{"line_number":3331,"context_line":"        migration \u003d objects.Migration.get_by_id_and_instance(context,"},{"line_number":3332,"context_line":"                    migration_id, instance.uuid)"},{"line_number":3333,"context_line":"        if migration.migration_type !\u003d \u0027live-migration\u0027:"},{"line_number":3334,"context_line":"            raise exception.InvalidMigrationType(migration_id\u003dmigration_id,"},{"line_number":3335,"context_line":"                    instance_uuid\u003dinstance.uuid,"},{"line_number":3336,"context_line":"                    migration_type\u003dmigration.migration_type,"}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_808834e9","line":3333,"range":{"start_line":3333,"start_character":8,"end_line":3333,"end_character":56},"in_reply_to":"dae33548_8774cfcf","updated":"2016-02-15 17:45:10.000000000","message":"I\u0027d remove it too just to reduce lines of code (and tests). Method is explicitly named \u0027live_migration_abort\u0027 so it should not be used for aborting any other type of migrations, but it\u0027s up to you.","commit_id":"7ecf34a592f24d63c862150f829e1d13d02e4652"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"0403973a0fb0872f81e2cec2b53a354a1a119a9e","unresolved":false,"context_lines":[{"line_number":3330,"context_line":"        LOG.debug(\"Going to cancel live migration\", instance\u003dinstance)"},{"line_number":3331,"context_line":"        migration \u003d objects.Migration.get_by_id_and_instance(context,"},{"line_number":3332,"context_line":"                    migration_id, instance.uuid)"},{"line_number":3333,"context_line":"        if migration.migration_type !\u003d \u0027live-migration\u0027:"},{"line_number":3334,"context_line":"            raise exception.InvalidMigrationType(migration_id\u003dmigration_id,"},{"line_number":3335,"context_line":"                    instance_uuid\u003dinstance.uuid,"},{"line_number":3336,"context_line":"                    migration_type\u003dmigration.migration_type,"}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_8774cfcf","line":3333,"range":{"start_line":3333,"start_character":8,"end_line":3333,"end_character":56},"in_reply_to":"dae33548_ce73944c","updated":"2016-02-15 10:48:00.000000000","message":"I think you are right as the MIGRATING state is set just when the migration_type is equal to \u0027live-migration\u0027.\nwe could leave it as a guard on the abort operation, what do you think?","commit_id":"7ecf34a592f24d63c862150f829e1d13d02e4652"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"91c19729a112d8a545fd2af9a3a739e25718f28d","unresolved":false,"context_lines":[{"line_number":3327,"context_line":""},{"line_number":3328,"context_line":"        \"\"\""},{"line_number":3329,"context_line":"        LOG.debug(\"Going to cancel live migration\", instance\u003dinstance)"},{"line_number":3330,"context_line":"        migration \u003d objects.Migration.get_by_id_and_instance(context,"},{"line_number":3331,"context_line":"                    migration_id, instance.uuid)"},{"line_number":3332,"context_line":""},{"line_number":3333,"context_line":"        if migration.status !\u003d \u0027running\u0027:"},{"line_number":3334,"context_line":"            raise exception.InvalidMigrationState(migration_id\u003dmigration_id,"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_a215104a","line":3331,"range":{"start_line":3330,"start_character":8,"end_line":3331,"end_character":48},"updated":"2016-02-23 05:11:40.000000000","message":"I missed this from previous review, I thought we should check the migration type, ensure it is live-migration","commit_id":"69a34f8ecdcc98efea8069890a7feee6cddd64f8"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"0b69f678bdf3f6e5039ee3b2e7a59cbf2d87aedd","unresolved":false,"context_lines":[{"line_number":3327,"context_line":""},{"line_number":3328,"context_line":"        \"\"\""},{"line_number":3329,"context_line":"        LOG.debug(\"Going to cancel live migration\", instance\u003dinstance)"},{"line_number":3330,"context_line":"        migration \u003d objects.Migration.get_by_id_and_instance(context,"},{"line_number":3331,"context_line":"                    migration_id, instance.uuid)"},{"line_number":3332,"context_line":""},{"line_number":3333,"context_line":"        if migration.status !\u003d \u0027running\u0027:"},{"line_number":3334,"context_line":"            raise exception.InvalidMigrationState(migration_id\u003dmigration_id,"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_f3f7dd88","line":3331,"range":{"start_line":3330,"start_character":8,"end_line":3331,"end_character":48},"in_reply_to":"bae84128_37577827","updated":"2016-02-23 11:58:34.000000000","message":"In the previous versions of the change there was the check on migration type then Pawel spotted that the check was not necessary because we check the task_state and the task state is equal to MIGRATING only if the mugration_type is \u0027live-migration\u0027","commit_id":"69a34f8ecdcc98efea8069890a7feee6cddd64f8"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"1000f7d99dd4e29e0051140457c9cac4d47a78dd","unresolved":false,"context_lines":[{"line_number":3327,"context_line":""},{"line_number":3328,"context_line":"        \"\"\""},{"line_number":3329,"context_line":"        LOG.debug(\"Going to cancel live migration\", instance\u003dinstance)"},{"line_number":3330,"context_line":"        migration \u003d objects.Migration.get_by_id_and_instance(context,"},{"line_number":3331,"context_line":"                    migration_id, instance.uuid)"},{"line_number":3332,"context_line":""},{"line_number":3333,"context_line":"        if migration.status !\u003d \u0027running\u0027:"},{"line_number":3334,"context_line":"            raise exception.InvalidMigrationState(migration_id\u003dmigration_id,"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_37577827","line":3331,"range":{"start_line":3330,"start_character":8,"end_line":3331,"end_character":48},"in_reply_to":"bae84128_a215104a","updated":"2016-02-23 07:53:20.000000000","message":"We already check task state at line #3320, which means that VM is being live migrated","commit_id":"69a34f8ecdcc98efea8069890a7feee6cddd64f8"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"b9220dc26d769499d23809dc9f57c4b27c67c85a","unresolved":false,"context_lines":[{"line_number":3342,"context_line":"                                  instance_actions.LIVE_MIGRATION_CANCEL)"},{"line_number":3343,"context_line":""},{"line_number":3344,"context_line":"        self.compute_rpcapi.live_migration_abort(context,"},{"line_number":3345,"context_line":"                instance, migration.id)"},{"line_number":3346,"context_line":""},{"line_number":3347,"context_line":"    @check_instance_state(vm_state\u003d[vm_states.ACTIVE, vm_states.STOPPED,"},{"line_number":3348,"context_line":"                                    vm_states.ERROR])"}],"source_content_type":"text/x-python","patch_set":11,"id":"bae84128_65f80bc4","line":3345,"updated":"2016-02-23 17:46:48.000000000","message":"why are we not passing the migration object here. It seems odd to pass the id. The above method was incorrect, I feel.","commit_id":"37a0155bd9ed8db8b1f45d9788fb25f8f3011c4c"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"06471e9928ee232af6cca7035bbfb3baeb478fe9","unresolved":false,"context_lines":[{"line_number":3342,"context_line":"                                  instance_actions.LIVE_MIGRATION_CANCEL)"},{"line_number":3343,"context_line":""},{"line_number":3344,"context_line":"        self.compute_rpcapi.live_migration_abort(context,"},{"line_number":3345,"context_line":"                instance, migration.id)"},{"line_number":3346,"context_line":""},{"line_number":3347,"context_line":"    @check_instance_state(vm_state\u003d[vm_states.ACTIVE, vm_states.STOPPED,"},{"line_number":3348,"context_line":"                                    vm_states.ERROR])"}],"source_content_type":"text/x-python","patch_set":11,"id":"bae84128_a9613307","line":3345,"in_reply_to":"bae84128_65f80bc4","updated":"2016-02-24 06:58:17.000000000","message":"If we feel comfortable with validating once and then asking libvirt, it can be an object there.","commit_id":"37a0155bd9ed8db8b1f45d9788fb25f8f3011c4c"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"6ffb377e1ee81c2d09f180ee7f1d4ae9db82dcbe","unresolved":false,"context_lines":[{"line_number":3342,"context_line":"                                  instance_actions.LIVE_MIGRATION_CANCEL)"},{"line_number":3343,"context_line":""},{"line_number":3344,"context_line":"        self.compute_rpcapi.live_migration_abort(context,"},{"line_number":3345,"context_line":"                instance, migration.id)"},{"line_number":3346,"context_line":""},{"line_number":3347,"context_line":"    @check_instance_state(vm_state\u003d[vm_states.ACTIVE, vm_states.STOPPED,"},{"line_number":3348,"context_line":"                                    vm_states.ERROR])"}],"source_content_type":"text/x-python","patch_set":11,"id":"bae84128_eb8de8d3","line":3345,"in_reply_to":"bae84128_65f80bc4","updated":"2016-02-24 09:57:56.000000000","message":"The reason to pass just the id is that at the compute manager we want to read the Migration object again from the DB to verify that the state of the migration is still equal to running, are you asking to do the same check but passing the entire object instead of the id?\nOr do you think the check at the compute manager is not required and therefore we can avoid to pass the migration details at all?","commit_id":"37a0155bd9ed8db8b1f45d9788fb25f8f3011c4c"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"d2fcb23949275a3beccfa6969d9d7d75e36353f6","unresolved":false,"context_lines":[{"line_number":3342,"context_line":"                                  instance_actions.LIVE_MIGRATION_CANCEL)"},{"line_number":3343,"context_line":""},{"line_number":3344,"context_line":"        self.compute_rpcapi.live_migration_abort(context,"},{"line_number":3345,"context_line":"                instance, migration.id)"},{"line_number":3346,"context_line":""},{"line_number":3347,"context_line":"    @check_instance_state(vm_state\u003d[vm_states.ACTIVE, vm_states.STOPPED,"},{"line_number":3348,"context_line":"                                    vm_states.ERROR])"}],"source_content_type":"text/x-python","patch_set":11,"id":"bae84128_14d6724e","line":3345,"in_reply_to":"bae84128_a9613307","updated":"2016-02-24 07:44:57.000000000","message":"leave this, not fix.","commit_id":"37a0155bd9ed8db8b1f45d9788fb25f8f3011c4c"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"988a8513fd4094a3c24ebf961a47a3a15a433f7f","unresolved":false,"context_lines":[{"line_number":3342,"context_line":"                                  instance_actions.LIVE_MIGRATION_CANCEL)"},{"line_number":3343,"context_line":""},{"line_number":3344,"context_line":"        self.compute_rpcapi.live_migration_abort(context,"},{"line_number":3345,"context_line":"                instance, migration.id)"},{"line_number":3346,"context_line":""},{"line_number":3347,"context_line":"    @check_instance_state(vm_state\u003d[vm_states.ACTIVE, vm_states.STOPPED,"},{"line_number":3348,"context_line":"                                    vm_states.ERROR])"}],"source_content_type":"text/x-python","patch_set":11,"id":"bae84128_ad2e5189","line":3345,"in_reply_to":"bae84128_eb8de8d3","updated":"2016-02-24 10:59:32.000000000","message":"Hmm, it feels odd not passing the full object now.\n\nNot sure I want to remove the second check though.\n\nLet me think on that more.","commit_id":"37a0155bd9ed8db8b1f45d9788fb25f8f3011c4c"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"7ce676972357145c1d97f4be89de213880ac3d54","unresolved":false,"context_lines":[{"line_number":3328,"context_line":"        self.compute_rpcapi.live_migration_force_complete("},{"line_number":3329,"context_line":"            context, instance, migration.id)"},{"line_number":3330,"context_line":""},{"line_number":3331,"context_line":"    @check_instance_state(task_state\u003d[task_states.MIGRATING])"},{"line_number":3332,"context_line":"    def live_migrate_abort(self, context, instance, migration_id):"},{"line_number":3333,"context_line":"        \"\"\"Abort an in-progress live migration."},{"line_number":3334,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"bae84128_8d238d55","line":3331,"updated":"2016-02-24 11:09:30.000000000","message":"It does feel like this should have the same decorators as the above two methods, in terms of @check_instance_lock and @check_instance_cell, or is there a reason we don\u0027t want those here?","commit_id":"5539ef7643743ad345118152c2db18a790ea7c25"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"5656f8fec4696f61428a72646dbac19a8ff94edf","unresolved":false,"context_lines":[{"line_number":3328,"context_line":"        self.compute_rpcapi.live_migration_force_complete("},{"line_number":3329,"context_line":"            context, instance, migration.id)"},{"line_number":3330,"context_line":""},{"line_number":3331,"context_line":"    @check_instance_state(task_state\u003d[task_states.MIGRATING])"},{"line_number":3332,"context_line":"    def live_migrate_abort(self, context, instance, migration_id):"},{"line_number":3333,"context_line":"        \"\"\"Abort an in-progress live migration."},{"line_number":3334,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"bae84128_f9cc9736","line":3331,"in_reply_to":"bae84128_8d238d55","updated":"2016-02-24 12:03:04.000000000","message":"I think you are right, going to fix it.","commit_id":"5539ef7643743ad345118152c2db18a790ea7c25"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"07090e807a01e2768e81f50cb8e8785213a56a69","unresolved":false,"context_lines":[{"line_number":3319,"context_line":"        # compute to double check and avoid possible race condition."},{"line_number":3320,"context_line":"        migration \u003d objects.Migration.get_by_id_and_instance("},{"line_number":3321,"context_line":"            context, migration_id, instance.uuid)"},{"line_number":3322,"context_line":"        if migration.status !\u003d \u0027running\u0027:"},{"line_number":3323,"context_line":"            raise exception.InvalidMigrationState(migration_id\u003dmigration_id,"},{"line_number":3324,"context_line":"                                                  instance_uuid\u003dinstance.uuid,"},{"line_number":3325,"context_line":"                                                  state\u003dmigration.status,"}],"source_content_type":"text/x-python","patch_set":15,"id":"bae84128_b773f3e6","line":3322,"updated":"2016-02-25 10:44:19.000000000","message":"PS, I think we have the same bug here, this is not checking we are doing a live-migration.","commit_id":"07d373d2925891d9d6862bd0724a8ad8aaaaa677"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"515da54c85d9c41d2d4e7a442021a543aaeea88c","unresolved":false,"context_lines":[{"line_number":3339,"context_line":"        :param migration_id: ID of in-progress live migration"},{"line_number":3340,"context_line":""},{"line_number":3341,"context_line":"        \"\"\""},{"line_number":3342,"context_line":"        LOG.debug(\"Going to cancel live migration\", instance\u003dinstance)"},{"line_number":3343,"context_line":"        migration \u003d objects.Migration.get_by_id_and_instance(context,"},{"line_number":3344,"context_line":"                    migration_id, instance.uuid)"},{"line_number":3345,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"bae84128_4a70390b","line":3342,"updated":"2016-02-24 15:14:31.000000000","message":"nit: Might be good to put this debug message after line 3343 and include the Migration ID for diagnostics/forensics purposes.","commit_id":"07d373d2925891d9d6862bd0724a8ad8aaaaa677"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"f7a3f434746049f07dda21b50a24aafc93d749b0","unresolved":false,"context_lines":[{"line_number":3339,"context_line":"        :param migration_id: ID of in-progress live migration"},{"line_number":3340,"context_line":""},{"line_number":3341,"context_line":"        \"\"\""},{"line_number":3342,"context_line":"        LOG.debug(\"Going to cancel live migration\", instance\u003dinstance)"},{"line_number":3343,"context_line":"        migration \u003d objects.Migration.get_by_id_and_instance(context,"},{"line_number":3344,"context_line":"                    migration_id, instance.uuid)"},{"line_number":3345,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"bae84128_569f2950","line":3342,"in_reply_to":"bae84128_4a70390b","updated":"2016-02-24 21:34:02.000000000","message":"agree, that would be a good follow on.","commit_id":"07d373d2925891d9d6862bd0724a8ad8aaaaa677"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"61c59fec31c6aaebb8da12264d7b4d4816f90402","unresolved":false,"context_lines":[{"line_number":3339,"context_line":"        :param migration_id: ID of in-progress live migration"},{"line_number":3340,"context_line":""},{"line_number":3341,"context_line":"        \"\"\""},{"line_number":3342,"context_line":"        LOG.debug(\"Going to cancel live migration\", instance\u003dinstance)"},{"line_number":3343,"context_line":"        migration \u003d objects.Migration.get_by_id_and_instance(context,"},{"line_number":3344,"context_line":"                    migration_id, instance.uuid)"},{"line_number":3345,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"bae84128_04953d3f","line":3342,"in_reply_to":"bae84128_569f2950","updated":"2016-02-25 16:03:33.000000000","message":"Done","commit_id":"07d373d2925891d9d6862bd0724a8ad8aaaaa677"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"07090e807a01e2768e81f50cb8e8785213a56a69","unresolved":false,"context_lines":[{"line_number":3343,"context_line":"        migration \u003d objects.Migration.get_by_id_and_instance(context,"},{"line_number":3344,"context_line":"                    migration_id, instance.uuid)"},{"line_number":3345,"context_line":""},{"line_number":3346,"context_line":"        if migration.status !\u003d \u0027running\u0027:"},{"line_number":3347,"context_line":"            raise exception.InvalidMigrationState(migration_id\u003dmigration_id,"},{"line_number":3348,"context_line":"                    instance_uuid\u003dinstance.uuid,"},{"line_number":3349,"context_line":"                    state\u003dmigration.status,"}],"source_content_type":"text/x-python","patch_set":15,"id":"bae84128_57626717","line":3346,"updated":"2016-02-25 10:44:19.000000000","message":"so I think we also can only abort \"live-migration\" type migrations, rather than any migration type. So I feel we should double check that here, or something like that?","commit_id":"07d373d2925891d9d6862bd0724a8ad8aaaaa677"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"61c59fec31c6aaebb8da12264d7b4d4816f90402","unresolved":false,"context_lines":[{"line_number":3343,"context_line":"        migration \u003d objects.Migration.get_by_id_and_instance(context,"},{"line_number":3344,"context_line":"                    migration_id, instance.uuid)"},{"line_number":3345,"context_line":""},{"line_number":3346,"context_line":"        if migration.status !\u003d \u0027running\u0027:"},{"line_number":3347,"context_line":"            raise exception.InvalidMigrationState(migration_id\u003dmigration_id,"},{"line_number":3348,"context_line":"                    instance_uuid\u003dinstance.uuid,"},{"line_number":3349,"context_line":"                    state\u003dmigration.status,"}],"source_content_type":"text/x-python","patch_set":15,"id":"bae84128_fb4c3378","line":3346,"in_reply_to":"bae84128_57626717","updated":"2016-02-25 16:03:33.000000000","message":"The task state is checked using the decorator:\n\n@check_instance_state(task_state\u003d[task_states.MIGRATING])\n\nSo this can only be a live migration (the MIGRATING task state is used for live migration - could be changed to LIVE_MIGRATING, but that\u0027s not in this change).","commit_id":"07d373d2925891d9d6862bd0724a8ad8aaaaa677"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"c5fa0c006310db07b0b0de648f39f133993a41c4","unresolved":false,"context_lines":[{"line_number":3344,"context_line":"        LOG.debug(\"Going to cancel live migration %s\","},{"line_number":3345,"context_line":"                  migration.id, instance\u003dinstance)"},{"line_number":3346,"context_line":""},{"line_number":3347,"context_line":"        if migration.status !\u003d \u0027running\u0027:"},{"line_number":3348,"context_line":"            raise exception.InvalidMigrationState(migration_id\u003dmigration_id,"},{"line_number":3349,"context_line":"                    instance_uuid\u003dinstance.uuid,"},{"line_number":3350,"context_line":"                    state\u003dmigration.status,"}],"source_content_type":"text/x-python","patch_set":18,"id":"9aed3d3a_87e2f8d3","line":3347,"updated":"2016-02-26 12:19:43.000000000","message":"we still don\u0027t seem to be checking the migration.type \u003d \u0027live-migration\u0027 here?","commit_id":"d003c676a0ed1d5f1635c937133ce52d86dcadd4"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"96cb69599e5da25827e508f806d40ce23ca449a3","unresolved":false,"context_lines":[{"line_number":3344,"context_line":"        LOG.debug(\"Going to cancel live migration %s\","},{"line_number":3345,"context_line":"                  migration.id, instance\u003dinstance)"},{"line_number":3346,"context_line":""},{"line_number":3347,"context_line":"        if migration.status !\u003d \u0027running\u0027:"},{"line_number":3348,"context_line":"            raise exception.InvalidMigrationState(migration_id\u003dmigration_id,"},{"line_number":3349,"context_line":"                    instance_uuid\u003dinstance.uuid,"},{"line_number":3350,"context_line":"                    state\u003dmigration.status,"}],"source_content_type":"text/x-python","patch_set":18,"id":"9aed3d3a_566d3f97","line":3347,"in_reply_to":"9aed3d3a_228afabf","updated":"2016-02-26 12:38:52.000000000","message":"The checks are ok here, but we need to check we are still in the MIGRATING state when we get to the compute manager. I hae put a comment there.","commit_id":"d003c676a0ed1d5f1635c937133ce52d86dcadd4"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"c7538aadcaf7c2f74c51be7846b144bcc14eec3e","unresolved":false,"context_lines":[{"line_number":3344,"context_line":"        LOG.debug(\"Going to cancel live migration %s\","},{"line_number":3345,"context_line":"                  migration.id, instance\u003dinstance)"},{"line_number":3346,"context_line":""},{"line_number":3347,"context_line":"        if migration.status !\u003d \u0027running\u0027:"},{"line_number":3348,"context_line":"            raise exception.InvalidMigrationState(migration_id\u003dmigration_id,"},{"line_number":3349,"context_line":"                    instance_uuid\u003dinstance.uuid,"},{"line_number":3350,"context_line":"                    state\u003dmigration.status,"}],"source_content_type":"text/x-python","patch_set":18,"id":"9aed3d3a_b6492b8e","line":3347,"in_reply_to":"9aed3d3a_566d3f97","updated":"2016-02-26 12:52:45.000000000","message":"This sounds like a super corner case. If we are not in MIGRATING state then migration status will not be \u0027running\u0027 i think","commit_id":"d003c676a0ed1d5f1635c937133ce52d86dcadd4"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"0318d2c803f0e27cc1b7c02ace8d92ccbef78181","unresolved":false,"context_lines":[{"line_number":3344,"context_line":"        LOG.debug(\"Going to cancel live migration %s\","},{"line_number":3345,"context_line":"                  migration.id, instance\u003dinstance)"},{"line_number":3346,"context_line":""},{"line_number":3347,"context_line":"        if migration.status !\u003d \u0027running\u0027:"},{"line_number":3348,"context_line":"            raise exception.InvalidMigrationState(migration_id\u003dmigration_id,"},{"line_number":3349,"context_line":"                    instance_uuid\u003dinstance.uuid,"},{"line_number":3350,"context_line":"                    state\u003dmigration.status,"}],"source_content_type":"text/x-python","patch_set":18,"id":"9aed3d3a_228afabf","line":3347,"in_reply_to":"9aed3d3a_820ae6d0","updated":"2016-02-26 12:30:50.000000000","message":"I just worry about the edge cases where something hasn\u0027t marked a previous migration as complete, due to a forced compute restart, or something like that. I am probably over thinking it, lets go with it.","commit_id":"d003c676a0ed1d5f1635c937133ce52d86dcadd4"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"66f89589afdc321e0d212c85be8ad4b9c3237c54","unresolved":false,"context_lines":[{"line_number":3344,"context_line":"        LOG.debug(\"Going to cancel live migration %s\","},{"line_number":3345,"context_line":"                  migration.id, instance\u003dinstance)"},{"line_number":3346,"context_line":""},{"line_number":3347,"context_line":"        if migration.status !\u003d \u0027running\u0027:"},{"line_number":3348,"context_line":"            raise exception.InvalidMigrationState(migration_id\u003dmigration_id,"},{"line_number":3349,"context_line":"                    instance_uuid\u003dinstance.uuid,"},{"line_number":3350,"context_line":"                    state\u003dmigration.status,"}],"source_content_type":"text/x-python","patch_set":18,"id":"9aed3d3a_820ae6d0","line":3347,"in_reply_to":"9aed3d3a_87e2f8d3","updated":"2016-02-26 12:25:32.000000000","message":"the check_instance_state decorator does that check as the task_sates is set to MIGRATING just for live-migration.\nIn the early patches I added the check for the migration type then we decided to get rid of it based on the assumption above.\nI am happy to not add it back if we are sure that that assumption (task_states\u003d\u003dMIGRATING just for live-migration) will be always true.","commit_id":"d003c676a0ed1d5f1635c937133ce52d86dcadd4"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"2e722e9eb567fa2dc0009f029f1d5d1423cbd9f2","unresolved":false,"context_lines":[{"line_number":3344,"context_line":"        LOG.debug(\"Going to cancel live migration %s\","},{"line_number":3345,"context_line":"                  migration.id, instance\u003dinstance)"},{"line_number":3346,"context_line":""},{"line_number":3347,"context_line":"        if migration.status !\u003d \u0027running\u0027:"},{"line_number":3348,"context_line":"            raise exception.InvalidMigrationState(migration_id\u003dmigration_id,"},{"line_number":3349,"context_line":"                    instance_uuid\u003dinstance.uuid,"},{"line_number":3350,"context_line":"                    state\u003dmigration.status,"}],"source_content_type":"text/x-python","patch_set":18,"id":"9aed3d3a_97021c0a","line":3347,"in_reply_to":"9aed3d3a_b6492b8e","updated":"2016-02-26 15:21:49.000000000","message":"Yeah, I forgot to carry over my comment from IRC, but lets not worry about this.\n\nI was thinking about migrating not being specific to live-migrate, but it is. So the window is very, very small, and its an admin facing API (well designed to be, anyways). So lets just try move forward on this now.","commit_id":"d003c676a0ed1d5f1635c937133ce52d86dcadd4"}],"nova/compute/instance_actions.py":[{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"1539c3baeb843a3042b4d4e921e448dd384f9e55","unresolved":false,"context_lines":[{"line_number":49,"context_line":"SHELVE \u003d \u0027shelve\u0027"},{"line_number":50,"context_line":"UNSHELVE \u003d \u0027unshelve\u0027"},{"line_number":51,"context_line":"LIVE_MIGRATION \u003d \u0027live-migration\u0027"},{"line_number":52,"context_line":"LIVE_MIGRATION_CANCELLED \u003d \u0027live-migration-cancelled\u0027"},{"line_number":53,"context_line":"TRIGGER_CRASH_DUMP \u003d \u0027trigger_crash_dump\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_60195c88","line":52,"range":{"start_line":52,"start_character":0,"end_line":52,"end_character":24},"updated":"2016-02-22 16:29:15.000000000","message":"I\u0027d rather call it LIVE_MIGRATION_CANCEL to follow convention (LIVE_MIGRATION is the only weird name here)","commit_id":"69a34f8ecdcc98efea8069890a7feee6cddd64f8"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"dbffe18064180437c68d223e9717c47953d5f64f","unresolved":false,"context_lines":[{"line_number":49,"context_line":"SHELVE \u003d \u0027shelve\u0027"},{"line_number":50,"context_line":"UNSHELVE \u003d \u0027unshelve\u0027"},{"line_number":51,"context_line":"LIVE_MIGRATION \u003d \u0027live-migration\u0027"},{"line_number":52,"context_line":"LIVE_MIGRATION_CANCELLED \u003d \u0027live-migration-cancelled\u0027"},{"line_number":53,"context_line":"TRIGGER_CRASH_DUMP \u003d \u0027trigger_crash_dump\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_43bd3f67","line":52,"range":{"start_line":52,"start_character":0,"end_line":52,"end_character":24},"in_reply_to":"bae84128_60195c88","updated":"2016-02-22 17:33:07.000000000","message":"ok I\u0027ll change it","commit_id":"69a34f8ecdcc98efea8069890a7feee6cddd64f8"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"515da54c85d9c41d2d4e7a442021a543aaeea88c","unresolved":false,"context_lines":[{"line_number":49,"context_line":"SHELVE \u003d \u0027shelve\u0027"},{"line_number":50,"context_line":"UNSHELVE \u003d \u0027unshelve\u0027"},{"line_number":51,"context_line":"LIVE_MIGRATION \u003d \u0027live-migration\u0027"},{"line_number":52,"context_line":"LIVE_MIGRATION_CANCEL \u003d \u0027live-migration-cancelled\u0027"},{"line_number":53,"context_line":"TRIGGER_CRASH_DUMP \u003d \u0027trigger_crash_dump\u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"bae84128_aa7e25e1","line":52,"updated":"2016-02-24 15:14:31.000000000","message":"All other task states use the present tense, however you use the past tense above. I believe this should be:\n\n LIVE_MIGRATION_CANCEL \u003d \u0027live-migration-cancel\u0027","commit_id":"07d373d2925891d9d6862bd0724a8ad8aaaaa677"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"61c59fec31c6aaebb8da12264d7b4d4816f90402","unresolved":false,"context_lines":[{"line_number":49,"context_line":"SHELVE \u003d \u0027shelve\u0027"},{"line_number":50,"context_line":"UNSHELVE \u003d \u0027unshelve\u0027"},{"line_number":51,"context_line":"LIVE_MIGRATION \u003d \u0027live-migration\u0027"},{"line_number":52,"context_line":"LIVE_MIGRATION_CANCEL \u003d \u0027live-migration-cancelled\u0027"},{"line_number":53,"context_line":"TRIGGER_CRASH_DUMP \u003d \u0027trigger_crash_dump\u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"bae84128_e473f9e5","line":52,"in_reply_to":"bae84128_12490dd1","updated":"2016-02-25 16:03:33.000000000","message":"Making present tense for consistency and using _ as Alex suggests","commit_id":"07d373d2925891d9d6862bd0724a8ad8aaaaa677"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"a5750b8e1ecbbabf651b5681863ec87170052487","unresolved":false,"context_lines":[{"line_number":49,"context_line":"SHELVE \u003d \u0027shelve\u0027"},{"line_number":50,"context_line":"UNSHELVE \u003d \u0027unshelve\u0027"},{"line_number":51,"context_line":"LIVE_MIGRATION \u003d \u0027live-migration\u0027"},{"line_number":52,"context_line":"LIVE_MIGRATION_CANCEL \u003d \u0027live-migration-cancelled\u0027"},{"line_number":53,"context_line":"TRIGGER_CRASH_DUMP \u003d \u0027trigger_crash_dump\u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"bae84128_12490dd1","line":52,"in_reply_to":"bae84128_124bcd5a","updated":"2016-02-25 10:56:19.000000000","message":"how about \u0027_\u0027, as we will use \u0027_\u0027 for action in the future. like \u0027trigger_crash_dump\u0027","commit_id":"07d373d2925891d9d6862bd0724a8ad8aaaaa677"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d3456d6fa7804a2d39dac284d6df5b10dd53d4ed","unresolved":false,"context_lines":[{"line_number":49,"context_line":"SHELVE \u003d \u0027shelve\u0027"},{"line_number":50,"context_line":"UNSHELVE \u003d \u0027unshelve\u0027"},{"line_number":51,"context_line":"LIVE_MIGRATION \u003d \u0027live-migration\u0027"},{"line_number":52,"context_line":"LIVE_MIGRATION_CANCEL \u003d \u0027live-migration-cancelled\u0027"},{"line_number":53,"context_line":"TRIGGER_CRASH_DUMP \u003d \u0027trigger_crash_dump\u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"bae84128_124bcd5a","line":52,"in_reply_to":"bae84128_76d06df8","updated":"2016-02-25 10:49:26.000000000","message":"+1","commit_id":"07d373d2925891d9d6862bd0724a8ad8aaaaa677"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"f7a3f434746049f07dda21b50a24aafc93d749b0","unresolved":false,"context_lines":[{"line_number":49,"context_line":"SHELVE \u003d \u0027shelve\u0027"},{"line_number":50,"context_line":"UNSHELVE \u003d \u0027unshelve\u0027"},{"line_number":51,"context_line":"LIVE_MIGRATION \u003d \u0027live-migration\u0027"},{"line_number":52,"context_line":"LIVE_MIGRATION_CANCEL \u003d \u0027live-migration-cancelled\u0027"},{"line_number":53,"context_line":"TRIGGER_CRASH_DUMP \u003d \u0027trigger_crash_dump\u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"bae84128_76d06df8","line":52,"in_reply_to":"bae84128_8657ce25","updated":"2016-02-24 21:34:02.000000000","message":"Yeh, agreed CANCELLED seems better","commit_id":"07d373d2925891d9d6862bd0724a8ad8aaaaa677"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"db4b5580617826ecd0e6e755d2c8ce7d4c6e9f64","unresolved":false,"context_lines":[{"line_number":49,"context_line":"SHELVE \u003d \u0027shelve\u0027"},{"line_number":50,"context_line":"UNSHELVE \u003d \u0027unshelve\u0027"},{"line_number":51,"context_line":"LIVE_MIGRATION \u003d \u0027live-migration\u0027"},{"line_number":52,"context_line":"LIVE_MIGRATION_CANCEL \u003d \u0027live-migration-cancelled\u0027"},{"line_number":53,"context_line":"TRIGGER_CRASH_DUMP \u003d \u0027trigger_crash_dump\u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"bae84128_8657ce25","line":52,"in_reply_to":"bae84128_aa7e25e1","updated":"2016-02-24 18:17:42.000000000","message":"Yes, you changed LIVE_MIGRATION_CANCELLED to ...CANCEL in an earlier patchset - I would do this now.","commit_id":"07d373d2925891d9d6862bd0724a8ad8aaaaa677"}],"nova/compute/manager.py":[{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"9dd3b47245068e15121bdea3ff8ac4eeada41fd7","unresolved":false,"context_lines":[{"line_number":5282,"context_line":""},{"line_number":5283,"context_line":"        \"\"\""},{"line_number":5284,"context_line":"        migration \u003d objects.Migration.get_by_id(context, migration_id)"},{"line_number":5285,"context_line":"        if migration.migration_type !\u003d \u0027live-migration\u0027:"},{"line_number":5286,"context_line":"            raise exception.InvalidMigrationType(migration_id\u003dmigration_id,"},{"line_number":5287,"context_line":"                    instance_uuid\u003dinstance.uuid,"},{"line_number":5288,"context_line":"                    migration_type\u003dmigration.migration_type,"},{"line_number":5289,"context_line":"                    method\u003d\u0027abort live migration\u0027)"},{"line_number":5290,"context_line":""},{"line_number":5291,"context_line":"        if migration.status !\u003d \u0027running\u0027:"},{"line_number":5292,"context_line":"            raise exception.InvalidMigrationState(migration_id\u003dmigration_id,"}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_0e945c35","line":5289,"range":{"start_line":5285,"start_character":8,"end_line":5289,"end_character":50},"updated":"2016-02-15 09:32:00.000000000","message":"ditto","commit_id":"7ecf34a592f24d63c862150f829e1d13d02e4652"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"0403973a0fb0872f81e2cec2b53a354a1a119a9e","unresolved":false,"context_lines":[{"line_number":5282,"context_line":""},{"line_number":5283,"context_line":"        \"\"\""},{"line_number":5284,"context_line":"        migration \u003d objects.Migration.get_by_id(context, migration_id)"},{"line_number":5285,"context_line":"        if migration.migration_type !\u003d \u0027live-migration\u0027:"},{"line_number":5286,"context_line":"            raise exception.InvalidMigrationType(migration_id\u003dmigration_id,"},{"line_number":5287,"context_line":"                    instance_uuid\u003dinstance.uuid,"},{"line_number":5288,"context_line":"                    migration_type\u003dmigration.migration_type,"},{"line_number":5289,"context_line":"                    method\u003d\u0027abort live migration\u0027)"},{"line_number":5290,"context_line":""},{"line_number":5291,"context_line":"        if migration.status !\u003d \u0027running\u0027:"},{"line_number":5292,"context_line":"            raise exception.InvalidMigrationState(migration_id\u003dmigration_id,"}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_e26ca99e","line":5289,"range":{"start_line":5285,"start_character":8,"end_line":5289,"end_character":50},"in_reply_to":"dae33548_0e945c35","updated":"2016-02-15 10:48:00.000000000","message":"Please see my previous reply.","commit_id":"7ecf34a592f24d63c862150f829e1d13d02e4652"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"2c506458c577f6fb87bfcd89b63dcdaf5a6a11ae","unresolved":false,"context_lines":[{"line_number":5282,"context_line":""},{"line_number":5283,"context_line":"        \"\"\""},{"line_number":5284,"context_line":"        migration \u003d objects.Migration.get_by_id(context, migration_id)"},{"line_number":5285,"context_line":"        if migration.migration_type !\u003d \u0027live-migration\u0027:"},{"line_number":5286,"context_line":"            raise exception.InvalidMigrationType(migration_id\u003dmigration_id,"},{"line_number":5287,"context_line":"                    instance_uuid\u003dinstance.uuid,"},{"line_number":5288,"context_line":"                    migration_type\u003dmigration.migration_type,"},{"line_number":5289,"context_line":"                    method\u003d\u0027abort live migration\u0027)"},{"line_number":5290,"context_line":""},{"line_number":5291,"context_line":"        if migration.status !\u003d \u0027running\u0027:"},{"line_number":5292,"context_line":"            raise exception.InvalidMigrationState(migration_id\u003dmigration_id,"},{"line_number":5293,"context_line":"                    instance_uuid\u003dinstance.uuid,"},{"line_number":5294,"context_line":"                    state\u003dmigration.status,"},{"line_number":5295,"context_line":"                    method\u003d\u0027abort live migration\u0027)"},{"line_number":5296,"context_line":""},{"line_number":5297,"context_line":"        self._notify_about_instance_usage("},{"line_number":5298,"context_line":"            context, instance, \u0027live.migration.abort.start\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_fe30cf09","line":5295,"range":{"start_line":5285,"start_character":7,"end_line":5295,"end_character":50},"updated":"2016-02-15 07:30:14.000000000","message":"I\u0027m not sure we need check those again, as we already checked at in the compute api.","commit_id":"7ecf34a592f24d63c862150f829e1d13d02e4652"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"98a90cd74adc247d8d82bffeccd73fc15affc1fb","unresolved":false,"context_lines":[{"line_number":5282,"context_line":""},{"line_number":5283,"context_line":"        \"\"\""},{"line_number":5284,"context_line":"        migration \u003d objects.Migration.get_by_id(context, migration_id)"},{"line_number":5285,"context_line":"        if migration.migration_type !\u003d \u0027live-migration\u0027:"},{"line_number":5286,"context_line":"            raise exception.InvalidMigrationType(migration_id\u003dmigration_id,"},{"line_number":5287,"context_line":"                    instance_uuid\u003dinstance.uuid,"},{"line_number":5288,"context_line":"                    migration_type\u003dmigration.migration_type,"},{"line_number":5289,"context_line":"                    method\u003d\u0027abort live migration\u0027)"},{"line_number":5290,"context_line":""},{"line_number":5291,"context_line":"        if migration.status !\u003d \u0027running\u0027:"},{"line_number":5292,"context_line":"            raise exception.InvalidMigrationState(migration_id\u003dmigration_id,"},{"line_number":5293,"context_line":"                    instance_uuid\u003dinstance.uuid,"},{"line_number":5294,"context_line":"                    state\u003dmigration.status,"},{"line_number":5295,"context_line":"                    method\u003d\u0027abort live migration\u0027)"},{"line_number":5296,"context_line":""},{"line_number":5297,"context_line":"        self._notify_about_instance_usage("},{"line_number":5298,"context_line":"            context, instance, \u0027live.migration.abort.start\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_c52b4593","line":5295,"range":{"start_line":5285,"start_character":7,"end_line":5295,"end_character":50},"in_reply_to":"dae33548_a2f901cb","updated":"2016-02-16 08:07:29.000000000","message":"But the race condition still can happen after this line. I feel it\u0027s fine, we can just log failed action in instance-actions.","commit_id":"7ecf34a592f24d63c862150f829e1d13d02e4652"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"0403973a0fb0872f81e2cec2b53a354a1a119a9e","unresolved":false,"context_lines":[{"line_number":5282,"context_line":""},{"line_number":5283,"context_line":"        \"\"\""},{"line_number":5284,"context_line":"        migration \u003d objects.Migration.get_by_id(context, migration_id)"},{"line_number":5285,"context_line":"        if migration.migration_type !\u003d \u0027live-migration\u0027:"},{"line_number":5286,"context_line":"            raise exception.InvalidMigrationType(migration_id\u003dmigration_id,"},{"line_number":5287,"context_line":"                    instance_uuid\u003dinstance.uuid,"},{"line_number":5288,"context_line":"                    migration_type\u003dmigration.migration_type,"},{"line_number":5289,"context_line":"                    method\u003d\u0027abort live migration\u0027)"},{"line_number":5290,"context_line":""},{"line_number":5291,"context_line":"        if migration.status !\u003d \u0027running\u0027:"},{"line_number":5292,"context_line":"            raise exception.InvalidMigrationState(migration_id\u003dmigration_id,"},{"line_number":5293,"context_line":"                    instance_uuid\u003dinstance.uuid,"},{"line_number":5294,"context_line":"                    state\u003dmigration.status,"},{"line_number":5295,"context_line":"                    method\u003d\u0027abort live migration\u0027)"},{"line_number":5296,"context_line":""},{"line_number":5297,"context_line":"        self._notify_about_instance_usage("},{"line_number":5298,"context_line":"            context, instance, \u0027live.migration.abort.start\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_a2f901cb","line":5295,"range":{"start_line":5285,"start_character":7,"end_line":5295,"end_character":50},"in_reply_to":"dae33548_ce1714ec","updated":"2016-02-15 10:48:00.000000000","message":"What Pawel said.","commit_id":"7ecf34a592f24d63c862150f829e1d13d02e4652"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"9dd3b47245068e15121bdea3ff8ac4eeada41fd7","unresolved":false,"context_lines":[{"line_number":5282,"context_line":""},{"line_number":5283,"context_line":"        \"\"\""},{"line_number":5284,"context_line":"        migration \u003d objects.Migration.get_by_id(context, migration_id)"},{"line_number":5285,"context_line":"        if migration.migration_type !\u003d \u0027live-migration\u0027:"},{"line_number":5286,"context_line":"            raise exception.InvalidMigrationType(migration_id\u003dmigration_id,"},{"line_number":5287,"context_line":"                    instance_uuid\u003dinstance.uuid,"},{"line_number":5288,"context_line":"                    migration_type\u003dmigration.migration_type,"},{"line_number":5289,"context_line":"                    method\u003d\u0027abort live migration\u0027)"},{"line_number":5290,"context_line":""},{"line_number":5291,"context_line":"        if migration.status !\u003d \u0027running\u0027:"},{"line_number":5292,"context_line":"            raise exception.InvalidMigrationState(migration_id\u003dmigration_id,"},{"line_number":5293,"context_line":"                    instance_uuid\u003dinstance.uuid,"},{"line_number":5294,"context_line":"                    state\u003dmigration.status,"},{"line_number":5295,"context_line":"                    method\u003d\u0027abort live migration\u0027)"},{"line_number":5296,"context_line":""},{"line_number":5297,"context_line":"        self._notify_about_instance_usage("},{"line_number":5298,"context_line":"            context, instance, \u0027live.migration.abort.start\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_ce1714ec","line":5295,"range":{"start_line":5285,"start_character":7,"end_line":5295,"end_character":50},"in_reply_to":"dae33548_fe30cf09","updated":"2016-02-15 09:32:00.000000000","message":"We need to avoid race condition so this check is necessary. There might be a delay on RPC between API and compute.","commit_id":"7ecf34a592f24d63c862150f829e1d13d02e4652"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"2c506458c577f6fb87bfcd89b63dcdaf5a6a11ae","unresolved":false,"context_lines":[{"line_number":5296,"context_line":""},{"line_number":5297,"context_line":"        self._notify_about_instance_usage("},{"line_number":5298,"context_line":"            context, instance, \u0027live.migration.abort.start\u0027)"},{"line_number":5299,"context_line":"        self.driver.live_migration_abort(instance)"},{"line_number":5300,"context_line":"        self._notify_about_instance_usage("},{"line_number":5301,"context_line":"            context, instance, \u0027live.migration.abort.end\u0027)"},{"line_number":5302,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_7e25dfc0","line":5299,"range":{"start_line":5299,"start_character":8,"end_line":5299,"end_character":50},"updated":"2016-02-15 07:30:14.000000000","message":"do we need an instance-action at here? Then user can know if the abort failed, otherwise, abort just failed sliently.","commit_id":"7ecf34a592f24d63c862150f829e1d13d02e4652"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"0403973a0fb0872f81e2cec2b53a354a1a119a9e","unresolved":false,"context_lines":[{"line_number":5296,"context_line":""},{"line_number":5297,"context_line":"        self._notify_about_instance_usage("},{"line_number":5298,"context_line":"            context, instance, \u0027live.migration.abort.start\u0027)"},{"line_number":5299,"context_line":"        self.driver.live_migration_abort(instance)"},{"line_number":5300,"context_line":"        self._notify_about_instance_usage("},{"line_number":5301,"context_line":"            context, instance, \u0027live.migration.abort.end\u0027)"},{"line_number":5302,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_422bd530","line":5299,"range":{"start_line":5299,"start_character":8,"end_line":5299,"end_character":50},"in_reply_to":"dae33548_7e25dfc0","updated":"2016-02-15 10:48:00.000000000","message":"Yes correct, I checked and even in the spec we specify we want to record a new instance-action. I\u0027ll add in the next PS.","commit_id":"7ecf34a592f24d63c862150f829e1d13d02e4652"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"d700aaea5e28ad46e9b694640f8e2a1344730dc1","unresolved":false,"context_lines":[{"line_number":5285,"context_line":""},{"line_number":5286,"context_line":"        \"\"\""},{"line_number":5287,"context_line":"        migration \u003d objects.Migration.get_by_id(context, migration_id)"},{"line_number":5288,"context_line":"        if migration.status !\u003d \u0027running\u0027:"},{"line_number":5289,"context_line":"            raise exception.InvalidMigrationState(migration_id\u003dmigration_id,"},{"line_number":5290,"context_line":"                    instance_uuid\u003dinstance.uuid,"},{"line_number":5291,"context_line":"                    state\u003dmigration.status,"},{"line_number":5292,"context_line":"                    method\u003d\u0027abort live migration\u0027)"},{"line_number":5293,"context_line":""},{"line_number":5294,"context_line":"        self._notify_about_instance_usage("},{"line_number":5295,"context_line":"            context, instance, \u0027live.migration.abort.start\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_209acd63","line":5292,"range":{"start_line":5288,"start_character":8,"end_line":5292,"end_character":50},"updated":"2016-02-22 07:13:55.000000000","message":"I still we needn\u0027t this check. I guess the driver will failed the abort live-migration when the migration isn\u0027t running anymore, then the failed will record by instance action. So this check didn\u0027t have too much help for race condition.","commit_id":"ac26aca6fc087a14e49cc7320158733c6f5590f6"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"12507f77b7af453c8d1b67a1649437439a4ab534","unresolved":false,"context_lines":[{"line_number":5285,"context_line":""},{"line_number":5286,"context_line":"        \"\"\""},{"line_number":5287,"context_line":"        migration \u003d objects.Migration.get_by_id(context, migration_id)"},{"line_number":5288,"context_line":"        if migration.status !\u003d \u0027running\u0027:"},{"line_number":5289,"context_line":"            raise exception.InvalidMigrationState(migration_id\u003dmigration_id,"},{"line_number":5290,"context_line":"                    instance_uuid\u003dinstance.uuid,"},{"line_number":5291,"context_line":"                    state\u003dmigration.status,"},{"line_number":5292,"context_line":"                    method\u003d\u0027abort live migration\u0027)"},{"line_number":5293,"context_line":""},{"line_number":5294,"context_line":"        self._notify_about_instance_usage("},{"line_number":5295,"context_line":"            context, instance, \u0027live.migration.abort.start\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_e35bc885","line":5292,"range":{"start_line":5288,"start_character":8,"end_line":5292,"end_character":50},"in_reply_to":"bae84128_209acd63","updated":"2016-02-22 12:21:10.000000000","message":"To cancel a live migration we actually call the generic abortJob so it could be that the migration is completed and a new job is running, the aim of this check is to reduce the window for killing a different job than a live-migration.\nSaid that I agree that putting this check here doesn\u0027t guarantee that we don\u0027t have a race condition, but it is a bit safer.","commit_id":"ac26aca6fc087a14e49cc7320158733c6f5590f6"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"9db0a270a9be49c2b81b1ccedafa3c7268a9edc1","unresolved":false,"context_lines":[{"line_number":5293,"context_line":""},{"line_number":5294,"context_line":"        self._notify_about_instance_usage("},{"line_number":5295,"context_line":"            context, instance, \u0027live.migration.abort.start\u0027)"},{"line_number":5296,"context_line":"        self.driver.live_migration_abort(instance)"},{"line_number":5297,"context_line":"        self._notify_about_instance_usage("},{"line_number":5298,"context_line":"            context, instance, \u0027live.migration.abort.end\u0027)"},{"line_number":5299,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_61d99483","line":5296,"range":{"start_line":5296,"start_character":8,"end_line":5296,"end_character":50},"updated":"2016-02-20 20:17:29.000000000","message":"This call should be wrapped with try catch. As libvirt driver could for example raise libvirt.libvirtError. In except section you need to check migration status again. Because it\u0027s possible, that live-migration finished after check on line 5288. In that case drivers code will raise exception, but the root cause for it would be *already* finished live-migration","commit_id":"ac26aca6fc087a14e49cc7320158733c6f5590f6"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"f9831787ad4cecb26f338f09ece2259aa0589bee","unresolved":false,"context_lines":[{"line_number":5293,"context_line":""},{"line_number":5294,"context_line":"        self._notify_about_instance_usage("},{"line_number":5295,"context_line":"            context, instance, \u0027live.migration.abort.start\u0027)"},{"line_number":5296,"context_line":"        self.driver.live_migration_abort(instance)"},{"line_number":5297,"context_line":"        self._notify_about_instance_usage("},{"line_number":5298,"context_line":"            context, instance, \u0027live.migration.abort.end\u0027)"},{"line_number":5299,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_701caec1","line":5296,"range":{"start_line":5296,"start_character":8,"end_line":5296,"end_character":50},"in_reply_to":"bae84128_61d99483","updated":"2016-02-21 18:41:08.000000000","message":"We don\u0027t catch libvirtErrors in compute-manager, different drivers might throw different errors, so it is not really useful","commit_id":"ac26aca6fc087a14e49cc7320158733c6f5590f6"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"fbd8e066788ab7cdd6263a8ccb7d043d7b13e0e6","unresolved":false,"context_lines":[{"line_number":5293,"context_line":""},{"line_number":5294,"context_line":"        self._notify_about_instance_usage("},{"line_number":5295,"context_line":"            context, instance, \u0027live.migration.abort.start\u0027)"},{"line_number":5296,"context_line":"        self.driver.live_migration_abort(instance)"},{"line_number":5297,"context_line":"        self._notify_about_instance_usage("},{"line_number":5298,"context_line":"            context, instance, \u0027live.migration.abort.end\u0027)"},{"line_number":5299,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_a3bb80e4","line":5296,"range":{"start_line":5296,"start_character":8,"end_line":5296,"end_character":50},"in_reply_to":"bae84128_701caec1","updated":"2016-02-22 10:16:40.000000000","message":"See comment in Libvirt driver code, I also proposed to create new exception class for this.","commit_id":"ac26aca6fc087a14e49cc7320158733c6f5590f6"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"12507f77b7af453c8d1b67a1649437439a4ab534","unresolved":false,"context_lines":[{"line_number":5293,"context_line":""},{"line_number":5294,"context_line":"        self._notify_about_instance_usage("},{"line_number":5295,"context_line":"            context, instance, \u0027live.migration.abort.start\u0027)"},{"line_number":5296,"context_line":"        self.driver.live_migration_abort(instance)"},{"line_number":5297,"context_line":"        self._notify_about_instance_usage("},{"line_number":5298,"context_line":"            context, instance, \u0027live.migration.abort.end\u0027)"},{"line_number":5299,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_23ddb0e0","line":5296,"range":{"start_line":5296,"start_character":8,"end_line":5296,"end_character":50},"in_reply_to":"bae84128_a3bb80e4","updated":"2016-02-22 12:21:10.000000000","message":"I am not sure adding a new exception in the libvirt driver is useful in this case, please see my comment in the Libvirt driver code.","commit_id":"ac26aca6fc087a14e49cc7320158733c6f5590f6"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"eee04b62acbff2d6452db99f60dbbb4cde5cf3d3","unresolved":false,"context_lines":[{"line_number":5287,"context_line":"        :param migration_id: ID of in-progress live migration"},{"line_number":5288,"context_line":""},{"line_number":5289,"context_line":"        \"\"\""},{"line_number":5290,"context_line":"        migration \u003d objects.Migration.get_by_id(context, migration_id)"},{"line_number":5291,"context_line":"        if migration.status !\u003d \u0027running\u0027:"},{"line_number":5292,"context_line":"            raise exception.InvalidMigrationState(migration_id\u003dmigration_id,"},{"line_number":5293,"context_line":"                    instance_uuid\u003dinstance.uuid,"}],"source_content_type":"text/x-python","patch_set":11,"id":"bae84128_05d5bf1a","line":5290,"updated":"2016-02-23 17:47:45.000000000","message":"this seems odd now, we should just be passing the migration object here.","commit_id":"37a0155bd9ed8db8b1f45d9788fb25f8f3011c4c"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"b9220dc26d769499d23809dc9f57c4b27c67c85a","unresolved":false,"context_lines":[{"line_number":5295,"context_line":"                    method\u003d\u0027abort live migration\u0027)"},{"line_number":5296,"context_line":""},{"line_number":5297,"context_line":"        self._notify_about_instance_usage("},{"line_number":5298,"context_line":"            context, instance, \u0027live.migration.abort.start\u0027)"},{"line_number":5299,"context_line":"        self.driver.live_migration_abort(instance)"},{"line_number":5300,"context_line":"        self._notify_about_instance_usage("},{"line_number":5301,"context_line":"            context, instance, \u0027live.migration.abort.end\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"bae84128_d3fa8042","line":5298,"updated":"2016-02-23 17:46:48.000000000","message":"we have technically banned any new notifications using this legacy format, but I want to over look that since there is no really viable alternative.","commit_id":"37a0155bd9ed8db8b1f45d9788fb25f8f3011c4c"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"d2fcb23949275a3beccfa6969d9d7d75e36353f6","unresolved":false,"context_lines":[{"line_number":5295,"context_line":"                    method\u003d\u0027abort live migration\u0027)"},{"line_number":5296,"context_line":""},{"line_number":5297,"context_line":"        self._notify_about_instance_usage("},{"line_number":5298,"context_line":"            context, instance, \u0027live.migration.abort.start\u0027)"},{"line_number":5299,"context_line":"        self.driver.live_migration_abort(instance)"},{"line_number":5300,"context_line":"        self._notify_about_instance_usage("},{"line_number":5301,"context_line":"            context, instance, \u0027live.migration.abort.end\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"bae84128_f4578e23","line":5298,"in_reply_to":"bae84128_d3fa8042","updated":"2016-02-24 07:44:57.000000000","message":"not fix.","commit_id":"37a0155bd9ed8db8b1f45d9788fb25f8f3011c4c"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"b9220dc26d769499d23809dc9f57c4b27c67c85a","unresolved":false,"context_lines":[{"line_number":5585,"context_line":"        self._notify_about_instance_usage(context, instance,"},{"line_number":5586,"context_line":"                                          \"live_migration._rollback.end\")"},{"line_number":5587,"context_line":""},{"line_number":5588,"context_line":"        self._set_migration_status(migration, migration_status)"},{"line_number":5589,"context_line":""},{"line_number":5590,"context_line":"    @wrap_exception()"},{"line_number":5591,"context_line":"    @wrap_instance_event"}],"source_content_type":"text/x-python","patch_set":11,"id":"bae84128_25a8c3da","line":5588,"updated":"2016-02-23 17:46:48.000000000","message":"does now passing \"cancelled\" in here, technical require a new API microversion to expose the cancelled state of a migration?\n\nIn theory it should be in an \"Unknown\" state for older API users.","commit_id":"37a0155bd9ed8db8b1f45d9788fb25f8f3011c4c"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"d2fcb23949275a3beccfa6969d9d7d75e36353f6","unresolved":false,"context_lines":[{"line_number":5585,"context_line":"        self._notify_about_instance_usage(context, instance,"},{"line_number":5586,"context_line":"                                          \"live_migration._rollback.end\")"},{"line_number":5587,"context_line":""},{"line_number":5588,"context_line":"        self._set_migration_status(migration, migration_status)"},{"line_number":5589,"context_line":""},{"line_number":5590,"context_line":"    @wrap_exception()"},{"line_number":5591,"context_line":"    @wrap_instance_event"}],"source_content_type":"text/x-python","patch_set":11,"id":"bae84128_0fc01f4f","line":5588,"in_reply_to":"bae84128_25a8c3da","updated":"2016-02-24 07:44:57.000000000","message":"Hi, John, here, what is the older API?","commit_id":"37a0155bd9ed8db8b1f45d9788fb25f8f3011c4c"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"6ffb377e1ee81c2d09f180ee7f1d4ae9db82dcbe","unresolved":false,"context_lines":[{"line_number":5585,"context_line":"        self._notify_about_instance_usage(context, instance,"},{"line_number":5586,"context_line":"                                          \"live_migration._rollback.end\")"},{"line_number":5587,"context_line":""},{"line_number":5588,"context_line":"        self._set_migration_status(migration, migration_status)"},{"line_number":5589,"context_line":""},{"line_number":5590,"context_line":"    @wrap_exception()"},{"line_number":5591,"context_line":"    @wrap_instance_event"}],"source_content_type":"text/x-python","patch_set":11,"id":"bae84128_cb16244b","line":5588,"in_reply_to":"bae84128_25a8c3da","updated":"2016-02-24 09:57:56.000000000","message":"The new API microversion is included in this change.\nDo you want me to put a logic in the _set_migration_status to deal the migration_status looking at the API version?\nI am not sure how I get this info, maybe passing the rpc version number to the compute_manager?\nI think I need some guidance here.","commit_id":"37a0155bd9ed8db8b1f45d9788fb25f8f3011c4c"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"f7a3f434746049f07dda21b50a24aafc93d749b0","unresolved":false,"context_lines":[{"line_number":5297,"context_line":"            context, instance, \u0027live.migration.abort.start\u0027)"},{"line_number":5298,"context_line":"        self.driver.live_migration_abort(instance)"},{"line_number":5299,"context_line":"        self._notify_about_instance_usage("},{"line_number":5300,"context_line":"            context, instance, \u0027live.migration.abort.end\u0027)"},{"line_number":5301,"context_line":""},{"line_number":5302,"context_line":"    def _live_migration_cleanup_flags(self, block_migration, migrate_data):"},{"line_number":5303,"context_line":"        \"\"\"Determine whether disks or instance path need to be cleaned up after"}],"source_content_type":"text/x-python","patch_set":15,"id":"bae84128_b11cbf6b","line":5300,"updated":"2016-02-24 21:34:02.000000000","message":"if live_migration_abort is async, it seems a little odd to send both start and end events, no?\n\n...\n\nNever mind, I see that abortJob is synchronous - https://libvirt.org/sources/java/javadoc/org/libvirt/Domain.html#abortJob()  \n\nMakes sense.","commit_id":"07d373d2925891d9d6862bd0724a8ad8aaaaa677"}],"nova/exception.py":[{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"9d761fc26ebf9194e78a72489cb093d47bf0aef1","unresolved":false,"context_lines":[{"line_number":1139,"context_line":"                \"migration is in this state.\")"},{"line_number":1140,"context_line":""},{"line_number":1141,"context_line":""},{"line_number":1142,"context_line":"class InvalidMigrationType(Invalid):"},{"line_number":1143,"context_line":"    msg_fmt \u003d _(\"Migration %(migration_id)s type of instance \""},{"line_number":1144,"context_line":"                \"%(instance_uuid)s is %(migration_type)s. Cannot %(method)s \""},{"line_number":1145,"context_line":"                \"for this type of migration.\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_f96b36b7","line":1142,"range":{"start_line":1142,"start_character":6,"end_line":1142,"end_character":26},"updated":"2016-02-17 16:10:19.000000000","message":"I missed something or it isn\u0027t used anywhere, so you can remove it","commit_id":"0d1bee288d895fcf5421e75b76dd43f8a8657d3b"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"122b02ebc6eb792af0b68dff59a4d068f527ac4c","unresolved":false,"context_lines":[{"line_number":1139,"context_line":"                \"migration is in this state.\")"},{"line_number":1140,"context_line":""},{"line_number":1141,"context_line":""},{"line_number":1142,"context_line":"class InvalidMigrationType(Invalid):"},{"line_number":1143,"context_line":"    msg_fmt \u003d _(\"Migration %(migration_id)s type of instance \""},{"line_number":1144,"context_line":"                \"%(instance_uuid)s is %(migration_type)s. Cannot %(method)s \""},{"line_number":1145,"context_line":"                \"for this type of migration.\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_7984140a","line":1142,"range":{"start_line":1142,"start_character":6,"end_line":1142,"end_character":26},"in_reply_to":"dae33548_f96b36b7","updated":"2016-02-18 13:52:56.000000000","message":"Done","commit_id":"0d1bee288d895fcf5421e75b76dd43f8a8657d3b"}],"nova/tests/functional/api_sample_tests/test_server_migrations.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"d700aaea5e28ad46e9b694640f8e2a1344730dc1","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        migration.status \u003d \u0027running\u0027"},{"line_number":66,"context_line":"        get_by_id_and_instance.return_value \u003d migration"},{"line_number":67,"context_line":"        self._headers \u003d {}"},{"line_number":68,"context_line":"        self._headers[\u0027X-OpenStack-Nova-API-Version\u0027] \u003d \u00272.23\u0027"},{"line_number":69,"context_line":"        self._do_post(\u0027servers/%s/action\u0027 % self.uuid, \u0027live-migrate-server\u0027,"},{"line_number":70,"context_line":"                      {\u0027hostname\u0027: self.compute.host})"},{"line_number":71,"context_line":"        uri \u003d \u0027servers/%s/migrations/%s\u0027 % (self.uuid, migration.id)"}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_0016a954","line":68,"range":{"start_line":68,"start_character":8,"end_line":68,"end_character":62},"updated":"2016-02-22 07:13:55.000000000","message":"we can use this way to pass requested version https://github.com/openstack/nova/blob/master/nova/tests/functional/api_sample_tests/test_keypairs.py#L110","commit_id":"ac26aca6fc087a14e49cc7320158733c6f5590f6"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"12507f77b7af453c8d1b67a1649437439a4ab534","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        migration.status \u003d \u0027running\u0027"},{"line_number":66,"context_line":"        get_by_id_and_instance.return_value \u003d migration"},{"line_number":67,"context_line":"        self._headers \u003d {}"},{"line_number":68,"context_line":"        self._headers[\u0027X-OpenStack-Nova-API-Version\u0027] \u003d \u00272.23\u0027"},{"line_number":69,"context_line":"        self._do_post(\u0027servers/%s/action\u0027 % self.uuid, \u0027live-migrate-server\u0027,"},{"line_number":70,"context_line":"                      {\u0027hostname\u0027: self.compute.host})"},{"line_number":71,"context_line":"        uri \u003d \u0027servers/%s/migrations/%s\u0027 % (self.uuid, migration.id)"}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_7ed10a57","line":68,"range":{"start_line":68,"start_character":8,"end_line":68,"end_character":62},"in_reply_to":"bae84128_0016a954","updated":"2016-02-22 12:21:10.000000000","message":"I\u0027ll create a new class and move the definition of headers in the setUp method.","commit_id":"ac26aca6fc087a14e49cc7320158733c6f5590f6"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"d700aaea5e28ad46e9b694640f8e2a1344730dc1","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                                 {}, api_version\u003d\u00272.22\u0027)"},{"line_number":52,"context_line":"        self.assertEqual(202, response.status_code)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    @mock.patch.object(conductor_manager.ComputeTaskManager, \u0027_live_migrate\u0027)"},{"line_number":55,"context_line":"    @mock.patch.object(db, \u0027service_get_by_compute_host\u0027)"},{"line_number":56,"context_line":"    @mock.patch.object(objects.Migration, \u0027get_by_id_and_instance\u0027)"},{"line_number":57,"context_line":"    @mock.patch(\u0027nova.compute.manager.ComputeManager.\u0027"},{"line_number":58,"context_line":"                \u0027live_migration_abort\u0027)"},{"line_number":59,"context_line":"    def test_live_migrate_abort(self, live_migration_abort,"},{"line_number":60,"context_line":"                                get_by_id_and_instance,"},{"line_number":61,"context_line":"                                service_get_by_compute_host,"},{"line_number":62,"context_line":"                                _live_migrate):"},{"line_number":63,"context_line":"        migration \u003d objects.Migration()"},{"line_number":64,"context_line":"        migration.id \u003d 1"},{"line_number":65,"context_line":"        migration.status \u003d \u0027running\u0027"},{"line_number":66,"context_line":"        get_by_id_and_instance.return_value \u003d migration"},{"line_number":67,"context_line":"        self._headers \u003d {}"},{"line_number":68,"context_line":"        self._headers[\u0027X-OpenStack-Nova-API-Version\u0027] \u003d \u00272.23\u0027"},{"line_number":69,"context_line":"        self._do_post(\u0027servers/%s/action\u0027 % self.uuid, \u0027live-migrate-server\u0027,"},{"line_number":70,"context_line":"                      {\u0027hostname\u0027: self.compute.host})"},{"line_number":71,"context_line":"        uri \u003d \u0027servers/%s/migrations/%s\u0027 % (self.uuid, migration.id)"},{"line_number":72,"context_line":"        response \u003d self.api.api_delete(uri, headers\u003dself._headers)"},{"line_number":73,"context_line":"        self.assertEqual(202, response.status)"}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_c01b217f","line":73,"range":{"start_line":54,"start_character":4,"end_line":73,"end_character":46},"updated":"2016-02-22 07:13:55.000000000","message":"we should create another class for microversion 2.23","commit_id":"ac26aca6fc087a14e49cc7320158733c6f5590f6"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"12507f77b7af453c8d1b67a1649437439a4ab534","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                                 {}, api_version\u003d\u00272.22\u0027)"},{"line_number":52,"context_line":"        self.assertEqual(202, response.status_code)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    @mock.patch.object(conductor_manager.ComputeTaskManager, \u0027_live_migrate\u0027)"},{"line_number":55,"context_line":"    @mock.patch.object(db, \u0027service_get_by_compute_host\u0027)"},{"line_number":56,"context_line":"    @mock.patch.object(objects.Migration, \u0027get_by_id_and_instance\u0027)"},{"line_number":57,"context_line":"    @mock.patch(\u0027nova.compute.manager.ComputeManager.\u0027"},{"line_number":58,"context_line":"                \u0027live_migration_abort\u0027)"},{"line_number":59,"context_line":"    def test_live_migrate_abort(self, live_migration_abort,"},{"line_number":60,"context_line":"                                get_by_id_and_instance,"},{"line_number":61,"context_line":"                                service_get_by_compute_host,"},{"line_number":62,"context_line":"                                _live_migrate):"},{"line_number":63,"context_line":"        migration \u003d objects.Migration()"},{"line_number":64,"context_line":"        migration.id \u003d 1"},{"line_number":65,"context_line":"        migration.status \u003d \u0027running\u0027"},{"line_number":66,"context_line":"        get_by_id_and_instance.return_value \u003d migration"},{"line_number":67,"context_line":"        self._headers \u003d {}"},{"line_number":68,"context_line":"        self._headers[\u0027X-OpenStack-Nova-API-Version\u0027] \u003d \u00272.23\u0027"},{"line_number":69,"context_line":"        self._do_post(\u0027servers/%s/action\u0027 % self.uuid, \u0027live-migrate-server\u0027,"},{"line_number":70,"context_line":"                      {\u0027hostname\u0027: self.compute.host})"},{"line_number":71,"context_line":"        uri \u003d \u0027servers/%s/migrations/%s\u0027 % (self.uuid, migration.id)"},{"line_number":72,"context_line":"        response \u003d self.api.api_delete(uri, headers\u003dself._headers)"},{"line_number":73,"context_line":"        self.assertEqual(202, response.status)"}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_c924e5b0","line":73,"range":{"start_line":54,"start_character":4,"end_line":73,"end_character":46},"in_reply_to":"bae84128_c01b217f","updated":"2016-02-22 12:21:10.000000000","message":"Done","commit_id":"ac26aca6fc087a14e49cc7320158733c6f5590f6"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"949b88ba9bf06e4dbbd542be90ff12f17ac074fd","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        \"\"\"setUp method for server usage.\"\"\""},{"line_number":60,"context_line":"        super(ServerMigrationsSampleJsonTest_V223, self).setUp()"},{"line_number":61,"context_line":"        self._headers \u003d {}"},{"line_number":62,"context_line":"        self._headers[\u0027X-OpenStack-Nova-API-Version\u0027] \u003d \u00272.23\u0027"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    @mock.patch.object(conductor_manager.ComputeTaskManager, \u0027_live_migrate\u0027)"},{"line_number":65,"context_line":"    @mock.patch.object(db, \u0027service_get_by_compute_host\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_fda20e98","line":62,"range":{"start_line":62,"start_character":8,"end_line":62,"end_character":62},"updated":"2016-02-23 10:04:15.000000000","message":"IMHO, you should not need to set the API Version in the head here.\n\nset microversion as the class variable\nmicroversion \u003d \u00272.23\u0027\n\nsame as your change in this file:\nhttps://review.openstack.org/#/c/277971/8/nova/tests/unit/api/openstack/compute/test_server_migrations.py","commit_id":"69a34f8ecdcc98efea8069890a7feee6cddd64f8"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"1539c3baeb843a3042b4d4e921e448dd384f9e55","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        \"\"\"setUp method for server usage.\"\"\""},{"line_number":60,"context_line":"        super(ServerMigrationsSampleJsonTest_V223, self).setUp()"},{"line_number":61,"context_line":"        self._headers \u003d {}"},{"line_number":62,"context_line":"        self._headers[\u0027X-OpenStack-Nova-API-Version\u0027] \u003d \u00272.23\u0027"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    @mock.patch.object(conductor_manager.ComputeTaskManager, \u0027_live_migrate\u0027)"},{"line_number":65,"context_line":"    @mock.patch.object(db, \u0027service_get_by_compute_host\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_cfa6a20f","line":62,"updated":"2016-02-22 16:29:15.000000000","message":"You can still change it to something friendlier\nhttps://github.com/openstack/nova/blob/master/nova/tests/functional/api_sample_tests/test_keypairs.py#L110\nor just pass api_version as a parameter. But it\u0027s fine to clean this up in a followup for me.","commit_id":"69a34f8ecdcc98efea8069890a7feee6cddd64f8"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"0b69f678bdf3f6e5039ee3b2e7a59cbf2d87aedd","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        \"\"\"setUp method for server usage.\"\"\""},{"line_number":60,"context_line":"        super(ServerMigrationsSampleJsonTest_V223, self).setUp()"},{"line_number":61,"context_line":"        self._headers \u003d {}"},{"line_number":62,"context_line":"        self._headers[\u0027X-OpenStack-Nova-API-Version\u0027] \u003d \u00272.23\u0027"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    @mock.patch.object(conductor_manager.ComputeTaskManager, \u0027_live_migrate\u0027)"},{"line_number":65,"context_line":"    @mock.patch.object(db, \u0027service_get_by_compute_host\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_726744b7","line":62,"range":{"start_line":62,"start_character":8,"end_line":62,"end_character":62},"in_reply_to":"bae84128_fda20e98","updated":"2016-02-23 11:58:34.000000000","message":"I do not understand why you don\u0027t like the use of headers which is the only option if I want to use the functional/api/client.py :)\n\nBTW I am going to change the code removing the headers, passing the param api_version to the api_samples_test_base class, exactly as it is done in the test_live_migrate_force_complete method above.\n\nI am not adding the microversion as class variable for two reasons:\n1 I still need to pass the api_version param\n2 it requires to define two new templates \nforce_complete.json.tpl and live-migrate-server.json.tpl for the version 2.23 but those new templates will be the same as the templates we already have in the nova/tests/functional/api_sample_tests/api_samples/server-migrations  folder.","commit_id":"69a34f8ecdcc98efea8069890a7feee6cddd64f8"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"32af2c5674cedf9e1e11f1ecc6e4b2ae4aee4cd9","unresolved":false,"context_lines":[{"line_number":169,"context_line":"    @mock.patch.object(db, \u0027service_get_by_compute_host\u0027)"},{"line_number":170,"context_line":"    @mock.patch.object(objects.Migration, \u0027get_by_id_and_instance\u0027)"},{"line_number":171,"context_line":"    @mock.patch(\u0027nova.compute.manager.ComputeManager.\u0027"},{"line_number":172,"context_line":"                \u0027live_migration_abort\u0027)"},{"line_number":173,"context_line":"    def test_live_migrate_abort(self, live_migration_abort,"},{"line_number":174,"context_line":"                                get_by_id_and_instance,"},{"line_number":175,"context_line":"                                service_get_by_compute_host,"}],"source_content_type":"text/x-python","patch_set":18,"id":"9aed3d3a_d4b97030","line":172,"updated":"2016-02-25 21:47:33.000000000","message":"We can\u0027t use mocks here, they end up having really negative impact on the integrity of the api samples.\n\nLoad up the database with objects in question that build the model you want, then do the delete of them.","commit_id":"d003c676a0ed1d5f1635c937133ce52d86dcadd4"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"2e722e9eb567fa2dc0009f029f1d5d1423cbd9f2","unresolved":false,"context_lines":[{"line_number":169,"context_line":"    @mock.patch.object(db, \u0027service_get_by_compute_host\u0027)"},{"line_number":170,"context_line":"    @mock.patch.object(objects.Migration, \u0027get_by_id_and_instance\u0027)"},{"line_number":171,"context_line":"    @mock.patch(\u0027nova.compute.manager.ComputeManager.\u0027"},{"line_number":172,"context_line":"                \u0027live_migration_abort\u0027)"},{"line_number":173,"context_line":"    def test_live_migrate_abort(self, live_migration_abort,"},{"line_number":174,"context_line":"                                get_by_id_and_instance,"},{"line_number":175,"context_line":"                                service_get_by_compute_host,"}],"source_content_type":"text/x-python","patch_set":18,"id":"9aed3d3a_7a73fd80","line":172,"in_reply_to":"9aed3d3a_9826e066","updated":"2016-02-26 15:21:49.000000000","message":"OK, so this is what we are waiting on now.","commit_id":"d003c676a0ed1d5f1635c937133ce52d86dcadd4"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"3e19e4b79a7800cb3201a912f0e3a5a55552a095","unresolved":false,"context_lines":[{"line_number":169,"context_line":"    @mock.patch.object(db, \u0027service_get_by_compute_host\u0027)"},{"line_number":170,"context_line":"    @mock.patch.object(objects.Migration, \u0027get_by_id_and_instance\u0027)"},{"line_number":171,"context_line":"    @mock.patch(\u0027nova.compute.manager.ComputeManager.\u0027"},{"line_number":172,"context_line":"                \u0027live_migration_abort\u0027)"},{"line_number":173,"context_line":"    def test_live_migrate_abort(self, live_migration_abort,"},{"line_number":174,"context_line":"                                get_by_id_and_instance,"},{"line_number":175,"context_line":"                                service_get_by_compute_host,"}],"source_content_type":"text/x-python","patch_set":18,"id":"9aed3d3a_9826e066","line":172,"in_reply_to":"9aed3d3a_d4b97030","updated":"2016-02-26 09:31:41.000000000","message":"ack, going to fix it. Thanks","commit_id":"d003c676a0ed1d5f1635c937133ce52d86dcadd4"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"d84c464f54ceea67649b280e0ad0b606b3b26fee","unresolved":false,"context_lines":[{"line_number":160,"context_line":"                              response, 200)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"class ServerMigrationsSampleJsonTestV2_24(test_servers.ServersSampleBase):"},{"line_number":164,"context_line":"    ADMIN_API \u003d True"},{"line_number":165,"context_line":"    extension_name \u003d \"server-migrations\""},{"line_number":166,"context_line":"    scenarios \u003d [(\u0027v2_24\u0027, {\u0027api_major_version\u0027: \u0027v2.1\u0027})]"}],"source_content_type":"text/x-python","patch_set":19,"id":"9aed3d3a_6b85f1ab","line":163,"updated":"2016-02-26 15:35:29.000000000","message":"are you ok with the fact that I am extending test_servers.ServerSampleBase or do you prefer I inherit ServerMigrationsSamplesJsonTestV2_23 ?","commit_id":"fa002925460e70d988d1b4dd1ea594c680a43740"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"c23132c7a5788ef426264386962cb84f0e2b01a9","unresolved":false,"context_lines":[{"line_number":160,"context_line":"                              response, 200)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"class ServerMigrationsSampleJsonTestV2_24(test_servers.ServersSampleBase):"},{"line_number":164,"context_line":"    ADMIN_API \u003d True"},{"line_number":165,"context_line":"    extension_name \u003d \"server-migrations\""},{"line_number":166,"context_line":"    scenarios \u003d [(\u0027v2_24\u0027, {\u0027api_major_version\u0027: \u0027v2.1\u0027})]"}],"source_content_type":"text/x-python","patch_set":19,"id":"9aed3d3a_26868013","line":163,"in_reply_to":"9aed3d3a_6b85f1ab","updated":"2016-02-26 15:42:54.000000000","message":"yes, this is fine","commit_id":"fa002925460e70d988d1b4dd1ea594c680a43740"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"67edfe302567f1ca442e1c0c1f95c199d107dbaa","unresolved":false,"context_lines":[{"line_number":208,"context_line":"                      {\u0027hostname\u0027: self.compute.host})"},{"line_number":209,"context_line":"        uri \u003d \u0027servers/%s/migrations/%s\u0027 % (self.uuid, self.migration.id)"},{"line_number":210,"context_line":"        response \u003d self._do_delete(uri, api_version\u003d\u00272.24\u0027)"},{"line_number":211,"context_line":"        self.assertEqual(400, response.status_code)"}],"source_content_type":"text/x-python","patch_set":19,"id":"9aed3d3a_cf47e049","line":211,"updated":"2016-02-26 17:33:47.000000000","message":"I don\u0027t see the 409 being tested here, but we can add that in a follow up, and it is already kinda covered anyways.","commit_id":"fa002925460e70d988d1b4dd1ea594c680a43740"}],"nova/tests/unit/api/openstack/compute/test_server_migrations.py":[{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"9d761fc26ebf9194e78a72489cb093d47bf0aef1","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class ServerMigrationsTestsV21(test.NoDBTestCase):"},{"line_number":26,"context_line":"    wsgi_api_version \u003d \u00272.23\u0027"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def setUp(self):"},{"line_number":29,"context_line":"        super(ServerMigrationsTestsV21, self).setUp()"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_1cb24d06","line":26,"updated":"2016-02-17 16:10:19.000000000","message":"You should leave this as it is and create new class ServerMigrationsTestsV223 that inherits from ServerMigrationsTestsV21. You can check test_instance_actions or test_virtual_interfaces","commit_id":"0d1bee288d895fcf5421e75b76dd43f8a8657d3b"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"122b02ebc6eb792af0b68dff59a4d068f527ac4c","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class ServerMigrationsTestsV21(test.NoDBTestCase):"},{"line_number":26,"context_line":"    wsgi_api_version \u003d \u00272.23\u0027"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def setUp(self):"},{"line_number":29,"context_line":"        super(ServerMigrationsTestsV21, self).setUp()"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_ab6639b8","line":26,"in_reply_to":"dae33548_1cb24d06","updated":"2016-02-18 13:52:56.000000000","message":"Ok I\u0027ll create a new class which inherits from the test.NoDBTestCase just to avoid to run the tests in the SErverMigrationsTestV21 twice","commit_id":"0d1bee288d895fcf5421e75b76dd43f8a8657d3b"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"677026357928e7b0abafcf97a0544e713ea2860d","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class ServerMigrationsTestsV21(test.NoDBTestCase):"},{"line_number":26,"context_line":"    wsgi_api_version \u003d \u00272.23\u0027"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def setUp(self):"},{"line_number":29,"context_line":"        super(ServerMigrationsTestsV21, self).setUp()"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_4e117b5c","line":26,"in_reply_to":"dae33548_ab6639b8","updated":"2016-02-18 13:57:41.000000000","message":"I think that\u0027s not a problem, we are doing it in other APIs already (run tests twice or more).","commit_id":"0d1bee288d895fcf5421e75b76dd43f8a8657d3b"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"9d761fc26ebf9194e78a72489cb093d47bf0aef1","unresolved":false,"context_lines":[{"line_number":138,"context_line":""},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"class ServerMigrationsPolicyEnforcementV21(test.NoDBTestCase):"},{"line_number":141,"context_line":"    wsgi_api_version \u003d \u00272.23\u0027"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def setUp(self):"},{"line_number":144,"context_line":"        super(ServerMigrationsPolicyEnforcementV21, self).setUp()"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_626f702b","line":141,"updated":"2016-02-17 16:10:19.000000000","message":"Im not sure about this but it probably should be changed in method, not here.","commit_id":"0d1bee288d895fcf5421e75b76dd43f8a8657d3b"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"122b02ebc6eb792af0b68dff59a4d068f527ac4c","unresolved":false,"context_lines":[{"line_number":138,"context_line":""},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"class ServerMigrationsPolicyEnforcementV21(test.NoDBTestCase):"},{"line_number":141,"context_line":"    wsgi_api_version \u003d \u00272.23\u0027"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def setUp(self):"},{"line_number":144,"context_line":"        super(ServerMigrationsPolicyEnforcementV21, self).setUp()"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_4b25ed59","line":141,"in_reply_to":"dae33548_626f702b","updated":"2016-02-18 13:52:56.000000000","message":"I\u0027ll create a new class, following the same logic we do for the ServerMigrationsTestsV21 class","commit_id":"0d1bee288d895fcf5421e75b76dd43f8a8657d3b"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"f9831787ad4cecb26f338f09ece2259aa0589bee","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                exception.NovaException(), webob.exc.HTTPInternalServerError)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"class ServerMigrationsTestsV223(test.NoDBTestCase):"},{"line_number":90,"context_line":"    wsgi_api_version \u003d \u00272.23\u0027"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_10a0c242","line":89,"range":{"start_line":89,"start_character":32,"end_line":89,"end_character":49},"updated":"2016-02-21 18:41:08.000000000","message":"I still think that we should follow other APIs and inherit from ServerMigrationsTestsV21, so we will validate that in case of a newer microversion everything still works fine.","commit_id":"ac26aca6fc087a14e49cc7320158733c6f5590f6"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"12507f77b7af453c8d1b67a1649437439a4ab534","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                exception.NovaException(), webob.exc.HTTPInternalServerError)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"class ServerMigrationsTestsV223(test.NoDBTestCase):"},{"line_number":90,"context_line":"    wsgi_api_version \u003d \u00272.23\u0027"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_de9f764e","line":89,"range":{"start_line":89,"start_character":32,"end_line":89,"end_character":49},"in_reply_to":"bae84128_10a0c242","updated":"2016-02-22 12:21:10.000000000","message":"do you mean that we tests that the existing API calls still work in the new microversions? I see your point even if I am not fully convinced that it is the right way to go, btw as we want to be consistent here I am going to change it as you suggested.","commit_id":"ac26aca6fc087a14e49cc7320158733c6f5590f6"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"949b88ba9bf06e4dbbd542be90ff12f17ac074fd","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    def test_cancel_live_migration_succeeded(self):"},{"line_number":96,"context_line":"        @mock.patch.object(self.compute_api, \u0027live_migrate_abort\u0027)"},{"line_number":97,"context_line":"        @mock.patch.object(self.compute_api, \u0027get\u0027)"},{"line_number":98,"context_line":"        def _do_test(mock_get, mock_abort):"},{"line_number":99,"context_line":"            self.controller.delete(self.req, \u0027server-id\u0027, \u0027migration-id\u0027)"},{"line_number":100,"context_line":"            mock_abort.assert_called_once_with(self.context,"},{"line_number":101,"context_line":"                                               mock_get(),"},{"line_number":102,"context_line":"                                               \u0027migration-id\u0027)"},{"line_number":103,"context_line":"        _do_test()"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def _test_cancel_live_migration_failed(self, fake_exc, expected_exc):"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_dd42aa67","line":102,"range":{"start_line":98,"start_character":0,"end_line":102,"end_character":62},"updated":"2016-02-23 10:04:15.000000000","message":"strangely you are define a new function here.\n\nIs it OK as follow?\n\n @mock.patch.object(self.compute_api, \u0027live_migrate_abort\u0027)\n @mock.patch.object(self.compute_api, \u0027get\u0027)\n def test_cancel_live_migration_succeeded(self):\n     self.controller.delete(self.req, \u0027server-id\u0027, \u0027migration-id\u0027)\n     ...","commit_id":"69a34f8ecdcc98efea8069890a7feee6cddd64f8"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"0b69f678bdf3f6e5039ee3b2e7a59cbf2d87aedd","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    def test_cancel_live_migration_succeeded(self):"},{"line_number":96,"context_line":"        @mock.patch.object(self.compute_api, \u0027live_migrate_abort\u0027)"},{"line_number":97,"context_line":"        @mock.patch.object(self.compute_api, \u0027get\u0027)"},{"line_number":98,"context_line":"        def _do_test(mock_get, mock_abort):"},{"line_number":99,"context_line":"            self.controller.delete(self.req, \u0027server-id\u0027, \u0027migration-id\u0027)"},{"line_number":100,"context_line":"            mock_abort.assert_called_once_with(self.context,"},{"line_number":101,"context_line":"                                               mock_get(),"},{"line_number":102,"context_line":"                                               \u0027migration-id\u0027)"},{"line_number":103,"context_line":"        _do_test()"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def _test_cancel_live_migration_failed(self, fake_exc, expected_exc):"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_f2ad149c","line":102,"range":{"start_line":98,"start_character":0,"end_line":102,"end_character":62},"in_reply_to":"bae84128_dd42aa67","updated":"2016-02-23 11:58:34.000000000","message":"I agree with you :) \nI am doing that to be consistent with what we have here, I remember I had your same concern when Pawel wrote the original test class for the force_complete action.","commit_id":"69a34f8ecdcc98efea8069890a7feee6cddd64f8"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"bcc06dae275b00c61f7c1676a7172686b896aa2a","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    def test_cancel_live_migration_succeeded(self):"},{"line_number":96,"context_line":"        @mock.patch.object(self.compute_api, \u0027live_migrate_abort\u0027)"},{"line_number":97,"context_line":"        @mock.patch.object(self.compute_api, \u0027get\u0027)"},{"line_number":98,"context_line":"        def _do_test(mock_get, mock_abort):"},{"line_number":99,"context_line":"            self.controller.delete(self.req, \u0027server-id\u0027, \u0027migration-id\u0027)"},{"line_number":100,"context_line":"            mock_abort.assert_called_once_with(self.context,"},{"line_number":101,"context_line":"                                               mock_get(),"},{"line_number":102,"context_line":"                                               \u0027migration-id\u0027)"},{"line_number":103,"context_line":"        _do_test()"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def _test_cancel_live_migration_failed(self, fake_exc, expected_exc):"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_52220053","line":102,"range":{"start_line":98,"start_character":0,"end_line":102,"end_character":62},"in_reply_to":"bae84128_dd42aa67","updated":"2016-02-23 11:38:48.000000000","message":"Yes, that is strange, but it is consistent with this file - so I guess it should stay with the _do_test(...) function. Possibly convert all the tests in this file in a different patch later?","commit_id":"69a34f8ecdcc98efea8069890a7feee6cddd64f8"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"949b88ba9bf06e4dbbd542be90ff12f17ac074fd","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        self.policy.set_rules({rule_name: \"project:non_fake\"})"},{"line_number":179,"context_line":"        self.assertRaises(exception.PolicyNotAuthorized,"},{"line_number":180,"context_line":"                          self.controller.delete, self.req,"},{"line_number":181,"context_line":"                          fakes.FAKE_UUID, fakes.FAKE_UUID)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_78060c1e","line":181,"range":{"start_line":181,"start_character":43,"end_line":181,"end_character":58},"updated":"2016-02-23 10:04:15.000000000","message":"it should be an id instead of UUID.","commit_id":"69a34f8ecdcc98efea8069890a7feee6cddd64f8"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"0b69f678bdf3f6e5039ee3b2e7a59cbf2d87aedd","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        self.policy.set_rules({rule_name: \"project:non_fake\"})"},{"line_number":179,"context_line":"        self.assertRaises(exception.PolicyNotAuthorized,"},{"line_number":180,"context_line":"                          self.controller.delete, self.req,"},{"line_number":181,"context_line":"                          fakes.FAKE_UUID, fakes.FAKE_UUID)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_75e28e30","line":181,"range":{"start_line":181,"start_character":43,"end_line":181,"end_character":58},"in_reply_to":"bae84128_78060c1e","updated":"2016-02-23 11:58:34.000000000","message":"correct, thanks","commit_id":"69a34f8ecdcc98efea8069890a7feee6cddd64f8"}],"nova/tests/unit/compute/test_compute_mgr.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"d700aaea5e28ad46e9b694640f8e2a1344730dc1","unresolved":false,"context_lines":[{"line_number":4372,"context_line":"        def _do_test(force_complete, get_by_id, _notify_about_instance_usage):"},{"line_number":4373,"context_line":"            self.compute.live_migration_force_complete("},{"line_number":4374,"context_line":"                self.context, instance, migration.id)"},{"line_number":4375,"context_line":""},{"line_number":4376,"context_line":"            force_complete.assert_called_once_with(instance)"},{"line_number":4377,"context_line":""},{"line_number":4378,"context_line":"            _notify_usage_calls \u003d ["}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_5ba422a5","side":"PARENT","line":4375,"updated":"2016-02-22 07:13:55.000000000","message":"unrelated change","commit_id":"d51c5670d8d26e989d92eb29658eed8113034c0f"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"12507f77b7af453c8d1b67a1649437439a4ab534","unresolved":false,"context_lines":[{"line_number":4372,"context_line":"        def _do_test(force_complete, get_by_id, _notify_about_instance_usage):"},{"line_number":4373,"context_line":"            self.compute.live_migration_force_complete("},{"line_number":4374,"context_line":"                self.context, instance, migration.id)"},{"line_number":4375,"context_line":""},{"line_number":4376,"context_line":"            force_complete.assert_called_once_with(instance)"},{"line_number":4377,"context_line":""},{"line_number":4378,"context_line":"            _notify_usage_calls \u003d ["}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_9172ffab","side":"PARENT","line":4375,"in_reply_to":"bae84128_5ba422a5","updated":"2016-02-22 12:21:10.000000000","message":"Done","commit_id":"d51c5670d8d26e989d92eb29658eed8113034c0f"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"949b88ba9bf06e4dbbd542be90ff12f17ac074fd","unresolved":false,"context_lines":[{"line_number":4535,"context_line":"                                  mock_driver,"},{"line_number":4536,"context_line":"                                  mock_get_migration,"},{"line_number":4537,"context_line":"                                  mock_notify):"},{"line_number":4538,"context_line":"        instance \u003d objects.Instance(id\u003d123, uuid\u003dstr(uuid.uuid4()))"},{"line_number":4539,"context_line":"        migration \u003d self._get_migration(10, \u0027running\u0027, \u0027live-migration\u0027)"},{"line_number":4540,"context_line":"        mock_get_migration.return_value \u003d migration"},{"line_number":4541,"context_line":"        self.compute.live_migration_abort(self.context, instance, migration.id)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_d83f5885","line":4538,"range":{"start_line":4538,"start_character":49,"end_line":4538,"end_character":66},"updated":"2016-02-23 10:04:15.000000000","message":"had better use uuidsentinel .","commit_id":"69a34f8ecdcc98efea8069890a7feee6cddd64f8"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"0b69f678bdf3f6e5039ee3b2e7a59cbf2d87aedd","unresolved":false,"context_lines":[{"line_number":4535,"context_line":"                                  mock_driver,"},{"line_number":4536,"context_line":"                                  mock_get_migration,"},{"line_number":4537,"context_line":"                                  mock_notify):"},{"line_number":4538,"context_line":"        instance \u003d objects.Instance(id\u003d123, uuid\u003dstr(uuid.uuid4()))"},{"line_number":4539,"context_line":"        migration \u003d self._get_migration(10, \u0027running\u0027, \u0027live-migration\u0027)"},{"line_number":4540,"context_line":"        mock_get_migration.return_value \u003d migration"},{"line_number":4541,"context_line":"        self.compute.live_migration_abort(self.context, instance, migration.id)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_d5b71ad6","line":4538,"range":{"start_line":4538,"start_character":49,"end_line":4538,"end_character":66},"in_reply_to":"bae84128_d83f5885","updated":"2016-02-23 11:58:34.000000000","message":"Done","commit_id":"69a34f8ecdcc98efea8069890a7feee6cddd64f8"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"949b88ba9bf06e4dbbd542be90ff12f17ac074fd","unresolved":false,"context_lines":[{"line_number":4559,"context_line":"                                                mock_get_migration,"},{"line_number":4560,"context_line":"                                                mock_notify,"},{"line_number":4561,"context_line":"                                                mock_instance_fault):"},{"line_number":4562,"context_line":"        instance \u003d objects.Instance(id\u003d123, uuid\u003dstr(uuid.uuid4()))"},{"line_number":4563,"context_line":"        migration \u003d self._get_migration(10, \u0027running\u0027, \u0027live-migration\u0027)"},{"line_number":4564,"context_line":"        mock_get_migration.return_value \u003d migration"},{"line_number":4565,"context_line":"        mock_driver.side_effect \u003d exception.AbortMigrationNotSupported()"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_385124d9","line":4562,"range":{"start_line":4562,"start_character":53,"end_line":4562,"end_character":65},"updated":"2016-02-23 10:04:15.000000000","message":"ditto","commit_id":"69a34f8ecdcc98efea8069890a7feee6cddd64f8"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"0b69f678bdf3f6e5039ee3b2e7a59cbf2d87aedd","unresolved":false,"context_lines":[{"line_number":4559,"context_line":"                                                mock_get_migration,"},{"line_number":4560,"context_line":"                                                mock_notify,"},{"line_number":4561,"context_line":"                                                mock_instance_fault):"},{"line_number":4562,"context_line":"        instance \u003d objects.Instance(id\u003d123, uuid\u003dstr(uuid.uuid4()))"},{"line_number":4563,"context_line":"        migration \u003d self._get_migration(10, \u0027running\u0027, \u0027live-migration\u0027)"},{"line_number":4564,"context_line":"        mock_get_migration.return_value \u003d migration"},{"line_number":4565,"context_line":"        mock_driver.side_effect \u003d exception.AbortMigrationNotSupported()"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_b5bc16bc","line":4562,"range":{"start_line":4562,"start_character":53,"end_line":4562,"end_character":65},"in_reply_to":"bae84128_385124d9","updated":"2016-02-23 11:58:34.000000000","message":"Done","commit_id":"69a34f8ecdcc98efea8069890a7feee6cddd64f8"}],"nova/tests/unit/fake_policy.py":[{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"6b18867c4bb9ac1594d0138c25325328e0626ab8","unresolved":false,"context_lines":[{"line_number":126,"context_line":"    \"os_compute_api:servers:stop\": \"\","},{"line_number":127,"context_line":"    \"os_compute_api:servers:trigger_crash_dump\": \"\","},{"line_number":128,"context_line":"    \"os_compute_api:servers:migrations:force_complete\": \"\","},{"line_number":129,"context_line":"    \"os_compute_api:servers:migrations:delete\": \"\","},{"line_number":130,"context_line":"    \"os_compute_api:os-access-ips\": \"\","},{"line_number":131,"context_line":"    \"compute_extension:accounts\": \"\","},{"line_number":132,"context_line":"    \"compute_extension:admin_actions:pause\": \"\","}],"source_content_type":"text/x-python","patch_set":11,"id":"bae84128_09693ff9","line":129,"range":{"start_line":129,"start_character":4,"end_line":129,"end_character":46},"updated":"2016-02-24 06:54:49.000000000","message":"need admin.\nI will fix it.","commit_id":"37a0155bd9ed8db8b1f45d9788fb25f8f3011c4c"}],"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"d700aaea5e28ad46e9b694640f8e2a1344730dc1","unresolved":false,"context_lines":[{"line_number":7921,"context_line":"            host.DomainJobInfo("},{"line_number":7922,"context_line":"                type\u003dfakelibvirt.VIR_DOMAIN_JOB_CANCELLED),"},{"line_number":7923,"context_line":"        ]"},{"line_number":7924,"context_line":""},{"line_number":7925,"context_line":"        self._test_live_migration_monitoring(domain_info_records,"},{"line_number":7926,"context_line":"                                             fake_times, self.EXPECT_ABORT)"},{"line_number":7927,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_db4dd273","side":"PARENT","line":7924,"updated":"2016-02-22 07:13:55.000000000","message":"nit, unrelated change","commit_id":"d51c5670d8d26e989d92eb29658eed8113034c0f"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"12507f77b7af453c8d1b67a1649437439a4ab534","unresolved":false,"context_lines":[{"line_number":7921,"context_line":"            host.DomainJobInfo("},{"line_number":7922,"context_line":"                type\u003dfakelibvirt.VIR_DOMAIN_JOB_CANCELLED),"},{"line_number":7923,"context_line":"        ]"},{"line_number":7924,"context_line":""},{"line_number":7925,"context_line":"        self._test_live_migration_monitoring(domain_info_records,"},{"line_number":7926,"context_line":"                                             fake_times, self.EXPECT_ABORT)"},{"line_number":7927,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_71eadb10","side":"PARENT","line":7924,"in_reply_to":"bae84128_db4dd273","updated":"2016-02-22 12:21:10.000000000","message":"Done","commit_id":"d51c5670d8d26e989d92eb29658eed8113034c0f"}],"nova/virt/driver.py":[{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"9d761fc26ebf9194e78a72489cb093d47bf0aef1","unresolved":false,"context_lines":[{"line_number":845,"context_line":"        :param instance: instance that is live migrating"},{"line_number":846,"context_line":""},{"line_number":847,"context_line":"        \"\"\""},{"line_number":848,"context_line":"        raise exception.LiveMigrationAbortNotSupported()"},{"line_number":849,"context_line":""},{"line_number":850,"context_line":"    def rollback_live_migration_at_destination(self, context, instance,"},{"line_number":851,"context_line":"                                               network_info,"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_5646714f","line":848,"updated":"2016-02-17 16:10:19.000000000","message":"I think that we should raise NotImplementedError here instead, don\u0027t know how new exception can help there","commit_id":"0d1bee288d895fcf5421e75b76dd43f8a8657d3b"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"122b02ebc6eb792af0b68dff59a4d068f527ac4c","unresolved":false,"context_lines":[{"line_number":845,"context_line":"        :param instance: instance that is live migrating"},{"line_number":846,"context_line":""},{"line_number":847,"context_line":"        \"\"\""},{"line_number":848,"context_line":"        raise exception.LiveMigrationAbortNotSupported()"},{"line_number":849,"context_line":""},{"line_number":850,"context_line":"    def rollback_live_migration_at_destination(self, context, instance,"},{"line_number":851,"context_line":"                                               network_info,"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_8ba6d5ab","line":848,"in_reply_to":"dae33548_5646714f","updated":"2016-02-18 13:52:56.000000000","message":"This is because in the spec we specify that if a driver doesn\u0027t implement the cancellation we raise a new exception.\nI could raise a NotImplemented and then catch it in the compute manager, not sure what is the better","commit_id":"0d1bee288d895fcf5421e75b76dd43f8a8657d3b"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"d700aaea5e28ad46e9b694640f8e2a1344730dc1","unresolved":false,"context_lines":[{"line_number":845,"context_line":"        :param instance: instance that is live migrating"},{"line_number":846,"context_line":""},{"line_number":847,"context_line":"        \"\"\""},{"line_number":848,"context_line":"        raise exception.LiveMigrationAbortNotSupported()"},{"line_number":849,"context_line":""},{"line_number":850,"context_line":"    def rollback_live_migration_at_destination(self, context, instance,"},{"line_number":851,"context_line":"                                               network_info,"}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_7bc0062b","line":848,"range":{"start_line":848,"start_character":14,"end_line":848,"end_character":56},"updated":"2016-02-22 07:13:55.000000000","message":"looks like NotImplementedError is enough, just like other actions","commit_id":"ac26aca6fc087a14e49cc7320158733c6f5590f6"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"12507f77b7af453c8d1b67a1649437439a4ab534","unresolved":false,"context_lines":[{"line_number":845,"context_line":"        :param instance: instance that is live migrating"},{"line_number":846,"context_line":""},{"line_number":847,"context_line":"        \"\"\""},{"line_number":848,"context_line":"        raise exception.LiveMigrationAbortNotSupported()"},{"line_number":849,"context_line":""},{"line_number":850,"context_line":"    def rollback_live_migration_at_destination(self, context, instance,"},{"line_number":851,"context_line":"                                               network_info,"}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_f1fa6bbc","line":848,"range":{"start_line":848,"start_character":14,"end_line":848,"end_character":56},"in_reply_to":"bae84128_7bc0062b","updated":"2016-02-22 12:21:10.000000000","message":"The problem here is that in the spec it is reported that we are going to raise a new exception if the driver doesn\u0027t support the abort, that is the only reason because I added the new exception. I do not know what is more important now, I mean can we do something different from what is reported in the spec?","commit_id":"ac26aca6fc087a14e49cc7320158733c6f5590f6"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"fb6b4f98be1b0052d75e5f384d395725a40117ac","unresolved":false,"context_lines":[{"line_number":845,"context_line":"        :param instance: instance that is live migrating"},{"line_number":846,"context_line":""},{"line_number":847,"context_line":"        \"\"\""},{"line_number":848,"context_line":"        raise exception.LiveMigrationAbortNotSupported()"},{"line_number":849,"context_line":""},{"line_number":850,"context_line":"    def rollback_live_migration_at_destination(self, context, instance,"},{"line_number":851,"context_line":"                                               network_info,"}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_f1152040","line":848,"range":{"start_line":848,"start_character":14,"end_line":848,"end_character":56},"in_reply_to":"bae84128_f1fa6bbc","updated":"2016-02-23 06:18:08.000000000","message":"I think it\u0027s fine without amend spec first, this is really a small thing.","commit_id":"ac26aca6fc087a14e49cc7320158733c6f5590f6"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"949b88ba9bf06e4dbbd542be90ff12f17ac074fd","unresolved":false,"context_lines":[{"line_number":841,"context_line":"    def live_migration_abort(self, instance):"},{"line_number":842,"context_line":"        \"\"\"Abort an in-progress live migration."},{"line_number":843,"context_line":""},{"line_number":844,"context_line":"        :param context: security context"},{"line_number":845,"context_line":"        :param instance: instance that is live migrating"},{"line_number":846,"context_line":""},{"line_number":847,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_7833acab","line":844,"range":{"start_line":844,"start_character":8,"end_line":844,"end_character":40},"updated":"2016-02-23 10:04:15.000000000","message":"no context.","commit_id":"69a34f8ecdcc98efea8069890a7feee6cddd64f8"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"0b69f678bdf3f6e5039ee3b2e7a59cbf2d87aedd","unresolved":false,"context_lines":[{"line_number":841,"context_line":"    def live_migration_abort(self, instance):"},{"line_number":842,"context_line":"        \"\"\"Abort an in-progress live migration."},{"line_number":843,"context_line":""},{"line_number":844,"context_line":"        :param context: security context"},{"line_number":845,"context_line":"        :param instance: instance that is live migrating"},{"line_number":846,"context_line":""},{"line_number":847,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_f80b3c28","line":844,"range":{"start_line":844,"start_character":8,"end_line":844,"end_character":40},"in_reply_to":"bae84128_7833acab","updated":"2016-02-23 11:58:34.000000000","message":"Done","commit_id":"69a34f8ecdcc98efea8069890a7feee6cddd64f8"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"1539c3baeb843a3042b4d4e921e448dd384f9e55","unresolved":false,"context_lines":[{"line_number":845,"context_line":"        :param instance: instance that is live migrating"},{"line_number":846,"context_line":""},{"line_number":847,"context_line":"        \"\"\""},{"line_number":848,"context_line":"        raise exception.LiveMigrationAbortNotSupported()"},{"line_number":849,"context_line":""},{"line_number":850,"context_line":"    def rollback_live_migration_at_destination(self, context, instance,"},{"line_number":851,"context_line":"                                               network_info,"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_bb91d554","line":848,"range":{"start_line":848,"start_character":24,"end_line":848,"end_character":54},"updated":"2016-02-22 16:29:15.000000000","message":"I don\u0027t like it but there is really new exception in the spec so...","commit_id":"69a34f8ecdcc98efea8069890a7feee6cddd64f8"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"dbffe18064180437c68d223e9717c47953d5f64f","unresolved":false,"context_lines":[{"line_number":845,"context_line":"        :param instance: instance that is live migrating"},{"line_number":846,"context_line":""},{"line_number":847,"context_line":"        \"\"\""},{"line_number":848,"context_line":"        raise exception.LiveMigrationAbortNotSupported()"},{"line_number":849,"context_line":""},{"line_number":850,"context_line":"    def rollback_live_migration_at_destination(self, context, instance,"},{"line_number":851,"context_line":"                                               network_info,"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_c35f8f3f","line":848,"range":{"start_line":848,"start_character":24,"end_line":848,"end_character":54},"in_reply_to":"bae84128_bb91d554","updated":"2016-02-22 17:33:07.000000000","message":"everyone reviewing this bit complain about that, I am going to be consistent with the other methods here so I\u0027ll change it and maybe I\u0027ll amend the spec.","commit_id":"69a34f8ecdcc98efea8069890a7feee6cddd64f8"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"bcc06dae275b00c61f7c1676a7172686b896aa2a","unresolved":false,"context_lines":[{"line_number":845,"context_line":"        :param instance: instance that is live migrating"},{"line_number":846,"context_line":""},{"line_number":847,"context_line":"        \"\"\""},{"line_number":848,"context_line":"        raise exception.LiveMigrationAbortNotSupported()"},{"line_number":849,"context_line":""},{"line_number":850,"context_line":"    def rollback_live_migration_at_destination(self, context, instance,"},{"line_number":851,"context_line":"                                               network_info,"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_f20eb48a","line":848,"range":{"start_line":848,"start_character":24,"end_line":848,"end_character":54},"in_reply_to":"bae84128_c35f8f3f","updated":"2016-02-23 11:38:48.000000000","message":"Agreed - not worried about the spec at this stage though","commit_id":"69a34f8ecdcc98efea8069890a7feee6cddd64f8"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"9db0a270a9be49c2b81b1ccedafa3c7268a9edc1","unresolved":false,"context_lines":[{"line_number":5814,"context_line":"        except libvirt.libvirtError as e:"},{"line_number":5815,"context_line":"            LOG.error(_LE(\"Failed to cancel migration %s\"),"},{"line_number":5816,"context_line":"                     e, instance\u003dinstance)"},{"line_number":5817,"context_line":"            raise"},{"line_number":5818,"context_line":""},{"line_number":5819,"context_line":"    def _update_xml(self, xml_str, migrate_bdm_info, listen_addrs,"},{"line_number":5820,"context_line":"                    serial_listen_addr):"}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_c1bfc0f9","line":5817,"range":{"start_line":5817,"start_character":12,"end_line":5817,"end_character":17},"updated":"2016-02-20 20:17:29.000000000","message":"please, create new Exception class for that, and raise it, instead of reraising LibvirtError.","commit_id":"ac26aca6fc087a14e49cc7320158733c6f5590f6"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"9aad0a06fe3cd045f41b3442c60f86a955c1d93d","unresolved":false,"context_lines":[{"line_number":5814,"context_line":"        except libvirt.libvirtError as e:"},{"line_number":5815,"context_line":"            LOG.error(_LE(\"Failed to cancel migration %s\"),"},{"line_number":5816,"context_line":"                     e, instance\u003dinstance)"},{"line_number":5817,"context_line":"            raise"},{"line_number":5818,"context_line":""},{"line_number":5819,"context_line":"    def _update_xml(self, xml_str, migrate_bdm_info, listen_addrs,"},{"line_number":5820,"context_line":"                    serial_listen_addr):"}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_6387a3d7","line":5817,"range":{"start_line":5817,"start_character":12,"end_line":5817,"end_character":17},"in_reply_to":"bae84128_20fe3437","updated":"2016-02-22 17:29:13.000000000","message":"I can agree with you that we could return more detailed information to the upper level, but how many do we want to manage?\nI am not sure there is a big plus in reporting a specific error when we spot that the cancellation failed because the migration was finished, I think it is something \"easy\" to spot for an operator looking at the timestamp of the actions for the live-migration and the timestamp of the logged error, but maybe my view is wrong.\n\nSo I am not disagreeing with you, not sure if it is worth do to it, let\u0027s see if we can have some other opinions.","commit_id":"ac26aca6fc087a14e49cc7320158733c6f5590f6"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"aeced143e2e066ddb5d6c32646d7b8e4253c1d45","unresolved":false,"context_lines":[{"line_number":5814,"context_line":"        except libvirt.libvirtError as e:"},{"line_number":5815,"context_line":"            LOG.error(_LE(\"Failed to cancel migration %s\"),"},{"line_number":5816,"context_line":"                     e, instance\u003dinstance)"},{"line_number":5817,"context_line":"            raise"},{"line_number":5818,"context_line":""},{"line_number":5819,"context_line":"    def _update_xml(self, xml_str, migrate_bdm_info, listen_addrs,"},{"line_number":5820,"context_line":"                    serial_listen_addr):"}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_c3d2efff","line":5817,"range":{"start_line":5817,"start_character":12,"end_line":5817,"end_character":17},"in_reply_to":"bae84128_20fe3437","updated":"2016-02-22 17:26:35.000000000","message":"My question to your request is still open - what do you want to handle in compute-manager layer in \u0027catch\u0027 block? If nothing there is no reason to change exception then.\nAlso Andrea pointed to low-level implementation - https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainAbortJob (this is exactly what is called by a piece of code that you pasted here) and it makes it clear that this function returns 0 or -1.\n\nNot sure \u0027future enhancement\u0027 is worth any work right now when we are near feature freeze. What you point here is not an issue, rather common (and anyway good) practice.","commit_id":"ac26aca6fc087a14e49cc7320158733c6f5590f6"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"149a990772dbd01b8f2cd603b2a5c8716908a5b6","unresolved":false,"context_lines":[{"line_number":5814,"context_line":"        except libvirt.libvirtError as e:"},{"line_number":5815,"context_line":"            LOG.error(_LE(\"Failed to cancel migration %s\"),"},{"line_number":5816,"context_line":"                     e, instance\u003dinstance)"},{"line_number":5817,"context_line":"            raise"},{"line_number":5818,"context_line":""},{"line_number":5819,"context_line":"    def _update_xml(self, xml_str, migrate_bdm_info, listen_addrs,"},{"line_number":5820,"context_line":"                    serial_listen_addr):"}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_20fe3437","line":5817,"range":{"start_line":5817,"start_character":12,"end_line":5817,"end_character":17},"in_reply_to":"bae84128_311cd311","updated":"2016-02-22 16:48:40.000000000","message":"While it looks rather useless to introduce new exception class right now, because there are no other drivers to implement this and we are not catching exceptions for this method in compute manager. It will align other drivers code in future, and forces other driver developers to use abstraction rather then implementation specific details.Also, if live-migration finished after line 5809 but before 5813 \nlibvirt will raise error with code 42. In case of trying to abort job, when there are no job at all code would be 55 for example. \nAlso:\ndef abortJob(self):\n        \"\"\"Requests that the current background job be aborted at the\n        soonest opportunity. \"\"\"\n  ret \u003d libvirtmod.virDomainAbortJob(self._o)\n  if ret \u003d\u003d -1: raise libvirtError (\u0027virDomainAbortJob() failed\u0027, dom\u003dself)\n    return ret \n\nCode above not guaranteed to return only 0 or -1\nSo what i would like to see here: \nat least to paths one for abortJob failure and one for cases when migration already finished. About catching exception for already finished live-migration: should nova mark such abort request as failured?","commit_id":"ac26aca6fc087a14e49cc7320158733c6f5590f6"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"30376db28bb52c755eb5a70574a08b8d2519c55e","unresolved":false,"context_lines":[{"line_number":5814,"context_line":"        except libvirt.libvirtError as e:"},{"line_number":5815,"context_line":"            LOG.error(_LE(\"Failed to cancel migration %s\"),"},{"line_number":5816,"context_line":"                     e, instance\u003dinstance)"},{"line_number":5817,"context_line":"            raise"},{"line_number":5818,"context_line":""},{"line_number":5819,"context_line":"    def _update_xml(self, xml_str, migrate_bdm_info, listen_addrs,"},{"line_number":5820,"context_line":"                    serial_listen_addr):"}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_57d5eb19","line":5817,"range":{"start_line":5817,"start_character":12,"end_line":5817,"end_character":17},"in_reply_to":"bae84128_595d2778","updated":"2016-02-22 22:28:13.000000000","message":"Was abort successful in case of already finished LM? Well, no, so why would we mark it as successful?\n\nno active job \u003d finished-lm, because of checks done in layer above (compute api). No reason to differentiate it.\n\nAnd what internal failure is? The only scenario I can see with different ending that might need to be exposed in a bit different way is live migration during post-copy phase. But it isn\u0027t implemented in libvirt yet so no idea about this behavior...\n\nI\u0027m trying to understand your point, but it looks like you want to try-catch ALL libvirt calls in this driver. Well, why don\u0027t we check, e.g., line 2405 for some kind of internal error?","commit_id":"ac26aca6fc087a14e49cc7320158733c6f5590f6"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"34ab2b88d93cbb95123aa1ff6efd678a98ecfb08","unresolved":false,"context_lines":[{"line_number":5814,"context_line":"        except libvirt.libvirtError as e:"},{"line_number":5815,"context_line":"            LOG.error(_LE(\"Failed to cancel migration %s\"),"},{"line_number":5816,"context_line":"                     e, instance\u003dinstance)"},{"line_number":5817,"context_line":"            raise"},{"line_number":5818,"context_line":""},{"line_number":5819,"context_line":"    def _update_xml(self, xml_str, migrate_bdm_info, listen_addrs,"},{"line_number":5820,"context_line":"                    serial_listen_addr):"}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_ae27e7b4","line":5817,"range":{"start_line":5817,"start_character":12,"end_line":5817,"end_character":17},"in_reply_to":"bae84128_8308fc92","updated":"2016-02-22 10:29:05.000000000","message":"Why would we need to manage exceptions coming from live_migration_abort? It does not require any handling in a layer above driver. Can you please at least explain what you want to do in \u0027catch\u0027 block in manager?","commit_id":"ac26aca6fc087a14e49cc7320158733c6f5590f6"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"d700aaea5e28ad46e9b694640f8e2a1344730dc1","unresolved":false,"context_lines":[{"line_number":5814,"context_line":"        except libvirt.libvirtError as e:"},{"line_number":5815,"context_line":"            LOG.error(_LE(\"Failed to cancel migration %s\"),"},{"line_number":5816,"context_line":"                     e, instance\u003dinstance)"},{"line_number":5817,"context_line":"            raise"},{"line_number":5818,"context_line":""},{"line_number":5819,"context_line":"    def _update_xml(self, xml_str, migrate_bdm_info, listen_addrs,"},{"line_number":5820,"context_line":"                    serial_listen_addr):"}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_bb928e49","line":5817,"range":{"start_line":5817,"start_character":12,"end_line":5817,"end_character":17},"in_reply_to":"bae84128_902172fe","updated":"2016-02-22 07:13:55.000000000","message":"yes, something like this is more useful https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L2598-L2610","commit_id":"ac26aca6fc087a14e49cc7320158733c6f5590f6"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"12507f77b7af453c8d1b67a1649437439a4ab534","unresolved":false,"context_lines":[{"line_number":5814,"context_line":"        except libvirt.libvirtError as e:"},{"line_number":5815,"context_line":"            LOG.error(_LE(\"Failed to cancel migration %s\"),"},{"line_number":5816,"context_line":"                     e, instance\u003dinstance)"},{"line_number":5817,"context_line":"            raise"},{"line_number":5818,"context_line":""},{"line_number":5819,"context_line":"    def _update_xml(self, xml_str, migrate_bdm_info, listen_addrs,"},{"line_number":5820,"context_line":"                    serial_listen_addr):"}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_311cd311","line":5817,"range":{"start_line":5817,"start_character":12,"end_line":5817,"end_character":17},"in_reply_to":"bae84128_ae27e7b4","updated":"2016-02-22 12:21:10.000000000","message":"The key point here is that the abort is not very chatty in terms of error code: https://libvirt.org/sources/java/javadoc/org/libvirt/Domain.html#abortJob()\n\nso not sure which additional information we can add here.","commit_id":"ac26aca6fc087a14e49cc7320158733c6f5590f6"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"a6f79c4d6836e5b0bb56069a98a34b6a3f0c91e7","unresolved":false,"context_lines":[{"line_number":5814,"context_line":"        except libvirt.libvirtError as e:"},{"line_number":5815,"context_line":"            LOG.error(_LE(\"Failed to cancel migration %s\"),"},{"line_number":5816,"context_line":"                     e, instance\u003dinstance)"},{"line_number":5817,"context_line":"            raise"},{"line_number":5818,"context_line":""},{"line_number":5819,"context_line":"    def _update_xml(self, xml_str, migrate_bdm_info, listen_addrs,"},{"line_number":5820,"context_line":"                    serial_listen_addr):"}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_8308fc92","line":5817,"range":{"start_line":5817,"start_character":12,"end_line":5817,"end_character":17},"in_reply_to":"bae84128_bb928e49","updated":"2016-02-22 10:20:54.000000000","message":"What I want is to raise hypervisor agnostic exceptions to compute manager. When new other than libvirt driver starts to implement abort for live migration it will be easier to manage exceptions in compute.manager side","commit_id":"ac26aca6fc087a14e49cc7320158733c6f5590f6"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"f9831787ad4cecb26f338f09ece2259aa0589bee","unresolved":false,"context_lines":[{"line_number":5814,"context_line":"        except libvirt.libvirtError as e:"},{"line_number":5815,"context_line":"            LOG.error(_LE(\"Failed to cancel migration %s\"),"},{"line_number":5816,"context_line":"                     e, instance\u003dinstance)"},{"line_number":5817,"context_line":"            raise"},{"line_number":5818,"context_line":""},{"line_number":5819,"context_line":"    def _update_xml(self, xml_str, migrate_bdm_info, listen_addrs,"},{"line_number":5820,"context_line":"                    serial_listen_addr):"}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_902172fe","line":5817,"range":{"start_line":5817,"start_character":12,"end_line":5817,"end_character":17},"in_reply_to":"bae84128_c1bfc0f9","updated":"2016-02-21 18:41:08.000000000","message":"Well, it is actually a libvirt error so re-raising this with correct log message is enough. Changing this exception would be useful only if error code is also provided, so we would translate exception to something more accurate basing on error code, e.g., live migration is not abortable or there is no on-going job to abort. Here libvirt returns 0 in case of a success and -1 in case of a failure, so we can\u0027t really translate it to something more useful.\n\nSo, good log message and re-raise is enough IMO","commit_id":"ac26aca6fc087a14e49cc7320158733c6f5590f6"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"8de77e74a0638ffb8dd64f28fd4f9039398abb42","unresolved":false,"context_lines":[{"line_number":5814,"context_line":"        except libvirt.libvirtError as e:"},{"line_number":5815,"context_line":"            LOG.error(_LE(\"Failed to cancel migration %s\"),"},{"line_number":5816,"context_line":"                     e, instance\u003dinstance)"},{"line_number":5817,"context_line":"            raise"},{"line_number":5818,"context_line":""},{"line_number":5819,"context_line":"    def _update_xml(self, xml_str, migrate_bdm_info, listen_addrs,"},{"line_number":5820,"context_line":"                    serial_listen_addr):"}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_595d2778","line":5817,"range":{"start_line":5817,"start_character":12,"end_line":5817,"end_character":17},"in_reply_to":"bae84128_c3d2efff","updated":"2016-02-22 20:42:56.000000000","message":"Pawel, original idea was to handle situations when live-migration already finished. For now there are 2 things that I\u0027m trying to clarify:\n- Should Nova mark  abort request as failed in case of already finished l-m? If \u0027no\u0027 we need to catch such situation on the managers side.   \n- I would like to see more clear differentiation of dom.abortJob() failures. Python wrapper method for virDomainAbortJob gives us ability to differentiate such things, e.g. finished l-m, no active job at all, internal failure, etc. Also it\u0027s important to create some common abstraction for such failures which will prevent leaking of the driver implementation details to compute.manager once this feature is implemented.","commit_id":"ac26aca6fc087a14e49cc7320158733c6f5590f6"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"949b88ba9bf06e4dbbd542be90ff12f17ac074fd","unresolved":false,"context_lines":[{"line_number":5813,"context_line":"            dom.abortJob()"},{"line_number":5814,"context_line":"        except libvirt.libvirtError as e:"},{"line_number":5815,"context_line":"            LOG.error(_LE(\"Failed to cancel migration %s\"),"},{"line_number":5816,"context_line":"                     e, instance\u003dinstance)"},{"line_number":5817,"context_line":"            raise"},{"line_number":5818,"context_line":""},{"line_number":5819,"context_line":"    def _update_xml(self, xml_str, migrate_bdm_info, listen_addrs,"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_381644f1","line":5816,"range":{"start_line":5816,"start_character":0,"end_line":5816,"end_character":42},"updated":"2016-02-23 10:04:15.000000000","message":"indentation","commit_id":"69a34f8ecdcc98efea8069890a7feee6cddd64f8"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"0b69f678bdf3f6e5039ee3b2e7a59cbf2d87aedd","unresolved":false,"context_lines":[{"line_number":5813,"context_line":"            dom.abortJob()"},{"line_number":5814,"context_line":"        except libvirt.libvirtError as e:"},{"line_number":5815,"context_line":"            LOG.error(_LE(\"Failed to cancel migration %s\"),"},{"line_number":5816,"context_line":"                     e, instance\u003dinstance)"},{"line_number":5817,"context_line":"            raise"},{"line_number":5818,"context_line":""},{"line_number":5819,"context_line":"    def _update_xml(self, xml_str, migrate_bdm_info, listen_addrs,"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_75444eb6","line":5816,"range":{"start_line":5816,"start_character":0,"end_line":5816,"end_character":42},"in_reply_to":"bae84128_381644f1","updated":"2016-02-23 11:58:34.000000000","message":"Done","commit_id":"69a34f8ecdcc98efea8069890a7feee6cddd64f8"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"7ce676972357145c1d97f4be89de213880ac3d54","unresolved":false,"context_lines":[{"line_number":5827,"context_line":"        dom \u003d guest._domain"},{"line_number":5828,"context_line":""},{"line_number":5829,"context_line":"        try:"},{"line_number":5830,"context_line":"            dom.abortJob()"},{"line_number":5831,"context_line":"        except libvirt.libvirtError as e:"},{"line_number":5832,"context_line":"            LOG.error(_LE(\"Failed to cancel migration %s\"),"},{"line_number":5833,"context_line":"                      e, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":14,"id":"bae84128_6d8729b5","line":5830,"updated":"2016-02-24 11:09:30.000000000","message":"do we need to double check this is actually a live-migrate job first?","commit_id":"5539ef7643743ad345118152c2db18a790ea7c25"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"5656f8fec4696f61428a72646dbac19a8ff94edf","unresolved":false,"context_lines":[{"line_number":5827,"context_line":"        dom \u003d guest._domain"},{"line_number":5828,"context_line":""},{"line_number":5829,"context_line":"        try:"},{"line_number":5830,"context_line":"            dom.abortJob()"},{"line_number":5831,"context_line":"        except libvirt.libvirtError as e:"},{"line_number":5832,"context_line":"            LOG.error(_LE(\"Failed to cancel migration %s\"),"},{"line_number":5833,"context_line":"                      e, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":14,"id":"bae84128_d92ef3a3","line":5830,"in_reply_to":"bae84128_6d8729b5","updated":"2016-02-24 12:03:04.000000000","message":"I *think* this is the only job we can start, I looked at the libvirt documentation to see if the JobInfo gives a way to check it but it seems it doesn\u0027t. \nI agree with you I\u0027d prefer to have an \"official\" confirmation that we don\u0027t risk to abort a different job, I\u0027ll ask Daniel to have a look.","commit_id":"5539ef7643743ad345118152c2db18a790ea7c25"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"984d04d699ce28568dc7df271dfeb1b446696f7c","unresolved":false,"context_lines":[{"line_number":5827,"context_line":"        dom \u003d guest._domain"},{"line_number":5828,"context_line":""},{"line_number":5829,"context_line":"        try:"},{"line_number":5830,"context_line":"            dom.abortJob()"},{"line_number":5831,"context_line":"        except libvirt.libvirtError as e:"},{"line_number":5832,"context_line":"            LOG.error(_LE(\"Failed to cancel migration %s\"),"},{"line_number":5833,"context_line":"                      e, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":14,"id":"bae84128_cb873a5f","line":5830,"in_reply_to":"bae84128_6d8729b5","updated":"2016-02-24 12:05:52.000000000","message":"There can only be one job active on a VM at any given time. The API layer enforces that the VM is in a \"migrating\" state. The libvirt driver won\u0027t start any other job while in a \"migrating\" state. So I think we\u0027re safe to assume this will abort a migration job, as the API layer state check protects us","commit_id":"5539ef7643743ad345118152c2db18a790ea7c25"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"515da54c85d9c41d2d4e7a442021a543aaeea88c","unresolved":false,"context_lines":[{"line_number":5827,"context_line":"        dom \u003d guest._domain"},{"line_number":5828,"context_line":""},{"line_number":5829,"context_line":"        try:"},{"line_number":5830,"context_line":"            dom.abortJob()"},{"line_number":5831,"context_line":"        except libvirt.libvirtError as e:"},{"line_number":5832,"context_line":"            LOG.error(_LE(\"Failed to cancel migration %s\"),"},{"line_number":5833,"context_line":"                      e, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":15,"id":"bae84128_0a82b1c7","line":5830,"updated":"2016-02-24 15:14:31.000000000","message":"Hmm, interesting. Seems that there can only ever be a single job running against a guest? I suppose that makes sense, but seems odd to me.","commit_id":"07d373d2925891d9d6862bd0724a8ad8aaaaa677"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d3456d6fa7804a2d39dac284d6df5b10dd53d4ed","unresolved":false,"context_lines":[{"line_number":5827,"context_line":"        dom \u003d guest._domain"},{"line_number":5828,"context_line":""},{"line_number":5829,"context_line":"        try:"},{"line_number":5830,"context_line":"            dom.abortJob()"},{"line_number":5831,"context_line":"        except libvirt.libvirtError as e:"},{"line_number":5832,"context_line":"            LOG.error(_LE(\"Failed to cancel migration %s\"),"},{"line_number":5833,"context_line":"                      e, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":15,"id":"bae84128_b2c0217e","line":5830,"in_reply_to":"bae84128_0a82b1c7","updated":"2016-02-25 10:49:26.000000000","message":"I would feel better if we checked it was a live-migrate job, rather than have a race where we cancel a reboot, or something odd like that.","commit_id":"07d373d2925891d9d6862bd0724a8ad8aaaaa677"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"61c59fec31c6aaebb8da12264d7b4d4816f90402","unresolved":false,"context_lines":[{"line_number":5827,"context_line":"        dom \u003d guest._domain"},{"line_number":5828,"context_line":""},{"line_number":5829,"context_line":"        try:"},{"line_number":5830,"context_line":"            dom.abortJob()"},{"line_number":5831,"context_line":"        except libvirt.libvirtError as e:"},{"line_number":5832,"context_line":"            LOG.error(_LE(\"Failed to cancel migration %s\"),"},{"line_number":5833,"context_line":"                      e, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":15,"id":"bae84128_9b1527e7","line":5830,"in_reply_to":"bae84128_b2c0217e","updated":"2016-02-25 16:03:33.000000000","message":"The API layer checks the task state is MIGRATING, which corresponds to live migration.","commit_id":"07d373d2925891d9d6862bd0724a8ad8aaaaa677"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"26bb83c682f0a9ac119d9596ec5fca30e56b63ef","unresolved":false,"context_lines":[{"line_number":5827,"context_line":"        dom \u003d guest._domain"},{"line_number":5828,"context_line":""},{"line_number":5829,"context_line":"        try:"},{"line_number":5830,"context_line":"            dom.abortJob()"},{"line_number":5831,"context_line":"        except libvirt.libvirtError as e:"},{"line_number":5832,"context_line":"            LOG.error(_LE(\"Failed to cancel migration %s\"),"},{"line_number":5833,"context_line":"                      e, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":18,"id":"9aed3d3a_c246ae22","line":5830,"updated":"2016-02-26 12:25:30.000000000","message":"I am still worried we don\u0027t check this job is a live-migrate job.\n\nCan\u0027t we use something like https://libvirt.org/sources/java/javadoc/org/libvirt/DomainJobInfo.html#getType() to check the type of the current job, before we call abort?\n\nIf this is not a quick fix, happy to consider leaving this as a follow up fix.","commit_id":"d003c676a0ed1d5f1635c937133ce52d86dcadd4"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"eb6df5819d6c67a983dc7f7cd8f63d31e9411cc1","unresolved":false,"context_lines":[{"line_number":5827,"context_line":"        dom \u003d guest._domain"},{"line_number":5828,"context_line":""},{"line_number":5829,"context_line":"        try:"},{"line_number":5830,"context_line":"            dom.abortJob()"},{"line_number":5831,"context_line":"        except libvirt.libvirtError as e:"},{"line_number":5832,"context_line":"            LOG.error(_LE(\"Failed to cancel migration %s\"),"},{"line_number":5833,"context_line":"                      e, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":18,"id":"9aed3d3a_6c1ce713","line":5830,"in_reply_to":"9aed3d3a_17d56cb8","updated":"2016-02-26 16:09:49.000000000","message":"Actually I think a check can be done in the compute manager, not here. The check for migration.status \u003d\u003d running is done there, but that could be any type of migration. Doesn\u0027t really matter if the job is running here, so long as it is the right job if it is running.\n\nIn practice these things go wrong when there is a disruption somewhere that stops something processing requests e.g. rabbit partition. The user then does something like repeatedly issuing aborts and migrations not understanding why nothing is happening. Then multiple requests are queued up and get released pretty much at the same time when the disruption clears. At that point all hell breaks loose and the operator has no idea what happened.\n\nBut that\u0027s a tail for another day. This is good enough for now.","commit_id":"d003c676a0ed1d5f1635c937133ce52d86dcadd4"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"90ad115e081a569777455d34a067f428ad8f64ea","unresolved":false,"context_lines":[{"line_number":5827,"context_line":"        dom \u003d guest._domain"},{"line_number":5828,"context_line":""},{"line_number":5829,"context_line":"        try:"},{"line_number":5830,"context_line":"            dom.abortJob()"},{"line_number":5831,"context_line":"        except libvirt.libvirtError as e:"},{"line_number":5832,"context_line":"            LOG.error(_LE(\"Failed to cancel migration %s\"),"},{"line_number":5833,"context_line":"                      e, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":18,"id":"9aed3d3a_a2dd6a16","line":5830,"in_reply_to":"9aed3d3a_227dda1c","updated":"2016-02-26 12:27:40.000000000","message":"yeah, lets worry about this later, it feels like we are protecting against the worst bits anyways.","commit_id":"d003c676a0ed1d5f1635c937133ce52d86dcadd4"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"0fc9e58b3bc4553b76883f64ab5eab0927dd004b","unresolved":false,"context_lines":[{"line_number":5827,"context_line":"        dom \u003d guest._domain"},{"line_number":5828,"context_line":""},{"line_number":5829,"context_line":"        try:"},{"line_number":5830,"context_line":"            dom.abortJob()"},{"line_number":5831,"context_line":"        except libvirt.libvirtError as e:"},{"line_number":5832,"context_line":"            LOG.error(_LE(\"Failed to cancel migration %s\"),"},{"line_number":5833,"context_line":"                      e, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":18,"id":"9aed3d3a_17d56cb8","line":5830,"in_reply_to":"9aed3d3a_39e50c37","updated":"2016-02-26 14:36:06.000000000","message":"Honestly, I think this is fine for this patch. Everything else is just about as racey as this.","commit_id":"d003c676a0ed1d5f1635c937133ce52d86dcadd4"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"c7538aadcaf7c2f74c51be7846b144bcc14eec3e","unresolved":false,"context_lines":[{"line_number":5827,"context_line":"        dom \u003d guest._domain"},{"line_number":5828,"context_line":""},{"line_number":5829,"context_line":"        try:"},{"line_number":5830,"context_line":"            dom.abortJob()"},{"line_number":5831,"context_line":"        except libvirt.libvirtError as e:"},{"line_number":5832,"context_line":"            LOG.error(_LE(\"Failed to cancel migration %s\"),"},{"line_number":5833,"context_line":"                      e, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":18,"id":"9aed3d3a_39e50c37","line":5830,"in_reply_to":"9aed3d3a_76d5e341","updated":"2016-02-26 12:52:45.000000000","message":"Here I agree that we should go to libvirt and check if there is active job on a VM","commit_id":"d003c676a0ed1d5f1635c937133ce52d86dcadd4"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"96cb69599e5da25827e508f806d40ce23ca449a3","unresolved":false,"context_lines":[{"line_number":5827,"context_line":"        dom \u003d guest._domain"},{"line_number":5828,"context_line":""},{"line_number":5829,"context_line":"        try:"},{"line_number":5830,"context_line":"            dom.abortJob()"},{"line_number":5831,"context_line":"        except libvirt.libvirtError as e:"},{"line_number":5832,"context_line":"            LOG.error(_LE(\"Failed to cancel migration %s\"),"},{"line_number":5833,"context_line":"                      e, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":18,"id":"9aed3d3a_76d5e341","line":5830,"in_reply_to":"9aed3d3a_a2dd6a16","updated":"2016-02-26 12:38:52.000000000","message":"There is a check in the API that we are in the MIGRATING task state. But the abort request could be overtaken by a different request before we get here due to asynchrony between multiple API servers.\nSo we really need to check we are still in the MIGRATING task state here.\nThat can be fixed in a follow on patch.","commit_id":"d003c676a0ed1d5f1635c937133ce52d86dcadd4"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"a759744a4ca429e88baf5d134eb7f74809819623","unresolved":false,"context_lines":[{"line_number":5827,"context_line":"        dom \u003d guest._domain"},{"line_number":5828,"context_line":""},{"line_number":5829,"context_line":"        try:"},{"line_number":5830,"context_line":"            dom.abortJob()"},{"line_number":5831,"context_line":"        except libvirt.libvirtError as e:"},{"line_number":5832,"context_line":"            LOG.error(_LE(\"Failed to cancel migration %s\"),"},{"line_number":5833,"context_line":"                      e, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":18,"id":"9aed3d3a_227dda1c","line":5830,"in_reply_to":"9aed3d3a_c246ae22","updated":"2016-02-26 12:26:51.000000000","message":"I think as a follow up. This doesn\u0027t really impact the user facing part of the interface.","commit_id":"d003c676a0ed1d5f1635c937133ce52d86dcadd4"}],"releasenotes/notes/abort-live-migration-cb902bb0754b11b6.yaml":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"515da54c85d9c41d2d4e7a442021a543aaeea88c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - A new REST API to allow to cancel an ongoing live migration has been added"},{"line_number":4,"context_line":"    in microversion 2.24."}],"source_content_type":"text/x-yaml","patch_set":15,"id":"bae84128_ea84add3","line":4,"updated":"2016-02-24 15:14:31.000000000","message":"@sdague: Yes, I think it should indeed mention that restriction.","commit_id":"07d373d2925891d9d6862bd0724a8ad8aaaaa677"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"5e34dca6959cc5319e24f046cc280a7b2ffb08a9","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - A new REST API to allow to cancel an ongoing live migration has been added"},{"line_number":4,"context_line":"    in microversion 2.24."}],"source_content_type":"text/x-yaml","patch_set":15,"id":"bae84128_da1d3e74","line":4,"updated":"2016-02-24 13:51:08.000000000","message":"I wonder if we should say \"currently only works with libvirt backed clouds.\"","commit_id":"07d373d2925891d9d6862bd0724a8ad8aaaaa677"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"8f368dc0c10f79ad9d3bf009be220e7be197f776","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - A new REST API to allow to cancel an ongoing live migration has been added"},{"line_number":4,"context_line":"    in microversion 2.24."}],"source_content_type":"text/x-yaml","patch_set":15,"id":"bae84128_2ac85554","line":4,"in_reply_to":"bae84128_da1d3e74","updated":"2016-02-24 15:13:58.000000000","message":"I think that it is a good point, it is good to have in the release note even if technically the API is there from that version, then if a driver doesn\u0027t implement it we return an error...yes it is a weak explanation I just try to find a good reason to not put a new patch and lose your +2 :-P","commit_id":"07d373d2925891d9d6862bd0724a8ad8aaaaa677"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"61c59fec31c6aaebb8da12264d7b4d4816f90402","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - A new REST API to allow to cancel an ongoing live migration has been added"},{"line_number":4,"context_line":"    in microversion 2.24."}],"source_content_type":"text/x-yaml","patch_set":15,"id":"bae84128_fff8a2c6","line":4,"in_reply_to":"bae84128_ea84add3","updated":"2016-02-25 16:03:33.000000000","message":"Done","commit_id":"07d373d2925891d9d6862bd0724a8ad8aaaaa677"}]}
