)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"f293ef2df4cb1d6308bd504a7dc224825d08538c","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"7f6b935a_d8e28df2","updated":"2024-12-09 14:36:12.000000000","message":"this is a live migation related issue so to proceed with this we need to do two things.\n\nfirst proceduerally we should file a launchpad bug to have somethign to track this\nsecodn we should evlauate if this is repoducable in a funtional test and if so we should add a regression test demponststrating the bug and then this patch cna be used to fix it and update the repdocuder.\n\nstep 2 is strongly perfer for all bug fixes but the reason i say we shoudl evaulate that instead of require that is we have to take speciall handelign with restarting comptue servics in functionalt tests. we can do that but it is not a perfectly repestive envionment so im not 100% sure if this would repoduce there althoguh likely it woudl be possible.\n\n\nthere are several examples of regression tests for live migrateion\n\nhttps://github.com/openstack/nova/blob/master/nova/tests/functional/regressions/test_bug_2143972.py\nhttps://github.com/openstack/nova/blob/master/nova/tests/functional/regressions/test_bug_1888395.py\n\n\nand https://github.com/openstack/nova/blob/master/nova/tests/functional/regressions/test_bug_2085975.py test comput service restarts with evacuations in progress\n\nthat also demonstrates the practice of using a treading Event\nhttps://github.com/openstack/nova/blob/master/nova/tests/functional/regressions/test_bug_2085975.py#L95\n\nto cause the backgroud task (the migration or evacuation in that example) to pause at at a particalary point so we can recreate the exact race considtion.\n\n\ndo you think you would have time to file a bug and create a functional reqpoducer usign those examples?\n\nif not we can perhasp see if other can help you by creating those or working with you to do that.","commit_id":"49bf571aea0f66d043fab92a1efb4b3d2c9b646b"}],"nova/compute/manager.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"e004470086c09d94e0126104a3adcf9eb614c289","unresolved":true,"context_lines":[{"line_number":1058,"context_line":"                try:"},{"line_number":1059,"context_line":"                    self.reportclient.delete_allocation_for_instance("},{"line_number":1060,"context_line":"                        context, migration.uuid, consumer_type\u003d\u0027migration\u0027,"},{"line_number":1061,"context_line":"                        force\u003dFalse)"},{"line_number":1062,"context_line":"                except exception.AllocationDeleteFailed:"},{"line_number":1063,"context_line":"                    LOG.warning("},{"line_number":1064,"context_line":"                        \u0027Unable to delete allocation for %(consumer_type)s \u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"e23108a5_6d3d1326","line":1061,"updated":"2024-12-09 14:45:37.000000000","message":"this will need some carful tought.\n\nrestarting the compute service when there is an active live migration leads to undefiend behavior.","commit_id":"49bf571aea0f66d043fab92a1efb4b3d2c9b646b"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"e004470086c09d94e0126104a3adcf9eb614c289","unresolved":true,"context_lines":[{"line_number":1074,"context_line":"                if instance.system_metadata.get(\"live_migration_completed\","},{"line_number":1075,"context_line":"                                                False):"},{"line_number":1076,"context_line":"                    instance.system_metadata.pop(\"live_migration_completed\","},{"line_number":1077,"context_line":"                                                 None)"},{"line_number":1078,"context_line":"                    instance.host \u003d migration.dest_compute"},{"line_number":1079,"context_line":"                    instance.node \u003d migration.dest_node"},{"line_number":1080,"context_line":"                    instance.apply_migration_context()"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f44d35d_d6a4a7b2","line":1077,"updated":"2024-12-09 14:45:37.000000000","message":"as noted below i dont think this si an approch we can take upstream.\n\nwe do not generally allow the instance.system_metadata table to be sued to hold state flags like this for migrtion state.","commit_id":"49bf571aea0f66d043fab92a1efb4b3d2c9b646b"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"b503c2e2068714dda09591e7a48ceb7767b7f13b","unresolved":true,"context_lines":[{"line_number":1348,"context_line":"                  {\u0027drv_state\u0027: drv_state, \u0027db_state\u0027: db_state},"},{"line_number":1349,"context_line":"                  instance\u003dinstance)"},{"line_number":1350,"context_line":""},{"line_number":1351,"context_line":"        if expect_running and CONF.resume_guests_state_on_host_boot:"},{"line_number":1352,"context_line":"            self._resume_guests_state(context, instance, net_info)"},{"line_number":1353,"context_line":""},{"line_number":1354,"context_line":"    def _resume_guests_state(self, context, instance, net_info):"}],"source_content_type":"text/x-python","patch_set":2,"id":"0c351465_8b4c4901","line":1351,"updated":"2024-12-09 14:50:53.000000000","message":"my inclination is to say that instead of what you propsoed in this patch\n\nwe should be altering the expect_running logic to not start isntnace that were bing live migrated.\n\n\nbasically if the instnace has not been stop as part of the migration yet then we dont need to start it.\n\nand if it has been stoped we should not start it as that implies its eitehr running on the destination or that it has crashed \n\nso if the instance in question was live migrated we shoudl never take this if branch as we shoudl not alter the runnign state on start up","commit_id":"49bf571aea0f66d043fab92a1efb4b3d2c9b646b"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"e004470086c09d94e0126104a3adcf9eb614c289","unresolved":true,"context_lines":[{"line_number":1462,"context_line":"        # duplication instance."},{"line_number":1463,"context_line":"        if instance.task_state \u003d\u003d task_states.MIGRATING and \\"},{"line_number":1464,"context_line":"                event_transition \u003d\u003d virtevent.EVENT_LIFECYCLE_RESUMED:"},{"line_number":1465,"context_line":"            instance.system_metadata[\"live_migration_completed\"] \u003d True"},{"line_number":1466,"context_line":"            instance.save()"},{"line_number":1467,"context_line":""},{"line_number":1468,"context_line":"        # The following checks are for live migration. We want to activate"}],"source_content_type":"text/x-python","patch_set":2,"id":"609f6353_a59db57e","line":1465,"updated":"2024-12-09 14:45:37.000000000","message":"we are genally not allowed to stash information like this in teh instance system metadata so this approch is unlikely to accpeted upstream\n\nwe have rejected approch based on that previously.\n\nthis is generallcy refered ot as a shadow rpc.\n\ni.e. we are passign state between the source and destination node without doing so via one of the normal RPC methods or using one of the existing object state filed.\n\nthis cause issue with upgrades and as a result this pattered is geneally not accpated upstream.","commit_id":"49bf571aea0f66d043fab92a1efb4b3d2c9b646b"}],"nova/tests/unit/compute/test_compute_mgr.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"e004470086c09d94e0126104a3adcf9eb614c289","unresolved":true,"context_lines":[{"line_number":2093,"context_line":"                                          migration.id)"},{"line_number":2094,"context_line":"            mock_set_migr.assert_called_with(migration, \u0027error\u0027)"},{"line_number":2095,"context_line":"        self.assertIsNone(instance.task_state)"},{"line_number":2096,"context_line":"        self.assertEqual(vm_states.ACTIVE, instance.vm_state)"},{"line_number":2097,"context_line":""},{"line_number":2098,"context_line":"    def _test_init_instance_sets_building_error(self, vm_state,"},{"line_number":2099,"context_line":"                                                task_state\u003dNone):"}],"source_content_type":"text/x-python","patch_set":2,"id":"79a14c25_bbeac433","line":2096,"updated":"2024-12-09 14:45:37.000000000","message":"unit test coverage is a start.\n\nfor live migration because it involves a distribute workflow across multiple process we try to have functional test coverage too were possible.","commit_id":"49bf571aea0f66d043fab92a1efb4b3d2c9b646b"}]}
