)]}'
{"nova/tests/functional/regressions/test_bug_1896463.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"5e50ca95cf65a75dcb50342f3bae41eddced3410","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from nova import objects"},{"line_number":20,"context_line":"from nova import test"},{"line_number":21,"context_line":"from nova import utils"},{"line_number":22,"context_line":"from nova.tests import fixtures as nova_fixtures"},{"line_number":23,"context_line":"from nova.tests.functional.api import client"},{"line_number":24,"context_line":"from nova.tests.functional import fixtures as func_fixtures"},{"line_number":25,"context_line":"from nova.tests.functional import integrated_helpers"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_0aaed97f","line":22,"updated":"2020-09-24 20:33:39.000000000","message":"pep8: H306: imports not in alphabetical order (nova.utils, nova.tests.fixtures)","commit_id":"59a7a17f860574be9816e74c05c5dad0c89ec5ee"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"5e50ca95cf65a75dcb50342f3bae41eddced3410","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from nova import test"},{"line_number":21,"context_line":"from nova import utils"},{"line_number":22,"context_line":"from nova.tests import fixtures as nova_fixtures"},{"line_number":23,"context_line":"from nova.tests.functional.api import client"},{"line_number":24,"context_line":"from nova.tests.functional import fixtures as func_fixtures"},{"line_number":25,"context_line":"from nova.tests.functional import integrated_helpers"},{"line_number":26,"context_line":"from nova.virt import fake"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_eab0c5de","line":23,"updated":"2020-09-24 20:33:39.000000000","message":"pep8: F401 \u0027nova.tests.functional.api.client\u0027 imported but unused","commit_id":"59a7a17f860574be9816e74c05c5dad0c89ec5ee"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"5e50ca95cf65a75dcb50342f3bae41eddced3410","unresolved":false,"context_lines":[{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def _assert_pci_device_allocated("},{"line_number":105,"context_line":"            self, instance_uuid, compute_node_id, num\u003d1):"},{"line_number":106,"context_line":"        \"\"\"Assert that a given number of PCI devices are allocated to the"},{"line_number":107,"context_line":"        instance on the given host.\"\"\""},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        devices \u003d objects.PciDeviceList.get_by_instance_uuid("}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_4acbb151","line":106,"updated":"2020-09-24 20:33:39.000000000","message":"pep8: H403: multi line docstrings should end on a new line","commit_id":"59a7a17f860574be9816e74c05c5dad0c89ec5ee"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"5e50ca95cf65a75dcb50342f3bae41eddced3410","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    def _assert_pci_device_allocated("},{"line_number":105,"context_line":"            self, instance_uuid, compute_node_id, num\u003d1):"},{"line_number":106,"context_line":"        \"\"\"Assert that a given number of PCI devices are allocated to the"},{"line_number":107,"context_line":"        instance on the given host.\"\"\""},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        devices \u003d objects.PciDeviceList.get_by_instance_uuid("},{"line_number":110,"context_line":"            self.ctxt, instance_uuid)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_2ac63d4a","line":107,"updated":"2020-09-24 20:33:39.000000000","message":"pep8: H403: multi line docstrings should end on a new line","commit_id":"59a7a17f860574be9816e74c05c5dad0c89ec5ee"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"5e50ca95cf65a75dcb50342f3bae41eddced3410","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            self.ctxt, instance_uuid)"},{"line_number":111,"context_line":"        devices_on_host \u003d [dev for dev in devices"},{"line_number":112,"context_line":"                           if dev.compute_node_id \u003d\u003d compute_node_id]"},{"line_number":113,"context_line":"        self.assertEquals(num, len(devices_on_host))"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def test_evacuate_races_with_update_available_resource(self):"},{"line_number":116,"context_line":"        # Create a server with a direct port to have PCI allocation"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_8ac14932","line":113,"updated":"2020-09-24 20:33:39.000000000","message":"pep8: H234: assertEquals is deprecated, use assertEqual","commit_id":"59a7a17f860574be9816e74c05c5dad0c89ec5ee"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"5e50ca95cf65a75dcb50342f3bae41eddced3410","unresolved":false,"context_lines":[{"line_number":183,"context_line":"            server, {\u0027OS-EXT-SRV-ATTR:host\u0027: \u0027host2\u0027, \u0027status\u0027: \u0027ACTIVE\u0027})"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"        self._assert_pci_device_allocated(server[\u0027id\u0027], self.compute1_id)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        # This is bug #1896463 as the PCI allocation was deleted by the racing"},{"line_number":189,"context_line":"        # _update_available_resource periodic task."}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_6abcb5b4","line":186,"updated":"2020-09-24 20:33:39.000000000","message":"pep8: E303 too many blank lines (2)","commit_id":"59a7a17f860574be9816e74c05c5dad0c89ec5ee"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"e79379c9f7a78f1974d92d5ad7fb32df7b9a4546","unresolved":false,"context_lines":[{"line_number":9,"context_line":"# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied."},{"line_number":10,"context_line":"# See the License for the specific language governing permissions and"},{"line_number":11,"context_line":"# limitations under the License."},{"line_number":12,"context_line":"import copy"},{"line_number":13,"context_line":"import fixtures"},{"line_number":14,"context_line":"import time"},{"line_number":15,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7f6b1bfe_0ae4ebab","line":12,"updated":"2020-10-13 15:50:30.000000000","message":"nit: missing newline above this","commit_id":"9788c0a52e2755c50f51cd6b9e950d3db3d53b6d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"386495dab6e00a5677d89b152256f5d72f95b9b5","unresolved":false,"context_lines":[{"line_number":9,"context_line":"# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied."},{"line_number":10,"context_line":"# See the License for the specific language governing permissions and"},{"line_number":11,"context_line":"# limitations under the License."},{"line_number":12,"context_line":"import copy"},{"line_number":13,"context_line":"import fixtures"},{"line_number":14,"context_line":"import time"},{"line_number":15,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7f6b1bfe_532fb0f5","line":12,"in_reply_to":"7f6b1bfe_0ae4ebab","updated":"2020-10-14 14:09:04.000000000","message":"Done","commit_id":"9788c0a52e2755c50f51cd6b9e950d3db3d53b6d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"e79379c9f7a78f1974d92d5ad7fb32df7b9a4546","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        self.start_service(\u0027conductor\u0027)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        if \u0027PciPassthroughFilter\u0027 not in CONF.filter_scheduler.enabled_filters:"},{"line_number":60,"context_line":"            self.flags("},{"line_number":61,"context_line":"                enabled_filters\u003dCONF.filter_scheduler.enabled_filters +"},{"line_number":62,"context_line":"                                [\u0027PciPassthroughFilter\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f6b1bfe_a56528e4","line":59,"range":{"start_line":59,"start_character":0,"end_line":59,"end_character":79},"updated":"2020-10-13 15:50:30.000000000","message":"When would this ever not be true? Seems superfluous","commit_id":"9788c0a52e2755c50f51cd6b9e950d3db3d53b6d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8eb0205476c6be31da06f7bed29448cfa116824a","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        self.start_service(\u0027conductor\u0027)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        if \u0027PciPassthroughFilter\u0027 not in CONF.filter_scheduler.enabled_filters:"},{"line_number":60,"context_line":"            self.flags("},{"line_number":61,"context_line":"                enabled_filters\u003dCONF.filter_scheduler.enabled_filters +"},{"line_number":62,"context_line":"                                [\u0027PciPassthroughFilter\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f621f24_93aa98cf","line":59,"range":{"start_line":59,"start_character":0,"end_line":59,"end_character":79},"in_reply_to":"7f6b1bfe_2999d56d","updated":"2020-11-04 14:05:50.000000000","message":"Yeah, this test only need need to trigger the claim process for PCI devices, and for that we don\u0027t need the scheduler to filter hosts based on PCI devs. The hosts this test starts are all supporting the PCI request of the booted instance.","commit_id":"9788c0a52e2755c50f51cd6b9e950d3db3d53b6d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"7109b299b1d6efb12c01cdd384e7761c66c26444","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        self.start_service(\u0027conductor\u0027)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        if \u0027PciPassthroughFilter\u0027 not in CONF.filter_scheduler.enabled_filters:"},{"line_number":60,"context_line":"            self.flags("},{"line_number":61,"context_line":"                enabled_filters\u003dCONF.filter_scheduler.enabled_filters +"},{"line_number":62,"context_line":"                                [\u0027PciPassthroughFilter\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f6b1bfe_2999d56d","line":59,"range":{"start_line":59,"start_character":0,"end_line":59,"end_character":79},"in_reply_to":"7f6b1bfe_9312e8b0","updated":"2020-10-15 09:11:00.000000000","message":"You seem to have removed this entirely. Was that intentional? I assume so since the test is passing","commit_id":"9788c0a52e2755c50f51cd6b9e950d3db3d53b6d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"386495dab6e00a5677d89b152256f5d72f95b9b5","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        self.start_service(\u0027conductor\u0027)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        if \u0027PciPassthroughFilter\u0027 not in CONF.filter_scheduler.enabled_filters:"},{"line_number":60,"context_line":"            self.flags("},{"line_number":61,"context_line":"                enabled_filters\u003dCONF.filter_scheduler.enabled_filters +"},{"line_number":62,"context_line":"                                [\u0027PciPassthroughFilter\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f6b1bfe_9312e8b0","line":59,"range":{"start_line":59,"start_character":0,"end_line":59,"end_character":79},"in_reply_to":"7f6b1bfe_a56528e4","updated":"2020-10-14 14:09:04.000000000","message":"Done","commit_id":"9788c0a52e2755c50f51cd6b9e950d3db3d53b6d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"e79379c9f7a78f1974d92d5ad7fb32df7b9a4546","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                                [\u0027PciPassthroughFilter\u0027],"},{"line_number":63,"context_line":"                group\u003d\u0027filter_scheduler\u0027)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"        self.scheduler_service \u003d self.start_service(\u0027scheduler\u0027)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        self.flags(compute_driver\u003d\u0027fake.FakeDriverWithPciResources\u0027)"},{"line_number":68,"context_line":"        self.useFixture("}],"source_content_type":"text/x-python","patch_set":2,"id":"7f6b1bfe_051b3c1b","line":65,"range":{"start_line":65,"start_character":8,"end_line":65,"end_character":34},"updated":"2020-10-13 15:50:30.000000000","message":"drop?","commit_id":"9788c0a52e2755c50f51cd6b9e950d3db3d53b6d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"386495dab6e00a5677d89b152256f5d72f95b9b5","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                                [\u0027PciPassthroughFilter\u0027],"},{"line_number":63,"context_line":"                group\u003d\u0027filter_scheduler\u0027)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"        self.scheduler_service \u003d self.start_service(\u0027scheduler\u0027)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        self.flags(compute_driver\u003d\u0027fake.FakeDriverWithPciResources\u0027)"},{"line_number":68,"context_line":"        self.useFixture("}],"source_content_type":"text/x-python","patch_set":2,"id":"7f6b1bfe_d323c004","line":65,"range":{"start_line":65,"start_character":8,"end_line":65,"end_character":34},"in_reply_to":"7f6b1bfe_051b3c1b","updated":"2020-10-14 14:09:04.000000000","message":"Done","commit_id":"9788c0a52e2755c50f51cd6b9e950d3db3d53b6d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"e79379c9f7a78f1974d92d5ad7fb32df7b9a4546","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            fake.FakeDriverWithPciResources."},{"line_number":70,"context_line":"                FakeDriverWithPciResourcesConfigFixture())"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        self.compute1 \u003d self._start_compute(\u0027host1\u0027)"},{"line_number":73,"context_line":"        self.compute1_id \u003d self._get_compute_node_id_by_host(\u0027host1\u0027)"},{"line_number":74,"context_line":"        self.compute1_service_id \u003d self.admin_api.get_services("},{"line_number":75,"context_line":"            host\u003d\u0027host1\u0027, binary\u003d\u0027nova-compute\u0027)[0][\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f6b1bfe_eaf9af4d","line":72,"range":{"start_line":72,"start_character":13,"end_line":72,"end_character":21},"updated":"2020-10-13 15:50:30.000000000","message":"super nit: compute_a ?","commit_id":"9788c0a52e2755c50f51cd6b9e950d3db3d53b6d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"7109b299b1d6efb12c01cdd384e7761c66c26444","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            fake.FakeDriverWithPciResources."},{"line_number":70,"context_line":"                FakeDriverWithPciResourcesConfigFixture())"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        self.compute1 \u003d self._start_compute(\u0027host1\u0027)"},{"line_number":73,"context_line":"        self.compute1_id \u003d self._get_compute_node_id_by_host(\u0027host1\u0027)"},{"line_number":74,"context_line":"        self.compute1_service_id \u003d self.admin_api.get_services("},{"line_number":75,"context_line":"            host\u003d\u0027host1\u0027, binary\u003d\u0027nova-compute\u0027)[0][\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f6b1bfe_4991b152","line":72,"range":{"start_line":72,"start_character":13,"end_line":72,"end_character":21},"in_reply_to":"7f6b1bfe_d3510065","updated":"2020-10-15 09:11:00.000000000","message":"I was going to say that\u0027s what we do elsewhere, but it turns out computeN is pretty widespread. Ignore me :)","commit_id":"9788c0a52e2755c50f51cd6b9e950d3db3d53b6d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"386495dab6e00a5677d89b152256f5d72f95b9b5","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            fake.FakeDriverWithPciResources."},{"line_number":70,"context_line":"                FakeDriverWithPciResourcesConfigFixture())"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        self.compute1 \u003d self._start_compute(\u0027host1\u0027)"},{"line_number":73,"context_line":"        self.compute1_id \u003d self._get_compute_node_id_by_host(\u0027host1\u0027)"},{"line_number":74,"context_line":"        self.compute1_service_id \u003d self.admin_api.get_services("},{"line_number":75,"context_line":"            host\u003d\u0027host1\u0027, binary\u003d\u0027nova-compute\u0027)[0][\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f6b1bfe_d3510065","line":72,"range":{"start_line":72,"start_character":13,"end_line":72,"end_character":21},"in_reply_to":"7f6b1bfe_eaf9af4d","updated":"2020-10-14 14:09:04.000000000","message":"I don\u0027t see how that would be better.","commit_id":"9788c0a52e2755c50f51cd6b9e950d3db3d53b6d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"e79379c9f7a78f1974d92d5ad7fb32df7b9a4546","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        self.compute2_service_id \u003d self.admin_api.get_services("},{"line_number":80,"context_line":"            host\u003d\u0027host2\u0027, binary\u003d\u0027nova-compute\u0027)[0][\u0027id\u0027]"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        self.neutron._ports[self.neutron.sriov_port[\u0027id\u0027]] \u003d \\"},{"line_number":83,"context_line":"            copy.deepcopy(self.neutron.sriov_port)"},{"line_number":84,"context_line":"        self.neutron._networks["},{"line_number":85,"context_line":"            self.neutron.network_2[\u0027id\u0027]] \u003d self.neutron.network_2"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f6b1bfe_0a922bf7","line":82,"updated":"2020-10-13 15:50:30.000000000","message":"some context comments on this would be very helpful, i.e. what you\u0027re trying to do","commit_id":"9788c0a52e2755c50f51cd6b9e950d3db3d53b6d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"386495dab6e00a5677d89b152256f5d72f95b9b5","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        self.compute2_service_id \u003d self.admin_api.get_services("},{"line_number":80,"context_line":"            host\u003d\u0027host2\u0027, binary\u003d\u0027nova-compute\u0027)[0][\u0027id\u0027]"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        self.neutron._ports[self.neutron.sriov_port[\u0027id\u0027]] \u003d \\"},{"line_number":83,"context_line":"            copy.deepcopy(self.neutron.sriov_port)"},{"line_number":84,"context_line":"        self.neutron._networks["},{"line_number":85,"context_line":"            self.neutron.network_2[\u0027id\u0027]] \u003d self.neutron.network_2"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f6b1bfe_d3d620c4","line":82,"in_reply_to":"7f6b1bfe_0a922bf7","updated":"2020-10-14 14:09:04.000000000","message":"Done","commit_id":"9788c0a52e2755c50f51cd6b9e950d3db3d53b6d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"e79379c9f7a78f1974d92d5ad7fb32df7b9a4546","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        #    and from the migration list. As our instance is not in either of"},{"line_number":152,"context_line":"        #    the lists, the resource tracker  cleans up the PCI allocation for"},{"line_number":153,"context_line":"        #    the already finished evacuation of our instance."},{"line_number":154,"context_line":"        orig_drop \u003d objects.Instance.drop_migration_context"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        def slow_drop(*args, **kwargs):"},{"line_number":157,"context_line":"            time.sleep(1)"},{"line_number":158,"context_line":"            return orig_drop(*args, **kwargs)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        self.useFixture("},{"line_number":161,"context_line":"            fixtures.MockPatch("},{"line_number":162,"context_line":"                \u0027nova.objects.instance.Instance.drop_migration_context\u0027,"},{"line_number":163,"context_line":"                new\u003dslow_drop))"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        orig_get_mig \u003d objects.MigrationList.get_in_progress_and_error"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        def slow_get_mig(*args, **kwargs):"},{"line_number":168,"context_line":"            time.sleep(2)"},{"line_number":169,"context_line":"            return orig_get_mig(*args, **kwargs)"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"        self.useFixture("},{"line_number":172,"context_line":"            fixtures.MockPatch("},{"line_number":173,"context_line":"                \u0027nova.objects.migration.MigrationList.\u0027"},{"line_number":174,"context_line":"                \u0027get_in_progress_and_error\u0027,"},{"line_number":175,"context_line":"                new\u003dslow_get_mig))"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"        self.admin_api.post_server_action(server[\u0027id\u0027], {\u0027evacuate\u0027: {}})"},{"line_number":178,"context_line":"        # we trigger the _update_available_resource periodic to overlap with"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f6b1bfe_051cdc68","line":175,"range":{"start_line":154,"start_character":0,"end_line":175,"end_character":34},"updated":"2020-10-13 15:50:30.000000000","message":"I\u0027m really not a fan of using sleeps in our tests. What I did for the similar races with resize/migration confirm/revert was to hook into some call between the changing of instance.host and the final save, and simply call the periodic task manually (i.e. change Ifea9a15fb01c0b25e9973024f4f61faecc56e1cd).\n\nPerhaps you could wrap the \u0027drop_migration_context\u0027 call in this manner?","commit_id":"9788c0a52e2755c50f51cd6b9e950d3db3d53b6d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"386495dab6e00a5677d89b152256f5d72f95b9b5","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        #    and from the migration list. As our instance is not in either of"},{"line_number":152,"context_line":"        #    the lists, the resource tracker  cleans up the PCI allocation for"},{"line_number":153,"context_line":"        #    the already finished evacuation of our instance."},{"line_number":154,"context_line":"        orig_drop \u003d objects.Instance.drop_migration_context"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        def slow_drop(*args, **kwargs):"},{"line_number":157,"context_line":"            time.sleep(1)"},{"line_number":158,"context_line":"            return orig_drop(*args, **kwargs)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        self.useFixture("},{"line_number":161,"context_line":"            fixtures.MockPatch("},{"line_number":162,"context_line":"                \u0027nova.objects.instance.Instance.drop_migration_context\u0027,"},{"line_number":163,"context_line":"                new\u003dslow_drop))"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        orig_get_mig \u003d objects.MigrationList.get_in_progress_and_error"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        def slow_get_mig(*args, **kwargs):"},{"line_number":168,"context_line":"            time.sleep(2)"},{"line_number":169,"context_line":"            return orig_get_mig(*args, **kwargs)"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"        self.useFixture("},{"line_number":172,"context_line":"            fixtures.MockPatch("},{"line_number":173,"context_line":"                \u0027nova.objects.migration.MigrationList.\u0027"},{"line_number":174,"context_line":"                \u0027get_in_progress_and_error\u0027,"},{"line_number":175,"context_line":"                new\u003dslow_get_mig))"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"        self.admin_api.post_server_action(server[\u0027id\u0027], {\u0027evacuate\u0027: {}})"},{"line_number":178,"context_line":"        # we trigger the _update_available_resource periodic to overlap with"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f6b1bfe_734bcc86","line":175,"range":{"start_line":154,"start_character":0,"end_line":175,"end_character":34},"in_reply_to":"7f6b1bfe_051cdc68","updated":"2020-10-14 14:09:04.000000000","message":"Unfortunately no. We need that the evac start first then periodic starts, but not finishes, then evac finishes, then periodic finishes. If I run the whole periodic at drop_migration_context then I could not reproduce the situation described at #4). In general it is not \n\n  evac\n   |\n   |\n   |     periodic\n   |        |\n   |        |\n   |        x\n   |\n   |\n   x\n\nbut \n\n  evac\n   |\n   |\n   |     periodic\n   |        |\n   |        |\n   |        |\n   x        |\n            |\n            x\n\nwhat I need.\n\nStarting the periodic from the test in a separate thread at drop_migration_context() might work but I don\u0027t think that we want that extra complexity in the test code either. Also it might need a sleep still to make the reproduction stable but only one sleep instead of two.","commit_id":"9788c0a52e2755c50f51cd6b9e950d3db3d53b6d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8eb0205476c6be31da06f7bed29448cfa116824a","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        #    and from the migration list. As our instance is not in either of"},{"line_number":152,"context_line":"        #    the lists, the resource tracker  cleans up the PCI allocation for"},{"line_number":153,"context_line":"        #    the already finished evacuation of our instance."},{"line_number":154,"context_line":"        orig_drop \u003d objects.Instance.drop_migration_context"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        def slow_drop(*args, **kwargs):"},{"line_number":157,"context_line":"            time.sleep(1)"},{"line_number":158,"context_line":"            return orig_drop(*args, **kwargs)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        self.useFixture("},{"line_number":161,"context_line":"            fixtures.MockPatch("},{"line_number":162,"context_line":"                \u0027nova.objects.instance.Instance.drop_migration_context\u0027,"},{"line_number":163,"context_line":"                new\u003dslow_drop))"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        orig_get_mig \u003d objects.MigrationList.get_in_progress_and_error"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        def slow_get_mig(*args, **kwargs):"},{"line_number":168,"context_line":"            time.sleep(2)"},{"line_number":169,"context_line":"            return orig_get_mig(*args, **kwargs)"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"        self.useFixture("},{"line_number":172,"context_line":"            fixtures.MockPatch("},{"line_number":173,"context_line":"                \u0027nova.objects.migration.MigrationList.\u0027"},{"line_number":174,"context_line":"                \u0027get_in_progress_and_error\u0027,"},{"line_number":175,"context_line":"                new\u003dslow_get_mig))"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"        self.admin_api.post_server_action(server[\u0027id\u0027], {\u0027evacuate\u0027: {}})"},{"line_number":178,"context_line":"        # we trigger the _update_available_resource periodic to overlap with"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f621f24_130968dc","line":175,"range":{"start_line":154,"start_character":0,"end_line":175,"end_character":34},"in_reply_to":"7f6b1bfe_697d8d1b","updated":"2020-11-04 14:05:50.000000000","message":"Done","commit_id":"9788c0a52e2755c50f51cd6b9e950d3db3d53b6d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"7109b299b1d6efb12c01cdd384e7761c66c26444","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        #    and from the migration list. As our instance is not in either of"},{"line_number":152,"context_line":"        #    the lists, the resource tracker  cleans up the PCI allocation for"},{"line_number":153,"context_line":"        #    the already finished evacuation of our instance."},{"line_number":154,"context_line":"        orig_drop \u003d objects.Instance.drop_migration_context"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        def slow_drop(*args, **kwargs):"},{"line_number":157,"context_line":"            time.sleep(1)"},{"line_number":158,"context_line":"            return orig_drop(*args, **kwargs)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        self.useFixture("},{"line_number":161,"context_line":"            fixtures.MockPatch("},{"line_number":162,"context_line":"                \u0027nova.objects.instance.Instance.drop_migration_context\u0027,"},{"line_number":163,"context_line":"                new\u003dslow_drop))"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        orig_get_mig \u003d objects.MigrationList.get_in_progress_and_error"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        def slow_get_mig(*args, **kwargs):"},{"line_number":168,"context_line":"            time.sleep(2)"},{"line_number":169,"context_line":"            return orig_get_mig(*args, **kwargs)"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"        self.useFixture("},{"line_number":172,"context_line":"            fixtures.MockPatch("},{"line_number":173,"context_line":"                \u0027nova.objects.migration.MigrationList.\u0027"},{"line_number":174,"context_line":"                \u0027get_in_progress_and_error\u0027,"},{"line_number":175,"context_line":"                new\u003dslow_get_mig))"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"        self.admin_api.post_server_action(server[\u0027id\u0027], {\u0027evacuate\u0027: {}})"},{"line_number":178,"context_line":"        # we trigger the _update_available_resource periodic to overlap with"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f6b1bfe_697d8d1b","line":175,"range":{"start_line":154,"start_character":0,"end_line":175,"end_character":34},"in_reply_to":"7f6b1bfe_734bcc86","updated":"2020-10-15 09:11:00.000000000","message":"Okay, fair. As an aside, that ^ would be a super comment to add to the code here","commit_id":"9788c0a52e2755c50f51cd6b9e950d3db3d53b6d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"e79379c9f7a78f1974d92d5ad7fb32df7b9a4546","unresolved":false,"context_lines":[{"line_number":174,"context_line":"                \u0027get_in_progress_and_error\u0027,"},{"line_number":175,"context_line":"                new\u003dslow_get_mig))"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"        self.admin_api.post_server_action(server[\u0027id\u0027], {\u0027evacuate\u0027: {}})"},{"line_number":178,"context_line":"        # we trigger the _update_available_resource periodic to overlap with"},{"line_number":179,"context_line":"        # the already started evacuation"},{"line_number":180,"context_line":"        self._run_periodics()"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        self._wait_for_server_parameter("},{"line_number":183,"context_line":"            server, {\u0027OS-EXT-SRV-ATTR:host\u0027: \u0027host2\u0027, \u0027status\u0027: \u0027ACTIVE\u0027})"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        self._assert_pci_device_allocated(server[\u0027id\u0027], self.compute1_id)"},{"line_number":186,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7f6b1bfe_257ab887","line":183,"range":{"start_line":177,"start_character":0,"end_line":183,"end_character":74},"updated":"2020-10-13 15:50:30.000000000","message":"If you were able to do the above, you could simply replace this with:\n\n  self._evacuate_server(server, \u0027host2\u0027)","commit_id":"9788c0a52e2755c50f51cd6b9e950d3db3d53b6d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"e79379c9f7a78f1974d92d5ad7fb32df7b9a4546","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        self._assert_pci_device_allocated("},{"line_number":190,"context_line":"            server[\u0027id\u0027], self.compute2_id, num\u003d0)"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        # When this bug is fixed (or if you remove the sleeps above to avoid"},{"line_number":193,"context_line":"        # the race condition) then we expect that the PCI allocation exists on"},{"line_number":194,"context_line":"        # the destination host too."},{"line_number":195,"context_line":"        # self._assert_pci_device_allocated(server[\u0027id\u0027], self.compute2_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f6b1bfe_856f4cc4","line":192,"range":{"start_line":192,"start_character":10,"end_line":192,"end_character":11},"updated":"2020-10-13 15:50:30.000000000","message":"super nit: we usually add a FIXME note","commit_id":"9788c0a52e2755c50f51cd6b9e950d3db3d53b6d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"386495dab6e00a5677d89b152256f5d72f95b9b5","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        self._assert_pci_device_allocated("},{"line_number":190,"context_line":"            server[\u0027id\u0027], self.compute2_id, num\u003d0)"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        # When this bug is fixed (or if you remove the sleeps above to avoid"},{"line_number":193,"context_line":"        # the race condition) then we expect that the PCI allocation exists on"},{"line_number":194,"context_line":"        # the destination host too."},{"line_number":195,"context_line":"        # self._assert_pci_device_allocated(server[\u0027id\u0027], self.compute2_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f6b1bfe_9e5b0f2d","line":192,"range":{"start_line":192,"start_character":10,"end_line":192,"end_character":11},"in_reply_to":"7f6b1bfe_856f4cc4","updated":"2020-10-14 14:09:04.000000000","message":"Done","commit_id":"9788c0a52e2755c50f51cd6b9e950d3db3d53b6d"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"94e7f1bbd185425e80604ae88a7db6dabc8a4967","unresolved":false,"context_lines":[{"line_number":190,"context_line":"        orig_drop \u003d objects.Instance.drop_migration_context"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        def slow_drop(*args, **kwargs):"},{"line_number":193,"context_line":"            time.sleep(1)"},{"line_number":194,"context_line":"            return orig_drop(*args, **kwargs)"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"        self.useFixture("}],"source_content_type":"text/x-python","patch_set":5,"id":"1f621f24_6d37dd4e","line":193,"updated":"2020-11-10 11:06:58.000000000","message":"I\u0027m thinking of we just depend on the sleep, it pretty depends on luck.\n\nHow about we use a flag to sync two threads.\n\nWe can set the flag as true here. But the \u0027slow_get_mig\u0027 will sleep until the flag set as true.","commit_id":"3f348602ae4a40c52c7135b2cb48deaa6052c488"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"73b17925ce48902a92740a1ed111a7038f1caa46","unresolved":false,"context_lines":[{"line_number":190,"context_line":"        orig_drop \u003d objects.Instance.drop_migration_context"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        def slow_drop(*args, **kwargs):"},{"line_number":193,"context_line":"            time.sleep(1)"},{"line_number":194,"context_line":"            return orig_drop(*args, **kwargs)"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"        self.useFixture("}],"source_content_type":"text/x-python","patch_set":5,"id":"1f621f24_8e0aea1c","line":193,"in_reply_to":"1f621f24_6d37dd4e","updated":"2020-11-16 16:42:03.000000000","message":"tl;dr: the flag based is too strict to work in both before and after the bug.\n\nThe flag based solution I could created only works until I fix the bug with an extra lock. After fixing the bug the test deadlocks as it still tries to enforce the same strict order of execution that leads to the error, but that is not possible any more with the extra locking. This defeats the goal of having a test case for reproduction that only differs in asserts between before and after the bug is fixed. \n\nI\u0027ve pushed the lock based test separately[1]. So if you can figure out a flag based solution that reproduces the bug and also keeps the test intact after the bug fix is applied then let me know. \n\n[1] https://review.opendev.org/762872","commit_id":"3f348602ae4a40c52c7135b2cb48deaa6052c488"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"dc043044332c9d407414e0d6dc45941bbfd70f73","unresolved":false,"context_lines":[{"line_number":190,"context_line":"        orig_drop \u003d objects.Instance.drop_migration_context"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        def slow_drop(*args, **kwargs):"},{"line_number":193,"context_line":"            time.sleep(1)"},{"line_number":194,"context_line":"            return orig_drop(*args, **kwargs)"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"        self.useFixture("}],"source_content_type":"text/x-python","patch_set":5,"id":"1f621f24_ad9d1159","line":193,"in_reply_to":"1f621f24_8e0aea1c","updated":"2020-11-18 08:33:14.000000000","message":"sorry about that. I missed that after we fixed the bug, then it will become a deadlock. I guess this is the only way for now.","commit_id":"3f348602ae4a40c52c7135b2cb48deaa6052c488"}]}
