)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c46175a4c4b26292c9df4e913f7ef6d6fcf80c35","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When trying to fit an instance\u0027s topology to a host\u0027s, various"},{"line_number":10,"context_line":"permutations of the host are attempted in the hope of finding one that"},{"line_number":11,"context_line":"can be used. Modify this iteration to try use cells without a PCI"},{"line_number":12,"context_line":"device attached first when we don\u0027t require PCI devices."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I8be6bf8c437fc801499b213c2e884defb7900b17"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"bf091321_75e1949a","line":11,"range":{"start_line":11,"start_character":42,"end_line":11,"end_character":45},"updated":"2017-06-09 03:08:08.000000000","message":"to use","commit_id":"0f6ab0dd7a2d11e15323da31848c8f87796d9f80"}],"nova/tests/unit/virt/test_hardware.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c46175a4c4b26292c9df4e913f7ef6d6fcf80c35","unresolved":false,"context_lines":[{"line_number":1795,"context_line":"        # the PCI device is found on host cell 1"},{"line_number":1796,"context_line":"        pci_stats \u003d _create_pci_stats(1)"},{"line_number":1797,"context_line":""},{"line_number":1798,"context_line":"        # ...threfore an instance without a PCI device should get host cell 2"},{"line_number":1799,"context_line":"        instance_topology \u003d hw.numa_fit_instance_to_host("},{"line_number":1800,"context_line":"                self.host, self.instance1, pci_stats\u003dpci_stats)"},{"line_number":1801,"context_line":"        self.assertIsInstance(instance_topology, objects.InstanceNUMATopology)"}],"source_content_type":"text/x-python","patch_set":19,"id":"bf091321_95e428ae","line":1798,"range":{"start_line":1798,"start_character":13,"end_line":1798,"end_character":21},"updated":"2017-06-09 03:08:08.000000000","message":"therefore","commit_id":"0f6ab0dd7a2d11e15323da31848c8f87796d9f80"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c46175a4c4b26292c9df4e913f7ef6d6fcf80c35","unresolved":false,"context_lines":[{"line_number":1805,"context_line":"        # the PCI device is now found on host cell 2"},{"line_number":1806,"context_line":"        pci_stats \u003d _create_pci_stats(2)"},{"line_number":1807,"context_line":""},{"line_number":1808,"context_line":"        # ...threfore an instance without a PCI device should get host cell 1"},{"line_number":1809,"context_line":"        instance_topology \u003d hw.numa_fit_instance_to_host("},{"line_number":1810,"context_line":"                self.host, self.instance1, pci_stats\u003dpci_stats)"},{"line_number":1811,"context_line":"        self.assertIsInstance(instance_topology, objects.InstanceNUMATopology)"}],"source_content_type":"text/x-python","patch_set":19,"id":"bf091321_35c31cf0","line":1808,"range":{"start_line":1808,"start_character":13,"end_line":1808,"end_character":21},"updated":"2017-06-09 03:08:08.000000000","message":"therefore","commit_id":"0f6ab0dd7a2d11e15323da31848c8f87796d9f80"}],"nova/virt/hardware.py":[{"author":{"_account_id":9569,"name":"Sergey Nikitin","email":"nikitinserv@gmail.com","username":"snikitin"},"change_message_id":"084c817ad2cd70b67f7da1dff2aabbd7a00b9332","unresolved":false,"context_lines":[{"line_number":1309,"context_line":"    host_cells \u003d host_topology.cells"},{"line_number":1310,"context_line":""},{"line_number":1311,"context_line":"    # If PCI device(s) are not required, prefer host cells that don\u0027t have"},{"line_number":1312,"context_line":"    # devices attached and vice versa. Presence of a given numa_node in a PCI"},{"line_number":1313,"context_line":"    # pool is indicative of a PCI device being associated with that node"},{"line_number":1314,"context_line":"    if not pci_requests and pci_stats:"},{"line_number":1315,"context_line":"        host_cells \u003d sorted(host_cells, key\u003dlambda cell: cell.id in ["}],"source_content_type":"text/x-python","patch_set":5,"id":"fa6399be_7232a0a8","line":1312,"range":{"start_line":1312,"start_character":27,"end_line":1312,"end_character":37},"updated":"2016-10-14 12:41:09.000000000","message":"Very good patch, just wonder why \u0027vice versa\u0027? You don\u0027t sort cells if PCI device(s) are required.","commit_id":"5fda9bfa5ac7c99f34bc051dd79adead663aab02"},{"author":{"_account_id":9569,"name":"Sergey Nikitin","email":"nikitinserv@gmail.com","username":"snikitin"},"change_message_id":"286895a04e14ce8ef8a1913439744a7b9c5d4af3","unresolved":false,"context_lines":[{"line_number":1309,"context_line":"    host_cells \u003d host_topology.cells"},{"line_number":1310,"context_line":""},{"line_number":1311,"context_line":"    # If PCI device(s) are not required, prefer host cells that don\u0027t have"},{"line_number":1312,"context_line":"    # devices attached and vice versa. Presence of a given numa_node in a PCI"},{"line_number":1313,"context_line":"    # pool is indicative of a PCI device being associated with that node"},{"line_number":1314,"context_line":"    if not pci_requests and pci_stats:"},{"line_number":1315,"context_line":"        host_cells \u003d sorted(host_cells, key\u003dlambda cell: cell.id in ["}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5da102_0e289f85","line":1312,"range":{"start_line":1312,"start_character":27,"end_line":1312,"end_character":37},"in_reply_to":"ba5da102_6be02dfb","updated":"2016-11-01 12:28:53.000000000","message":"good","commit_id":"5fda9bfa5ac7c99f34bc051dd79adead663aab02"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2b4ce018cc43d15e7ad32956d050c1bae55b2c57","unresolved":false,"context_lines":[{"line_number":1309,"context_line":"    host_cells \u003d host_topology.cells"},{"line_number":1310,"context_line":""},{"line_number":1311,"context_line":"    # If PCI device(s) are not required, prefer host cells that don\u0027t have"},{"line_number":1312,"context_line":"    # devices attached and vice versa. Presence of a given numa_node in a PCI"},{"line_number":1313,"context_line":"    # pool is indicative of a PCI device being associated with that node"},{"line_number":1314,"context_line":"    if not pci_requests and pci_stats:"},{"line_number":1315,"context_line":"        host_cells \u003d sorted(host_cells, key\u003dlambda cell: cell.id in ["}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5da102_6be02dfb","line":1312,"range":{"start_line":1312,"start_character":27,"end_line":1312,"end_character":37},"in_reply_to":"fa6399be_7232a0a8","updated":"2016-11-01 12:14:30.000000000","message":"I did in a past revision :) I\u0027ll update this comment if I need to respin","commit_id":"5fda9bfa5ac7c99f34bc051dd79adead663aab02"},{"author":{"_account_id":9569,"name":"Sergey Nikitin","email":"nikitinserv@gmail.com","username":"snikitin"},"change_message_id":"11dd1cd4cebd7f1b3b931c0a8e8a69066b8ede43","unresolved":false,"context_lines":[{"line_number":1332,"context_line":"    host_cells \u003d host_topology.cells"},{"line_number":1333,"context_line":""},{"line_number":1334,"context_line":"    # If PCI device(s) are not required, prefer host cells that don\u0027t have"},{"line_number":1335,"context_line":"    # devices attached and vice versa. Presence of a given numa_node in a PCI"},{"line_number":1336,"context_line":"    # pool is indicative of a PCI device being associated with that node"},{"line_number":1337,"context_line":"    if not pci_requests and pci_stats:"},{"line_number":1338,"context_line":"        host_cells \u003d sorted(host_cells, key\u003dlambda cell: cell.id in ["}],"source_content_type":"text/x-python","patch_set":10,"id":"3a71b18c_9a5d4def","line":1335,"range":{"start_line":1335,"start_character":27,"end_line":1335,"end_character":37},"updated":"2016-12-01 08:24:48.000000000","message":"still \u0027vice versa\u0027 :)\n\nhttps://review.openstack.org/#/c/379625/5/nova/virt/hardware.py","commit_id":"7e94f02649b35de3d16570ece4f127acf8072b22"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"063622bef23e0b21dc059ed6c6fb90610edf363a","unresolved":false,"context_lines":[{"line_number":1332,"context_line":"    host_cells \u003d host_topology.cells"},{"line_number":1333,"context_line":""},{"line_number":1334,"context_line":"    # If PCI device(s) are not required, prefer host cells that don\u0027t have"},{"line_number":1335,"context_line":"    # devices attached and vice versa. Presence of a given numa_node in a PCI"},{"line_number":1336,"context_line":"    # pool is indicative of a PCI device being associated with that node"},{"line_number":1337,"context_line":"    if not pci_requests and pci_stats:"},{"line_number":1338,"context_line":"        host_cells \u003d sorted(host_cells, key\u003dlambda cell: cell.id in ["}],"source_content_type":"text/x-python","patch_set":10,"id":"9a30ddce_11ce305a","line":1335,"range":{"start_line":1335,"start_character":27,"end_line":1335,"end_character":37},"in_reply_to":"3a71b18c_9a5d4def","updated":"2017-03-08 17:50:57.000000000","message":"i gues we should add an else that just runs the same lamda with the order reversed.","commit_id":"7e94f02649b35de3d16570ece4f127acf8072b22"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"637c7d35075a5cdd6f926c4d33ce75b0891331a2","unresolved":false,"context_lines":[{"line_number":1485,"context_line":"    # indicative of a PCI device being associated with that node"},{"line_number":1486,"context_line":"    if not pci_requests and pci_stats:"},{"line_number":1487,"context_line":"        host_cells \u003d sorted(host_cells, key\u003dlambda cell: cell.id in ["},{"line_number":1488,"context_line":"            pool[\u0027numa_node\u0027] for pool in pci_stats.pools])"},{"line_number":1489,"context_line":""},{"line_number":1490,"context_line":"    # TODO(ndipanov): We may want to sort permutations differently"},{"line_number":1491,"context_line":"    # depending on whether we want packing/spreading over NUMA nodes"}],"source_content_type":"text/x-python","patch_set":12,"id":"df140735_a5001736","line":1488,"updated":"2017-05-30 19:40:16.000000000","message":"So key will be False for host cells that don\u0027t have PCI devices attached and True for host cells that do. Then the Falses will be sorted ahead of the Trues.","commit_id":"711e4f1b69f3d91c3cee962ca4d4542306181d19"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"7cb4240bf5d211777bc6acb1f04390c58abdf5e1","unresolved":false,"context_lines":[{"line_number":1485,"context_line":"    # indicative of a PCI device being associated with that node"},{"line_number":1486,"context_line":"    if not pci_requests and pci_stats:"},{"line_number":1487,"context_line":"        host_cells \u003d sorted(host_cells, key\u003dlambda cell: cell.id in ["},{"line_number":1488,"context_line":"            pool[\u0027numa_node\u0027] for pool in pci_stats.pools])"},{"line_number":1489,"context_line":""},{"line_number":1490,"context_line":"    # TODO(ndipanov): We may want to sort permutations differently"},{"line_number":1491,"context_line":"    # depending on whether we want packing/spreading over NUMA nodes"}],"source_content_type":"text/x-python","patch_set":12,"id":"df140735_23fe3137","line":1488,"in_reply_to":"df140735_a5001736","updated":"2017-05-31 09:31:30.000000000","message":"Yup - if the below evaluates to true, the device has PCI devices:\n\n  cell.id in [pool[\u0027numa_node\u0027] for pool in pci_stats.pools]\n\nsorted places False ahead of True, as you say:\n\n  \u003e\u003e\u003e sorted([True, False, False, True])\n  [False, False, True, True]","commit_id":"711e4f1b69f3d91c3cee962ca4d4542306181d19"}]}
