)]}'
{"nova/compute/claims.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"680ccb69a0d03b88de3760612dae353cc5b4883a","unresolved":false,"context_lines":[{"line_number":227,"context_line":"                    return (_(\"Requested instance NUMA topology cannot fit \""},{"line_number":228,"context_line":"                          \"the given host NUMA topology\"))"},{"line_number":229,"context_line":"            elif instance_topology:"},{"line_number":230,"context_line":"                self.claimed_numa_topology \u003d instance_topology"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def _test(self, type_, unit, total, used, requested, limit):"},{"line_number":233,"context_line":"        \"\"\"Test if the given type of resource needed for a claim can be safely"}],"source_content_type":"text/x-python","patch_set":2,"id":"1af94dfe_e7d4c048","line":230,"range":{"start_line":230,"start_character":16,"end_line":230,"end_character":62},"updated":"2016-03-15 16:45:36.000000000","message":"So does the above call to hardware.numa_fit_for_instance_to_host actually do the claim?","commit_id":"66e79e1bbca66a6f0f7be14006a87426c4dda402"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"819d2e0ec03f17499049119fc07db0832669dbf2","unresolved":false,"context_lines":[{"line_number":227,"context_line":"                    return (_(\"Requested instance NUMA topology cannot fit \""},{"line_number":228,"context_line":"                          \"the given host NUMA topology\"))"},{"line_number":229,"context_line":"            elif instance_topology:"},{"line_number":230,"context_line":"                self.claimed_numa_topology \u003d instance_topology"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def _test(self, type_, unit, total, used, requested, limit):"},{"line_number":233,"context_line":"        \"\"\"Test if the given type of resource needed for a claim can be safely"}],"source_content_type":"text/x-python","patch_set":2,"id":"1af94dfe_e74e8095","line":230,"range":{"start_line":230,"start_character":16,"end_line":230,"end_character":62},"in_reply_to":"1af94dfe_e7d4c048","updated":"2016-03-15 16:53:45.000000000","message":"Nah, it just selects a NUMA node. The only reason this isn\u0027t a race condition is because COMPUTE_NODE_SEMAPHORE is acquired during this.\n\nThe *claim* for NUMA is when the ComputeNode object is updated here:\n\nhttps://github.com/openstack/nova/blob/master/nova/compute/resource_tracker.py#L201-L206","commit_id":"66e79e1bbca66a6f0f7be14006a87426c4dda402"}],"nova/compute/resource_tracker.py":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"8161630e1c9da5ad342d3d25db546e2bf53c74cb","unresolved":false,"context_lines":[{"line_number":202,"context_line":"                             overhead\u003doverhead, limits\u003dlimits)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        if self.pci_tracker:"},{"line_number":205,"context_line":"            # NOTE(jaypipes): ComputeNode.pci_device_pools is set below"},{"line_number":206,"context_line":"            # in _update_usage_from_instance()."},{"line_number":207,"context_line":"            self.pci_tracker.claim_instance(context, instance_ref)"},{"line_number":208,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1af94dfe_d3aa2a19","line":205,"updated":"2016-03-15 16:20:28.000000000","message":"I\u0027d say it\u0027s just a comment so NOTE(jaypipes) probably not something necessary.\n\n\nEven that This look like a hack really, the claim object has a method \u0027abort\u0027 which probably have to be called if any tests failed.\nCurrently that method should have well been defined to release PCI devices acquired during tests.","commit_id":"66e79e1bbca66a6f0f7be14006a87426c4dda402"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"d1ea0c2932ef48f1c1780b0023bded1b26eb0191","unresolved":false,"context_lines":[{"line_number":202,"context_line":"                             overhead\u003doverhead, limits\u003dlimits)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        if self.pci_tracker:"},{"line_number":205,"context_line":"            # NOTE(jaypipes): ComputeNode.pci_device_pools is set below"},{"line_number":206,"context_line":"            # in _update_usage_from_instance()."},{"line_number":207,"context_line":"            self.pci_tracker.claim_instance(context, instance_ref)"},{"line_number":208,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1af94dfe_7ca3239f","line":205,"in_reply_to":"1af94dfe_d3aa2a19","updated":"2016-03-15 16:35:27.000000000","message":"@sahid: This bug was to address the problem where PCI devices were *claimed* in the Claim constructor and not afterwards, therefore leading to a data corruption issue where the pci device would be in the claimed bucket of the PCI tracker even when memory exhaustion would cause the Claim constructor to raise a ResourcesUnavailable exception.\n\nIf you look at the code, you will notice that NUMA resources are claimed *after* the Claim constructor completes, not during the test of the claim. The *claim* here is the process of updating the ComputeNode object, not determining the individual NUMA cell to place an instance to.","commit_id":"66e79e1bbca66a6f0f7be14006a87426c4dda402"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cf85b615c60b7e0cdabbce7ccdc5ff980e00e86f","unresolved":false,"context_lines":[{"line_number":202,"context_line":"                             overhead\u003doverhead, limits\u003dlimits)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        if self.pci_tracker:"},{"line_number":205,"context_line":"            # NOTE(jaypipes): ComputeNode.pci_device_pools is set below"},{"line_number":206,"context_line":"            # in _update_usage_from_instance()."},{"line_number":207,"context_line":"            self.pci_tracker.claim_instance(context, instance_ref)"},{"line_number":208,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1af94dfe_dc519710","line":205,"in_reply_to":"1af94dfe_d3aa2a19","updated":"2016-03-15 16:28:10.000000000","message":"sahid, so your -1 is because the comment is prefixed with NOTE(jaypipes)?","commit_id":"66e79e1bbca66a6f0f7be14006a87426c4dda402"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7871cc2d73dd3056a4008b4a41e65cd8faba61af","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        # so set instance_ref[\u0027numa_topology\u0027] first.  We need to make sure"},{"line_number":211,"context_line":"        # that numa_topology is saved while under COMPUTE_RESOURCE_SEMAPHORE"},{"line_number":212,"context_line":"        # so that the resource audit knows about any cpus we\u0027ve pinned."},{"line_number":213,"context_line":"        instance_ref.numa_topology \u003d claim.claimed_numa_topology"},{"line_number":214,"context_line":"        self._set_instance_host_and_node(instance_ref)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        # Mark resources in-use and update stats"}],"source_content_type":"text/x-python","patch_set":2,"id":"1af94dfe_676a701c","line":213,"range":{"start_line":213,"start_character":37,"end_line":213,"end_character":64},"updated":"2016-03-15 16:51:34.000000000","message":"This is where it looks like the numa topology is claimed as part of the test and then set here.","commit_id":"66e79e1bbca66a6f0f7be14006a87426c4dda402"}],"nova/tests/unit/compute/test_tracker.py":[{"author":{"_account_id":6508,"name":"Dmitry Stepanenko","email":"dstepanenko@mirantis.com","username":"dstepanenko"},"change_message_id":"1c8f77b98346af1dc23b09b49579bf91bcae56ac","unresolved":false,"context_lines":[{"line_number":1291,"context_line":"    @mock.patch(\u0027nova.pci.manager.PciDevTracker.claim_instance\u0027)"},{"line_number":1292,"context_line":"    @mock.patch(\u0027nova.objects.InstancePCIRequests.get_by_instance_uuid\u0027)"},{"line_number":1293,"context_line":"    @mock.patch(\u0027nova.objects.MigrationList.get_in_progress_by_host_and_node\u0027)"},{"line_number":1294,"context_line":"    def test_claim_with_pci(self, migr_mock, pci_mock,"},{"line_number":1295,"context_line":"                            pci_manager_mock, pci_stats_mock):"},{"line_number":1296,"context_line":"        # Test that a claim involving PCI requests correctly claims"},{"line_number":1297,"context_line":"        # PCI devices on the host and sends an updated pci_device_pools"}],"source_content_type":"text/x-python","patch_set":2,"id":"1af94dfe_13e2d703","line":1294,"updated":"2016-03-15 15:13:21.000000000","message":"nit: What do you think about changing mock variables names to more \"talking\" names, for example:\n\nmigr_mock -\u003e mirg_get_in_progr_mock\n\nI know they will be a bit long, but code readability will increase","commit_id":"66e79e1bbca66a6f0f7be14006a87426c4dda402"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5a6a9ace1f512e5f3d969f329c6aa7d645989256","unresolved":false,"context_lines":[{"line_number":1291,"context_line":"    @mock.patch(\u0027nova.pci.manager.PciDevTracker.claim_instance\u0027)"},{"line_number":1292,"context_line":"    @mock.patch(\u0027nova.objects.InstancePCIRequests.get_by_instance_uuid\u0027)"},{"line_number":1293,"context_line":"    @mock.patch(\u0027nova.objects.MigrationList.get_in_progress_by_host_and_node\u0027)"},{"line_number":1294,"context_line":"    def test_claim_with_pci(self, migr_mock, pci_mock,"},{"line_number":1295,"context_line":"                            pci_manager_mock, pci_stats_mock):"},{"line_number":1296,"context_line":"        # Test that a claim involving PCI requests correctly claims"},{"line_number":1297,"context_line":"        # PCI devices on the host and sends an updated pci_device_pools"}],"source_content_type":"text/x-python","patch_set":2,"id":"1af94dfe_7c5e8346","line":1294,"in_reply_to":"1af94dfe_13e2d703","updated":"2016-03-15 16:43:53.000000000","message":"This is more consistent with other test methods in here, so this seems fine.","commit_id":"66e79e1bbca66a6f0f7be14006a87426c4dda402"}]}
