)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"65f63b82fe5d1a0e054090765ff03afa22aff129","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Fix live migration break group policy simultaneously"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Now we will do later check for creating instances and"},{"line_number":10,"context_line":"evacuation. All of them will cause race."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Here we also call later check for live migration."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"9fb8cfa7_5ba595b4","line":10,"range":{"start_line":10,"start_character":39,"end_line":10,"end_character":40},"updated":"2019-06-19 08:46:36.000000000","message":"minor:\nI guess, it says the current Nova code already do such thing in creating/evacuation path and we gonna added to live-migration.","commit_id":"33e16add36704e1940a373a11f7096cc4762e97c"}],"nova/compute/manager.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0d95ccb2fec97afb16199fe9cddf386570ed81a4","unresolved":false,"context_lines":[{"line_number":6326,"context_line":"    @wrap_exception()"},{"line_number":6327,"context_line":"    @wrap_instance_event(prefix\u003d\u0027compute\u0027)"},{"line_number":6328,"context_line":"    @wrap_instance_fault"},{"line_number":6329,"context_line":"    def pre_live_migration(self, context, instance, block_migration, disk,"},{"line_number":6330,"context_line":"                           migrate_data, migration\u003dNone):"},{"line_number":6331,"context_line":"        \"\"\"Preparations for live migration at dest host."},{"line_number":6332,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"9fb8cfa7_9096d63d","line":6329,"updated":"2019-07-01 08:55:49.000000000","message":"Would it be better checking the group policy in check_can_live_migrate_destination() ? That way when _validate_instance_group_policy() raises RescheduledException the live migration can be re-scheduled to another host instead of failing.","commit_id":"33e16add36704e1940a373a11f7096cc4762e97c"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"97678d2ced6c17ce4ed4817cdfb5ec097d92fb83","unresolved":false,"context_lines":[{"line_number":6326,"context_line":"    @wrap_exception()"},{"line_number":6327,"context_line":"    @wrap_instance_event(prefix\u003d\u0027compute\u0027)"},{"line_number":6328,"context_line":"    @wrap_instance_fault"},{"line_number":6329,"context_line":"    def pre_live_migration(self, context, instance, block_migration, disk,"},{"line_number":6330,"context_line":"                           migrate_data, migration\u003dNone):"},{"line_number":6331,"context_line":"        \"\"\"Preparations for live migration at dest host."},{"line_number":6332,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"7faddb67_eb65e545","line":6329,"in_reply_to":"7faddb67_01e14ed0","updated":"2019-08-21 03:22:05.000000000","message":"@chris, thanks for your review.\nAs you metioned, not only before calling self.compute_rpcapi.live_migration() -but also before calling check_can_live_migrate_destination()- in LiveMigrationTask._execute(), the information about which host we\u0027re migrating to is saved in the migration object. So I don\u0027t think we need to double-check the destination. Or where do you think we need to check the destination, too?","commit_id":"33e16add36704e1940a373a11f7096cc4762e97c"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"f2cda5d14f81acbca082ae9e7baa78c801dd707d","unresolved":false,"context_lines":[{"line_number":6326,"context_line":"    @wrap_exception()"},{"line_number":6327,"context_line":"    @wrap_instance_event(prefix\u003d\u0027compute\u0027)"},{"line_number":6328,"context_line":"    @wrap_instance_fault"},{"line_number":6329,"context_line":"    def pre_live_migration(self, context, instance, block_migration, disk,"},{"line_number":6330,"context_line":"                           migrate_data, migration\u003dNone):"},{"line_number":6331,"context_line":"        \"\"\"Preparations for live migration at dest host."},{"line_number":6332,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"7faddb67_01e14ed0","line":6329,"in_reply_to":"9fb8cfa7_9096d63d","updated":"2019-08-20 15:34:51.000000000","message":"Doing the check in check_can_live_migrate_destination() wouldn\u0027t really close the race.\n\nThe information about which host we\u0027re migrating to is saved in the migration object in LiveMigrationTask._execute() right before calling self.compute_rpcapi.live_migration().\n\nI think we need to double-check the destination after saving the migration object so that we can see the destination of other racing live migrations and they can see ours.","commit_id":"33e16add36704e1940a373a11f7096cc4762e97c"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"97678d2ced6c17ce4ed4817cdfb5ec097d92fb83","unresolved":false,"context_lines":[{"line_number":6326,"context_line":"    @wrap_exception()"},{"line_number":6327,"context_line":"    @wrap_instance_event(prefix\u003d\u0027compute\u0027)"},{"line_number":6328,"context_line":"    @wrap_instance_fault"},{"line_number":6329,"context_line":"    def pre_live_migration(self, context, instance, block_migration, disk,"},{"line_number":6330,"context_line":"                           migrate_data, migration\u003dNone):"},{"line_number":6331,"context_line":"        \"\"\"Preparations for live migration at dest host."},{"line_number":6332,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"7faddb67_6bf57582","line":6329,"in_reply_to":"9fb8cfa7_9096d63d","updated":"2019-08-21 03:22:05.000000000","message":"Done.\nI have moved the _validate_instance_group_policy into function check_can_live_migrate_destination.","commit_id":"33e16add36704e1940a373a11f7096cc4762e97c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8c6fc6cc257b83996725d2ce16673b93446e577f","unresolved":false,"context_lines":[{"line_number":7640,"context_line":"        dst_compute_info \u003d obj_base.obj_to_primitive("},{"line_number":7641,"context_line":"            self._get_compute_info(ctxt, CONF.host))"},{"line_number":7642,"context_line":""},{"line_number":7643,"context_line":"        if request_spec:"},{"line_number":7644,"context_line":"            hints \u003d self._get_scheduler_hints({}, request_spec)"},{"line_number":7645,"context_line":"            self._validate_instance_group_policy("},{"line_number":7646,"context_line":"                ctxt, instance, hints, dst_compute_info[\u0027hypervisor_hostname\u0027])"},{"line_number":7647,"context_line":""},{"line_number":7648,"context_line":"        dest_check_data \u003d self.driver.check_can_live_migrate_destination(ctxt,"},{"line_number":7649,"context_line":"            instance, src_compute_info, dst_compute_info,"}],"source_content_type":"text/x-python","patch_set":25,"id":"3fa7e38b_3bd2c8ff","line":7646,"range":{"start_line":7643,"start_character":5,"end_line":7646,"end_character":79},"updated":"2020-01-21 16:36:19.000000000","message":"this will not fix it in all cases.\n\nif there are concurrent request to the api to add new instances to the server group then there can be a race between the server create and the live migration that would violate anti affinity policies. i think you could also have a short interval where creating new instnace  could fail for the affinity policy too as the new instance could get scheduled to the source node while the migration is happening.","commit_id":"7e2e783a41338d2e76e317f51b7572f19862ae81"}]}
