)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8011f1cbd2c0e48d3cbbd1a94e7d31d8861b8969","unresolved":false,"context_lines":[{"line_number":10,"context_line":"adds all the previously missing scaffolding, specifically:"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"* The serial elements in fakelibvirt\u0027s XMLDesc() are malformed. They"},{"line_number":13,"context_line":"are enough to pass existing unit tests, but would break"},{"line_number":14,"context_line":"migration._update_serial_xml(). This patch removes unused elements,"},{"line_number":15,"context_line":"and makes the remaining element\u0027s presence conditional to"},{"line_number":16,"context_line":"CONF.serial_console.enabled being set - which is how serial consoles"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":57,"id":"3fa7e38b_b0532339","line":13,"updated":"2019-10-10 15:38:38.000000000","message":"supernit: missing indent on all these lines","commit_id":"1ebbd1afe500649f57824104f7957b5d5758cd5c"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"780743d35db7ad3139a3ccf8f5cb5152107e14d3","unresolved":false,"context_lines":[{"line_number":10,"context_line":"adds all the previously missing scaffolding, specifically:"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"* The serial elements in fakelibvirt\u0027s XMLDesc() are malformed. They"},{"line_number":13,"context_line":"are enough to pass existing unit tests, but would break"},{"line_number":14,"context_line":"migration._update_serial_xml(). This patch removes unused elements,"},{"line_number":15,"context_line":"and makes the remaining element\u0027s presence conditional to"},{"line_number":16,"context_line":"CONF.serial_console.enabled being set - which is how serial consoles"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":57,"id":"3fa7e38b_7bcc55ba","line":13,"in_reply_to":"3fa7e38b_b0532339","updated":"2019-10-24 17:35:15.000000000","message":"Done","commit_id":"1ebbd1afe500649f57824104f7957b5d5758cd5c"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8011f1cbd2c0e48d3cbbd1a94e7d31d8861b8969","unresolved":false,"context_lines":[{"line_number":22,"context_line":"* Make the fakelibvirt Domain support the vcpupin, memnode and"},{"line_number":23,"context_line":"emulatorpin XML elements."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"* Modifiy how HostInfo is built to support NUMA nodes with different"},{"line_number":26,"context_line":"numbers of CPUs."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"* _run_periodics() from ProviderUsageBaseTestCase is needed in the new"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":57,"id":"3fa7e38b_1043176e","line":25,"range":{"start_line":25,"start_character":2,"end_line":25,"end_character":9},"updated":"2019-10-10 15:38:38.000000000","message":"Modify","commit_id":"1ebbd1afe500649f57824104f7957b5d5758cd5c"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"780743d35db7ad3139a3ccf8f5cb5152107e14d3","unresolved":false,"context_lines":[{"line_number":22,"context_line":"* Make the fakelibvirt Domain support the vcpupin, memnode and"},{"line_number":23,"context_line":"emulatorpin XML elements."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"* Modifiy how HostInfo is built to support NUMA nodes with different"},{"line_number":26,"context_line":"numbers of CPUs."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"* _run_periodics() from ProviderUsageBaseTestCase is needed in the new"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":57,"id":"3fa7e38b_1bc76198","line":25,"range":{"start_line":25,"start_character":2,"end_line":25,"end_character":9},"in_reply_to":"3fa7e38b_1043176e","updated":"2019-10-24 17:35:15.000000000","message":"Done","commit_id":"1ebbd1afe500649f57824104f7957b5d5758cd5c"}],"nova/tests/functional/libvirt/base.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"65bc51a8c30a174acf9399f004d6bd9ecaed4172","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":"                # Once that\u0027s done, we need to tweak each individual compute"},{"line_number":120,"context_line":"                # \"service\" to make sure they return unique objects. We do this"},{"line_number":121,"context_line":"                # inside the mock context to avoid a small window between the"},{"line_number":122,"context_line":"                # end of the context and the tweaking where get_connection"},{"line_number":123,"context_line":"                # would revert to being an autospec mock."},{"line_number":124,"context_line":"                compute.driver._host.get_connection \u003d lambda: fake_connection"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_9a5c527e","line":121,"range":{"start_line":121,"start_character":45,"end_line":121,"end_character":65},"updated":"2019-08-27 15:31:12.000000000","message":"I don\u0027t think it matters, but this is fine too.","commit_id":"676b3cd9ebd18b4c8ee51ebdfb4e6a067836d949"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"d2331c65df9c2939afd3378c55f734c48f98a5ff","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            create_disks\u003dcreate_disks)"},{"line_number":95,"context_line":"        return fake_connection"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def _start_heterogeneous_computes(self, host_info_dict,"},{"line_number":98,"context_line":"                                      create_disks\u003dFalse):"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        def start_compute(host, host_info):"},{"line_number":101,"context_line":"            # NOTE(artom) This function is necessary to introduce an"},{"line_number":102,"context_line":"            # intermediate scope between the for loop further down and the"},{"line_number":103,"context_line":"            # lambda. The \u0027lambda: host\u0027 construct takes \u0027host\u0027 from the"},{"line_number":104,"context_line":"            # surrounding scope. If put directly in the for loop, the \u0027host\u0027"},{"line_number":105,"context_line":"            # returned by the lambda would change with every iteration of the"},{"line_number":106,"context_line":"            # loop, giving the libvirt driver the impression that the hostname"},{"line_number":107,"context_line":"            # has changed, and leading to weirdness with which host gets which"},{"line_number":108,"context_line":"            # fake connection. By introducing this function, the lambda takes"},{"line_number":109,"context_line":"            # \u0027host\u0027 from this scope, which is recreated with a new \u0027host\u0027"},{"line_number":110,"context_line":"            # every time it\u0027s called. This ensure each compute service\u0027s host"},{"line_number":111,"context_line":"            # and fake connection remain constant. Google \u0027python lambda scope\u0027"},{"line_number":112,"context_line":"            # for more fun and details."},{"line_number":113,"context_line":"            fake_connection \u003d self._get_connection(host_info\u003dhost_info,"},{"line_number":114,"context_line":"                                                   create_disks\u003dcreate_disks)"},{"line_number":115,"context_line":"            fake_connection.getHostname \u003d lambda: host"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"            # This is fun. Firstly we need to do a global\u0027ish mock so we can"},{"line_number":118,"context_line":"            # actually start the service."},{"line_number":119,"context_line":"            with mock.patch(\u0027nova.virt.libvirt.host.Host.get_connection\u0027,"},{"line_number":120,"context_line":"                            return_value\u003dfake_connection):"},{"line_number":121,"context_line":"                compute \u003d self.start_service(\u0027compute\u0027, host\u003dhost)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"                # Once that\u0027s done, we need to tweak each individual compute"},{"line_number":124,"context_line":"                # \"service\" to make sure they return unique objects. We do this"},{"line_number":125,"context_line":"                # inside the mock context to avoid a small window between the"},{"line_number":126,"context_line":"                # end of the context and the tweaking where get_connection"},{"line_number":127,"context_line":"                # would revert to being an autospec mock."},{"line_number":128,"context_line":"                compute.driver._host.get_connection \u003d lambda: fake_connection"},{"line_number":129,"context_line":"                return compute"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        self.computes \u003d {}"},{"line_number":132,"context_line":"        for host, host_info in host_info_dict.items():"},{"line_number":133,"context_line":"            self.computes[host] \u003d start_compute(host, host_info)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"class LibvirtNeutronFixture(nova_fixtures.NeutronFixture):"}],"source_content_type":"text/x-python","patch_set":52,"id":"5faad753_354ae0ab","line":133,"range":{"start_line":97,"start_character":0,"end_line":133,"end_character":64},"updated":"2019-09-12 10:18:37.000000000","message":"I know it\u0027s really late in the day to ask this but would there be any chance of extracting this into a separate change? I\u0027ve got a number of bugfixes queued up where I could use this to provide some functional regression coverage and having an extracted version would make backports so much easier.","commit_id":"1b0f9cc5bc14218764f93dcc17d3327896284e05"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"111a47edc42275e48d5f6ff71cecc878210b5f05","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            create_disks\u003dcreate_disks)"},{"line_number":95,"context_line":"        return fake_connection"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def _start_heterogeneous_computes(self, host_info_dict,"},{"line_number":98,"context_line":"                                      create_disks\u003dFalse):"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        def start_compute(host, host_info):"},{"line_number":101,"context_line":"            # NOTE(artom) This function is necessary to introduce an"},{"line_number":102,"context_line":"            # intermediate scope between the for loop further down and the"},{"line_number":103,"context_line":"            # lambda. The \u0027lambda: host\u0027 construct takes \u0027host\u0027 from the"},{"line_number":104,"context_line":"            # surrounding scope. If put directly in the for loop, the \u0027host\u0027"},{"line_number":105,"context_line":"            # returned by the lambda would change with every iteration of the"},{"line_number":106,"context_line":"            # loop, giving the libvirt driver the impression that the hostname"},{"line_number":107,"context_line":"            # has changed, and leading to weirdness with which host gets which"},{"line_number":108,"context_line":"            # fake connection. By introducing this function, the lambda takes"},{"line_number":109,"context_line":"            # \u0027host\u0027 from this scope, which is recreated with a new \u0027host\u0027"},{"line_number":110,"context_line":"            # every time it\u0027s called. This ensure each compute service\u0027s host"},{"line_number":111,"context_line":"            # and fake connection remain constant. Google \u0027python lambda scope\u0027"},{"line_number":112,"context_line":"            # for more fun and details."},{"line_number":113,"context_line":"            fake_connection \u003d self._get_connection(host_info\u003dhost_info,"},{"line_number":114,"context_line":"                                                   create_disks\u003dcreate_disks)"},{"line_number":115,"context_line":"            fake_connection.getHostname \u003d lambda: host"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"            # This is fun. Firstly we need to do a global\u0027ish mock so we can"},{"line_number":118,"context_line":"            # actually start the service."},{"line_number":119,"context_line":"            with mock.patch(\u0027nova.virt.libvirt.host.Host.get_connection\u0027,"},{"line_number":120,"context_line":"                            return_value\u003dfake_connection):"},{"line_number":121,"context_line":"                compute \u003d self.start_service(\u0027compute\u0027, host\u003dhost)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"                # Once that\u0027s done, we need to tweak each individual compute"},{"line_number":124,"context_line":"                # \"service\" to make sure they return unique objects. We do this"},{"line_number":125,"context_line":"                # inside the mock context to avoid a small window between the"},{"line_number":126,"context_line":"                # end of the context and the tweaking where get_connection"},{"line_number":127,"context_line":"                # would revert to being an autospec mock."},{"line_number":128,"context_line":"                compute.driver._host.get_connection \u003d lambda: fake_connection"},{"line_number":129,"context_line":"                return compute"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        self.computes \u003d {}"},{"line_number":132,"context_line":"        for host, host_info in host_info_dict.items():"},{"line_number":133,"context_line":"            self.computes[host] \u003d start_compute(host, host_info)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"class LibvirtNeutronFixture(nova_fixtures.NeutronFixture):"}],"source_content_type":"text/x-python","patch_set":52,"id":"5faad753_f8d8bd7b","line":133,"range":{"start_line":97,"start_character":0,"end_line":133,"end_character":64},"in_reply_to":"5faad753_354ae0ab","updated":"2019-09-12 10:36:27.000000000","message":"FWIW bug 1843639 is an example of this, I have an example locally where I\u0027ve mocked out Host.get_hostname in the ServiceFixture but this approach is much saner.","commit_id":"1b0f9cc5bc14218764f93dcc17d3327896284e05"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"1653af935d26024760ed063f6f81b2e9b9b3329d","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            create_disks\u003dcreate_disks)"},{"line_number":95,"context_line":"        return fake_connection"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def _start_heterogeneous_computes(self, host_info_dict,"},{"line_number":98,"context_line":"                                      create_disks\u003dFalse):"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        def start_compute(host, host_info):"},{"line_number":101,"context_line":"            # NOTE(artom) This function is necessary to introduce an"},{"line_number":102,"context_line":"            # intermediate scope between the for loop further down and the"},{"line_number":103,"context_line":"            # lambda. The \u0027lambda: host\u0027 construct takes \u0027host\u0027 from the"},{"line_number":104,"context_line":"            # surrounding scope. If put directly in the for loop, the \u0027host\u0027"},{"line_number":105,"context_line":"            # returned by the lambda would change with every iteration of the"},{"line_number":106,"context_line":"            # loop, giving the libvirt driver the impression that the hostname"},{"line_number":107,"context_line":"            # has changed, and leading to weirdness with which host gets which"},{"line_number":108,"context_line":"            # fake connection. By introducing this function, the lambda takes"},{"line_number":109,"context_line":"            # \u0027host\u0027 from this scope, which is recreated with a new \u0027host\u0027"},{"line_number":110,"context_line":"            # every time it\u0027s called. This ensure each compute service\u0027s host"},{"line_number":111,"context_line":"            # and fake connection remain constant. Google \u0027python lambda scope\u0027"},{"line_number":112,"context_line":"            # for more fun and details."},{"line_number":113,"context_line":"            fake_connection \u003d self._get_connection(host_info\u003dhost_info,"},{"line_number":114,"context_line":"                                                   create_disks\u003dcreate_disks)"},{"line_number":115,"context_line":"            fake_connection.getHostname \u003d lambda: host"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"            # This is fun. Firstly we need to do a global\u0027ish mock so we can"},{"line_number":118,"context_line":"            # actually start the service."},{"line_number":119,"context_line":"            with mock.patch(\u0027nova.virt.libvirt.host.Host.get_connection\u0027,"},{"line_number":120,"context_line":"                            return_value\u003dfake_connection):"},{"line_number":121,"context_line":"                compute \u003d self.start_service(\u0027compute\u0027, host\u003dhost)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"                # Once that\u0027s done, we need to tweak each individual compute"},{"line_number":124,"context_line":"                # \"service\" to make sure they return unique objects. We do this"},{"line_number":125,"context_line":"                # inside the mock context to avoid a small window between the"},{"line_number":126,"context_line":"                # end of the context and the tweaking where get_connection"},{"line_number":127,"context_line":"                # would revert to being an autospec mock."},{"line_number":128,"context_line":"                compute.driver._host.get_connection \u003d lambda: fake_connection"},{"line_number":129,"context_line":"                return compute"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        self.computes \u003d {}"},{"line_number":132,"context_line":"        for host, host_info in host_info_dict.items():"},{"line_number":133,"context_line":"            self.computes[host] \u003d start_compute(host, host_info)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"class LibvirtNeutronFixture(nova_fixtures.NeutronFixture):"}],"source_content_type":"text/x-python","patch_set":52,"id":"5faad753_2fbda501","line":133,"range":{"start_line":97,"start_character":0,"end_line":133,"end_character":64},"in_reply_to":"5faad753_84e5a00b","updated":"2019-09-12 13:51:52.000000000","message":"Ah! I wasn\u0027t aware of these being acceptable past FF. \n\nI spoke to stephenfin about the other changes this morning as I actually came across them first. As I only need to mock out getHostname his approach could work but honestly I\u0027d rather avoid all of the required additional mocking in the test and use the above helper once to start multiple computes each with mocked connections.","commit_id":"1b0f9cc5bc14218764f93dcc17d3327896284e05"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"481f1d8bf30853ef1ab2b0e96a36bc28eca94ece","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            create_disks\u003dcreate_disks)"},{"line_number":95,"context_line":"        return fake_connection"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def _start_heterogeneous_computes(self, host_info_dict,"},{"line_number":98,"context_line":"                                      create_disks\u003dFalse):"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        def start_compute(host, host_info):"},{"line_number":101,"context_line":"            # NOTE(artom) This function is necessary to introduce an"},{"line_number":102,"context_line":"            # intermediate scope between the for loop further down and the"},{"line_number":103,"context_line":"            # lambda. The \u0027lambda: host\u0027 construct takes \u0027host\u0027 from the"},{"line_number":104,"context_line":"            # surrounding scope. If put directly in the for loop, the \u0027host\u0027"},{"line_number":105,"context_line":"            # returned by the lambda would change with every iteration of the"},{"line_number":106,"context_line":"            # loop, giving the libvirt driver the impression that the hostname"},{"line_number":107,"context_line":"            # has changed, and leading to weirdness with which host gets which"},{"line_number":108,"context_line":"            # fake connection. By introducing this function, the lambda takes"},{"line_number":109,"context_line":"            # \u0027host\u0027 from this scope, which is recreated with a new \u0027host\u0027"},{"line_number":110,"context_line":"            # every time it\u0027s called. This ensure each compute service\u0027s host"},{"line_number":111,"context_line":"            # and fake connection remain constant. Google \u0027python lambda scope\u0027"},{"line_number":112,"context_line":"            # for more fun and details."},{"line_number":113,"context_line":"            fake_connection \u003d self._get_connection(host_info\u003dhost_info,"},{"line_number":114,"context_line":"                                                   create_disks\u003dcreate_disks)"},{"line_number":115,"context_line":"            fake_connection.getHostname \u003d lambda: host"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"            # This is fun. Firstly we need to do a global\u0027ish mock so we can"},{"line_number":118,"context_line":"            # actually start the service."},{"line_number":119,"context_line":"            with mock.patch(\u0027nova.virt.libvirt.host.Host.get_connection\u0027,"},{"line_number":120,"context_line":"                            return_value\u003dfake_connection):"},{"line_number":121,"context_line":"                compute \u003d self.start_service(\u0027compute\u0027, host\u003dhost)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"                # Once that\u0027s done, we need to tweak each individual compute"},{"line_number":124,"context_line":"                # \"service\" to make sure they return unique objects. We do this"},{"line_number":125,"context_line":"                # inside the mock context to avoid a small window between the"},{"line_number":126,"context_line":"                # end of the context and the tweaking where get_connection"},{"line_number":127,"context_line":"                # would revert to being an autospec mock."},{"line_number":128,"context_line":"                compute.driver._host.get_connection \u003d lambda: fake_connection"},{"line_number":129,"context_line":"                return compute"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        self.computes \u003d {}"},{"line_number":132,"context_line":"        for host, host_info in host_info_dict.items():"},{"line_number":133,"context_line":"            self.computes[host] \u003d start_compute(host, host_info)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"class LibvirtNeutronFixture(nova_fixtures.NeutronFixture):"}],"source_content_type":"text/x-python","patch_set":52,"id":"5faad753_84e5a00b","line":133,"range":{"start_line":97,"start_character":0,"end_line":133,"end_character":64},"in_reply_to":"5faad753_f8d8bd7b","updated":"2019-09-12 13:15:09.000000000","message":"There are currently another couple of patches in flight [see links below] that solve the same issue - or at least part of it, I have to double check whether it affects just the hostname or both host and connection.\n\nSince func tests are in no hurry to land before FF, and this patch needs to be rebased because of the merge conflict anyways, we can wait until the FF dust settles, and then tackle this.\n\nhttps://review.opendev.org/#/c/681060/\nhttps://review.opendev.org/#/c/678470/24/nova/tests/unit/virt/libvirt/fakelibvirt.py","commit_id":"1b0f9cc5bc14218764f93dcc17d3327896284e05"}],"nova/tests/functional/libvirt/test_numa_live_migration.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"65bc51a8c30a174acf9399f004d6bd9ecaed4172","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        self.assertItemsEqual(host2_topo.cells[0].pinned_cpus, [0, 1])"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        # Since two fakelibvirts cannot actually live migrate an"},{"line_number":210,"context_line":"        # isntance between themselves, we need to hack the destination to give"},{"line_number":211,"context_line":"        # it the migrating instance."},{"line_number":212,"context_line":"        dest \u003d self.computes[self.server2_final_host]"},{"line_number":213,"context_line":"        dest.driver._host.get_connection().defineXML("}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_7a11565d","line":210,"range":{"start_line":210,"start_character":10,"end_line":210,"end_character":18},"updated":"2019-08-27 15:31:12.000000000","message":"instance","commit_id":"676b3cd9ebd18b4c8ee51ebdfb4e6a067836d949"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"54c9be14aa8c8099f17fca1f29652583f9e3d466","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        self.assertItemsEqual(host2_topo.cells[0].pinned_cpus, [0, 1])"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        # Since two fakelibvirts cannot actually live migrate an"},{"line_number":210,"context_line":"        # isntance between themselves, we need to hack the destination to give"},{"line_number":211,"context_line":"        # it the migrating instance."},{"line_number":212,"context_line":"        dest \u003d self.computes[self.server2_final_host]"},{"line_number":213,"context_line":"        dest.driver._host.get_connection().defineXML("}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_36a53204","line":210,"range":{"start_line":210,"start_character":10,"end_line":210,"end_character":18},"in_reply_to":"7faddb67_7a11565d","updated":"2019-08-27 20:11:55.000000000","message":"Done","commit_id":"676b3cd9ebd18b4c8ee51ebdfb4e6a067836d949"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"65bc51a8c30a174acf9399f004d6bd9ecaed4172","unresolved":false,"context_lines":[{"line_number":213,"context_line":"        dest.driver._host.get_connection().defineXML("},{"line_number":214,"context_line":"            params[\u0027destination_xml\u0027], emit_event\u003dFalse)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        # The resource udpate periodic task should not change the consumed"},{"line_number":217,"context_line":"        # CPUs, as the migration is still happening."},{"line_number":218,"context_line":"        self._run_periodics()"},{"line_number":219,"context_line":"        host3_topo \u003d self._get_host_numa_topology(\u0027host3\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_dc0f272d","line":216,"range":{"start_line":216,"start_character":23,"end_line":216,"end_character":29},"updated":"2019-08-27 15:31:12.000000000","message":"update","commit_id":"676b3cd9ebd18b4c8ee51ebdfb4e6a067836d949"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"54c9be14aa8c8099f17fca1f29652583f9e3d466","unresolved":false,"context_lines":[{"line_number":213,"context_line":"        dest.driver._host.get_connection().defineXML("},{"line_number":214,"context_line":"            params[\u0027destination_xml\u0027], emit_event\u003dFalse)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        # The resource udpate periodic task should not change the consumed"},{"line_number":217,"context_line":"        # CPUs, as the migration is still happening."},{"line_number":218,"context_line":"        self._run_periodics()"},{"line_number":219,"context_line":"        host3_topo \u003d self._get_host_numa_topology(\u0027host3\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_96b50635","line":216,"range":{"start_line":216,"start_character":23,"end_line":216,"end_character":29},"in_reply_to":"7faddb67_dc0f272d","updated":"2019-08-27 20:11:55.000000000","message":"Done","commit_id":"676b3cd9ebd18b4c8ee51ebdfb4e6a067836d949"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c152a4076088ffd7c8732e669f07924d6bdf20f8","unresolved":false,"context_lines":[{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        # The resource udpate periodic task should not change the consumed"},{"line_number":217,"context_line":"        # CPUs, as the migration is still happening."},{"line_number":218,"context_line":"        self._run_periodics()"},{"line_number":219,"context_line":"        host3_topo \u003d self._get_host_numa_topology(\u0027host3\u0027)"},{"line_number":220,"context_line":"        host2_topo \u003d self._get_host_numa_topology(\u0027host2\u0027)"},{"line_number":221,"context_line":"        self.assertItemsEqual(host3_topo.cells[0].pinned_cpus, [0, 1, 2])"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_9c7d2fb4","line":218,"updated":"2019-08-27 16:09:23.000000000","message":"Note for other reviewers, I commented this out and the test still passes, so this test doesn\u0027t *depend* on a periodic run.","commit_id":"676b3cd9ebd18b4c8ee51ebdfb4e6a067836d949"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"29811e96cc2092c91a6621dfdc78bdee57c65d77","unresolved":false,"context_lines":[{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        # The resource udpate periodic task should not change the consumed"},{"line_number":217,"context_line":"        # CPUs, as the migration is still happening."},{"line_number":218,"context_line":"        self._run_periodics()"},{"line_number":219,"context_line":"        host3_topo \u003d self._get_host_numa_topology(\u0027host3\u0027)"},{"line_number":220,"context_line":"        host2_topo \u003d self._get_host_numa_topology(\u0027host2\u0027)"},{"line_number":221,"context_line":"        self.assertItemsEqual(host3_topo.cells[0].pinned_cpus, [0, 1, 2])"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_3f28ad31","line":218,"in_reply_to":"7faddb67_9c7d2fb4","updated":"2019-08-27 16:15:58.000000000","message":"Yeah, this was added because Windriver noticed at the end of Stein that the periodic resource update would remove the migration\u0027s usage from the host. So this is more of a regression assertion.","commit_id":"676b3cd9ebd18b4c8ee51ebdfb4e6a067836d949"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c152a4076088ffd7c8732e669f07924d6bdf20f8","unresolved":false,"context_lines":[{"line_number":240,"context_line":"        # contexts."},{"line_number":241,"context_line":"        self._check_server2_pinned_cpus(server2[\u0027id\u0027], server2_final_host)"},{"line_number":242,"context_line":"        self._check_hosts_pinned_cpus(server2_final_host)"},{"line_number":243,"context_line":"        self._run_periodics()"},{"line_number":244,"context_line":"        self._check_hosts_pinned_cpus(server2_final_host)"},{"line_number":245,"context_line":"        self.assertTrue(self.migrate_stub_ran)"},{"line_number":246,"context_line":"        # TODO(artom) It\u0027d be a good idea to live migrate in the other"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_3ceafb73","line":243,"updated":"2019-08-27 16:09:23.000000000","message":"Note for other reviewers, I commented this out and the test still passes, so this test doesn\u0027t *depend* on a periodic run. It also passes with two runs.","commit_id":"676b3cd9ebd18b4c8ee51ebdfb4e6a067836d949"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"29811e96cc2092c91a6621dfdc78bdee57c65d77","unresolved":false,"context_lines":[{"line_number":240,"context_line":"        # contexts."},{"line_number":241,"context_line":"        self._check_server2_pinned_cpus(server2[\u0027id\u0027], server2_final_host)"},{"line_number":242,"context_line":"        self._check_hosts_pinned_cpus(server2_final_host)"},{"line_number":243,"context_line":"        self._run_periodics()"},{"line_number":244,"context_line":"        self._check_hosts_pinned_cpus(server2_final_host)"},{"line_number":245,"context_line":"        self.assertTrue(self.migrate_stub_ran)"},{"line_number":246,"context_line":"        # TODO(artom) It\u0027d be a good idea to live migrate in the other"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_9f18c11e","line":243,"in_reply_to":"7faddb67_3ceafb73","updated":"2019-08-27 16:15:58.000000000","message":"Ditto, just making sure the periodic resource update does its thing correctly.","commit_id":"676b3cd9ebd18b4c8ee51ebdfb4e6a067836d949"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"65bc51a8c30a174acf9399f004d6bd9ecaed4172","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        self._check_hosts_pinned_cpus(server2_final_host)"},{"line_number":245,"context_line":"        self.assertTrue(self.migrate_stub_ran)"},{"line_number":246,"context_line":"        # TODO(artom) It\u0027d be a good idea to live migrate in the other"},{"line_number":247,"context_line":"        # direction here, but current fakelibvirt doens\u0027t allow that."},{"line_number":248,"context_line":""},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"class CPUPinningLiveMigrationRollbackTest(CPUPinningLiveMigrationBase):"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_1c1fff5b","line":247,"range":{"start_line":247,"start_character":50,"end_line":247,"end_character":57},"updated":"2019-08-27 15:31:12.000000000","message":"doesn\u0027t","commit_id":"676b3cd9ebd18b4c8ee51ebdfb4e6a067836d949"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"54c9be14aa8c8099f17fca1f29652583f9e3d466","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        self._check_hosts_pinned_cpus(server2_final_host)"},{"line_number":245,"context_line":"        self.assertTrue(self.migrate_stub_ran)"},{"line_number":246,"context_line":"        # TODO(artom) It\u0027d be a good idea to live migrate in the other"},{"line_number":247,"context_line":"        # direction here, but current fakelibvirt doens\u0027t allow that."},{"line_number":248,"context_line":""},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"class CPUPinningLiveMigrationRollbackTest(CPUPinningLiveMigrationBase):"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_d694de8e","line":247,"range":{"start_line":247,"start_character":50,"end_line":247,"end_character":57},"in_reply_to":"7faddb67_1c1fff5b","updated":"2019-08-27 20:11:55.000000000","message":"Done","commit_id":"676b3cd9ebd18b4c8ee51ebdfb4e6a067836d949"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"65bc51a8c30a174acf9399f004d6bd9ecaed4172","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        self.assertItemsEqual(host3_topo.cells[1].pinned_cpus, [3, 4])"},{"line_number":260,"context_line":"        self.assertItemsEqual(host2_topo.cells[0].pinned_cpus, [0, 1])"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        # The resource udpate periodic task should not change the consumed"},{"line_number":263,"context_line":"        # CPUs, as the migration is still happening."},{"line_number":264,"context_line":"        self._run_periodics()"},{"line_number":265,"context_line":"        host3_topo \u003d self._get_host_numa_topology(\u0027host3\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_1c7b7f7b","line":262,"range":{"start_line":262,"start_character":23,"end_line":262,"end_character":29},"updated":"2019-08-27 15:31:12.000000000","message":"update","commit_id":"676b3cd9ebd18b4c8ee51ebdfb4e6a067836d949"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"54c9be14aa8c8099f17fca1f29652583f9e3d466","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        self.assertItemsEqual(host3_topo.cells[1].pinned_cpus, [3, 4])"},{"line_number":260,"context_line":"        self.assertItemsEqual(host2_topo.cells[0].pinned_cpus, [0, 1])"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        # The resource udpate periodic task should not change the consumed"},{"line_number":263,"context_line":"        # CPUs, as the migration is still happening."},{"line_number":264,"context_line":"        self._run_periodics()"},{"line_number":265,"context_line":"        host3_topo \u003d self._get_host_numa_topology(\u0027host3\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_f68f9a73","line":262,"range":{"start_line":262,"start_character":23,"end_line":262,"end_character":29},"in_reply_to":"7faddb67_1c7b7f7b","updated":"2019-08-27 20:11:55.000000000","message":"Done","commit_id":"676b3cd9ebd18b4c8ee51ebdfb4e6a067836d949"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c152a4076088ffd7c8732e669f07924d6bdf20f8","unresolved":false,"context_lines":[{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        # The resource udpate periodic task should not change the consumed"},{"line_number":263,"context_line":"        # CPUs, as the migration is still happening."},{"line_number":264,"context_line":"        self._run_periodics()"},{"line_number":265,"context_line":"        host3_topo \u003d self._get_host_numa_topology(\u0027host3\u0027)"},{"line_number":266,"context_line":"        host2_topo \u003d self._get_host_numa_topology(\u0027host2\u0027)"},{"line_number":267,"context_line":"        self.assertItemsEqual(host3_topo.cells[0].pinned_cpus, [0, 1, 2])"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_bc510b33","line":264,"updated":"2019-08-27 16:09:23.000000000","message":"Note for other reviewers, I commented this out and the test still passes, so this test doesn\u0027t *depend* on a periodic run.","commit_id":"676b3cd9ebd18b4c8ee51ebdfb4e6a067836d949"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"29811e96cc2092c91a6621dfdc78bdee57c65d77","unresolved":false,"context_lines":[{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        # The resource udpate periodic task should not change the consumed"},{"line_number":263,"context_line":"        # CPUs, as the migration is still happening."},{"line_number":264,"context_line":"        self._run_periodics()"},{"line_number":265,"context_line":"        host3_topo \u003d self._get_host_numa_topology(\u0027host3\u0027)"},{"line_number":266,"context_line":"        host2_topo \u003d self._get_host_numa_topology(\u0027host2\u0027)"},{"line_number":267,"context_line":"        self.assertItemsEqual(host3_topo.cells[0].pinned_cpus, [0, 1, 2])"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_5fd0092c","line":264,"in_reply_to":"7faddb67_bc510b33","updated":"2019-08-27 16:15:58.000000000","message":"And again ditto.","commit_id":"676b3cd9ebd18b4c8ee51ebdfb4e6a067836d949"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"9180d8fc023d0e1ce4f0404b6d120975e83fdfd0","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        # monkeypatch get_instance_path_at_destination() to return a path that"},{"line_number":91,"context_line":"        # cannot possibly exist."},{"line_number":92,"context_line":"        self.useFixture(fixtures.MonkeyPatch("},{"line_number":93,"context_line":"            \u0027nova.virt.libvirt.utils.get_instance_path_at_destination\u0027,"},{"line_number":94,"context_line":"            lambda *args, **kwargs: \u0027\u0027.join([random.choice("},{"line_number":95,"context_line":"                string.ascii_lowercase) for _ in range(20)])))"},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":53,"id":"5faad753_e9da1f49","line":93,"updated":"2019-09-12 21:41:03.000000000","message":"So I think this is leaving behind a bunch of 20-letter-named directories after a test run...","commit_id":"1539f1cc93a36bd6b9d34c92573e3df5a0b9f25f"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8011f1cbd2c0e48d3cbbd1a94e7d31d8861b8969","unresolved":false,"context_lines":[{"line_number":37,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"class _StubComputeRPCAPI(compute_rpcapi.ComputeAPI):"},{"line_number":41,"context_line":"    \"\"\"Stub ComputeAPI that allows us to pin the RPC version of a host. Used to"},{"line_number":42,"context_line":"    simulate rolling upgrade situations where either source, dest or conductor"},{"line_number":43,"context_line":"    are pinned."}],"source_content_type":"text/x-python","patch_set":57,"id":"3fa7e38b_4329cb87","line":40,"range":{"start_line":40,"start_character":6,"end_line":40,"end_character":24},"updated":"2019-10-10 15:38:38.000000000","message":"Any reason this has to be here rather than higher up the module tree, or that it has to be private?","commit_id":"1ebbd1afe500649f57824104f7957b5d5758cd5c"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"780743d35db7ad3139a3ccf8f5cb5152107e14d3","unresolved":false,"context_lines":[{"line_number":37,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"class _StubComputeRPCAPI(compute_rpcapi.ComputeAPI):"},{"line_number":41,"context_line":"    \"\"\"Stub ComputeAPI that allows us to pin the RPC version of a host. Used to"},{"line_number":42,"context_line":"    simulate rolling upgrade situations where either source, dest or conductor"},{"line_number":43,"context_line":"    are pinned."}],"source_content_type":"text/x-python","patch_set":57,"id":"3fa7e38b_9b3831a0","line":40,"range":{"start_line":40,"start_character":6,"end_line":40,"end_character":24},"in_reply_to":"3fa7e38b_4329cb87","updated":"2019-10-24 17:35:15.000000000","message":"True, this could be useful elsewhere in func tests, though I don\u0027t see a natural place for it in the hierarchy - if there was nova/tests/functional/base.py it could do there (I guess test_servers.py is kinda a base, but this could be useful outside servers?), but as it stands... integrated_helpers.py? We can bikeshed on that later.","commit_id":"1ebbd1afe500649f57824104f7957b5d5758cd5c"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8011f1cbd2c0e48d3cbbd1a94e7d31d8861b8969","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        self.admin_api \u003d api_fixture.admin_api"},{"line_number":94,"context_line":"        self.admin_api.microversion \u003d self.microversion"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def _setup_scheduler_service(self):"},{"line_number":97,"context_line":"        \"\"\"Override _IntegratedTestBase\u0027s method to make sure we get the"},{"line_number":98,"context_line":"        NUMATopologyFilter."},{"line_number":99,"context_line":"        \"\"\""},{"line_number":100,"context_line":"        self.flags(driver\u003d\u0027filter_scheduler\u0027, group\u003d\u0027scheduler\u0027)"},{"line_number":101,"context_line":"        self.flags("},{"line_number":102,"context_line":"            enabled_filters\u003dCONF.filter_scheduler.enabled_filters +"},{"line_number":103,"context_line":"                            [\u0027NUMATopologyFilter\u0027],"},{"line_number":104,"context_line":"            group\u003d\u0027filter_scheduler\u0027)"},{"line_number":105,"context_line":"        self.start_service(\u0027scheduler\u0027)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def _get_host(self, server_id):"},{"line_number":108,"context_line":"        server \u003d self.api.get_server(server_id)"}],"source_content_type":"text/x-python","patch_set":57,"id":"3fa7e38b_0396733f","line":105,"range":{"start_line":96,"start_character":0,"end_line":105,"end_character":39},"updated":"2019-10-10 15:38:38.000000000","message":"Don\u0027t do this. Override \u0027ADDITIONAL_FILTERS\u0027 instead. See commit de89b2d83faed631d00ee3814ba1d7bdbb3cdf1b","commit_id":"1ebbd1afe500649f57824104f7957b5d5758cd5c"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"780743d35db7ad3139a3ccf8f5cb5152107e14d3","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        self.admin_api \u003d api_fixture.admin_api"},{"line_number":94,"context_line":"        self.admin_api.microversion \u003d self.microversion"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def _setup_scheduler_service(self):"},{"line_number":97,"context_line":"        \"\"\"Override _IntegratedTestBase\u0027s method to make sure we get the"},{"line_number":98,"context_line":"        NUMATopologyFilter."},{"line_number":99,"context_line":"        \"\"\""},{"line_number":100,"context_line":"        self.flags(driver\u003d\u0027filter_scheduler\u0027, group\u003d\u0027scheduler\u0027)"},{"line_number":101,"context_line":"        self.flags("},{"line_number":102,"context_line":"            enabled_filters\u003dCONF.filter_scheduler.enabled_filters +"},{"line_number":103,"context_line":"                            [\u0027NUMATopologyFilter\u0027],"},{"line_number":104,"context_line":"            group\u003d\u0027filter_scheduler\u0027)"},{"line_number":105,"context_line":"        self.start_service(\u0027scheduler\u0027)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def _get_host(self, server_id):"},{"line_number":108,"context_line":"        server \u003d self.api.get_server(server_id)"}],"source_content_type":"text/x-python","patch_set":57,"id":"3fa7e38b_5b0b997b","line":105,"range":{"start_line":96,"start_character":0,"end_line":105,"end_character":39},"in_reply_to":"3fa7e38b_0396733f","updated":"2019-10-24 17:35:15.000000000","message":"Done","commit_id":"1ebbd1afe500649f57824104f7957b5d5758cd5c"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8011f1cbd2c0e48d3cbbd1a94e7d31d8861b8969","unresolved":false,"context_lines":[{"line_number":104,"context_line":"            group\u003d\u0027filter_scheduler\u0027)"},{"line_number":105,"context_line":"        self.start_service(\u0027scheduler\u0027)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def _get_host(self, server_id):"},{"line_number":108,"context_line":"        server \u003d self.api.get_server(server_id)"},{"line_number":109,"context_line":"        return server[\u0027OS-EXT-SRV-ATTR:host\u0027]"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    def _assert_no_migration_context(self, instance_uuid):"},{"line_number":112,"context_line":"        ctxt \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":57,"id":"3fa7e38b_03af537d","line":109,"range":{"start_line":107,"start_character":0,"end_line":109,"end_character":45},"updated":"2019-10-10 15:38:38.000000000","message":"Can you move this to the base class (nova.tests.functional.test_servers.ServersTestBase) since I see a lot of references to this field in other tests and therefore this is likely to be useful","commit_id":"1ebbd1afe500649f57824104f7957b5d5758cd5c"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"780743d35db7ad3139a3ccf8f5cb5152107e14d3","unresolved":false,"context_lines":[{"line_number":104,"context_line":"            group\u003d\u0027filter_scheduler\u0027)"},{"line_number":105,"context_line":"        self.start_service(\u0027scheduler\u0027)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def _get_host(self, server_id):"},{"line_number":108,"context_line":"        server \u003d self.api.get_server(server_id)"},{"line_number":109,"context_line":"        return server[\u0027OS-EXT-SRV-ATTR:host\u0027]"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    def _assert_no_migration_context(self, instance_uuid):"},{"line_number":112,"context_line":"        ctxt \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":57,"id":"3fa7e38b_1bdc41e2","line":109,"range":{"start_line":107,"start_character":0,"end_line":109,"end_character":45},"in_reply_to":"3fa7e38b_03af537d","updated":"2019-10-24 17:35:15.000000000","message":"I\u0027m not sure this is that useful outside of the NUMA LM tests. For one thing, it assumes self.api is the admin api (because for any LM you need to be admin), for another, it really only exists because I hate passing the full server JSON around because you never know which level of nesting you then need to use to access the fiels. Sometimes it\u0027s server[\u0027server\u0027][\u0027id\u0027], other times it\u0027s server[\u0027id\u0027], you get the idea.\n\nIf we really want to, can we refactor this in a follow up?","commit_id":"1ebbd1afe500649f57824104f7957b5d5758cd5c"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8011f1cbd2c0e48d3cbbd1a94e7d31d8861b8969","unresolved":false,"context_lines":[{"line_number":145,"context_line":"            context\u003dctxt)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def _start_3_2_computes(self):"},{"line_number":148,"context_line":"        \"\"\"Starts 2 computes: one with 5 CPUs split 3/2 across 2 NUMA cells,"},{"line_number":149,"context_line":"        one with a single 2-CPU NUMA cell."},{"line_number":150,"context_line":"        \"\"\""},{"line_number":151,"context_line":"        self._start_heterogeneous_computes({"}],"source_content_type":"text/x-python","patch_set":57,"id":"3fa7e38b_839b4371","line":148,"range":{"start_line":148,"start_character":52,"end_line":148,"end_character":76},"updated":"2019-10-10 15:38:38.000000000","message":"As noted elsewhere, this seems mad. Can this actually occur in reality? If not, why do we care?","commit_id":"1ebbd1afe500649f57824104f7957b5d5758cd5c"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"570ca9804bf6f0fe15a7de016323170002f6c477","unresolved":false,"context_lines":[{"line_number":145,"context_line":"            context\u003dctxt)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def _start_3_2_computes(self):"},{"line_number":148,"context_line":"        \"\"\"Starts 2 computes: one with 5 CPUs split 3/2 across 2 NUMA cells,"},{"line_number":149,"context_line":"        one with a single 2-CPU NUMA cell."},{"line_number":150,"context_line":"        \"\"\""},{"line_number":151,"context_line":"        self._start_heterogeneous_computes({"}],"source_content_type":"text/x-python","patch_set":57,"id":"3fa7e38b_9c70800a","line":148,"in_reply_to":"","updated":"2019-10-10 17:05:06.000000000","message":"You can (though using the latest microversion you can no longer force anything, it\u0027ll go through the scheduler regardless as of 2.67, not sure if that\u0027s relevant here though). But we can\u0027t force to a specific NUMA node.\n\nAnd frankly, why is it a problem? I mean, we\u0027re using fakelibvirt, which seems like a way more significant departure from reality than weird NUMA topologies.","commit_id":"1ebbd1afe500649f57824104f7957b5d5758cd5c"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"86e06d3bdd84a61be291193dfa33de3472203a85","unresolved":false,"context_lines":[{"line_number":145,"context_line":"            context\u003dctxt)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def _start_3_2_computes(self):"},{"line_number":148,"context_line":"        \"\"\"Starts 2 computes: one with 5 CPUs split 3/2 across 2 NUMA cells,"},{"line_number":149,"context_line":"        one with a single 2-CPU NUMA cell."},{"line_number":150,"context_line":"        \"\"\""},{"line_number":151,"context_line":"        self._start_heterogeneous_computes({"}],"source_content_type":"text/x-python","patch_set":57,"id":"3fa7e38b_9c2f2087","line":148,"range":{"start_line":148,"start_character":52,"end_line":148,"end_character":76},"in_reply_to":"3fa7e38b_839b4371","updated":"2019-10-10 16:20:39.000000000","message":"Yep, totally wild and unrealistic. It\u0027s a way to force specifically-crafted instances to land in specific places, so that we can assert stuff about which CPUs are pinned in a 100% deterministic way. In my whitebox integration tests I can just change vcpu_pin_set per compute, but in func tests CONF is global for all computes. I can\u0027t think of a way of achieving the same thing when using realistic NUMA topologies. For instance, 2 hosts with 2 NUMA cells each, 4 CPUs per cell. Boot an instance with 4 CPUs. Where does it land? No idea. Live migrate it. Where does it go? No idea. With these 2-cell and 2/3-cell hosts, a 3-CPU instance can *only* go in the 3-cell, which leaves the 2-CPU instance to move around between the 2 2-cells, and because the first 2-cell is [0, 1] and the second [3, 4], it gives us meaningful assertions to make about which CPUs are pinned at what time.","commit_id":"1ebbd1afe500649f57824104f7957b5d5758cd5c"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"e85177a9ed74b0fb199ac1891aa4042c518d3451","unresolved":false,"context_lines":[{"line_number":145,"context_line":"            context\u003dctxt)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def _start_3_2_computes(self):"},{"line_number":148,"context_line":"        \"\"\"Starts 2 computes: one with 5 CPUs split 3/2 across 2 NUMA cells,"},{"line_number":149,"context_line":"        one with a single 2-CPU NUMA cell."},{"line_number":150,"context_line":"        \"\"\""},{"line_number":151,"context_line":"        self._start_heterogeneous_computes({"}],"source_content_type":"text/x-python","patch_set":57,"id":"3fa7e38b_1c37b04f","line":148,"range":{"start_line":148,"start_character":52,"end_line":148,"end_character":76},"in_reply_to":"3fa7e38b_9c2f2087","updated":"2019-10-10 16:57:16.000000000","message":"Can\u0027t you choose a host to live migrate to now or is that just cold migration?","commit_id":"1ebbd1afe500649f57824104f7957b5d5758cd5c"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8011f1cbd2c0e48d3cbbd1a94e7d31d8861b8969","unresolved":false,"context_lines":[{"line_number":605,"context_line":"    def test_different_page_sizes(self):"},{"line_number":606,"context_line":"        self._start_heterogeneous_computes({"},{"line_number":607,"context_line":"            \u0027host_a\u0027: fakelibvirt.HostInfo("},{"line_number":608,"context_line":"                numa_topology\u003dfakelibvirt.NUMATopology("},{"line_number":609,"context_line":"                    cpu_nodes\u003d1, cpu_sockets\u003d2, cpu_cores\u003d1, cpu_threads\u003d1,"},{"line_number":610,"context_line":"                    kB_mem\u003d1024000,"},{"line_number":611,"context_line":"                    mempages\u003d{0: fakelibvirt.create_mempages("},{"line_number":612,"context_line":"                        [(4, 256000), (1024, 1000)])})),"},{"line_number":613,"context_line":"            \u0027host_b\u0027: fakelibvirt.HostInfo("},{"line_number":614,"context_line":"                numa_topology\u003dfakelibvirt.NUMATopology("},{"line_number":615,"context_line":"                    cpu_nodes\u003d1, cpu_sockets\u003d2, cpu_cores\u003d1, cpu_threads\u003d1,"}],"source_content_type":"text/x-python","patch_set":57,"id":"3fa7e38b_c3f93bc8","line":612,"range":{"start_line":608,"start_character":0,"end_line":612,"end_character":56},"updated":"2019-10-10 15:38:38.000000000","message":"I\u0027m guessing this is the reason for the changes at [1]. However, the way you\u0027ve done this is going to result in multiple fields on that object being incorrect. Any reason you couldn\u0027t just add a \u0027mempages\u0027 argument to the HostInfo function if you want to expose that, so we can continue generating the NUMATopology object instead of having to do it statically?\n\n[1] https://review.opendev.org/#/c/672595/57/nova/tests/unit/virt/libvirt/fakelibvirt.py@474","commit_id":"1ebbd1afe500649f57824104f7957b5d5758cd5c"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"780743d35db7ad3139a3ccf8f5cb5152107e14d3","unresolved":false,"context_lines":[{"line_number":605,"context_line":"    def test_different_page_sizes(self):"},{"line_number":606,"context_line":"        self._start_heterogeneous_computes({"},{"line_number":607,"context_line":"            \u0027host_a\u0027: fakelibvirt.HostInfo("},{"line_number":608,"context_line":"                numa_topology\u003dfakelibvirt.NUMATopology("},{"line_number":609,"context_line":"                    cpu_nodes\u003d1, cpu_sockets\u003d2, cpu_cores\u003d1, cpu_threads\u003d1,"},{"line_number":610,"context_line":"                    kB_mem\u003d1024000,"},{"line_number":611,"context_line":"                    mempages\u003d{0: fakelibvirt.create_mempages("},{"line_number":612,"context_line":"                        [(4, 256000), (1024, 1000)])})),"},{"line_number":613,"context_line":"            \u0027host_b\u0027: fakelibvirt.HostInfo("},{"line_number":614,"context_line":"                numa_topology\u003dfakelibvirt.NUMATopology("},{"line_number":615,"context_line":"                    cpu_nodes\u003d1, cpu_sockets\u003d2, cpu_cores\u003d1, cpu_threads\u003d1,"}],"source_content_type":"text/x-python","patch_set":57,"id":"3fa7e38b_9c6bce1d","line":612,"range":{"start_line":608,"start_character":0,"end_line":612,"end_character":56},"in_reply_to":"3fa7e38b_c3f93bc8","updated":"2019-10-24 17:35:15.000000000","message":"Done","commit_id":"1ebbd1afe500649f57824104f7957b5d5758cd5c"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"dac6a2d75462fd6c2f913d299777660396f377ba","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        self.admin_api \u003d api_fixture.admin_api"},{"line_number":70,"context_line":"        self.admin_api.microversion \u003d self.microversion"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def _get_host(self, server_id):"},{"line_number":73,"context_line":"        server \u003d self.api.get_server(server_id)"},{"line_number":74,"context_line":"        return server[\u0027OS-EXT-SRV-ATTR:host\u0027]"},{"line_number":75,"context_line":""}],"source_content_type":"text/x-python","patch_set":59,"id":"3fa7e38b_888629ba","line":72,"range":{"start_line":72,"start_character":8,"end_line":72,"end_character":9},"updated":"2019-11-14 17:40:05.000000000","message":"nit: We don\u0027t really need to mark these as private since this is test code and the idea of private methods doesn\u0027t really make sense here. I\u0027m as guilty of doing this as anyone though","commit_id":"1f6b648d4e13d458e8fdd52beab22ba1d1672f9d"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"e3e3c7a7ac530ee8c0144ff713a5e969e3f2787f","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        self.admin_api \u003d api_fixture.admin_api"},{"line_number":70,"context_line":"        self.admin_api.microversion \u003d self.microversion"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def _get_host(self, server_id):"},{"line_number":73,"context_line":"        server \u003d self.api.get_server(server_id)"},{"line_number":74,"context_line":"        return server[\u0027OS-EXT-SRV-ATTR:host\u0027]"},{"line_number":75,"context_line":""}],"source_content_type":"text/x-python","patch_set":59,"id":"3fa7e38b_48ffbf01","line":72,"range":{"start_line":72,"start_character":8,"end_line":72,"end_character":9},"in_reply_to":"3fa7e38b_888629ba","updated":"2019-11-19 20:32:41.000000000","message":"Done","commit_id":"1f6b648d4e13d458e8fdd52beab22ba1d1672f9d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"cd7889a40658626af74797a58c330dc3f0c2546e","unresolved":false,"context_lines":[{"line_number":64,"context_line":"            \u0027_live_migration_cleanup_flags\u0027,"},{"line_number":65,"context_line":"            lambda *args, **kwargs: (True, True)))"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        api_fixture \u003d self.useFixture(nova_fixtures.OSAPIFixture("},{"line_number":68,"context_line":"            api_version\u003d\u0027v2.1\u0027))"},{"line_number":69,"context_line":"        self.admin_api \u003d api_fixture.admin_api"},{"line_number":70,"context_line":"        self.admin_api.microversion \u003d self.microversion"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def get_host(self, server_id):"},{"line_number":73,"context_line":"        server \u003d self.api.get_server(server_id)"}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_50717676","line":70,"range":{"start_line":67,"start_character":0,"end_line":70,"end_character":55},"updated":"2019-12-09 17:37:16.000000000","message":"We get this for free from \u0027_setup_services\u0027 in \u0027_IntegratedTestBase\u0027 (which is the \"grandparent\" of \u0027base.ServersTestBase\u0027). Why do we need it here?","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"a30c84be97d1b39d5bdba9d0aab67835d4dfc3ca","unresolved":false,"context_lines":[{"line_number":64,"context_line":"            \u0027_live_migration_cleanup_flags\u0027,"},{"line_number":65,"context_line":"            lambda *args, **kwargs: (True, True)))"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        api_fixture \u003d self.useFixture(nova_fixtures.OSAPIFixture("},{"line_number":68,"context_line":"            api_version\u003d\u0027v2.1\u0027))"},{"line_number":69,"context_line":"        self.admin_api \u003d api_fixture.admin_api"},{"line_number":70,"context_line":"        self.admin_api.microversion \u003d self.microversion"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def get_host(self, server_id):"},{"line_number":73,"context_line":"        server \u003d self.api.get_server(server_id)"}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_da452a9d","line":70,"range":{"start_line":67,"start_character":0,"end_line":70,"end_character":55},"in_reply_to":"3fa7e38b_50717676","updated":"2020-01-13 20:15:17.000000000","message":"Because I\u0027m a noob? :) Done (but had to add ADMIN_API \u003d True as a class var).","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"cd7889a40658626af74797a58c330dc3f0c2546e","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def get_host(self, server_id):"},{"line_number":73,"context_line":"        server \u003d self.api.get_server(server_id)"},{"line_number":74,"context_line":"        return server[\u0027OS-EXT-SRV-ATTR:host\u0027]"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def _assert_no_migration_context(self, instance_uuid):"},{"line_number":77,"context_line":"        ctxt \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_10153ee6","line":74,"updated":"2019-12-09 17:37:16.000000000","message":"Not needed here, but there are enough users of this that it probably makes sense to add this to one of the helpers in \u0027integrated_helpers\u0027 when you\u0027re adding it","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"a30c84be97d1b39d5bdba9d0aab67835d4dfc3ca","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def get_host(self, server_id):"},{"line_number":73,"context_line":"        server \u003d self.api.get_server(server_id)"},{"line_number":74,"context_line":"        return server[\u0027OS-EXT-SRV-ATTR:host\u0027]"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def _assert_no_migration_context(self, instance_uuid):"},{"line_number":77,"context_line":"        ctxt \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_3e0b6b2b","line":74,"in_reply_to":"3fa7e38b_10153ee6","updated":"2020-01-13 20:15:17.000000000","message":"Yeah, you brought this up on PS57 as well - see reply there.","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"41ceb98d61122308beef278ca6a3d95db67cf811","unresolved":false,"context_lines":[{"line_number":121,"context_line":"                cpu_nodes\u003d1, cpu_sockets\u003d2, cpu_cores\u003d1, cpu_threads\u003d1,"},{"line_number":122,"context_line":"                kB_mem\u003d10740000)})"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def _create_3_2_flavors(self):"},{"line_number":125,"context_line":"        \"\"\"Creates flavors with 2 and 3 vCPUs, such that each flavor \"fills\" a"},{"line_number":126,"context_line":"        NUMA cell."},{"line_number":127,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_f5937457","line":124,"range":{"start_line":124,"start_character":8,"end_line":124,"end_character":27},"updated":"2019-12-13 03:14:38.000000000","message":"How about rename this to \"_create_3_and_2_vpus_flavors\" or \"_create_flavor_with_3_and_2_vcpus\"?","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"a30c84be97d1b39d5bdba9d0aab67835d4dfc3ca","unresolved":false,"context_lines":[{"line_number":121,"context_line":"                cpu_nodes\u003d1, cpu_sockets\u003d2, cpu_cores\u003d1, cpu_threads\u003d1,"},{"line_number":122,"context_line":"                kB_mem\u003d10740000)})"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def _create_3_2_flavors(self):"},{"line_number":125,"context_line":"        \"\"\"Creates flavors with 2 and 3 vCPUs, such that each flavor \"fills\" a"},{"line_number":126,"context_line":"        NUMA cell."},{"line_number":127,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_7524471b","line":124,"range":{"start_line":124,"start_character":8,"end_line":124,"end_character":27},"in_reply_to":"3fa7e38b_f5937457","updated":"2020-01-13 20:15:17.000000000","message":"This is moot, see Stephen\u0027s comments on L304.","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"41ceb98d61122308beef278ca6a3d95db67cf811","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        flavor2 \u003d self._create_flavor(vcpu\u003d2, extra_spec\u003dextra_spec)"},{"line_number":132,"context_line":"        return flavor3, flavor2"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def _boot_server3(self, flavor3):"},{"line_number":135,"context_line":"        \"\"\"Boots a server with 3 vCPUs and makes sure it\u0027s pinned to the 3-CPU"},{"line_number":136,"context_line":"        cell of host3, as it can\u0027t fit anywhere else."},{"line_number":137,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_359cac59","line":134,"range":{"start_line":134,"start_character":8,"end_line":134,"end_character":21},"updated":"2019-12-13 03:14:38.000000000","message":"From the function name I don\u0027t know what would you want to do. How about rename to \"_boot_server_with_3_vcpus\"? I think it will be made read easily.","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"a30c84be97d1b39d5bdba9d0aab67835d4dfc3ca","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        flavor2 \u003d self._create_flavor(vcpu\u003d2, extra_spec\u003dextra_spec)"},{"line_number":132,"context_line":"        return flavor3, flavor2"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def _boot_server3(self, flavor3):"},{"line_number":135,"context_line":"        \"\"\"Boots a server with 3 vCPUs and makes sure it\u0027s pinned to the 3-CPU"},{"line_number":136,"context_line":"        cell of host3, as it can\u0027t fit anywhere else."},{"line_number":137,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_b5487fb4","line":134,"range":{"start_line":134,"start_character":8,"end_line":134,"end_character":21},"in_reply_to":"3fa7e38b_359cac59","updated":"2020-01-13 20:15:17.000000000","message":"Ditto.","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"41ceb98d61122308beef278ca6a3d95db67cf811","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        self.assertItemsEqual(server3_topo.cells[0].cpu_pinning_raw.values(),"},{"line_number":156,"context_line":"                              [0, 1, 2])"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def _boot_server2(self, flavor2):"},{"line_number":159,"context_line":"        \"\"\"Boots a server with 2 vCPUs. It can fit either on the lone 2-pCPU"},{"line_number":160,"context_line":"        cell of host2, or on the 2-pCPU cell of host3. In either case, we make"},{"line_number":161,"context_line":"        sure its CPU pins are what we expect based on the host, and that the"}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_f5a13493","line":158,"range":{"start_line":158,"start_character":8,"end_line":158,"end_character":21},"updated":"2019-12-13 03:14:38.000000000","message":"ditto.","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"a30c84be97d1b39d5bdba9d0aab67835d4dfc3ca","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        self.assertItemsEqual(server3_topo.cells[0].cpu_pinning_raw.values(),"},{"line_number":156,"context_line":"                              [0, 1, 2])"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def _boot_server2(self, flavor2):"},{"line_number":159,"context_line":"        \"\"\"Boots a server with 2 vCPUs. It can fit either on the lone 2-pCPU"},{"line_number":160,"context_line":"        cell of host2, or on the 2-pCPU cell of host3. In either case, we make"},{"line_number":161,"context_line":"        sure its CPU pins are what we expect based on the host, and that the"}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_d545fb9c","line":158,"range":{"start_line":158,"start_character":8,"end_line":158,"end_character":21},"in_reply_to":"3fa7e38b_f5a13493","updated":"2020-01-13 20:15:17.000000000","message":"Ditto.","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"cd7889a40658626af74797a58c330dc3f0c2546e","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        self._check_hosts_pinned_cpus(server2_initial_host)"},{"line_number":174,"context_line":"        return server2, server2_initial_host"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def _live_migrate_server2(self, server2, expect_success\u003dTrue,"},{"line_number":177,"context_line":"                              pin_dest\u003dFalse):"},{"line_number":178,"context_line":"        \"\"\"Live migrate server2, making sure it moved to the expected host. If"},{"line_number":179,"context_line":"        expect_success is False, that host is the same as the initial host."}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_101bfeca","line":176,"range":{"start_line":176,"start_character":8,"end_line":176,"end_character":29},"updated":"2019-12-09 17:37:16.000000000","message":"Could you make this a bit more generic? Given that we\u0027re providing the server response \"object\" here, there isn\u0027t really anything specific to server2. Perhaps you could also move the assertion about the end destination into the caller since there are only two of them and they provide the two different values #localityFTW","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"a30c84be97d1b39d5bdba9d0aab67835d4dfc3ca","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        self._check_hosts_pinned_cpus(server2_initial_host)"},{"line_number":174,"context_line":"        return server2, server2_initial_host"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def _live_migrate_server2(self, server2, expect_success\u003dTrue,"},{"line_number":177,"context_line":"                              pin_dest\u003dFalse):"},{"line_number":178,"context_line":"        \"\"\"Live migrate server2, making sure it moved to the expected host. If"},{"line_number":179,"context_line":"        expect_success is False, that host is the same as the initial host."}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_d03e6925","line":176,"range":{"start_line":176,"start_character":8,"end_line":176,"end_character":29},"in_reply_to":"3fa7e38b_101bfeca","updated":"2020-01-13 20:15:17.000000000","message":"Done, but then I\u0027ve had to factor out the pinning stuff, as it requires knowing the dest, which this method no longer does. That\u0027s actually a good thing, I lost sight of \"small, single-thing methods\" in this patch.","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"cd7889a40658626af74797a58c330dc3f0c2546e","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        if pin_dest:"},{"line_number":195,"context_line":"            dest_mgr.compute_rpcapi \u003d integrated_helpers.StubComputeRPCAPI("},{"line_number":196,"context_line":"                \u00275.2\u0027)"},{"line_number":197,"context_line":"        self.assertEqual("},{"line_number":198,"context_line":"            not pin_dest,"},{"line_number":199,"context_line":"            dest_mgr.compute_rpcapi.router.client("},{"line_number":200,"context_line":"                ctxt).can_send_version(\u00275.3\u0027))"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"        self.api.post_server_action("},{"line_number":203,"context_line":"            server2[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_5053b66c","line":200,"range":{"start_line":197,"start_character":0,"end_line":200,"end_character":46},"updated":"2019-12-09 17:37:16.000000000","message":"I get what you\u0027re trying to do but:\n\n  _can_send \u003d dest_mgr.compute_rpcapi.router.client(\n      ctxt).can_send_version(\u00275.3\u0027))\n  if pin_dest:\n      self.assertTrue(_can_send)\n  else:\n      self.assertFalse(_can_send)\n\nif one line more and a more grokable (IMO, obv)","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"a30c84be97d1b39d5bdba9d0aab67835d4dfc3ca","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        if pin_dest:"},{"line_number":195,"context_line":"            dest_mgr.compute_rpcapi \u003d integrated_helpers.StubComputeRPCAPI("},{"line_number":196,"context_line":"                \u00275.2\u0027)"},{"line_number":197,"context_line":"        self.assertEqual("},{"line_number":198,"context_line":"            not pin_dest,"},{"line_number":199,"context_line":"            dest_mgr.compute_rpcapi.router.client("},{"line_number":200,"context_line":"                ctxt).can_send_version(\u00275.3\u0027))"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"        self.api.post_server_action("},{"line_number":203,"context_line":"            server2[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_b052cd35","line":200,"range":{"start_line":197,"start_character":0,"end_line":200,"end_character":46},"in_reply_to":"3fa7e38b_5053b66c","updated":"2020-01-13 20:15:17.000000000","message":"With the pinning stuff factored out into its own method, this is moot.","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"cd7889a40658626af74797a58c330dc3f0c2546e","unresolved":false,"context_lines":[{"line_number":204,"context_line":"            {\u0027os-migrateLive\u0027: {\u0027host\u0027: None,"},{"line_number":205,"context_line":"                                \u0027block_migration\u0027: \u0027auto\u0027}})"},{"line_number":206,"context_line":"        self._wait_for_server_parameter(self.api, server2,"},{"line_number":207,"context_line":"                                        {\u0027status\u0027: \u0027ACTIVE\u0027})"},{"line_number":208,"context_line":"        self.assertEqual(self.server2_final_host,"},{"line_number":209,"context_line":"                         self.get_host(server2[\u0027id\u0027]))"},{"line_number":210,"context_line":""}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_d0c48610","line":207,"updated":"2019-12-09 17:37:16.000000000","message":"Hmm, don\u0027t we have to confirm live migrations? I\u0027d have expected a different state if so. If we do but you\u0027re doing something to avoid that requirements, can you describe that here? If not, ignore me /o\\","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"a30c84be97d1b39d5bdba9d0aab67835d4dfc3ca","unresolved":false,"context_lines":[{"line_number":204,"context_line":"            {\u0027os-migrateLive\u0027: {\u0027host\u0027: None,"},{"line_number":205,"context_line":"                                \u0027block_migration\u0027: \u0027auto\u0027}})"},{"line_number":206,"context_line":"        self._wait_for_server_parameter(self.api, server2,"},{"line_number":207,"context_line":"                                        {\u0027status\u0027: \u0027ACTIVE\u0027})"},{"line_number":208,"context_line":"        self.assertEqual(self.server2_final_host,"},{"line_number":209,"context_line":"                         self.get_host(server2[\u0027id\u0027]))"},{"line_number":210,"context_line":""}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_393945d7","line":207,"in_reply_to":"3fa7e38b_d0c48610","updated":"2020-01-13 20:15:17.000000000","message":"Nope, they just go until they\u0027re finished.","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"cd7889a40658626af74797a58c330dc3f0c2546e","unresolved":false,"context_lines":[{"line_number":226,"context_line":"            self.assertItemsEqual(host3_topo.cells[1].pinned_cpus, [3, 4])"},{"line_number":227,"context_line":"            self.assertFalse(host2_topo.cells[0].pinned_cpus)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    def _check_server2_pinned_cpus(self, server2_id, server2_host):"},{"line_number":230,"context_line":"        \"\"\"Checks that server2 is pinned to the correct pCPUs. This will depend"},{"line_number":231,"context_line":"        on which host it\u0027s on. On host3 with the 3/2 NUMA cells, server2 should"},{"line_number":232,"context_line":"        be pinned on the 2-pCPU NUMA cell. On host2 with the single 2-pCPU"}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_b0e8ea7a","line":229,"range":{"start_line":229,"start_character":8,"end_line":229,"end_character":34},"updated":"2019-12-09 17:37:16.000000000","message":"This feels like you\u0027re testing implementation details. Is there anyway to check things to ensure this server\u0027s pinned CPUs simply don\u0027t overlap with those of other servers? We don\u0027t actually care where it lands","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"a30c84be97d1b39d5bdba9d0aab67835d4dfc3ca","unresolved":false,"context_lines":[{"line_number":226,"context_line":"            self.assertItemsEqual(host3_topo.cells[1].pinned_cpus, [3, 4])"},{"line_number":227,"context_line":"            self.assertFalse(host2_topo.cells[0].pinned_cpus)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    def _check_server2_pinned_cpus(self, server2_id, server2_host):"},{"line_number":230,"context_line":"        \"\"\"Checks that server2 is pinned to the correct pCPUs. This will depend"},{"line_number":231,"context_line":"        on which host it\u0027s on. On host3 with the 3/2 NUMA cells, server2 should"},{"line_number":232,"context_line":"        be pinned on the 2-pCPU NUMA cell. On host2 with the single 2-pCPU"}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_d62e628c","line":229,"range":{"start_line":229,"start_character":8,"end_line":229,"end_character":34},"in_reply_to":"3fa7e38b_b0e8ea7a","updated":"2020-01-13 20:15:17.000000000","message":"The way the fake hosts are setup, the 2-vcpu server and 3-vcpu server could be on different hosts - in which case they would be pinned to [0, 1] and [0, 1, 2] respectively, which do overlap. I\u0027ll rephrase my note.","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"cd7889a40658626af74797a58c330dc3f0c2546e","unresolved":false,"context_lines":[{"line_number":236,"context_line":"        server2_topo \u003d objects.InstanceNUMATopology.get_by_instance_uuid("},{"line_number":237,"context_line":"            ctxt, server2_id)"},{"line_number":238,"context_line":"        self.assertEqual(1, len(server2_topo.cells))"},{"line_number":239,"context_line":"        self.assertItemsEqual(server2_topo.cells[0].cpu_pinning_raw.keys(),"},{"line_number":240,"context_line":"                              [\u00270\u0027, \u00271\u0027])"},{"line_number":241,"context_line":"        server2_pcpus \u003d server2_topo.cells[0].cpu_pinning_raw.values()"},{"line_number":242,"context_line":"        if server2_host \u003d\u003d \u0027host2\u0027:"},{"line_number":243,"context_line":"            self.assertItemsEqual(server2_pcpus, [0, 1])"}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_10f77e5c","line":240,"range":{"start_line":239,"start_character":30,"end_line":240,"end_character":40},"updated":"2019-12-09 17:37:16.000000000","message":"nit: switch the order of these or your error message, if it were raised, will be wrong","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"a30c84be97d1b39d5bdba9d0aab67835d4dfc3ca","unresolved":false,"context_lines":[{"line_number":236,"context_line":"        server2_topo \u003d objects.InstanceNUMATopology.get_by_instance_uuid("},{"line_number":237,"context_line":"            ctxt, server2_id)"},{"line_number":238,"context_line":"        self.assertEqual(1, len(server2_topo.cells))"},{"line_number":239,"context_line":"        self.assertItemsEqual(server2_topo.cells[0].cpu_pinning_raw.keys(),"},{"line_number":240,"context_line":"                              [\u00270\u0027, \u00271\u0027])"},{"line_number":241,"context_line":"        server2_pcpus \u003d server2_topo.cells[0].cpu_pinning_raw.values()"},{"line_number":242,"context_line":"        if server2_host \u003d\u003d \u0027host2\u0027:"},{"line_number":243,"context_line":"            self.assertItemsEqual(server2_pcpus, [0, 1])"}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_76552ef9","line":240,"range":{"start_line":239,"start_character":30,"end_line":240,"end_character":40},"in_reply_to":"3fa7e38b_10f77e5c","updated":"2020-01-13 20:15:17.000000000","message":"Done","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"cd7889a40658626af74797a58c330dc3f0c2546e","unresolved":false,"context_lines":[{"line_number":267,"context_line":"        # to be consumed."},{"line_number":268,"context_line":"        host3_topo \u003d self._get_host_numa_topology(\u0027host3\u0027)"},{"line_number":269,"context_line":"        host2_topo \u003d self._get_host_numa_topology(\u0027host2\u0027)"},{"line_number":270,"context_line":"        self.assertItemsEqual(host3_topo.cells[0].pinned_cpus, [0, 1, 2])"},{"line_number":271,"context_line":"        self.assertItemsEqual(host3_topo.cells[1].pinned_cpus, [3, 4])"},{"line_number":272,"context_line":"        self.assertItemsEqual(host2_topo.cells[0].pinned_cpus, [0, 1])"},{"line_number":273,"context_line":""}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_90f92e83","line":270,"range":{"start_line":270,"start_character":0,"end_line":270,"end_character":73},"updated":"2019-12-09 17:37:16.000000000","message":"This is used by the other instance, I assume","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"a30c84be97d1b39d5bdba9d0aab67835d4dfc3ca","unresolved":false,"context_lines":[{"line_number":267,"context_line":"        # to be consumed."},{"line_number":268,"context_line":"        host3_topo \u003d self._get_host_numa_topology(\u0027host3\u0027)"},{"line_number":269,"context_line":"        host2_topo \u003d self._get_host_numa_topology(\u0027host2\u0027)"},{"line_number":270,"context_line":"        self.assertItemsEqual(host3_topo.cells[0].pinned_cpus, [0, 1, 2])"},{"line_number":271,"context_line":"        self.assertItemsEqual(host3_topo.cells[1].pinned_cpus, [3, 4])"},{"line_number":272,"context_line":"        self.assertItemsEqual(host2_topo.cells[0].pinned_cpus, [0, 1])"},{"line_number":273,"context_line":""}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_f6403e35","line":270,"range":{"start_line":270,"start_character":0,"end_line":270,"end_character":73},"in_reply_to":"3fa7e38b_90f92e83","updated":"2020-01-13 20:15:17.000000000","message":"Yeah, I\u0027ll add a note.","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"cd7889a40658626af74797a58c330dc3f0c2546e","unresolved":false,"context_lines":[{"line_number":277,"context_line":"        dest \u003d self.computes[self.server2_final_host]"},{"line_number":278,"context_line":"        dest.driver._host.get_connection().createXML("},{"line_number":279,"context_line":"            params[\u0027destination_xml\u0027],"},{"line_number":280,"context_line":"            \u0027fake-createXML-doesnt-care-about-flags\u0027)"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"        # The resource update periodic task should not change the consumed"},{"line_number":283,"context_line":"        # CPUs, as the migration is still happening. The test should still pass"}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_108c5ed6","line":280,"updated":"2019-12-09 17:37:16.000000000","message":"I haven\u0027t a clue what this is doing :) What do you mean by \"hack the destination to give it the migrating instance\"? I\u0027d have expected us to be assigning stuff to something. Perhaps \u0027createXML\u0027 is doing that for us","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"a30c84be97d1b39d5bdba9d0aab67835d4dfc3ca","unresolved":false,"context_lines":[{"line_number":277,"context_line":"        dest \u003d self.computes[self.server2_final_host]"},{"line_number":278,"context_line":"        dest.driver._host.get_connection().createXML("},{"line_number":279,"context_line":"            params[\u0027destination_xml\u0027],"},{"line_number":280,"context_line":"            \u0027fake-createXML-doesnt-care-about-flags\u0027)"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"        # The resource update periodic task should not change the consumed"},{"line_number":283,"context_line":"        # CPUs, as the migration is still happening. The test should still pass"}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_5677d28f","line":280,"in_reply_to":"3fa7e38b_108c5ed6","updated":"2020-01-13 20:15:17.000000000","message":"So, in a real live migration, the source libvirtd first sends the XML to the dest libvirtd, then the actual instance. In this case, there is no libvirtd, so we have to go to the dest fakelibvirt and create the \"incoming\" instance there.","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"cd7889a40658626af74797a58c330dc3f0c2546e","unresolved":false,"context_lines":[{"line_number":297,"context_line":"        self.migrate_stub_ran \u003d True"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    def _test(self, pin_dest\u003dFalse):"},{"line_number":300,"context_line":"        self._start_3_2_computes()"},{"line_number":301,"context_line":"        flavor3, flavor2 \u003d self._create_3_2_flavors()"},{"line_number":302,"context_line":"        self._boot_server3(flavor3)"},{"line_number":303,"context_line":"        self.server2, server2_initial_host \u003d self._boot_server2(flavor2)"},{"line_number":304,"context_line":"        self._assert_no_migration_context(self.server2[\u0027id\u0027])"},{"line_number":305,"context_line":"        server2_final_host \u003d self._live_migrate_server2(self.server2,"},{"line_number":306,"context_line":"                                                        pin_dest\u003dpin_dest)"},{"line_number":307,"context_line":"        self._wait_for_migration_status(self.server2, [\u0027completed\u0027])"}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_70cb5249","line":304,"range":{"start_line":300,"start_character":0,"end_line":304,"end_character":61},"updated":"2019-12-09 17:37:16.000000000","message":"Would it be possible to move all of this into a single \u0027_create_servers\u0027 helper and get rid of all these separate helpers. I\u0027m finding it personally very hard to grok and it looks like you\u0027re always calling this part in the exact same order (well, in the two places these are used here)","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"a30c84be97d1b39d5bdba9d0aab67835d4dfc3ca","unresolved":false,"context_lines":[{"line_number":297,"context_line":"        self.migrate_stub_ran \u003d True"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    def _test(self, pin_dest\u003dFalse):"},{"line_number":300,"context_line":"        self._start_3_2_computes()"},{"line_number":301,"context_line":"        flavor3, flavor2 \u003d self._create_3_2_flavors()"},{"line_number":302,"context_line":"        self._boot_server3(flavor3)"},{"line_number":303,"context_line":"        self.server2, server2_initial_host \u003d self._boot_server2(flavor2)"},{"line_number":304,"context_line":"        self._assert_no_migration_context(self.server2[\u0027id\u0027])"},{"line_number":305,"context_line":"        server2_final_host \u003d self._live_migrate_server2(self.server2,"},{"line_number":306,"context_line":"                                                        pin_dest\u003dpin_dest)"},{"line_number":307,"context_line":"        self._wait_for_migration_status(self.server2, [\u0027completed\u0027])"}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_16595a5b","line":304,"range":{"start_line":300,"start_character":0,"end_line":304,"end_character":61},"in_reply_to":"3fa7e38b_70cb5249","updated":"2020-01-13 20:15:17.000000000","message":"Done.","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"cd7889a40658626af74797a58c330dc3f0c2546e","unresolved":false,"context_lines":[{"line_number":331,"context_line":"    \"fails\" the migration."},{"line_number":332,"context_line":"    \"\"\""},{"line_number":333,"context_line":""},{"line_number":334,"context_line":"    def _migrate_stub(self, domain, destination, params, flags):"},{"line_number":335,"context_line":"        self._assert_has_migration_context(self.server2[\u0027id\u0027])"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"        # During the migration, the 2-vPCU instances and its migration are"}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_9034cefb","line":334,"updated":"2019-12-09 17:37:16.000000000","message":"Could you add a small docstring stating that this \"fails\" the migration. I know it\u0027s written above but I somehow missed that and had to figure it out myself","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"a30c84be97d1b39d5bdba9d0aab67835d4dfc3ca","unresolved":false,"context_lines":[{"line_number":331,"context_line":"    \"fails\" the migration."},{"line_number":332,"context_line":"    \"\"\""},{"line_number":333,"context_line":""},{"line_number":334,"context_line":"    def _migrate_stub(self, domain, destination, params, flags):"},{"line_number":335,"context_line":"        self._assert_has_migration_context(self.server2[\u0027id\u0027])"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"        # During the migration, the 2-vPCU instances and its migration are"}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_f94a7122","line":334,"in_reply_to":"3fa7e38b_9034cefb","updated":"2020-01-13 20:15:17.000000000","message":"Done","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"cd7889a40658626af74797a58c330dc3f0c2546e","unresolved":false,"context_lines":[{"line_number":360,"context_line":"        self.migrate_stub_ran \u003d True"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"    def _test(self, pin_dest\u003dFalse):"},{"line_number":363,"context_line":"        self._start_3_2_computes()"},{"line_number":364,"context_line":"        flavor3, flavor2 \u003d self._create_3_2_flavors()"},{"line_number":365,"context_line":"        self._boot_server3(flavor3)"},{"line_number":366,"context_line":"        self.server2, server2_initial_host \u003d self._boot_server2(flavor2)"},{"line_number":367,"context_line":"        self._assert_no_migration_context(self.server2[\u0027id\u0027])"},{"line_number":368,"context_line":"        server2_final_host \u003d self._live_migrate_server2(self.server2,"},{"line_number":369,"context_line":"                                                        expect_success\u003dFalse,"},{"line_number":370,"context_line":"                                                        pin_dest\u003dpin_dest)"}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_500bb629","line":367,"range":{"start_line":363,"start_character":0,"end_line":367,"end_character":61},"updated":"2019-12-09 17:37:16.000000000","message":"same comment as above","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"a30c84be97d1b39d5bdba9d0aab67835d4dfc3ca","unresolved":false,"context_lines":[{"line_number":360,"context_line":"        self.migrate_stub_ran \u003d True"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"    def _test(self, pin_dest\u003dFalse):"},{"line_number":363,"context_line":"        self._start_3_2_computes()"},{"line_number":364,"context_line":"        flavor3, flavor2 \u003d self._create_3_2_flavors()"},{"line_number":365,"context_line":"        self._boot_server3(flavor3)"},{"line_number":366,"context_line":"        self.server2, server2_initial_host \u003d self._boot_server2(flavor2)"},{"line_number":367,"context_line":"        self._assert_no_migration_context(self.server2[\u0027id\u0027])"},{"line_number":368,"context_line":"        server2_final_host \u003d self._live_migrate_server2(self.server2,"},{"line_number":369,"context_line":"                                                        expect_success\u003dFalse,"},{"line_number":370,"context_line":"                                                        pin_dest\u003dpin_dest)"}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_b95e39e6","line":367,"range":{"start_line":363,"start_character":0,"end_line":367,"end_character":61},"in_reply_to":"3fa7e38b_500bb629","updated":"2020-01-13 20:15:17.000000000","message":"Still done.","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"cd7889a40658626af74797a58c330dc3f0c2546e","unresolved":false,"context_lines":[{"line_number":385,"context_line":"    when either the conductor or the source are pinned to an old RPC version."},{"line_number":386,"context_line":"    Sets up two identical compute hosts and \"fills\" them with an instance each."},{"line_number":387,"context_line":"    In such a situation, live migrating one of the instances should fail with"},{"line_number":388,"context_line":"    the new NUMA live migration code, but the old lgeacy behaviour is for the"},{"line_number":389,"context_line":"    live migration to go through (if forced through the API, thus bypassing the"},{"line_number":390,"context_line":"    scheduler)."},{"line_number":391,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_1001be07","line":388,"range":{"start_line":388,"start_character":50,"end_line":388,"end_character":56},"updated":"2019-12-09 17:37:16.000000000","message":"legacy","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"a30c84be97d1b39d5bdba9d0aab67835d4dfc3ca","unresolved":false,"context_lines":[{"line_number":385,"context_line":"    when either the conductor or the source are pinned to an old RPC version."},{"line_number":386,"context_line":"    Sets up two identical compute hosts and \"fills\" them with an instance each."},{"line_number":387,"context_line":"    In such a situation, live migrating one of the instances should fail with"},{"line_number":388,"context_line":"    the new NUMA live migration code, but the old lgeacy behaviour is for the"},{"line_number":389,"context_line":"    live migration to go through (if forced through the API, thus bypassing the"},{"line_number":390,"context_line":"    scheduler)."},{"line_number":391,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_7958c1f8","line":388,"range":{"start_line":388,"start_character":50,"end_line":388,"end_character":56},"in_reply_to":"3fa7e38b_1001be07","updated":"2020-01-13 20:15:17.000000000","message":"Done","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"cd7889a40658626af74797a58c330dc3f0c2546e","unresolved":false,"context_lines":[{"line_number":387,"context_line":"    In such a situation, live migrating one of the instances should fail with"},{"line_number":388,"context_line":"    the new NUMA live migration code, but the old lgeacy behaviour is for the"},{"line_number":389,"context_line":"    live migration to go through (if forced through the API, thus bypassing the"},{"line_number":390,"context_line":"    scheduler)."},{"line_number":391,"context_line":"    \"\"\""},{"line_number":392,"context_line":""},{"line_number":393,"context_line":"    api_major_version \u003d \u0027v2.1\u0027"}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_f32aec7b","line":390,"updated":"2019-12-09 17:37:16.000000000","message":"I don\u0027t really get this test and the following ones. What are you trying to prove? That migrations are allowed, even if they\u0027re broken? Given that we only need to support this version of the conductor in master for another few months (til Ussuri is released), I wonder if this is even worth having?","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"a30c84be97d1b39d5bdba9d0aab67835d4dfc3ca","unresolved":false,"context_lines":[{"line_number":387,"context_line":"    In such a situation, live migrating one of the instances should fail with"},{"line_number":388,"context_line":"    the new NUMA live migration code, but the old lgeacy behaviour is for the"},{"line_number":389,"context_line":"    live migration to go through (if forced through the API, thus bypassing the"},{"line_number":390,"context_line":"    scheduler)."},{"line_number":391,"context_line":"    \"\"\""},{"line_number":392,"context_line":""},{"line_number":393,"context_line":"    api_major_version \u003d \u0027v2.1\u0027"}],"source_content_type":"text/x-python","patch_set":60,"id":"3fa7e38b_99feddb3","line":390,"in_reply_to":"3fa7e38b_f32aec7b","updated":"2020-01-13 20:15:17.000000000","message":"That we correctly revert to the old behaviour if the source or conductor are pinned - ie, the rolling upgrade scenario.","commit_id":"b771dd901de22723cbea0528c97dc9cd822ee304"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"532a9a6492158b6ac3bfaa60532161e663a5f1e6","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"class NUMALiveMigrationBase(base.ServersTestBase,"},{"line_number":35,"context_line":"                            integrated_helpers.InstanceHelperMixin,"},{"line_number":36,"context_line":"                            integrated_helpers.ServicesHelperMixin):"},{"line_number":37,"context_line":"    \"\"\"Base for all the test classes here. Gives us the NUMATopologyFilter and"},{"line_number":38,"context_line":"    small helper methods."}],"source_content_type":"text/x-python","patch_set":61,"id":"3fa7e38b_157045a7","line":35,"range":{"start_line":35,"start_character":28,"end_line":35,"end_character":67},"updated":"2020-01-31 17:10:23.000000000","message":"I think you don\u0027t need this since I0d21cb94c932e6e556eca964c57868c705b2d120","commit_id":"d9846d26f3e658be696773d6f9936ce1552a581e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"532a9a6492158b6ac3bfaa60532161e663a5f1e6","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"class NUMALiveMigrationBase(base.ServersTestBase,"},{"line_number":35,"context_line":"                            integrated_helpers.InstanceHelperMixin,"},{"line_number":36,"context_line":"                            integrated_helpers.ServicesHelperMixin):"},{"line_number":37,"context_line":"    \"\"\"Base for all the test classes here. Gives us the NUMATopologyFilter and"},{"line_number":38,"context_line":"    small helper methods."},{"line_number":39,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":61,"id":"3fa7e38b_d5694dc0","line":36,"range":{"start_line":36,"start_character":28,"end_line":36,"end_character":66},"updated":"2020-01-31 17:10:23.000000000","message":"...not sure about this one though","commit_id":"d9846d26f3e658be696773d6f9936ce1552a581e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7046b6d8f32f3b4650a7d6c90d46c1443da60292","unresolved":false,"context_lines":[{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        return server2"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def _pin_host(self, hostname):"},{"line_number":164,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":165,"context_line":"        dest_mgr \u003d self.computes[hostname].manager"},{"line_number":166,"context_line":"        dest_mgr.compute_rpcapi \u003d integrated_helpers.StubComputeRPCAPI("}],"source_content_type":"text/x-python","patch_set":61,"id":"3fa7e38b_dde6444a","line":163,"updated":"2020-01-16 16:53:05.000000000","message":"Given you\u0027re pinning CPUs and RPC versions in this test, you probably should name this something more descriptive.","commit_id":"d9846d26f3e658be696773d6f9936ce1552a581e"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"4c06ba550241783232f13fcd4f3e955c9d2de14d","unresolved":false,"context_lines":[{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        return server2"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def _pin_host(self, hostname):"},{"line_number":164,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":165,"context_line":"        dest_mgr \u003d self.computes[hostname].manager"},{"line_number":166,"context_line":"        dest_mgr.compute_rpcapi \u003d integrated_helpers.StubComputeRPCAPI("}],"source_content_type":"text/x-python","patch_set":61,"id":"3fa7e38b_f67eac19","line":163,"in_reply_to":"3fa7e38b_dde6444a","updated":"2020-01-17 21:15:12.000000000","message":"True, done.","commit_id":"d9846d26f3e658be696773d6f9936ce1552a581e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7046b6d8f32f3b4650a7d6c90d46c1443da60292","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":165,"context_line":"        dest_mgr \u003d self.computes[hostname].manager"},{"line_number":166,"context_line":"        dest_mgr.compute_rpcapi \u003d integrated_helpers.StubComputeRPCAPI("},{"line_number":167,"context_line":"            \u00275.2\u0027)"},{"line_number":168,"context_line":"        self.assertFalse("},{"line_number":169,"context_line":"            dest_mgr.compute_rpcapi.router.client("},{"line_number":170,"context_line":"                ctxt).can_send_version(\u00275.3\u0027))"}],"source_content_type":"text/x-python","patch_set":61,"id":"3fa7e38b_fde0e029","line":167,"updated":"2020-01-16 16:53:05.000000000","message":"This is pretty gross. Why not just pin the version before you start the servers in a test where you want it to be 5.2?","commit_id":"d9846d26f3e658be696773d6f9936ce1552a581e"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"051d68025713be9e04674ccfce0227f74cc242f3","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":165,"context_line":"        dest_mgr \u003d self.computes[hostname].manager"},{"line_number":166,"context_line":"        dest_mgr.compute_rpcapi \u003d integrated_helpers.StubComputeRPCAPI("},{"line_number":167,"context_line":"            \u00275.2\u0027)"},{"line_number":168,"context_line":"        self.assertFalse("},{"line_number":169,"context_line":"            dest_mgr.compute_rpcapi.router.client("},{"line_number":170,"context_line":"                ctxt).can_send_version(\u00275.3\u0027))"}],"source_content_type":"text/x-python","patch_set":61,"id":"3fa7e38b_76c9aea9","line":167,"in_reply_to":"3fa7e38b_01559d1f","updated":"2020-01-30 19:34:40.000000000","message":"Ah, yeah, _build_server() has that host kwarg that we can use. It depends on microversion 2.74, but then the tests here that would need it are all 2.latest. I\u0027m going to push what I currently have locally to let CI run on it, then address this point later on.","commit_id":"d9846d26f3e658be696773d6f9936ce1552a581e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"694aa13e1f92736d75992f3e70394bac1ebffe2c","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":165,"context_line":"        dest_mgr \u003d self.computes[hostname].manager"},{"line_number":166,"context_line":"        dest_mgr.compute_rpcapi \u003d integrated_helpers.StubComputeRPCAPI("},{"line_number":167,"context_line":"            \u00275.2\u0027)"},{"line_number":168,"context_line":"        self.assertFalse("},{"line_number":169,"context_line":"            dest_mgr.compute_rpcapi.router.client("},{"line_number":170,"context_line":"                ctxt).can_send_version(\u00275.3\u0027))"}],"source_content_type":"text/x-python","patch_set":61,"id":"3fa7e38b_01559d1f","line":167,"in_reply_to":"3fa7e38b_96941843","updated":"2020-01-30 14:41:30.000000000","message":"...or boot it constrained to one and then migrate it to a known destination?","commit_id":"d9846d26f3e658be696773d6f9936ce1552a581e"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"4c06ba550241783232f13fcd4f3e955c9d2de14d","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":165,"context_line":"        dest_mgr \u003d self.computes[hostname].manager"},{"line_number":166,"context_line":"        dest_mgr.compute_rpcapi \u003d integrated_helpers.StubComputeRPCAPI("},{"line_number":167,"context_line":"            \u00275.2\u0027)"},{"line_number":168,"context_line":"        self.assertFalse("},{"line_number":169,"context_line":"            dest_mgr.compute_rpcapi.router.client("},{"line_number":170,"context_line":"                ctxt).can_send_version(\u00275.3\u0027))"}],"source_content_type":"text/x-python","patch_set":61,"id":"3fa7e38b_96941843","line":167,"in_reply_to":"3fa7e38b_fde0e029","updated":"2020-01-17 21:15:12.000000000","message":"Because we don\u0027t know on which fake host the server that we\u0027ll be live migrating will land. So we need to boot it, figure out what the dest host will be, and pin that.","commit_id":"d9846d26f3e658be696773d6f9936ce1552a581e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7046b6d8f32f3b4650a7d6c90d46c1443da60292","unresolved":false,"context_lines":[{"line_number":254,"context_line":"        # without running periodics, this just makes sure updating available"},{"line_number":255,"context_line":"        # resources does the right thing."},{"line_number":256,"context_line":"        self._run_periodics()"},{"line_number":257,"context_line":"        host3_topo \u003d self._get_host_numa_topology(\u0027host3\u0027)"},{"line_number":258,"context_line":"        host2_topo \u003d self._get_host_numa_topology(\u0027host2\u0027)"},{"line_number":259,"context_line":"        self.assertItemsEqual(host3_topo.cells[0].pinned_cpus, [0, 1, 2])"},{"line_number":260,"context_line":"        self.assertItemsEqual(host3_topo.cells[1].pinned_cpus, [3, 4])"},{"line_number":261,"context_line":"        self.assertItemsEqual(host2_topo.cells[0].pinned_cpus, [0, 1])"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"        self.useFixture("},{"line_number":264,"context_line":"            fixtures.MonkeyPatch("}],"source_content_type":"text/x-python","patch_set":61,"id":"3fa7e38b_5d401405","line":261,"range":{"start_line":257,"start_character":8,"end_line":261,"end_character":70},"updated":"2020-01-16 16:53:05.000000000","message":"Maybe put this in a closure to run twice so that we don\u0027t have to eye-diff these with the lines above to make sure you\u0027re asserting the same thing?","commit_id":"d9846d26f3e658be696773d6f9936ce1552a581e"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"4c06ba550241783232f13fcd4f3e955c9d2de14d","unresolved":false,"context_lines":[{"line_number":254,"context_line":"        # without running periodics, this just makes sure updating available"},{"line_number":255,"context_line":"        # resources does the right thing."},{"line_number":256,"context_line":"        self._run_periodics()"},{"line_number":257,"context_line":"        host3_topo \u003d self._get_host_numa_topology(\u0027host3\u0027)"},{"line_number":258,"context_line":"        host2_topo \u003d self._get_host_numa_topology(\u0027host2\u0027)"},{"line_number":259,"context_line":"        self.assertItemsEqual(host3_topo.cells[0].pinned_cpus, [0, 1, 2])"},{"line_number":260,"context_line":"        self.assertItemsEqual(host3_topo.cells[1].pinned_cpus, [3, 4])"},{"line_number":261,"context_line":"        self.assertItemsEqual(host2_topo.cells[0].pinned_cpus, [0, 1])"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"        self.useFixture("},{"line_number":264,"context_line":"            fixtures.MonkeyPatch("}],"source_content_type":"text/x-python","patch_set":61,"id":"3fa7e38b_d61db0bf","line":261,"range":{"start_line":257,"start_character":8,"end_line":261,"end_character":70},"in_reply_to":"3fa7e38b_5d401405","updated":"2020-01-17 21:15:12.000000000","message":"Done","commit_id":"d9846d26f3e658be696773d6f9936ce1552a581e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7046b6d8f32f3b4650a7d6c90d46c1443da60292","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        self.useFixture("},{"line_number":264,"context_line":"            fixtures.MonkeyPatch("},{"line_number":265,"context_line":"                \u0027nova.tests.unit.virt.libvirt.fakelibvirt.Domain.jobStats\u0027,"},{"line_number":266,"context_line":"                lambda flags: {\u0027type\u0027: fakelibvirt.VIR_DOMAIN_JOB_COMPLETED}))"},{"line_number":267,"context_line":"        self.migrate_stub_ran \u003d True"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    def _test(self, pin_dest\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":61,"id":"3fa7e38b_1d637cad","line":266,"updated":"2020-01-16 16:53:05.000000000","message":"It seems weird to me to use a fixture in the middle of running like this. Can you not do this ahead of time for some reason?","commit_id":"d9846d26f3e658be696773d6f9936ce1552a581e"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"4c06ba550241783232f13fcd4f3e955c9d2de14d","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        self.useFixture("},{"line_number":264,"context_line":"            fixtures.MonkeyPatch("},{"line_number":265,"context_line":"                \u0027nova.tests.unit.virt.libvirt.fakelibvirt.Domain.jobStats\u0027,"},{"line_number":266,"context_line":"                lambda flags: {\u0027type\u0027: fakelibvirt.VIR_DOMAIN_JOB_COMPLETED}))"},{"line_number":267,"context_line":"        self.migrate_stub_ran \u003d True"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    def _test(self, pin_dest\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":61,"id":"3fa7e38b_761cfcc1","line":266,"in_reply_to":"3fa7e38b_1d637cad","updated":"2020-01-17 21:15:12.000000000","message":"You answered your own question later on. I like you test-only interface idea. Done.","commit_id":"d9846d26f3e658be696773d6f9936ce1552a581e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7046b6d8f32f3b4650a7d6c90d46c1443da60292","unresolved":false,"context_lines":[{"line_number":325,"context_line":"        host2_topo \u003d self._get_host_numa_topology(\u0027host2\u0027)"},{"line_number":326,"context_line":"        self.assertItemsEqual(host3_topo.cells[0].pinned_cpus, [0, 1, 2])"},{"line_number":327,"context_line":"        self.assertItemsEqual(host3_topo.cells[1].pinned_cpus, [3, 4])"},{"line_number":328,"context_line":"        self.assertItemsEqual(host2_topo.cells[0].pinned_cpus, [0, 1])"},{"line_number":329,"context_line":"        self.useFixture("},{"line_number":330,"context_line":"            fixtures.MonkeyPatch("},{"line_number":331,"context_line":"                \u0027nova.tests.unit.virt.libvirt.fakelibvirt.Domain.jobStats\u0027,"}],"source_content_type":"text/x-python","patch_set":61,"id":"3fa7e38b_7d54f0c6","line":328,"updated":"2020-01-16 16:53:05.000000000","message":"Same deal.","commit_id":"d9846d26f3e658be696773d6f9936ce1552a581e"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"4c06ba550241783232f13fcd4f3e955c9d2de14d","unresolved":false,"context_lines":[{"line_number":325,"context_line":"        host2_topo \u003d self._get_host_numa_topology(\u0027host2\u0027)"},{"line_number":326,"context_line":"        self.assertItemsEqual(host3_topo.cells[0].pinned_cpus, [0, 1, 2])"},{"line_number":327,"context_line":"        self.assertItemsEqual(host3_topo.cells[1].pinned_cpus, [3, 4])"},{"line_number":328,"context_line":"        self.assertItemsEqual(host2_topo.cells[0].pinned_cpus, [0, 1])"},{"line_number":329,"context_line":"        self.useFixture("},{"line_number":330,"context_line":"            fixtures.MonkeyPatch("},{"line_number":331,"context_line":"                \u0027nova.tests.unit.virt.libvirt.fakelibvirt.Domain.jobStats\u0027,"}],"source_content_type":"text/x-python","patch_set":61,"id":"3fa7e38b_7945cf43","line":328,"in_reply_to":"3fa7e38b_7d54f0c6","updated":"2020-01-17 21:15:12.000000000","message":"Done","commit_id":"d9846d26f3e658be696773d6f9936ce1552a581e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7046b6d8f32f3b4650a7d6c90d46c1443da60292","unresolved":false,"context_lines":[{"line_number":329,"context_line":"        self.useFixture("},{"line_number":330,"context_line":"            fixtures.MonkeyPatch("},{"line_number":331,"context_line":"                \u0027nova.tests.unit.virt.libvirt.fakelibvirt.Domain.jobStats\u0027,"},{"line_number":332,"context_line":"                lambda flags: {\u0027type\u0027: fakelibvirt.VIR_DOMAIN_JOB_FAILED}))"},{"line_number":333,"context_line":"        self.migrate_stub_ran \u003d True"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"    def _test(self, pin_dest\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":61,"id":"3fa7e38b_bdffc8af","line":332,"updated":"2020-01-16 16:53:05.000000000","message":"also same.","commit_id":"d9846d26f3e658be696773d6f9936ce1552a581e"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"4c06ba550241783232f13fcd4f3e955c9d2de14d","unresolved":false,"context_lines":[{"line_number":329,"context_line":"        self.useFixture("},{"line_number":330,"context_line":"            fixtures.MonkeyPatch("},{"line_number":331,"context_line":"                \u0027nova.tests.unit.virt.libvirt.fakelibvirt.Domain.jobStats\u0027,"},{"line_number":332,"context_line":"                lambda flags: {\u0027type\u0027: fakelibvirt.VIR_DOMAIN_JOB_FAILED}))"},{"line_number":333,"context_line":"        self.migrate_stub_ran \u003d True"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"    def _test(self, pin_dest\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":61,"id":"3fa7e38b_d93643e0","line":332,"in_reply_to":"3fa7e38b_bdffc8af","updated":"2020-01-17 21:15:12.000000000","message":"Done","commit_id":"d9846d26f3e658be696773d6f9936ce1552a581e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7046b6d8f32f3b4650a7d6c90d46c1443da60292","unresolved":false,"context_lines":[{"line_number":392,"context_line":"                \u00275.2\u0027)"},{"line_number":393,"context_line":"        if pin_cond:"},{"line_number":394,"context_line":"            cond_mgr.compute_rpcapi \u003d integrated_helpers.StubComputeRPCAPI("},{"line_number":395,"context_line":"                \u00275.2\u0027)"},{"line_number":396,"context_line":""},{"line_number":397,"context_line":"        self.assertEqual("},{"line_number":398,"context_line":"            not pin_source,"}],"source_content_type":"text/x-python","patch_set":61,"id":"3fa7e38b_5ddc9442","line":395,"updated":"2020-01-16 16:53:05.000000000","message":"Maybe this is why you\u0027re doing the rpc pinning late and forcibly? I get why it\u0027s simpler to do this, but it\u0027s very roundabout instead of changing the setup code to let you pin one at service start time in the test base(s).","commit_id":"d9846d26f3e658be696773d6f9936ce1552a581e"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"4c06ba550241783232f13fcd4f3e955c9d2de14d","unresolved":false,"context_lines":[{"line_number":392,"context_line":"                \u00275.2\u0027)"},{"line_number":393,"context_line":"        if pin_cond:"},{"line_number":394,"context_line":"            cond_mgr.compute_rpcapi \u003d integrated_helpers.StubComputeRPCAPI("},{"line_number":395,"context_line":"                \u00275.2\u0027)"},{"line_number":396,"context_line":""},{"line_number":397,"context_line":"        self.assertEqual("},{"line_number":398,"context_line":"            not pin_source,"}],"source_content_type":"text/x-python","patch_set":61,"id":"3fa7e38b_5999f3cc","line":395,"in_reply_to":"3fa7e38b_5ddc9442","updated":"2020-01-17 21:15:12.000000000","message":"This is part of it, but mostly because we don\u0027t know in advance which host will end up being the destination.","commit_id":"d9846d26f3e658be696773d6f9936ce1552a581e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"532a9a6492158b6ac3bfaa60532161e663a5f1e6","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"class NUMALiveMigrationBase(base.ServersTestBase,"},{"line_number":35,"context_line":"                            integrated_helpers.InstanceHelperMixin,"},{"line_number":36,"context_line":"                            integrated_helpers.ServicesHelperMixin):"},{"line_number":37,"context_line":"    \"\"\"Base for all the test classes here. Gives us the NUMATopologyFilter and"},{"line_number":38,"context_line":"    small helper methods."}],"source_content_type":"text/x-python","patch_set":64,"id":"3fa7e38b_ac126e63","line":35,"range":{"start_line":35,"start_character":28,"end_line":35,"end_character":67},"updated":"2020-01-31 17:10:23.000000000","message":"You get this for free since change I0d21cb94c932e6e556eca964c57868c705b2d120","commit_id":"ca109294a3e0c6b7fe0ac0660d86427e46ec613a"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"8993f75f1145b0104c1ac5187e28904fab3de713","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"class NUMALiveMigrationBase(base.ServersTestBase,"},{"line_number":35,"context_line":"                            integrated_helpers.InstanceHelperMixin,"},{"line_number":36,"context_line":"                            integrated_helpers.ServicesHelperMixin):"},{"line_number":37,"context_line":"    \"\"\"Base for all the test classes here. Gives us the NUMATopologyFilter and"},{"line_number":38,"context_line":"    small helper methods."}],"source_content_type":"text/x-python","patch_set":64,"id":"3fa7e38b_8fbf4bc9","line":35,"range":{"start_line":35,"start_character":28,"end_line":35,"end_character":67},"in_reply_to":"3fa7e38b_ac126e63","updated":"2020-02-03 20:22:50.000000000","message":"Done","commit_id":"ca109294a3e0c6b7fe0ac0660d86427e46ec613a"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"532a9a6492158b6ac3bfaa60532161e663a5f1e6","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        # cleanup() to enter the code block containing the instance.save()"},{"line_number":59,"context_line":"        # call. Both do_cleanup and destroy_disks are set by"},{"line_number":60,"context_line":"        # _live_migration_cleanup_flags(), so we just monkeypatch it to return"},{"line_number":61,"context_line":"        # what we want regardless of any shared storage configuration."},{"line_number":62,"context_line":"        self.useFixture(fixtures.MonkeyPatch("},{"line_number":63,"context_line":"            \u0027nova.compute.manager.ComputeManager.\u0027"},{"line_number":64,"context_line":"            \u0027_live_migration_cleanup_flags\u0027,"}],"source_content_type":"text/x-python","patch_set":64,"id":"3fa7e38b_c72543af","line":61,"updated":"2020-01-31 17:10:23.000000000","message":"Any reason we _wouldn\u0027t_ want to do this across the board? If not, would this make sense in \u0027base.ServersTestBase\u0027?","commit_id":"ca109294a3e0c6b7fe0ac0660d86427e46ec613a"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"8993f75f1145b0104c1ac5187e28904fab3de713","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        # cleanup() to enter the code block containing the instance.save()"},{"line_number":59,"context_line":"        # call. Both do_cleanup and destroy_disks are set by"},{"line_number":60,"context_line":"        # _live_migration_cleanup_flags(), so we just monkeypatch it to return"},{"line_number":61,"context_line":"        # what we want regardless of any shared storage configuration."},{"line_number":62,"context_line":"        self.useFixture(fixtures.MonkeyPatch("},{"line_number":63,"context_line":"            \u0027nova.compute.manager.ComputeManager.\u0027"},{"line_number":64,"context_line":"            \u0027_live_migration_cleanup_flags\u0027,"}],"source_content_type":"text/x-python","patch_set":64,"id":"3fa7e38b_2fb177e4","line":61,"in_reply_to":"3fa7e38b_c72543af","updated":"2020-02-03 20:22:50.000000000","message":"This is very specific to this test, I\u0027m not sure we need this in the base class.","commit_id":"ca109294a3e0c6b7fe0ac0660d86427e46ec613a"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"532a9a6492158b6ac3bfaa60532161e663a5f1e6","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            \u0027nova.virt.libvirt.driver.connector\u0027,"},{"line_number":68,"context_line":"            fake_os_brick_connector))"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def get_host(self, server_id):"},{"line_number":71,"context_line":"        server \u003d self.api.get_server(server_id)"},{"line_number":72,"context_line":"        return server[\u0027OS-EXT-SRV-ATTR:host\u0027]"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def _assert_no_migration_context(self, instance_uuid):"},{"line_number":75,"context_line":"        ctxt \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":64,"id":"3fa7e38b_276217dc","line":72,"range":{"start_line":70,"start_character":0,"end_line":72,"end_character":45},"updated":"2020-01-31 17:10:23.000000000","message":"I guess this information is not returned in all API responses, right? i.e. you can\u0027t just do\n\n    server \u003d self.api.live_migrate(.... blah ...)\n    self.assertEqual(\u0027foo\u0027, server[\u0027server\u0027][\u0027OS-EXT-SRV-ATTR:host\u0027])","commit_id":"ca109294a3e0c6b7fe0ac0660d86427e46ec613a"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"532a9a6492158b6ac3bfaa60532161e663a5f1e6","unresolved":false,"context_lines":[{"line_number":102,"context_line":"            jsonutils.loads("},{"line_number":103,"context_line":"                objects.ComputeNode.get_by_nodename("},{"line_number":104,"context_line":"                    ctxt, host).numa_topology),"},{"line_number":105,"context_line":"            context\u003dctxt)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def _create_servers(self):"},{"line_number":108,"context_line":"        # Start 2 computes: one with 5 CPUs split 3/2 across 2 NUMA cells,"}],"source_content_type":"text/x-python","patch_set":64,"id":"3fa7e38b_c75d43ec","line":105,"updated":"2020-01-31 17:10:23.000000000","message":"Whoever used a string field on that object deserves a slap. Note, however, that you could just use \u0027obj_from_db_obj\u0027 here, which is what we do in \u0027nova/compute/resource_tracker.py\u0027:\n\n  return objects.NUMATopology.obj_from_db_obj(\n      objects.ComputeNode.get_by_nodename(ctxt, host).numa_topology))","commit_id":"ca109294a3e0c6b7fe0ac0660d86427e46ec613a"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"8993f75f1145b0104c1ac5187e28904fab3de713","unresolved":false,"context_lines":[{"line_number":102,"context_line":"            jsonutils.loads("},{"line_number":103,"context_line":"                objects.ComputeNode.get_by_nodename("},{"line_number":104,"context_line":"                    ctxt, host).numa_topology),"},{"line_number":105,"context_line":"            context\u003dctxt)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def _create_servers(self):"},{"line_number":108,"context_line":"        # Start 2 computes: one with 5 CPUs split 3/2 across 2 NUMA cells,"}],"source_content_type":"text/x-python","patch_set":64,"id":"3fa7e38b_81639fab","line":105,"in_reply_to":"3fa7e38b_c75d43ec","updated":"2020-02-03 20:22:50.000000000","message":"Done","commit_id":"ca109294a3e0c6b7fe0ac0660d86427e46ec613a"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"532a9a6492158b6ac3bfaa60532161e663a5f1e6","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            context\u003dctxt)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def _create_servers(self):"},{"line_number":108,"context_line":"        # Start 2 computes: one with 5 CPUs split 3/2 across 2 NUMA cells,"},{"line_number":109,"context_line":"        # one with a single 2-CPU NUMA cell."},{"line_number":110,"context_line":"        self.start_computes({"},{"line_number":111,"context_line":"            \u0027host3\u0027: fakelibvirt.CustomHostInfo("},{"line_number":112,"context_line":"                sockets_per_node\u003d[3, 2], cpu_cores\u003d1, cpu_threads\u003d1,"}],"source_content_type":"text/x-python","patch_set":64,"id":"3fa7e38b_27df773a","line":109,"range":{"start_line":108,"start_character":0,"end_line":109,"end_character":44},"updated":"2020-01-31 17:10:23.000000000","message":"I still don\u0027t like this. It adds a whole load of complexity to the fakelibvirt module for very little gain. We discussed it previously at [1] but I never came back around to it. Thinking on it more now, I\u0027d argue that we don\u0027t really have to care where the instances land, so long as they don\u0027t overlap. Boot an instance on both hosts, live migrate one of them, and make sure there\u0027s no overlap. That\u0027s all we need. If that\u0027s good enough, I think we could remove a lot of complexity from this and make it parsable at a glance for mere mortals like I\n\n[1] https://review.opendev.org/#/c/672595/57/nova/tests/functional/libvirt/test_numa_live_migration.py@148","commit_id":"ca109294a3e0c6b7fe0ac0660d86427e46ec613a"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"415caf1069c487c3444ed267eede3f93f0b2e20a","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            context\u003dctxt)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def _create_servers(self):"},{"line_number":108,"context_line":"        # Start 2 computes: one with 5 CPUs split 3/2 across 2 NUMA cells,"},{"line_number":109,"context_line":"        # one with a single 2-CPU NUMA cell."},{"line_number":110,"context_line":"        self.start_computes({"},{"line_number":111,"context_line":"            \u0027host3\u0027: fakelibvirt.CustomHostInfo("},{"line_number":112,"context_line":"                sockets_per_node\u003d[3, 2], cpu_cores\u003d1, cpu_threads\u003d1,"}],"source_content_type":"text/x-python","patch_set":64,"id":"3fa7e38b_c065184c","line":109,"range":{"start_line":108,"start_character":0,"end_line":109,"end_character":44},"in_reply_to":"3fa7e38b_27df773a","updated":"2020-02-03 15:34:24.000000000","message":"So it would mean something like:\n\n  +----+----+    +--- +----+\n  | N1 | N2 |    | N1 | N2 |\n  +----+----+    +----+----+\n   VM1            VM2 \n               |\n               |  live-migration \n               |\n              \\/\n  +----+----+    +--- +----+\n  | N1 | N2 |    | N1 | N2 |\n  +----+----+    +----+----+\n                  VM2   VM1\n\nI suppose there\u0027s no chance that VM1 somehow lands on N2 to begin with, in which case the live migration won\u0027t have actually tested anything, as that\u0027s the result we\u0027d have gotten pre-NUMA-live-migration anyways?","commit_id":"ca109294a3e0c6b7fe0ac0660d86427e46ec613a"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"532a9a6492158b6ac3bfaa60532161e663a5f1e6","unresolved":false,"context_lines":[{"line_number":171,"context_line":"            dest_mgr.compute_rpcapi.router.client("},{"line_number":172,"context_line":"                ctxt).can_send_version(\u00275.3\u0027))"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    def _live_migrate(self, server):"},{"line_number":175,"context_line":"        self.api.post_server_action("},{"line_number":176,"context_line":"            server[\u0027id\u0027],"},{"line_number":177,"context_line":"            {\u0027os-migrateLive\u0027: {\u0027host\u0027: None,"},{"line_number":178,"context_line":"                                \u0027block_migration\u0027: \u0027auto\u0027}})"},{"line_number":179,"context_line":"        self._wait_for_state_change(server, \u0027ACTIVE\u0027)"},{"line_number":180,"context_line":"        return self.get_host(server[\u0027id\u0027])"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    def _check_hosts_pinned_cpus(self, server2_host):"},{"line_number":183,"context_line":"        \"\"\"Checks that the correct pCPUs are consumed on each host. host3"}],"source_content_type":"text/x-python","patch_set":64,"id":"3fa7e38b_a77cc774","line":180,"range":{"start_line":174,"start_character":0,"end_line":180,"end_character":42},"updated":"2020-01-31 17:10:23.000000000","message":"This would make sense in the \u0027InstanceHelperMixin\u0027, assuming we plan to add more live migration tests in the future","commit_id":"ca109294a3e0c6b7fe0ac0660d86427e46ec613a"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"e209120b75fc5661b6256a066c4b92f84b2a50ed","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    def _get_host_numa_topology(self, host):"},{"line_number":100,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":101,"context_line":"        return objects.NUMATopology.obj_from_db_obj("},{"line_number":102,"context_line":"            objects.ComputeNode.get_by_nodename(cxtx, host).numa_topology)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def _create_servers(self):"},{"line_number":105,"context_line":"        # Start 2 computes: one with 5 CPUs split 3/2 across 2 NUMA cells,"}],"source_content_type":"text/x-python","patch_set":68,"id":"1fa4df85_b9d32cd5","line":102,"range":{"start_line":102,"start_character":48,"end_line":102,"end_character":52},"updated":"2020-03-19 07:19:53.000000000","message":"ctxt","commit_id":"436bfa13de86cb9ad5384275241f7a3b1450aaa1"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"1fe04572574e78a30be4aeee5ce60361c20986fb","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        return objects.NUMATopology.obj_from_db_obj("},{"line_number":75,"context_line":"            objects.ComputeNode.get_by_nodename(ctxt, host).numa_topology)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def _assert_no_migration_context(self, instance_uuid):"},{"line_number":78,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":79,"context_line":"        self.assertFalse("},{"line_number":80,"context_line":"            objects.MigrationContext.get_by_instance_uuid(ctxt, instance_uuid))"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def _assert_has_migration_context(self, instance_uuid):"},{"line_number":83,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":84,"context_line":"        self.assertTrue("},{"line_number":85,"context_line":"            objects.MigrationContext.get_by_instance_uuid(ctxt, instance_uuid))"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def _assert_instance_pinned_cpus(self, uuid, instance_cpus, host_cpus):"},{"line_number":88,"context_line":"        ctxt \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":73,"id":"1f493fa4_fbe1e69c","line":85,"range":{"start_line":77,"start_character":0,"end_line":85,"end_character":79},"updated":"2020-04-28 14:17:07.000000000","message":"How about instead of doing this, you simply have a \u0027_get_migration_context\u0027 function and inline the assertTrue/assertFalse statements?\n\n  self.assertTrue(self._get_migration_context(self.server_a[\u0027id\u0027]))","commit_id":"06aaa08dc42bf00f5d05fe7bbf5edebe0b91a9fc"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"01b6e7b865bf9ab841a6ae89250b1f5ac28ef79c","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        return objects.NUMATopology.obj_from_db_obj("},{"line_number":75,"context_line":"            objects.ComputeNode.get_by_nodename(ctxt, host).numa_topology)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def _assert_no_migration_context(self, instance_uuid):"},{"line_number":78,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":79,"context_line":"        self.assertFalse("},{"line_number":80,"context_line":"            objects.MigrationContext.get_by_instance_uuid(ctxt, instance_uuid))"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def _assert_has_migration_context(self, instance_uuid):"},{"line_number":83,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":84,"context_line":"        self.assertTrue("},{"line_number":85,"context_line":"            objects.MigrationContext.get_by_instance_uuid(ctxt, instance_uuid))"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def _assert_instance_pinned_cpus(self, uuid, instance_cpus, host_cpus):"},{"line_number":88,"context_line":"        ctxt \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":73,"id":"1f493fa4_a2524565","line":85,"range":{"start_line":77,"start_character":0,"end_line":85,"end_character":79},"in_reply_to":"1f493fa4_fbe1e69c","updated":"2020-05-01 17:59:11.000000000","message":"Done","commit_id":"06aaa08dc42bf00f5d05fe7bbf5edebe0b91a9fc"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"1fe04572574e78a30be4aeee5ce60361c20986fb","unresolved":false,"context_lines":[{"line_number":95,"context_line":"                              topology.cells[0].cpu_pinning_raw.values())"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def _assert_host_consumed_cpus(self, host, cpus):"},{"line_number":98,"context_line":"        topology \u003d self._get_host_numa_topology(host)"},{"line_number":99,"context_line":"        self.assertItemsEqual(cpus, topology.cells[0].pinned_cpus)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":73,"id":"1f493fa4_bb563e5b","line":98,"range":{"start_line":98,"start_character":8,"end_line":98,"end_character":53},"updated":"2020-04-28 14:17:07.000000000","message":"could you just fold this in here, since it only has the one caller","commit_id":"06aaa08dc42bf00f5d05fe7bbf5edebe0b91a9fc"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"01b6e7b865bf9ab841a6ae89250b1f5ac28ef79c","unresolved":false,"context_lines":[{"line_number":95,"context_line":"                              topology.cells[0].cpu_pinning_raw.values())"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def _assert_host_consumed_cpus(self, host, cpus):"},{"line_number":98,"context_line":"        topology \u003d self._get_host_numa_topology(host)"},{"line_number":99,"context_line":"        self.assertItemsEqual(cpus, topology.cells[0].pinned_cpus)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":73,"id":"1f493fa4_02fcd93b","line":98,"range":{"start_line":98,"start_character":8,"end_line":98,"end_character":53},"in_reply_to":"1f493fa4_bb563e5b","updated":"2020-05-01 17:59:11.000000000","message":"Done","commit_id":"06aaa08dc42bf00f5d05fe7bbf5edebe0b91a9fc"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1dbc1c9261ad85ed4d07b247232633826c4a4929","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        super(NUMALiveMigrationPositiveBase, self).setUp()"},{"line_number":110,"context_line":"        self.useFixture(fixtures.MonkeyPatch("},{"line_number":111,"context_line":"            \u0027nova.tests.unit.virt.libvirt.fakelibvirt.Domain.migrateToURI3\u0027,"},{"line_number":112,"context_line":"            self._migrate_stub))"},{"line_number":113,"context_line":"        self.migrate_stub_ran \u003d False"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def start_computes_and_servers(self):"}],"source_content_type":"text/x-python","patch_set":73,"id":"1f493fa4_91cd2387","line":112,"range":{"start_line":112,"start_character":12,"end_line":112,"end_character":30},"updated":"2020-04-28 16:36:01.000000000","message":"Can you at least implement this in this base class and just raise something to say \"Yo idiot, implement me\"? Otherwise if I subclass this and don\u0027t know I need to do that, I\u0027ll get a weird NameError.","commit_id":"06aaa08dc42bf00f5d05fe7bbf5edebe0b91a9fc"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"01b6e7b865bf9ab841a6ae89250b1f5ac28ef79c","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        super(NUMALiveMigrationPositiveBase, self).setUp()"},{"line_number":110,"context_line":"        self.useFixture(fixtures.MonkeyPatch("},{"line_number":111,"context_line":"            \u0027nova.tests.unit.virt.libvirt.fakelibvirt.Domain.migrateToURI3\u0027,"},{"line_number":112,"context_line":"            self._migrate_stub))"},{"line_number":113,"context_line":"        self.migrate_stub_ran \u003d False"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def start_computes_and_servers(self):"}],"source_content_type":"text/x-python","patch_set":73,"id":"1f493fa4_05e50338","line":112,"range":{"start_line":112,"start_character":12,"end_line":112,"end_character":30},"in_reply_to":"1f493fa4_91cd2387","updated":"2020-05-01 17:59:11.000000000","message":"Done","commit_id":"06aaa08dc42bf00f5d05fe7bbf5edebe0b91a9fc"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1dbc1c9261ad85ed4d07b247232633826c4a4929","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        # Boot 2 servers with 2 CPUs each, one on host_a and one on host_b."},{"line_number":130,"context_line":"        # Given the cpu_dedicated_set we set earlier, they should both be on"},{"line_number":131,"context_line":"        # CPUs 0,1."},{"line_number":132,"context_line":"        for server_name, host in [(\u0027server_a\u0027, \u0027host_a\u0027),"},{"line_number":133,"context_line":"                                  (\u0027server_b\u0027, \u0027host_b\u0027)]:"},{"line_number":134,"context_line":"            server \u003d self._build_server("}],"source_content_type":"text/x-python","patch_set":73,"id":"1f493fa4_ac3c462f","line":131,"updated":"2020-04-28 16:36:01.000000000","message":"I\u0027m sure this is me confusing all the terminology, but how can two 2-vcpu instances sit on the same two dedicated cpus of a host? Isn\u0027t that what your cpu_policy\u003ddedicated means? That the host cpus are dedicated?","commit_id":"06aaa08dc42bf00f5d05fe7bbf5edebe0b91a9fc"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"16ec50a3960b7bdbb64f6253a4a7c6629a6623a6","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        # Boot 2 servers with 2 CPUs each, one on host_a and one on host_b."},{"line_number":130,"context_line":"        # Given the cpu_dedicated_set we set earlier, they should both be on"},{"line_number":131,"context_line":"        # CPUs 0,1."},{"line_number":132,"context_line":"        for server_name, host in [(\u0027server_a\u0027, \u0027host_a\u0027),"},{"line_number":133,"context_line":"                                  (\u0027server_b\u0027, \u0027host_b\u0027)]:"},{"line_number":134,"context_line":"            server \u003d self._build_server("}],"source_content_type":"text/x-python","patch_set":73,"id":"1f493fa4_045eee42","line":131,"in_reply_to":"1f493fa4_44e1162a","updated":"2020-04-28 17:42:41.000000000","message":"Sorry, I realize what it was now. I was reading the below set of 2-tuples as a single 4-tuple and was thinking you were creating four instances total. Now it makes sense.","commit_id":"06aaa08dc42bf00f5d05fe7bbf5edebe0b91a9fc"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"495e600cf516eba359338bcdc32a75447d42355c","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        # Boot 2 servers with 2 CPUs each, one on host_a and one on host_b."},{"line_number":130,"context_line":"        # Given the cpu_dedicated_set we set earlier, they should both be on"},{"line_number":131,"context_line":"        # CPUs 0,1."},{"line_number":132,"context_line":"        for server_name, host in [(\u0027server_a\u0027, \u0027host_a\u0027),"},{"line_number":133,"context_line":"                                  (\u0027server_b\u0027, \u0027host_b\u0027)]:"},{"line_number":134,"context_line":"            server \u003d self._build_server("}],"source_content_type":"text/x-python","patch_set":73,"id":"1f493fa4_44e1162a","line":131,"in_reply_to":"1f493fa4_ac3c462f","updated":"2020-04-28 17:33:01.000000000","message":"They\u0027re both on CPUs 0 and 1, but on different hosts. I can make this clearer in the FUP, but I do say \"one on host_a and one on host_b\" in the first line of this paragraph ;)","commit_id":"06aaa08dc42bf00f5d05fe7bbf5edebe0b91a9fc"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"1fe04572574e78a30be4aeee5ce60361c20986fb","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        # CPUs 0,1."},{"line_number":132,"context_line":"        for server_name, host in [(\u0027server_a\u0027, \u0027host_a\u0027),"},{"line_number":133,"context_line":"                                  (\u0027server_b\u0027, \u0027host_b\u0027)]:"},{"line_number":134,"context_line":"            server \u003d self._build_server("},{"line_number":135,"context_line":"                flavor_id\u003dflavor,"},{"line_number":136,"context_line":"                image_uuid\u003d\u0027155d900f-4e14-4e4c-a73d-069cbf4541e6\u0027)"},{"line_number":137,"context_line":"            server.update({\u0027networks\u0027: \u0027none\u0027,"},{"line_number":138,"context_line":"                           \u0027host\u0027: host})"},{"line_number":139,"context_line":"            post \u003d {\u0027server\u0027: server}"},{"line_number":140,"context_line":"            server \u003d self.api.post_server(post)"},{"line_number":141,"context_line":"            setattr(self, server_name,"},{"line_number":142,"context_line":"                    self._wait_for_state_change(server, \u0027ACTIVE\u0027))"},{"line_number":143,"context_line":"            self.assertEqual(host, self.get_host(server[\u0027id\u0027]))"},{"line_number":144,"context_line":"            self._assert_instance_pinned_cpus(server[\u0027id\u0027], [\u00270\u0027, \u00271\u0027], [0, 1])"},{"line_number":145,"context_line":""}],"source_content_type":"text/x-python","patch_set":73,"id":"1f493fa4_7baf967c","line":142,"range":{"start_line":134,"start_character":0,"end_line":142,"end_character":66},"updated":"2020-04-28 14:17:07.000000000","message":"Or:\n\n  server \u003d self._create_server(\n      flavor_id\u003dflavor, host\u003dhost, networks\u003d\u0027none\u0027,\n  )","commit_id":"06aaa08dc42bf00f5d05fe7bbf5edebe0b91a9fc"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"01b6e7b865bf9ab841a6ae89250b1f5ac28ef79c","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        # CPUs 0,1."},{"line_number":132,"context_line":"        for server_name, host in [(\u0027server_a\u0027, \u0027host_a\u0027),"},{"line_number":133,"context_line":"                                  (\u0027server_b\u0027, \u0027host_b\u0027)]:"},{"line_number":134,"context_line":"            server \u003d self._build_server("},{"line_number":135,"context_line":"                flavor_id\u003dflavor,"},{"line_number":136,"context_line":"                image_uuid\u003d\u0027155d900f-4e14-4e4c-a73d-069cbf4541e6\u0027)"},{"line_number":137,"context_line":"            server.update({\u0027networks\u0027: \u0027none\u0027,"},{"line_number":138,"context_line":"                           \u0027host\u0027: host})"},{"line_number":139,"context_line":"            post \u003d {\u0027server\u0027: server}"},{"line_number":140,"context_line":"            server \u003d self.api.post_server(post)"},{"line_number":141,"context_line":"            setattr(self, server_name,"},{"line_number":142,"context_line":"                    self._wait_for_state_change(server, \u0027ACTIVE\u0027))"},{"line_number":143,"context_line":"            self.assertEqual(host, self.get_host(server[\u0027id\u0027]))"},{"line_number":144,"context_line":"            self._assert_instance_pinned_cpus(server[\u0027id\u0027], [\u00270\u0027, \u00271\u0027], [0, 1])"},{"line_number":145,"context_line":""}],"source_content_type":"text/x-python","patch_set":73,"id":"1f493fa4_65104701","line":142,"range":{"start_line":134,"start_character":0,"end_line":142,"end_character":66},"in_reply_to":"1f493fa4_7baf967c","updated":"2020-05-01 17:59:11.000000000","message":"Done","commit_id":"06aaa08dc42bf00f5d05fe7bbf5edebe0b91a9fc"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"1fe04572574e78a30be4aeee5ce60361c20986fb","unresolved":false,"context_lines":[{"line_number":152,"context_line":"            dest_mgr.compute_rpcapi.router.client("},{"line_number":153,"context_line":"                ctxt).can_send_version(\u00275.3\u0027))"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def _live_migrate(self, server, migration_final_status):"},{"line_number":156,"context_line":"        self.api.post_server_action("},{"line_number":157,"context_line":"            server[\u0027id\u0027],"},{"line_number":158,"context_line":"            {\u0027os-migrateLive\u0027: {\u0027host\u0027: None,"},{"line_number":159,"context_line":"                                \u0027block_migration\u0027: \u0027auto\u0027}})"},{"line_number":160,"context_line":"        self._wait_for_state_change(server, \u0027ACTIVE\u0027)"},{"line_number":161,"context_line":"        self._wait_for_migration_status(server, [migration_final_status])"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"class NUMALiveMigrationPositiveTests(NUMALiveMigrationPositiveBase):"}],"source_content_type":"text/x-python","patch_set":73,"id":"1f493fa4_5be9fab4","line":161,"range":{"start_line":155,"start_character":0,"end_line":161,"end_character":73},"updated":"2020-04-28 14:17:07.000000000","message":"This could go into the integrated helpers class","commit_id":"06aaa08dc42bf00f5d05fe7bbf5edebe0b91a9fc"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"01b6e7b865bf9ab841a6ae89250b1f5ac28ef79c","unresolved":false,"context_lines":[{"line_number":152,"context_line":"            dest_mgr.compute_rpcapi.router.client("},{"line_number":153,"context_line":"                ctxt).can_send_version(\u00275.3\u0027))"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def _live_migrate(self, server, migration_final_status):"},{"line_number":156,"context_line":"        self.api.post_server_action("},{"line_number":157,"context_line":"            server[\u0027id\u0027],"},{"line_number":158,"context_line":"            {\u0027os-migrateLive\u0027: {\u0027host\u0027: None,"},{"line_number":159,"context_line":"                                \u0027block_migration\u0027: \u0027auto\u0027}})"},{"line_number":160,"context_line":"        self._wait_for_state_change(server, \u0027ACTIVE\u0027)"},{"line_number":161,"context_line":"        self._wait_for_migration_status(server, [migration_final_status])"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"class NUMALiveMigrationPositiveTests(NUMALiveMigrationPositiveBase):"}],"source_content_type":"text/x-python","patch_set":73,"id":"1f493fa4_45beebd4","line":161,"range":{"start_line":155,"start_character":0,"end_line":161,"end_character":73},"in_reply_to":"1f493fa4_5be9fab4","updated":"2020-05-01 17:59:11.000000000","message":"Done","commit_id":"06aaa08dc42bf00f5d05fe7bbf5edebe0b91a9fc"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"1fe04572574e78a30be4aeee5ce60361c20986fb","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        # all 4 of host_b\u0027s CPU are consumed by server_b and the incoming"},{"line_number":183,"context_line":"        # migration."},{"line_number":184,"context_line":"        self._assert_host_consumed_cpus(\u0027host_a\u0027, [0, 1])"},{"line_number":185,"context_line":"        self._assert_host_consumed_cpus(\u0027host_b\u0027, [0, 1, 2, 3])"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"        # In a real live migration, libvirt and QEMU on the source and"},{"line_number":188,"context_line":"        # destination talk it out, resulting in the instance starting to exist"}],"source_content_type":"text/x-python","patch_set":73,"id":"1f493fa4_7bb5d67d","line":185,"updated":"2020-04-28 14:17:07.000000000","message":"It would also be good to query placement\u0027s inventory, which should reflect the same thing afaict","commit_id":"06aaa08dc42bf00f5d05fe7bbf5edebe0b91a9fc"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"01b6e7b865bf9ab841a6ae89250b1f5ac28ef79c","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        # all 4 of host_b\u0027s CPU are consumed by server_b and the incoming"},{"line_number":183,"context_line":"        # migration."},{"line_number":184,"context_line":"        self._assert_host_consumed_cpus(\u0027host_a\u0027, [0, 1])"},{"line_number":185,"context_line":"        self._assert_host_consumed_cpus(\u0027host_b\u0027, [0, 1, 2, 3])"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"        # In a real live migration, libvirt and QEMU on the source and"},{"line_number":188,"context_line":"        # destination talk it out, resulting in the instance starting to exist"}],"source_content_type":"text/x-python","patch_set":73,"id":"1f493fa4_b629e3e6","line":185,"in_reply_to":"1f493fa4_7bb5d67d","updated":"2020-05-01 17:59:11.000000000","message":"Done","commit_id":"06aaa08dc42bf00f5d05fe7bbf5edebe0b91a9fc"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1dbc1c9261ad85ed4d07b247232633826c4a4929","unresolved":false,"context_lines":[{"line_number":192,"context_line":"        dest \u003d self.computes[\u0027host_b\u0027]"},{"line_number":193,"context_line":"        dest.driver._host.get_connection().createXML("},{"line_number":194,"context_line":"            params[\u0027destination_xml\u0027],"},{"line_number":195,"context_line":"            \u0027fake-createXML-doesnt-care-about-flags\u0027)"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        # The resource update periodic task should not change the consumed"},{"line_number":198,"context_line":"        # CPUs, as the migration is still happening. The test should still pass"}],"source_content_type":"text/x-python","patch_set":73,"id":"1f493fa4_0cbd7a01","line":195,"updated":"2020-04-28 16:36:01.000000000","message":"Oof this is hacky :)","commit_id":"06aaa08dc42bf00f5d05fe7bbf5edebe0b91a9fc"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1dbc1c9261ad85ed4d07b247232633826c4a4929","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        # CPUs, as the migration is still happening. The test should still pass"},{"line_number":199,"context_line":"        # without running periodics, this just makes sure updating available"},{"line_number":200,"context_line":"        # resources does the right thing."},{"line_number":201,"context_line":"        self._run_periodics()"},{"line_number":202,"context_line":"        self._assert_host_consumed_cpus(\u0027host_a\u0027, [0, 1])"},{"line_number":203,"context_line":"        self._assert_host_consumed_cpus(\u0027host_b\u0027, [0, 1, 2, 3])"},{"line_number":204,"context_line":""}],"source_content_type":"text/x-python","patch_set":73,"id":"1f493fa4_4ca2e2af","line":201,"updated":"2020-04-28 16:36:01.000000000","message":"I was kinda skeptical about the benefit here, but it does look like this could run while we\u0027re in the middle of a migration (i.e. the post-live call chain doesn\u0027t seem to hold the compute resource semaphore, or at least not for long). Did you add this because you\u0027re just an amazingly detailed individual, or because you saw this interact somewhere sometime?","commit_id":"06aaa08dc42bf00f5d05fe7bbf5edebe0b91a9fc"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"495e600cf516eba359338bcdc32a75447d42355c","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        # CPUs, as the migration is still happening. The test should still pass"},{"line_number":199,"context_line":"        # without running periodics, this just makes sure updating available"},{"line_number":200,"context_line":"        # resources does the right thing."},{"line_number":201,"context_line":"        self._run_periodics()"},{"line_number":202,"context_line":"        self._assert_host_consumed_cpus(\u0027host_a\u0027, [0, 1])"},{"line_number":203,"context_line":"        self._assert_host_consumed_cpus(\u0027host_b\u0027, [0, 1, 2, 3])"},{"line_number":204,"context_line":""}],"source_content_type":"text/x-python","patch_set":73,"id":"1f493fa4_e4b30209","line":201,"in_reply_to":"1f493fa4_4ca2e2af","updated":"2020-04-28 17:33:01.000000000","message":"\u003e semaphore, or at least not for long). Did you add this because\n \u003e you\u0027re just an amazingly detailed individual, or because you saw\n \u003e this interact somewhere sometime?\n\nThe latter, unfortunately. I can\u0027t track down the exact email/review comment, but someone tested it and found that the periodic would revert any changes that the resource claim initially made.","commit_id":"06aaa08dc42bf00f5d05fe7bbf5edebe0b91a9fc"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1dbc1c9261ad85ed4d07b247232633826c4a4929","unresolved":false,"context_lines":[{"line_number":228,"context_line":"        if pin_dest:"},{"line_number":229,"context_line":"            self._rpc_pin_host(\u0027host_b\u0027)"},{"line_number":230,"context_line":"        self._live_migrate(self.server_a, \u0027completed\u0027)"},{"line_number":231,"context_line":"        self.assertEqual(\u0027host_b\u0027, self.get_host(self.server_a[\u0027id\u0027]))"},{"line_number":232,"context_line":"        self._assert_no_migration_context(self.server_a[\u0027id\u0027])"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"        # At this point host_a should have no CPUs consumed (server_a has moved"}],"source_content_type":"text/x-python","patch_set":73,"id":"1f493fa4_ecedaeb7","line":231,"updated":"2020-04-28 16:36:01.000000000","message":"Apologies if I missed it in all the indirection, but did we ever assert that server_a landed on host_a to start with?","commit_id":"06aaa08dc42bf00f5d05fe7bbf5edebe0b91a9fc"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"495e600cf516eba359338bcdc32a75447d42355c","unresolved":false,"context_lines":[{"line_number":228,"context_line":"        if pin_dest:"},{"line_number":229,"context_line":"            self._rpc_pin_host(\u0027host_b\u0027)"},{"line_number":230,"context_line":"        self._live_migrate(self.server_a, \u0027completed\u0027)"},{"line_number":231,"context_line":"        self.assertEqual(\u0027host_b\u0027, self.get_host(self.server_a[\u0027id\u0027]))"},{"line_number":232,"context_line":"        self._assert_no_migration_context(self.server_a[\u0027id\u0027])"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"        # At this point host_a should have no CPUs consumed (server_a has moved"}],"source_content_type":"text/x-python","patch_set":73,"id":"1f493fa4_4472b64a","line":231,"in_reply_to":"1f493fa4_ecedaeb7","updated":"2020-04-28 17:33:01.000000000","message":"Yeah, on L143.","commit_id":"06aaa08dc42bf00f5d05fe7bbf5edebe0b91a9fc"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1dbc1c9261ad85ed4d07b247232633826c4a4929","unresolved":false,"context_lines":[{"line_number":240,"context_line":"        self._assert_host_consumed_cpus(\u0027host_a\u0027, [])"},{"line_number":241,"context_line":"        self._assert_host_consumed_cpus(\u0027host_b\u0027, [0, 1, 2, 3])"},{"line_number":242,"context_line":"        self._assert_instance_pinned_cpus(self.server_a[\u0027id\u0027],"},{"line_number":243,"context_line":"                                          [\u00270\u0027, \u00271\u0027], [2, 3])"},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"        self._run_periodics()"},{"line_number":246,"context_line":""}],"source_content_type":"text/x-python","patch_set":73,"id":"1f493fa4_e24e5736","line":243,"range":{"start_line":243,"start_character":42,"end_line":243,"end_character":60},"updated":"2020-04-28 16:36:01.000000000","message":"What\u0027s with the mix of strings and integers here?","commit_id":"06aaa08dc42bf00f5d05fe7bbf5edebe0b91a9fc"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"01b6e7b865bf9ab841a6ae89250b1f5ac28ef79c","unresolved":false,"context_lines":[{"line_number":240,"context_line":"        self._assert_host_consumed_cpus(\u0027host_a\u0027, [])"},{"line_number":241,"context_line":"        self._assert_host_consumed_cpus(\u0027host_b\u0027, [0, 1, 2, 3])"},{"line_number":242,"context_line":"        self._assert_instance_pinned_cpus(self.server_a[\u0027id\u0027],"},{"line_number":243,"context_line":"                                          [\u00270\u0027, \u00271\u0027], [2, 3])"},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"        self._run_periodics()"},{"line_number":246,"context_line":""}],"source_content_type":"text/x-python","patch_set":73,"id":"1f493fa4_d670ef42","line":243,"range":{"start_line":243,"start_character":42,"end_line":243,"end_character":60},"in_reply_to":"1f493fa4_24268acf","updated":"2020-05-01 17:59:11.000000000","message":"Done","commit_id":"06aaa08dc42bf00f5d05fe7bbf5edebe0b91a9fc"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"16ec50a3960b7bdbb64f6253a4a7c6629a6623a6","unresolved":false,"context_lines":[{"line_number":240,"context_line":"        self._assert_host_consumed_cpus(\u0027host_a\u0027, [])"},{"line_number":241,"context_line":"        self._assert_host_consumed_cpus(\u0027host_b\u0027, [0, 1, 2, 3])"},{"line_number":242,"context_line":"        self._assert_instance_pinned_cpus(self.server_a[\u0027id\u0027],"},{"line_number":243,"context_line":"                                          [\u00270\u0027, \u00271\u0027], [2, 3])"},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"        self._run_periodics()"},{"line_number":246,"context_line":""}],"source_content_type":"text/x-python","patch_set":73,"id":"1f493fa4_24268acf","line":243,"range":{"start_line":243,"start_character":42,"end_line":243,"end_character":60},"in_reply_to":"1f493fa4_44a756a8","updated":"2020-04-28 17:42:41.000000000","message":"It\u0027d be nicer to always pass ints in here, and then convert them to strings inline with the assertEqual I think. There the context is related to the field where here is just looks kinda sloppy.","commit_id":"06aaa08dc42bf00f5d05fe7bbf5edebe0b91a9fc"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"495e600cf516eba359338bcdc32a75447d42355c","unresolved":false,"context_lines":[{"line_number":240,"context_line":"        self._assert_host_consumed_cpus(\u0027host_a\u0027, [])"},{"line_number":241,"context_line":"        self._assert_host_consumed_cpus(\u0027host_b\u0027, [0, 1, 2, 3])"},{"line_number":242,"context_line":"        self._assert_instance_pinned_cpus(self.server_a[\u0027id\u0027],"},{"line_number":243,"context_line":"                                          [\u00270\u0027, \u00271\u0027], [2, 3])"},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"        self._run_periodics()"},{"line_number":246,"context_line":""}],"source_content_type":"text/x-python","patch_set":73,"id":"1f493fa4_44a756a8","line":243,"range":{"start_line":243,"start_character":42,"end_line":243,"end_character":60},"in_reply_to":"1f493fa4_e24e5736","updated":"2020-04-28 17:33:01.000000000","message":"It comes from a DictOfIntegers field, in which the keys are strings (but the values are ints)","commit_id":"06aaa08dc42bf00f5d05fe7bbf5edebe0b91a9fc"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1dbc1c9261ad85ed4d07b247232633826c4a4929","unresolved":false,"context_lines":[{"line_number":249,"context_line":"        self._assert_instance_pinned_cpus(self.server_a[\u0027id\u0027],"},{"line_number":250,"context_line":"                                          [\u00270\u0027, \u00271\u0027], [2, 3])"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"        self.assertTrue(self.migrate_stub_ran)"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"        # TODO(artom) It\u0027d be a good idea to live migrate in the other"},{"line_number":255,"context_line":"        # direction here."}],"source_content_type":"text/x-python","patch_set":73,"id":"1f493fa4_e28bf764","line":252,"updated":"2020-04-28 16:36:01.000000000","message":"Isn\u0027t the method you monkeypatched actually a mock.Mock() ? If so, you could check its .called instead of requiring subclasses to remember to set this flag...","commit_id":"06aaa08dc42bf00f5d05fe7bbf5edebe0b91a9fc"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"16ec50a3960b7bdbb64f6253a4a7c6629a6623a6","unresolved":false,"context_lines":[{"line_number":249,"context_line":"        self._assert_instance_pinned_cpus(self.server_a[\u0027id\u0027],"},{"line_number":250,"context_line":"                                          [\u00270\u0027, \u00271\u0027], [2, 3])"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"        self.assertTrue(self.migrate_stub_ran)"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"        # TODO(artom) It\u0027d be a good idea to live migrate in the other"},{"line_number":255,"context_line":"        # direction here."}],"source_content_type":"text/x-python","patch_set":73,"id":"1f493fa4_a41bba7e","line":252,"in_reply_to":"1f493fa4_641ff2b6","updated":"2020-04-28 17:42:41.000000000","message":"I know it is, but I thought fixtures.MonkeyPatch provides behavior of the old thing using mock now?","commit_id":"06aaa08dc42bf00f5d05fe7bbf5edebe0b91a9fc"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"495e600cf516eba359338bcdc32a75447d42355c","unresolved":false,"context_lines":[{"line_number":249,"context_line":"        self._assert_instance_pinned_cpus(self.server_a[\u0027id\u0027],"},{"line_number":250,"context_line":"                                          [\u00270\u0027, \u00271\u0027], [2, 3])"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"        self.assertTrue(self.migrate_stub_ran)"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"        # TODO(artom) It\u0027d be a good idea to live migrate in the other"},{"line_number":255,"context_line":"        # direction here."}],"source_content_type":"text/x-python","patch_set":73,"id":"1f493fa4_641ff2b6","line":252,"in_reply_to":"1f493fa4_e28bf764","updated":"2020-04-28 17:33:01.000000000","message":"It\u0027s a fixtures.MonkeyPatch (see L110), I thought that didn\u0027t have the mock magic?","commit_id":"06aaa08dc42bf00f5d05fe7bbf5edebe0b91a9fc"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"1fe04572574e78a30be4aeee5ce60361c20986fb","unresolved":false,"context_lines":[{"line_number":384,"context_line":"        extra_spec \u003d {\u0027hw:numa_nodes\u0027: 1,"},{"line_number":385,"context_line":"                      \u0027hw:cpu_policy\u0027: \u0027dedicated\u0027}"},{"line_number":386,"context_line":"        flavor \u003d self._create_flavor(vcpu\u003d2, extra_spec\u003dextra_spec)"},{"line_number":387,"context_line":"        server \u003d self._build_server("},{"line_number":388,"context_line":"            flavor_id\u003dflavor,"},{"line_number":389,"context_line":"            image_uuid\u003d\u0027155d900f-4e14-4e4c-a73d-069cbf4541e6\u0027)"},{"line_number":390,"context_line":"        server[\u0027networks\u0027] \u003d \u0027none\u0027"},{"line_number":391,"context_line":"        post \u003d {\u0027server\u0027: server}"},{"line_number":392,"context_line":"        server1 \u003d self.api.post_server(post)"},{"line_number":393,"context_line":"        server2 \u003d self.api.post_server(post)"},{"line_number":394,"context_line":"        self._wait_for_state_change(server1, \u0027ACTIVE\u0027)"},{"line_number":395,"context_line":"        self._wait_for_state_change(server2, \u0027ACTIVE\u0027)"},{"line_number":396,"context_line":"        if self.get_host(server1[\u0027id\u0027]) \u003d\u003d \u0027source\u0027:"},{"line_number":397,"context_line":"            self.migrating_server \u003d server1"},{"line_number":398,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":73,"id":"1f493fa4_db286a98","line":395,"range":{"start_line":387,"start_character":0,"end_line":395,"end_character":54},"updated":"2020-04-28 14:17:07.000000000","message":"Try:\n\n  server1 \u003d self._create_server(flavor_id\u003dflavor, networks\u003d\u0027none\u0027)\n  server2 \u003d self._create_server(flavor_id\u003dflavor, networks\u003d\u0027none\u0027)","commit_id":"06aaa08dc42bf00f5d05fe7bbf5edebe0b91a9fc"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"01b6e7b865bf9ab841a6ae89250b1f5ac28ef79c","unresolved":false,"context_lines":[{"line_number":384,"context_line":"        extra_spec \u003d {\u0027hw:numa_nodes\u0027: 1,"},{"line_number":385,"context_line":"                      \u0027hw:cpu_policy\u0027: \u0027dedicated\u0027}"},{"line_number":386,"context_line":"        flavor \u003d self._create_flavor(vcpu\u003d2, extra_spec\u003dextra_spec)"},{"line_number":387,"context_line":"        server \u003d self._build_server("},{"line_number":388,"context_line":"            flavor_id\u003dflavor,"},{"line_number":389,"context_line":"            image_uuid\u003d\u0027155d900f-4e14-4e4c-a73d-069cbf4541e6\u0027)"},{"line_number":390,"context_line":"        server[\u0027networks\u0027] \u003d \u0027none\u0027"},{"line_number":391,"context_line":"        post \u003d {\u0027server\u0027: server}"},{"line_number":392,"context_line":"        server1 \u003d self.api.post_server(post)"},{"line_number":393,"context_line":"        server2 \u003d self.api.post_server(post)"},{"line_number":394,"context_line":"        self._wait_for_state_change(server1, \u0027ACTIVE\u0027)"},{"line_number":395,"context_line":"        self._wait_for_state_change(server2, \u0027ACTIVE\u0027)"},{"line_number":396,"context_line":"        if self.get_host(server1[\u0027id\u0027]) \u003d\u003d \u0027source\u0027:"},{"line_number":397,"context_line":"            self.migrating_server \u003d server1"},{"line_number":398,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":73,"id":"1f493fa4_56b33fe9","line":395,"range":{"start_line":387,"start_character":0,"end_line":395,"end_character":54},"in_reply_to":"1f493fa4_db286a98","updated":"2020-05-01 17:59:11.000000000","message":"Done","commit_id":"06aaa08dc42bf00f5d05fe7bbf5edebe0b91a9fc"}],"nova/tests/unit/virt/libvirt/fake_imagebackend.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8011f1cbd2c0e48d3cbbd1a94e7d31d8861b8969","unresolved":false,"context_lines":[{"line_number":74,"context_line":"            \u0027nova.virt.libvirt.driver.LibvirtDriver._create_swap\u0027,"},{"line_number":75,"context_line":"            self.mock_create_swap))"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        self.mock_is_shared_block_storage \u003d mock.create_autospec("},{"line_number":78,"context_line":"            driver.LibvirtDriver._is_shared_block_storage, return_value\u003dTrue)"},{"line_number":79,"context_line":"        self.useFixture(fixtures.MonkeyPatch("},{"line_number":80,"context_line":"            \u0027nova.virt.libvirt.driver.LibvirtDriver._is_shared_block_storage\u0027,"},{"line_number":81,"context_line":"            self.mock_is_shared_block_storage))"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        # Backend.backend creates all Image objects"},{"line_number":84,"context_line":"        self.useFixture(fixtures.MonkeyPatch("}],"source_content_type":"text/x-python","patch_set":57,"id":"3fa7e38b_a3b2ff47","line":81,"range":{"start_line":77,"start_character":0,"end_line":81,"end_character":47},"updated":"2019-10-10 15:38:38.000000000","message":"Rather than doing this, could we set the relevant attributes on the fake image backend? (nova/tests/unit/virt/libvirt/fake_imagebackend.py). Looking at the function, it seems that\u0027s either \u0027is_shared_block_storage\u0027 or \u0027is_file_in_instance_path\u0027?","commit_id":"1ebbd1afe500649f57824104f7957b5d5758cd5c"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"780743d35db7ad3139a3ccf8f5cb5152107e14d3","unresolved":false,"context_lines":[{"line_number":74,"context_line":"            \u0027nova.virt.libvirt.driver.LibvirtDriver._create_swap\u0027,"},{"line_number":75,"context_line":"            self.mock_create_swap))"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        self.mock_is_shared_block_storage \u003d mock.create_autospec("},{"line_number":78,"context_line":"            driver.LibvirtDriver._is_shared_block_storage, return_value\u003dTrue)"},{"line_number":79,"context_line":"        self.useFixture(fixtures.MonkeyPatch("},{"line_number":80,"context_line":"            \u0027nova.virt.libvirt.driver.LibvirtDriver._is_shared_block_storage\u0027,"},{"line_number":81,"context_line":"            self.mock_is_shared_block_storage))"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        # Backend.backend creates all Image objects"},{"line_number":84,"context_line":"        self.useFixture(fixtures.MonkeyPatch("}],"source_content_type":"text/x-python","patch_set":57,"id":"3fa7e38b_c2a3a0ff","line":81,"range":{"start_line":77,"start_character":0,"end_line":81,"end_character":47},"in_reply_to":"3fa7e38b_a3b2ff47","updated":"2019-10-24 17:35:15.000000000","message":"Done","commit_id":"1ebbd1afe500649f57824104f7957b5d5758cd5c"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"dac6a2d75462fd6c2f913d299777660396f377ba","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        # class."},{"line_number":185,"context_line":"        image_init.SUPPORTS_CLONE \u003d False"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"        image_init.is_shared_block_storage \u003d lambda: False"},{"line_number":188,"context_line":"        image_init.is_file_in_instance_path \u003d lambda: False"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        return image_init"},{"line_number":191,"context_line":""}],"source_content_type":"text/x-python","patch_set":59,"id":"3fa7e38b_8853896c","line":188,"range":{"start_line":187,"start_character":0,"end_line":188,"end_character":59},"updated":"2019-11-14 17:40:05.000000000","message":"ima guess mriedem is going to ask for comments on this, like he did for [1] at some point (on IRC, maybe? idk)\n\n[1] https://review.opendev.org/#/c/662522/","commit_id":"1f6b648d4e13d458e8fdd52beab22ba1d1672f9d"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"e3e3c7a7ac530ee8c0144ff713a5e969e3f2787f","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        # class."},{"line_number":185,"context_line":"        image_init.SUPPORTS_CLONE \u003d False"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"        image_init.is_shared_block_storage \u003d lambda: False"},{"line_number":188,"context_line":"        image_init.is_file_in_instance_path \u003d lambda: False"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        return image_init"},{"line_number":191,"context_line":""}],"source_content_type":"text/x-python","patch_set":59,"id":"3fa7e38b_f83652e7","line":188,"range":{"start_line":187,"start_character":0,"end_line":188,"end_character":59},"in_reply_to":"3fa7e38b_8853896c","updated":"2019-11-19 20:32:41.000000000","message":"Added words, hopefully they\u0027re the right ones.","commit_id":"1f6b648d4e13d458e8fdd52beab22ba1d1672f9d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7046b6d8f32f3b4650a7d6c90d46c1443da60292","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        # The base Image imagebackend returns False in both of these, only the"},{"line_number":188,"context_line":"        # Rbd backend returns True."},{"line_number":189,"context_line":"        image_init.is_shared_block_storage \u003d lambda: False"},{"line_number":190,"context_line":"        image_init.is_file_in_instance_path \u003d lambda: False"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        return image_init"},{"line_number":193,"context_line":""}],"source_content_type":"text/x-python","patch_set":61,"id":"3fa7e38b_3df43888","line":190,"updated":"2020-01-16 16:53:05.000000000","message":"Why is this relevant to your patch? I don\u0027t see it in your commit message and it seems rather random.","commit_id":"d9846d26f3e658be696773d6f9936ce1552a581e"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"4c06ba550241783232f13fcd4f3e955c9d2de14d","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        # The base Image imagebackend returns False in both of these, only the"},{"line_number":188,"context_line":"        # Rbd backend returns True."},{"line_number":189,"context_line":"        image_init.is_shared_block_storage \u003d lambda: False"},{"line_number":190,"context_line":"        image_init.is_file_in_instance_path \u003d lambda: False"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        return image_init"},{"line_number":193,"context_line":""}],"source_content_type":"text/x-python","patch_set":61,"id":"3fa7e38b_b9f4a789","line":190,"in_reply_to":"3fa7e38b_3df43888","updated":"2020-01-17 21:15:12.000000000","message":"image_init() stands in for a imagebackend Backend object, and these two methods are eventually called by the initial _check_can_live_migrate_(destination|source) checks, so we need them here. I\u0027ll add a note to the commit message.","commit_id":"d9846d26f3e658be696773d6f9936ce1552a581e"}],"nova/tests/unit/virt/libvirt/fakelibvirt.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"65bc51a8c30a174acf9399f004d6bd9ecaed4172","unresolved":false,"context_lines":[{"line_number":1222,"context_line":""},{"line_number":1223,"context_line":"    def jobStats(self, flags\u003d0):"},{"line_number":1224,"context_line":"        # NOTE(artom) By returning VIR_DOMAIN_JOB_UNBOUNDED, we\u0027re pretending a"},{"line_number":1225,"context_line":"        # job is constrantly running. Tests are expected to monkeypatch this"},{"line_number":1226,"context_line":"        # method when they\u0027re ready for jobs (read: live migrations) to"},{"line_number":1227,"context_line":"        # \"complete\"."},{"line_number":1228,"context_line":"        return {\u0027type\u0027: VIR_DOMAIN_JOB_UNBOUNDED}"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_3cf3db0b","line":1225,"range":{"start_line":1225,"start_character":17,"end_line":1225,"end_character":28},"updated":"2019-08-27 15:31:12.000000000","message":"constantly","commit_id":"676b3cd9ebd18b4c8ee51ebdfb4e6a067836d949"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8011f1cbd2c0e48d3cbbd1a94e7d31d8861b8969","unresolved":false,"context_lines":[{"line_number":477,"context_line":"        :param cpu_nodes: (int) the number of NUMA cell, 1 for unusual"},{"line_number":478,"context_line":"                          NUMA topologies or uniform"},{"line_number":479,"context_line":"        :param cpu_sockets: (int or list) If int, number of CPU sockets per"},{"line_number":480,"context_line":"                            node. If list, must have length \u003d\u003d cpu_nodes, and"},{"line_number":481,"context_line":"                            cpu_sockets[i] indicates the number of sockets in"},{"line_number":482,"context_line":"                            node i. For example, cpu_sockets \u003d [2, 4] means the"},{"line_number":483,"context_line":"                            first node has 2 sockets and the second has 4."},{"line_number":484,"context_line":"        :param cpu_cores: (int) number of cores per socket"},{"line_number":485,"context_line":"        :param cpu_threads: (int) number of threads per core"},{"line_number":486,"context_line":"        :param kB_mem: (int) memory size in KBytes"}],"source_content_type":"text/x-python","patch_set":57,"id":"3fa7e38b_23adaf9a","line":483,"range":{"start_line":480,"start_character":5,"end_line":483,"end_character":74},"updated":"2019-10-10 15:38:38.000000000","message":"But whyyyy? Is that a realistic topology that someone will encounter in the wild? If not, why consider it?","commit_id":"1ebbd1afe500649f57824104f7957b5d5758cd5c"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"dac6a2d75462fd6c2f913d299777660396f377ba","unresolved":false,"context_lines":[{"line_number":1246,"context_line":""},{"line_number":1247,"context_line":"    def jobStats(self, flags\u003d0):"},{"line_number":1248,"context_line":"        # NOTE(artom) By returning VIR_DOMAIN_JOB_UNBOUNDED, we\u0027re pretending a"},{"line_number":1249,"context_line":"        # job is constrantly running. Tests are expected to monkeypatch this"},{"line_number":1250,"context_line":"        # method when they\u0027re ready for jobs (read: live migrations) to"},{"line_number":1251,"context_line":"        # \"complete\"."},{"line_number":1252,"context_line":"        return {\u0027type\u0027: VIR_DOMAIN_JOB_UNBOUNDED}"}],"source_content_type":"text/x-python","patch_set":59,"id":"3fa7e38b_c8ce612c","line":1249,"range":{"start_line":1249,"start_character":22,"end_line":1249,"end_character":23},"updated":"2019-11-14 17:40:05.000000000","message":"nit","commit_id":"1f6b648d4e13d458e8fdd52beab22ba1d1672f9d"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"e3e3c7a7ac530ee8c0144ff713a5e969e3f2787f","unresolved":false,"context_lines":[{"line_number":1246,"context_line":""},{"line_number":1247,"context_line":"    def jobStats(self, flags\u003d0):"},{"line_number":1248,"context_line":"        # NOTE(artom) By returning VIR_DOMAIN_JOB_UNBOUNDED, we\u0027re pretending a"},{"line_number":1249,"context_line":"        # job is constrantly running. Tests are expected to monkeypatch this"},{"line_number":1250,"context_line":"        # method when they\u0027re ready for jobs (read: live migrations) to"},{"line_number":1251,"context_line":"        # \"complete\"."},{"line_number":1252,"context_line":"        return {\u0027type\u0027: VIR_DOMAIN_JOB_UNBOUNDED}"}],"source_content_type":"text/x-python","patch_set":59,"id":"3fa7e38b_a303f40b","line":1249,"range":{"start_line":1249,"start_character":22,"end_line":1249,"end_character":23},"in_reply_to":"3fa7e38b_c8ce612c","updated":"2019-11-19 20:32:41.000000000","message":"Done","commit_id":"1f6b648d4e13d458e8fdd52beab22ba1d1672f9d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7046b6d8f32f3b4650a7d6c90d46c1443da60292","unresolved":false,"context_lines":[{"line_number":486,"context_line":"                            node. If list, must have length \u003d\u003d cpu_nodes, and"},{"line_number":487,"context_line":"                            cpu_sockets[i] indicates the number of sockets in"},{"line_number":488,"context_line":"                            node i. For example, cpu_sockets \u003d [2, 4] means the"},{"line_number":489,"context_line":"                            first node has 2 sockets and the second has 4."},{"line_number":490,"context_line":"        :param cpu_cores: (int) number of cores per socket"},{"line_number":491,"context_line":"        :param cpu_threads: (int) number of threads per core"},{"line_number":492,"context_line":"        :param kB_mem: (int) memory size in KBytes"}],"source_content_type":"text/x-python","patch_set":61,"id":"3fa7e38b_dd1164b0","line":489,"updated":"2020-01-16 16:53:05.000000000","message":"This is an unfortunate change. I assume you\u0027re doing this to avoid refactoring a bunch of tests, but this really doesn\u0027t help future maintainability.","commit_id":"d9846d26f3e658be696773d6f9936ce1552a581e"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"4c06ba550241783232f13fcd4f3e955c9d2de14d","unresolved":false,"context_lines":[{"line_number":486,"context_line":"                            node. If list, must have length \u003d\u003d cpu_nodes, and"},{"line_number":487,"context_line":"                            cpu_sockets[i] indicates the number of sockets in"},{"line_number":488,"context_line":"                            node i. For example, cpu_sockets \u003d [2, 4] means the"},{"line_number":489,"context_line":"                            first node has 2 sockets and the second has 4."},{"line_number":490,"context_line":"        :param cpu_cores: (int) number of cores per socket"},{"line_number":491,"context_line":"        :param cpu_threads: (int) number of threads per core"},{"line_number":492,"context_line":"        :param kB_mem: (int) memory size in KBytes"}],"source_content_type":"text/x-python","patch_set":61,"id":"3fa7e38b_1997fb3b","line":489,"in_reply_to":"3fa7e38b_dd1164b0","updated":"2020-01-17 21:15:12.000000000","message":"My line of thinking here was - the default type of cpu_sockets being int (meaning all nodes have the same number of sockets per node) is what\u0027ll get used by the vast majority of tests, and I don\u0027t want to complicate that.\n\nWhat I do want, is a parallel way to introduce more complexity for tests that need artificial (because such topologies can never exist in real life, and are purely used to force tests into desired scenarios) asymmetric topologies.\n\nI agree that this is an ugly way of doing it - having spelled out the problem, I\u0027ll have a think about a solution.","commit_id":"d9846d26f3e658be696773d6f9936ce1552a581e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7046b6d8f32f3b4650a7d6c90d46c1443da60292","unresolved":false,"context_lines":[{"line_number":1255,"context_line":"        # job is constantly running. Tests are expected to monkeypatch this"},{"line_number":1256,"context_line":"        # method when they\u0027re ready for jobs (read: live migrations) to"},{"line_number":1257,"context_line":"        # \"complete\"."},{"line_number":1258,"context_line":"        return {\u0027type\u0027: VIR_DOMAIN_JOB_UNBOUNDED}"},{"line_number":1259,"context_line":""},{"line_number":1260,"context_line":"    def injectNMI(self, flags\u003d0):"},{"line_number":1261,"context_line":"        return 0"}],"source_content_type":"text/x-python","patch_set":61,"id":"3fa7e38b_7d7dd0e4","line":1258,"updated":"2020-01-16 16:53:05.000000000","message":"Ah, is this why you use a fixture in the middle of the test?\n\nWhy not have some test-only interface on this module to set the job state or something like that instead of patching?","commit_id":"d9846d26f3e658be696773d6f9936ce1552a581e"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"4c06ba550241783232f13fcd4f3e955c9d2de14d","unresolved":false,"context_lines":[{"line_number":1255,"context_line":"        # job is constantly running. Tests are expected to monkeypatch this"},{"line_number":1256,"context_line":"        # method when they\u0027re ready for jobs (read: live migrations) to"},{"line_number":1257,"context_line":"        # \"complete\"."},{"line_number":1258,"context_line":"        return {\u0027type\u0027: VIR_DOMAIN_JOB_UNBOUNDED}"},{"line_number":1259,"context_line":""},{"line_number":1260,"context_line":"    def injectNMI(self, flags\u003d0):"},{"line_number":1261,"context_line":"        return 0"}],"source_content_type":"text/x-python","patch_set":61,"id":"3fa7e38b_f951bf0e","line":1258,"in_reply_to":"3fa7e38b_7d7dd0e4","updated":"2020-01-17 21:15:12.000000000","message":"Done","commit_id":"d9846d26f3e658be696773d6f9936ce1552a581e"}],"nova/tests/unit/virt/test_virt_drivers.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"dac6a2d75462fd6c2f913d299777660396f377ba","unresolved":false,"context_lines":[{"line_number":620,"context_line":"        self.connection.unfilter_instance(instance_ref, network_info)"},{"line_number":621,"context_line":""},{"line_number":622,"context_line":"    @mock.patch(\u0027nova.tests.unit.virt.libvirt.fakelibvirt.Domain.jobStats\u0027,"},{"line_number":623,"context_line":"                return_value\u003d{\u0027type\u0027: fakelibvirt.VIR_DOMAIN_JOB_COMPLETED})"},{"line_number":624,"context_line":"    def test_live_migration(self, _):"},{"line_number":625,"context_line":"        instance_ref, network_info \u003d self._get_running_instance()"},{"line_number":626,"context_line":"        fake_context \u003d context.RequestContext(\u0027fake\u0027, \u0027fake\u0027)"}],"source_content_type":"text/x-python","patch_set":59,"id":"3fa7e38b_08eeb98a","line":623,"range":{"start_line":623,"start_character":16,"end_line":623,"end_character":29},"updated":"2019-11-14 17:40:05.000000000","message":"try:\n\n  new\u003dmock.Mock(return_value\u003d{...})\n\nand drop the \u0027_\u0027 below","commit_id":"1f6b648d4e13d458e8fdd52beab22ba1d1672f9d"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"e3e3c7a7ac530ee8c0144ff713a5e969e3f2787f","unresolved":false,"context_lines":[{"line_number":620,"context_line":"        self.connection.unfilter_instance(instance_ref, network_info)"},{"line_number":621,"context_line":""},{"line_number":622,"context_line":"    @mock.patch(\u0027nova.tests.unit.virt.libvirt.fakelibvirt.Domain.jobStats\u0027,"},{"line_number":623,"context_line":"                return_value\u003d{\u0027type\u0027: fakelibvirt.VIR_DOMAIN_JOB_COMPLETED})"},{"line_number":624,"context_line":"    def test_live_migration(self, _):"},{"line_number":625,"context_line":"        instance_ref, network_info \u003d self._get_running_instance()"},{"line_number":626,"context_line":"        fake_context \u003d context.RequestContext(\u0027fake\u0027, \u0027fake\u0027)"}],"source_content_type":"text/x-python","patch_set":59,"id":"3fa7e38b_63117c53","line":623,"range":{"start_line":623,"start_character":16,"end_line":623,"end_character":29},"in_reply_to":"3fa7e38b_08eeb98a","updated":"2019-11-19 20:32:41.000000000","message":"Done","commit_id":"1f6b648d4e13d458e8fdd52beab22ba1d1672f9d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"532a9a6492158b6ac3bfaa60532161e663a5f1e6","unresolved":false,"context_lines":[{"line_number":596,"context_line":""},{"line_number":597,"context_line":"    @mock.patch("},{"line_number":598,"context_line":"        \u0027nova.tests.unit.virt.libvirt.fakelibvirt.Domain.jobStats\u0027,"},{"line_number":599,"context_line":"        new\u003dmock.Mock("},{"line_number":600,"context_line":"            return_value\u003d{\u0027type\u0027: fakelibvirt.VIR_DOMAIN_JOB_COMPLETED}))"},{"line_number":601,"context_line":"    def test_live_migration(self):"},{"line_number":602,"context_line":"        instance_ref, network_info \u003d self._get_running_instance()"},{"line_number":603,"context_line":"        fake_context \u003d context.RequestContext(\u0027fake\u0027, \u0027fake\u0027)"}],"source_content_type":"text/x-python","patch_set":64,"id":"3fa7e38b_07dcbb6f","line":600,"range":{"start_line":599,"start_character":8,"end_line":600,"end_character":73},"updated":"2020-01-31 17:10:23.000000000","message":"style nit:\n\n  new\u003dmock.Mock(return_value\u003d{\n      \u0027type\u0027: ...}))\n\ndon\u0027t know why, just reads nicer","commit_id":"ca109294a3e0c6b7fe0ac0660d86427e46ec613a"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"8993f75f1145b0104c1ac5187e28904fab3de713","unresolved":false,"context_lines":[{"line_number":596,"context_line":""},{"line_number":597,"context_line":"    @mock.patch("},{"line_number":598,"context_line":"        \u0027nova.tests.unit.virt.libvirt.fakelibvirt.Domain.jobStats\u0027,"},{"line_number":599,"context_line":"        new\u003dmock.Mock("},{"line_number":600,"context_line":"            return_value\u003d{\u0027type\u0027: fakelibvirt.VIR_DOMAIN_JOB_COMPLETED}))"},{"line_number":601,"context_line":"    def test_live_migration(self):"},{"line_number":602,"context_line":"        instance_ref, network_info \u003d self._get_running_instance()"},{"line_number":603,"context_line":"        fake_context \u003d context.RequestContext(\u0027fake\u0027, \u0027fake\u0027)"}],"source_content_type":"text/x-python","patch_set":64,"id":"3fa7e38b_01556ff9","line":600,"range":{"start_line":599,"start_character":8,"end_line":600,"end_character":73},"in_reply_to":"3fa7e38b_07dcbb6f","updated":"2020-02-03 20:22:50.000000000","message":"Done","commit_id":"ca109294a3e0c6b7fe0ac0660d86427e46ec613a"}]}
