)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1bbc5e1f9436319ba5c5c342e5a992312afd3bfe","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"pci : Fix resize with PCI devices"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch refacor the pci code and move the pci"},{"line_number":10,"context_line":"resource claiming to be part of the Claim and MoveClaim"},{"line_number":11,"context_line":"classes. It is also use the migration context to save"},{"line_number":12,"context_line":"old/new pci device. This patch address only the resize"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a122d0e_970ec8e3","line":9,"updated":"2016-04-21 23:12:26.000000000","message":"s/refactor/refactors/\n\ns/move/moves/\n\nAlso, s/pci/PCI/ throughout the commit description.","commit_id":"4e4eced6ac5728dffdb2577887f2e1fb1ddb890b"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1bbc5e1f9436319ba5c5c342e5a992312afd3bfe","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch refacor the pci code and move the pci"},{"line_number":10,"context_line":"resource claiming to be part of the Claim and MoveClaim"},{"line_number":11,"context_line":"classes. It is also use the migration context to save"},{"line_number":12,"context_line":"old/new pci device. This patch address only the resize"},{"line_number":13,"context_line":"issue, a follow up patch should address cold migration."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a122d0e_572b9033","line":11,"updated":"2016-04-21 23:12:26.000000000","message":"s/is also use/also uses/","commit_id":"4e4eced6ac5728dffdb2577887f2e1fb1ddb890b"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1bbc5e1f9436319ba5c5c342e5a992312afd3bfe","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch refacor the pci code and move the pci"},{"line_number":10,"context_line":"resource claiming to be part of the Claim and MoveClaim"},{"line_number":11,"context_line":"classes. It is also use the migration context to save"},{"line_number":12,"context_line":"old/new pci device. This patch address only the resize"},{"line_number":13,"context_line":"issue, a follow up patch should address cold migration."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Closes-Bug: #1368201"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a122d0e_d71fa007","line":12,"range":{"start_line":12,"start_character":19,"end_line":12,"end_character":20},"updated":"2016-04-21 23:12:26.000000000","message":"s/address/addressses/","commit_id":"4e4eced6ac5728dffdb2577887f2e1fb1ddb890b"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"b6652cb0e4c26835ede283fc20c4f4be158c6e7e","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Moshe Levi \u003cmoshele@mellanox.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-05-17 12:45:20 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"pci: Move PCI devices and PCI requests into migration context"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Adds old and new PCI devices/ PCI requests into the MigrationContext"},{"line_number":10,"context_line":"object and uses the nova.pci.request.get_pci_requests_from_flavor()"},{"line_number":11,"context_line":"function to grab the set of requested PCI devices during a migration."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Then, in the resource tracker\u0027s _update_usage_from_migration() call, we"},{"line_number":14,"context_line":"use the old and new PCI devices and PCI requests stored in the"},{"line_number":15,"context_line":"MigrationContext to properly account for changes."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Closes-Bug: #1368201"},{"line_number":18,"context_line":"Co-Authored-by: Jay Pipes \u003cjaypipes@gmail.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"dab17558_9033a461","line":15,"range":{"start_line":7,"start_character":0,"end_line":15,"end_character":49},"updated":"2016-05-17 10:34:18.000000000","message":"It would be a great addition to briefly explain why this is necessary here (focus on the why, rather than the what). I figured it out, but only after a good bit of background reading","commit_id":"3f8def5d7a787c469f7ec5651fb58f40af8c0543"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"a0ae02f59987ddba57ecacdb2b42c0cd85f43c0c","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Moshe Levi \u003cmoshele@mellanox.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-05-17 12:45:20 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"pci: Move PCI devices and PCI requests into migration context"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Adds old and new PCI devices/ PCI requests into the MigrationContext"},{"line_number":10,"context_line":"object and uses the nova.pci.request.get_pci_requests_from_flavor()"},{"line_number":11,"context_line":"function to grab the set of requested PCI devices during a migration."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Then, in the resource tracker\u0027s _update_usage_from_migration() call, we"},{"line_number":14,"context_line":"use the old and new PCI devices and PCI requests stored in the"},{"line_number":15,"context_line":"MigrationContext to properly account for changes."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Closes-Bug: #1368201"},{"line_number":18,"context_line":"Co-Authored-by: Jay Pipes \u003cjaypipes@gmail.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"dab17558_76071818","line":15,"range":{"start_line":7,"start_character":0,"end_line":15,"end_character":49},"in_reply_to":"dab17558_9033a461","updated":"2016-05-17 11:12:45.000000000","message":"Done","commit_id":"3f8def5d7a787c469f7ec5651fb58f40af8c0543"},{"author":{"_account_id":17973,"name":"Ludovic Beliveau","email":"lbeliveau@gmail.com","username":"lbeliveau"},"change_message_id":"d5dd506824542254b9b59d2aab618dea11a3176b","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"pci: Move PCI devices and PCI requests into migration context"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When resizing guest to falvor with pci passthrogth, we need to drop"},{"line_number":10,"context_line":"the old pci devices and allocate new ones. To be able to do that We"},{"line_number":11,"context_line":"are leveraging the migration context (that used only for NUMA)."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":17,"id":"bab6814e_16ec2328","line":9,"updated":"2016-05-25 17:10:45.000000000","message":"s/falvor/flavor/","commit_id":"a4e6cf6b7aad76b20b1b993ef6f7bbb1df20c89f"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"1bba22ec2c6597a0dac2dbcd242a299e1b97c81b","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"pci: Move PCI devices and PCI requests into migration context"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When resizing guest to falvor with pci passthrogth, we need to drop"},{"line_number":10,"context_line":"the old pci devices and allocate new ones. To be able to do that We"},{"line_number":11,"context_line":"are leveraging the migration context (that used only for NUMA)."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":17,"id":"bab6814e_8cfda63d","line":9,"in_reply_to":"bab6814e_16ec2328","updated":"2016-05-25 18:16:18.000000000","message":"Done","commit_id":"a4e6cf6b7aad76b20b1b993ef6f7bbb1df20c89f"},{"author":{"_account_id":17973,"name":"Ludovic Beliveau","email":"lbeliveau@gmail.com","username":"lbeliveau"},"change_message_id":"d5dd506824542254b9b59d2aab618dea11a3176b","unresolved":false,"context_lines":[{"line_number":7,"context_line":"pci: Move PCI devices and PCI requests into migration context"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When resizing guest to falvor with pci passthrogth, we need to drop"},{"line_number":10,"context_line":"the old pci devices and allocate new ones. To be able to do that We"},{"line_number":11,"context_line":"are leveraging the migration context (that used only for NUMA)."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Adds old and new PCI devices/ PCI requests into the MigrationContext"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":17,"id":"bab6814e_76f3ef0a","line":10,"updated":"2016-05-25 17:10:45.000000000","message":"s/We/we/","commit_id":"a4e6cf6b7aad76b20b1b993ef6f7bbb1df20c89f"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"1bba22ec2c6597a0dac2dbcd242a299e1b97c81b","unresolved":false,"context_lines":[{"line_number":7,"context_line":"pci: Move PCI devices and PCI requests into migration context"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When resizing guest to falvor with pci passthrogth, we need to drop"},{"line_number":10,"context_line":"the old pci devices and allocate new ones. To be able to do that We"},{"line_number":11,"context_line":"are leveraging the migration context (that used only for NUMA)."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Adds old and new PCI devices/ PCI requests into the MigrationContext"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":17,"id":"bab6814e_2c959ae3","line":10,"in_reply_to":"bab6814e_76f3ef0a","updated":"2016-05-25 18:16:18.000000000","message":"Done","commit_id":"a4e6cf6b7aad76b20b1b993ef6f7bbb1df20c89f"}],"nova/compute/claims.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1bbc5e1f9436319ba5c5c342e5a992312afd3bfe","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        pci_requests \u003d self.pci_requests"},{"line_number":196,"context_line":"        if pci_requests.requests and self.tracker.pci_tracker:"},{"line_number":197,"context_line":"            # NOTE(jaypipes): ComputeNode.pci_device_pools is set below"},{"line_number":198,"context_line":"            # in _update_usage_from_instance()."},{"line_number":199,"context_line":"            pci_devs \u003d self.tracker.pci_tracker.claim_instance("},{"line_number":200,"context_line":"                self.context, self.instance, pci_requests)"},{"line_number":201,"context_line":"            if not pci_devs:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_d7e68015","line":198,"updated":"2016-04-21 23:12:26.000000000","message":"You moved this comment but the code referenced as \"is set below\" isn\u0027t even in this file... it\u0027s in the resource_tracker.py module.","commit_id":"4e4eced6ac5728dffdb2577887f2e1fb1ddb890b"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"eeff736454725d61fd74f600721694dad299bd88","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        pci_requests \u003d self.pci_requests"},{"line_number":196,"context_line":"        if pci_requests.requests and self.tracker.pci_tracker:"},{"line_number":197,"context_line":"            # NOTE(jaypipes): ComputeNode.pci_device_pools is set below"},{"line_number":198,"context_line":"            # in _update_usage_from_instance()."},{"line_number":199,"context_line":"            pci_devs \u003d self.tracker.pci_tracker.claim_instance("},{"line_number":200,"context_line":"                self.context, self.instance, pci_requests)"},{"line_number":201,"context_line":"            if not pci_devs:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_5dfe0f06","line":198,"in_reply_to":"1a122d0e_d7e68015","updated":"2016-04-22 00:26:38.000000000","message":"yes, I will update the comment","commit_id":"4e4eced6ac5728dffdb2577887f2e1fb1ddb890b"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1bbc5e1f9436319ba5c5c342e5a992312afd3bfe","unresolved":false,"context_lines":[{"line_number":196,"context_line":"        if pci_requests.requests and self.tracker.pci_tracker:"},{"line_number":197,"context_line":"            # NOTE(jaypipes): ComputeNode.pci_device_pools is set below"},{"line_number":198,"context_line":"            # in _update_usage_from_instance()."},{"line_number":199,"context_line":"            pci_devs \u003d self.tracker.pci_tracker.claim_instance("},{"line_number":200,"context_line":"                self.context, self.instance, pci_requests)"},{"line_number":201,"context_line":"            if not pci_devs:"},{"line_number":202,"context_line":"                return _(\u0027Claim pci failed\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_f7729c48","line":199,"updated":"2016-04-21 23:12:26.000000000","message":"Why did you change this back to claim_instance() from supports_requests(), which specifically does *not* claim the device during the _test_pci() method?\n\nPlease note the comment in the Claim._test_claim() method that calls _test_pci(), which clearly states:\n\n This should be called before the compute node actually\n consumes the resources required to execute the claim.\n\nThe test methods should *not* claim the device in the PCI device tracker. It should only see if the PCI device requested can be serviced by the compute node. That\u0027s it.","commit_id":"4e4eced6ac5728dffdb2577887f2e1fb1ddb890b"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"dd9f1400c964fd1b1fac2378c50a9e6d73e6f2da","unresolved":false,"context_lines":[{"line_number":196,"context_line":"        if pci_requests.requests and self.tracker.pci_tracker:"},{"line_number":197,"context_line":"            # NOTE(jaypipes): ComputeNode.pci_device_pools is set below"},{"line_number":198,"context_line":"            # in _update_usage_from_instance()."},{"line_number":199,"context_line":"            pci_devs \u003d self.tracker.pci_tracker.claim_instance("},{"line_number":200,"context_line":"                self.context, self.instance, pci_requests)"},{"line_number":201,"context_line":"            if not pci_devs:"},{"line_number":202,"context_line":"                return _(\u0027Claim pci failed\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_dd5dff49","line":199,"in_reply_to":"1a122d0e_5d03af76","updated":"2016-04-22 00:31:21.000000000","message":"What do you mean by \"This makes the pci devices aligned with all the others\"?","commit_id":"4e4eced6ac5728dffdb2577887f2e1fb1ddb890b"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"3b822b0204ea277e705b391c5db3af45e1049ffb","unresolved":false,"context_lines":[{"line_number":196,"context_line":"        if pci_requests.requests and self.tracker.pci_tracker:"},{"line_number":197,"context_line":"            # NOTE(jaypipes): ComputeNode.pci_device_pools is set below"},{"line_number":198,"context_line":"            # in _update_usage_from_instance()."},{"line_number":199,"context_line":"            pci_devs \u003d self.tracker.pci_tracker.claim_instance("},{"line_number":200,"context_line":"                self.context, self.instance, pci_requests)"},{"line_number":201,"context_line":"            if not pci_devs:"},{"line_number":202,"context_line":"                return _(\u0027Claim pci failed\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_602524ad","line":199,"in_reply_to":"1a122d0e_dd5dff49","updated":"2016-04-22 00:37:47.000000000","message":"I meant aligned with the numa.","commit_id":"4e4eced6ac5728dffdb2577887f2e1fb1ddb890b"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"eeff736454725d61fd74f600721694dad299bd88","unresolved":false,"context_lines":[{"line_number":196,"context_line":"        if pci_requests.requests and self.tracker.pci_tracker:"},{"line_number":197,"context_line":"            # NOTE(jaypipes): ComputeNode.pci_device_pools is set below"},{"line_number":198,"context_line":"            # in _update_usage_from_instance()."},{"line_number":199,"context_line":"            pci_devs \u003d self.tracker.pci_tracker.claim_instance("},{"line_number":200,"context_line":"                self.context, self.instance, pci_requests)"},{"line_number":201,"context_line":"            if not pci_devs:"},{"line_number":202,"context_line":"                return _(\u0027Claim pci failed\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_5d03af76","line":199,"in_reply_to":"1a122d0e_f7729c48","updated":"2016-04-22 00:26:38.000000000","message":"The problem with the resize is that we didn\u0027t claim the  PCI device in MoveClaim (the MoveClaim inherit from Claim). \nAlso to save the claim pci_devices in the migration context we have to find them here see L 203\nthe self.claimed_pci_devices is the new_pci_devices in the migration context. This makes the  pci devices aligned with all the others\n\nI see you point regarding the support_requests I think I just need to call supports_requests in the claim_instance to check we support it.","commit_id":"4e4eced6ac5728dffdb2577887f2e1fb1ddb890b"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1bbc5e1f9436319ba5c5c342e5a992312afd3bfe","unresolved":false,"context_lines":[{"line_number":300,"context_line":"    def pci_requests(self):"},{"line_number":301,"context_line":"        # TODO(moshele):  here we just take the pci request"},{"line_number":302,"context_line":"        # for the flavour but we should merged it with the"},{"line_number":303,"context_line":"        # pci request for creating SR-IOV ports"},{"line_number":304,"context_line":"        return pci_request.get_pci_requests_from_flavor("},{"line_number":305,"context_line":"             self.instance_type)"},{"line_number":306,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_77b4ccd0","line":303,"updated":"2016-04-21 23:12:26.000000000","message":"This comment isn\u0027t clear to me. What precisely are you referring to by \"the pci request for creating SR-IOV ports\"?","commit_id":"4e4eced6ac5728dffdb2577887f2e1fb1ddb890b"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"eeff736454725d61fd74f600721694dad299bd88","unresolved":false,"context_lines":[{"line_number":300,"context_line":"    def pci_requests(self):"},{"line_number":301,"context_line":"        # TODO(moshele):  here we just take the pci request"},{"line_number":302,"context_line":"        # for the flavour but we should merged it with the"},{"line_number":303,"context_line":"        # pci request for creating SR-IOV ports"},{"line_number":304,"context_line":"        return pci_request.get_pci_requests_from_flavor("},{"line_number":305,"context_line":"             self.instance_type)"},{"line_number":306,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_3dcb5320","line":303,"in_reply_to":"1a122d0e_77b4ccd0","updated":"2016-04-22 00:26:38.000000000","message":"pci requests can come from 2 places sr-iov ports and pci_alias (pci pass-though) on move claim I am generating new pci requests from instance type (this is for the pci_alias)  but the old instance cloud have pci_request from the sriov-port which should be merged together","commit_id":"4e4eced6ac5728dffdb2577887f2e1fb1ddb890b"}],"nova/compute/resource_tracker.py":[{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"7a17ae68192873c9d818c018f815d61d33921f12","unresolved":false,"context_lines":[{"line_number":710,"context_line":"                # possible revert to the old instance type:"},{"line_number":711,"context_line":"                itype \u003d self._get_instance_type(context, instance, \u0027old_\u0027,"},{"line_number":712,"context_line":"                        migration)"},{"line_number":713,"context_line":"                sign \u003d -1"},{"line_number":714,"context_line":""},{"line_number":715,"context_line":"        elif incoming and not record:"},{"line_number":716,"context_line":"            # instance has not yet migrated here:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_ce749537","line":713,"range":{"start_line":713,"start_character":15,"end_line":713,"end_character":25},"updated":"2016-04-20 13:44:19.000000000","message":"this is a bug in the resize, so after I confirm the pci device was deallocated so I removed here","commit_id":"03c8672fd60519d17891b999e74282f7b0cacae4"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"fb6bf80c89f0ca3a14fef317429f5dd8680f3a95","unresolved":false,"context_lines":[{"line_number":726,"context_line":"                    migration)"},{"line_number":727,"context_line":"            numa_topology \u003d self._get_migration_context_resource("},{"line_number":728,"context_line":"                \u0027numa_topology\u0027, instance, prefix\u003d\u0027old_\u0027)"},{"line_number":729,"context_line":"            sign \u003d -1"},{"line_number":730,"context_line":""},{"line_number":731,"context_line":"        if image_meta is None:"},{"line_number":732,"context_line":"            image_meta \u003d objects.ImageMeta.from_instance(instance)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_026b2f86","line":729,"range":{"start_line":729,"start_character":12,"end_line":729,"end_character":21},"updated":"2016-04-19 14:09:26.000000000","message":"The bug is here \u003d we never really want to subtract the usage until the migration is done and confirmed. we do that in drop_move_claim. this method should mark resources as used on both nodes.","commit_id":"03c8672fd60519d17891b999e74282f7b0cacae4"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"7a17ae68192873c9d818c018f815d61d33921f12","unresolved":false,"context_lines":[{"line_number":726,"context_line":"                    migration)"},{"line_number":727,"context_line":"            numa_topology \u003d self._get_migration_context_resource("},{"line_number":728,"context_line":"                \u0027numa_topology\u0027, instance, prefix\u003d\u0027old_\u0027)"},{"line_number":729,"context_line":"            sign \u003d -1"},{"line_number":730,"context_line":""},{"line_number":731,"context_line":"        if image_meta is None:"},{"line_number":732,"context_line":"            image_meta \u003d objects.ImageMeta.from_instance(instance)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_4e8085f7","line":729,"range":{"start_line":729,"start_character":12,"end_line":729,"end_character":21},"in_reply_to":"1a122d0e_026b2f86","updated":"2016-04-20 13:44:19.000000000","message":"right so I will remove the sign from the migration incoming/outbound and will only focus on resize. \nI will provide a follow up patch to handle the cold migration.","commit_id":"03c8672fd60519d17891b999e74282f7b0cacae4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"319a8b5fc340713658666e33587b9dbc147a3464","unresolved":false,"context_lines":[{"line_number":237,"context_line":"            old_numa_topology\u003dinstance.numa_topology,"},{"line_number":238,"context_line":"            # TODO(jaypipes): Move claimed_numa_topology out of the Claim\u0027s"},{"line_number":239,"context_line":"            # constructor flow so the Claim constructor only tests whether"},{"line_number":240,"context_line":"            # resources can be claimed, not consume the resources directly."},{"line_number":241,"context_line":"            new_numa_topology\u003dclaim.claimed_numa_topology,"},{"line_number":242,"context_line":"            old_pci_devices\u003dinstance.pci_devices,"},{"line_number":243,"context_line":"            new_pci_devices\u003dclaimed_pci_devices)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a122d0e_51ec3829","line":240,"updated":"2016-05-02 19:59:42.000000000","message":"I hate the comment in the middle of a class instantiation here, FYI :)","commit_id":"c3de4dd9e69ee4e7b6e69e3fb7ee9ca540f010b5"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"226f14454f836a1f9a23d05bad20859b60309a2c","unresolved":false,"context_lines":[{"line_number":237,"context_line":"            old_numa_topology\u003dinstance.numa_topology,"},{"line_number":238,"context_line":"            # TODO(jaypipes): Move claimed_numa_topology out of the Claim\u0027s"},{"line_number":239,"context_line":"            # constructor flow so the Claim constructor only tests whether"},{"line_number":240,"context_line":"            # resources can be claimed, not consume the resources directly."},{"line_number":241,"context_line":"            new_numa_topology\u003dclaim.claimed_numa_topology,"},{"line_number":242,"context_line":"            old_pci_devices\u003dinstance.pci_devices,"},{"line_number":243,"context_line":"            new_pci_devices\u003dclaimed_pci_devices)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a122d0e_955ea977","line":240,"in_reply_to":"1a122d0e_51ec3829","updated":"2016-05-03 16:50:37.000000000","message":"Done","commit_id":"c3de4dd9e69ee4e7b6e69e3fb7ee9ca540f010b5"},{"author":{"_account_id":17973,"name":"Ludovic Beliveau","email":"lbeliveau@gmail.com","username":"lbeliveau"},"change_message_id":"49d3aceab7fca48206e4c5c8b77af8b863057ce9","unresolved":false,"context_lines":[{"line_number":217,"context_line":"        pci_requests \u003d pci_request.get_pci_requests_from_flavor("},{"line_number":218,"context_line":"             new_instance_type)"},{"line_number":219,"context_line":"        # PCI requests come from two sources: instance flavor and"},{"line_number":220,"context_line":"        # for SR-IOV ports. On resize we need to merge the direct"},{"line_number":221,"context_line":"        # ports pci_requests with the new instance flavor pci_requests"},{"line_number":222,"context_line":"        # SR-IOV ports pci_request don\u0027t have alias_name so we add only"},{"line_number":223,"context_line":"        # them to the \"new\" pci_requests"}],"source_content_type":"text/x-python","patch_set":9,"id":"dab17558_22305801","line":220,"updated":"2016-05-06 16:34:26.000000000","message":"s/for SR-IOV ports/attached SR-IOV ports/.\n\nIs this valid for macvtap as well ?","commit_id":"b91cfdb77006d0b935bfeca978320a2516732347"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"05cdedc4709be5f8d20a04c50a46598c374c40dd","unresolved":false,"context_lines":[{"line_number":217,"context_line":"        pci_requests \u003d pci_request.get_pci_requests_from_flavor("},{"line_number":218,"context_line":"             new_instance_type)"},{"line_number":219,"context_line":"        # PCI requests come from two sources: instance flavor and"},{"line_number":220,"context_line":"        # for SR-IOV ports. On resize we need to merge the direct"},{"line_number":221,"context_line":"        # ports pci_requests with the new instance flavor pci_requests"},{"line_number":222,"context_line":"        # SR-IOV ports pci_request don\u0027t have alias_name so we add only"},{"line_number":223,"context_line":"        # them to the \"new\" pci_requests"}],"source_content_type":"text/x-python","patch_set":9,"id":"dab17558_283f76d7","line":220,"in_reply_to":"dab17558_22305801","updated":"2016-05-08 18:22:46.000000000","message":"we need this to macvtap as well so I don\u0027t want to use attached SR-IOV ports","commit_id":"b91cfdb77006d0b935bfeca978320a2516732347"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"900eab3a838095ad10c3a1de5859d53749b0bcd9","unresolved":false,"context_lines":[{"line_number":221,"context_line":"        # ports pci_requests with the new instance flavor pci_requests"},{"line_number":222,"context_line":"        # SR-IOV ports pci_request don\u0027t have alias_name so we add only"},{"line_number":223,"context_line":"        # them to the \"new\" pci_requests"},{"line_number":224,"context_line":"        if instance.pci_requests:"},{"line_number":225,"context_line":"            for request in instance.pci_requests.requests:"},{"line_number":226,"context_line":"                if request.alias_name is None:"},{"line_number":227,"context_line":"                    pci_requests.requests.append(request)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a122d0e_917046a6","line":224,"updated":"2016-05-04 14:29:29.000000000","message":"Is this guaranteed to be None or empty on all instances if they do or don\u0027t have PCI stuff, including legacy instances already in someone\u0027s database?","commit_id":"b91cfdb77006d0b935bfeca978320a2516732347"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"05cdedc4709be5f8d20a04c50a46598c374c40dd","unresolved":false,"context_lines":[{"line_number":221,"context_line":"        # ports pci_requests with the new instance flavor pci_requests"},{"line_number":222,"context_line":"        # SR-IOV ports pci_request don\u0027t have alias_name so we add only"},{"line_number":223,"context_line":"        # them to the \"new\" pci_requests"},{"line_number":224,"context_line":"        if instance.pci_requests:"},{"line_number":225,"context_line":"            for request in instance.pci_requests.requests:"},{"line_number":226,"context_line":"                if request.alias_name is None:"},{"line_number":227,"context_line":"                    pci_requests.requests.append(request)"}],"source_content_type":"text/x-python","patch_set":9,"id":"dab17558_68085e2e","line":224,"in_reply_to":"1a122d0e_917046a6","updated":"2016-05-08 18:22:46.000000000","message":"I know it is empty list if you don\u0027t have pci stuff\nand it seems that this is the case for legacy instances see \nhttps://github.com/openstack/nova/blob/master/nova/objects/instance_pci_requests.py#L111-L113","commit_id":"b91cfdb77006d0b935bfeca978320a2516732347"},{"author":{"_account_id":17973,"name":"Ludovic Beliveau","email":"lbeliveau@gmail.com","username":"lbeliveau"},"change_message_id":"49d3aceab7fca48206e4c5c8b77af8b863057ce9","unresolved":false,"context_lines":[{"line_number":744,"context_line":"                        migration)"},{"line_number":745,"context_line":"                numa_topology \u003d self._get_migration_context_resource("},{"line_number":746,"context_line":"                    \u0027numa_topology\u0027, instance)"},{"line_number":747,"context_line":"                sign \u003d 1"},{"line_number":748,"context_line":"            else:"},{"line_number":749,"context_line":"                # instance record already has new flavor, hold space for a"},{"line_number":750,"context_line":"                # possible revert to the old instance type:"}],"source_content_type":"text/x-python","patch_set":9,"id":"dab17558_d603110e","line":747,"updated":"2016-05-06 16:34:26.000000000","message":"sign\u003d1 indicate to pci manager to allocate PCI devices.\n\nIf this is a resize on the same node, and the number of PCI devices hasn\u0027t changed between the old and the new instance (for e.g. only disk size changed), should we allocate PCI devices or just re-use the same ones ?\n\nSo during the resize on the same node, with this logic we are effectively using twice as much as PCI devices as we really need.  Resize on a compute that has scarse PCI resources (or vm that uses large number of PCI devices) is then likely to fail.","commit_id":"b91cfdb77006d0b935bfeca978320a2516732347"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"05cdedc4709be5f8d20a04c50a46598c374c40dd","unresolved":false,"context_lines":[{"line_number":744,"context_line":"                        migration)"},{"line_number":745,"context_line":"                numa_topology \u003d self._get_migration_context_resource("},{"line_number":746,"context_line":"                    \u0027numa_topology\u0027, instance)"},{"line_number":747,"context_line":"                sign \u003d 1"},{"line_number":748,"context_line":"            else:"},{"line_number":749,"context_line":"                # instance record already has new flavor, hold space for a"},{"line_number":750,"context_line":"                # possible revert to the old instance type:"}],"source_content_type":"text/x-python","patch_set":9,"id":"dab17558_ab19a07b","line":747,"in_reply_to":"dab17558_d603110e","updated":"2016-05-08 18:22:46.000000000","message":"You have a good point here, which I am not sure how to solve at the moment. maybe we should address it as bug late on.","commit_id":"b91cfdb77006d0b935bfeca978320a2516732347"},{"author":{"_account_id":17973,"name":"Ludovic Beliveau","email":"lbeliveau@gmail.com","username":"lbeliveau"},"change_message_id":"d1c7a0e87723e7fa5874cd037c64e9fa66d43659","unresolved":false,"context_lines":[{"line_number":893,"context_line":"            if instance.vm_state not in vm_states.ALLOW_RESOURCE_REMOVAL:"},{"line_number":894,"context_line":"                self._update_usage_from_instance(context, instance)"},{"line_number":895,"context_line":"        self.compute_node.free_ram_mb \u003d max(0, self.compute_node.free_ram_mb)"},{"line_number":896,"context_line":"        self.compute_node.free_disk_gb \u003d max(0, self.compute_node.free_disk_gb)"},{"line_number":897,"context_line":""},{"line_number":898,"context_line":"    def _find_orphaned_instances(self):"},{"line_number":899,"context_line":"        \"\"\"Given the set of instances and migrations already account for"}],"source_content_type":"text/x-python","patch_set":11,"id":"dab17558_1101a86a","line":896,"updated":"2016-05-10 15:45:43.000000000","message":"Hate to say this, but this doesn\u0027t seem to be part of this patch. :)","commit_id":"cd50f54268ab7e184f87908f7fd79a1b4f2ac450"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"6035e0b0141228d3100cb470dbb9d084f412dc83","unresolved":false,"context_lines":[{"line_number":893,"context_line":"            if instance.vm_state not in vm_states.ALLOW_RESOURCE_REMOVAL:"},{"line_number":894,"context_line":"                self._update_usage_from_instance(context, instance)"},{"line_number":895,"context_line":"        self.compute_node.free_ram_mb \u003d max(0, self.compute_node.free_ram_mb)"},{"line_number":896,"context_line":"        self.compute_node.free_disk_gb \u003d max(0, self.compute_node.free_disk_gb)"},{"line_number":897,"context_line":""},{"line_number":898,"context_line":"    def _find_orphaned_instances(self):"},{"line_number":899,"context_line":"        \"\"\"Given the set of instances and migrations already account for"}],"source_content_type":"text/x-python","patch_set":11,"id":"dab17558_e914f44d","line":896,"in_reply_to":"dab17558_1101a86a","updated":"2016-05-10 16:52:21.000000000","message":"Not my change :) it a rebase change\nI think you compare it to the previous patch set","commit_id":"cd50f54268ab7e184f87908f7fd79a1b4f2ac450"},{"author":{"_account_id":17973,"name":"Ludovic Beliveau","email":"lbeliveau@gmail.com","username":"lbeliveau"},"change_message_id":"d3ce9b3806c62979a0e532a3e815b00d60023030","unresolved":false,"context_lines":[{"line_number":893,"context_line":"            if instance.vm_state not in vm_states.ALLOW_RESOURCE_REMOVAL:"},{"line_number":894,"context_line":"                self._update_usage_from_instance(context, instance)"},{"line_number":895,"context_line":"        self.compute_node.free_ram_mb \u003d max(0, self.compute_node.free_ram_mb)"},{"line_number":896,"context_line":"        self.compute_node.free_disk_gb \u003d max(0, self.compute_node.free_disk_gb)"},{"line_number":897,"context_line":""},{"line_number":898,"context_line":"    def _find_orphaned_instances(self):"},{"line_number":899,"context_line":"        \"\"\"Given the set of instances and migrations already account for"}],"source_content_type":"text/x-python","patch_set":11,"id":"dab17558_fc231456","line":896,"in_reply_to":"dab17558_e914f44d","updated":"2016-05-10 16:58:24.000000000","message":"My bad :)","commit_id":"cd50f54268ab7e184f87908f7fd79a1b4f2ac450"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"bb6630f2d080047819da0f2acdf224e7ac2aac63","unresolved":false,"context_lines":[{"line_number":212,"context_line":"                  \"MB\", {\u0027flavor\u0027: new_instance_type.memory_mb,"},{"line_number":213,"context_line":"                          \u0027overhead\u0027: overhead[\u0027memory_mb\u0027]})"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        # TODO(moshele): we are recreating the pci request even if"},{"line_number":216,"context_line":"        # there was no change on resize. This is causing in the resize"},{"line_number":217,"context_line":"        # phase to hold twice the pci device."},{"line_number":218,"context_line":"        new_pci_requests \u003d pci_request.get_pci_requests_from_flavor("},{"line_number":219,"context_line":"            new_instance_type)"},{"line_number":220,"context_line":"        new_pci_requests.instance_uuid \u003d instance.uuid"}],"source_content_type":"text/x-python","patch_set":12,"id":"dab17558_87b40c82","line":217,"range":{"start_line":215,"start_character":8,"end_line":217,"end_character":45},"updated":"2016-05-17 10:32:30.000000000","message":"q: Is there a limit on available PCI resources? Is so, what happens if you only have no free PCI devices and you attempt to resize?","commit_id":"3f8def5d7a787c469f7ec5651fb58f40af8c0543"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"a0ae02f59987ddba57ecacdb2b42c0cd85f43c0c","unresolved":false,"context_lines":[{"line_number":212,"context_line":"                  \"MB\", {\u0027flavor\u0027: new_instance_type.memory_mb,"},{"line_number":213,"context_line":"                          \u0027overhead\u0027: overhead[\u0027memory_mb\u0027]})"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        # TODO(moshele): we are recreating the pci request even if"},{"line_number":216,"context_line":"        # there was no change on resize. This is causing in the resize"},{"line_number":217,"context_line":"        # phase to hold twice the pci device."},{"line_number":218,"context_line":"        new_pci_requests \u003d pci_request.get_pci_requests_from_flavor("},{"line_number":219,"context_line":"            new_instance_type)"},{"line_number":220,"context_line":"        new_pci_requests.instance_uuid \u003d instance.uuid"}],"source_content_type":"text/x-python","patch_set":12,"id":"dab17558_bbfb29c0","line":217,"range":{"start_line":215,"start_character":8,"end_line":217,"end_character":45},"in_reply_to":"dab17558_87b40c82","updated":"2016-05-17 11:12:45.000000000","message":"the pci resource is limit. In case you don\u0027t have free pci device you will failed on claims.MoveClaim","commit_id":"3f8def5d7a787c469f7ec5651fb58f40af8c0543"},{"author":{"_account_id":17973,"name":"Ludovic Beliveau","email":"lbeliveau@gmail.com","username":"lbeliveau"},"change_message_id":"b7516c0683ca8f36ae14da98e7bb169c1de4a165","unresolved":false,"context_lines":[{"line_number":319,"context_line":"                if self.pci_tracker:"},{"line_number":320,"context_line":"                    self.pci_tracker.update_pci_for_migration(context,"},{"line_number":321,"context_line":"                                                              instance,"},{"line_number":322,"context_line":"                                                              sign\u003d-1)"},{"line_number":323,"context_line":"                self._update_usage(usage, sign\u003d-1)"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"                ctxt \u003d context.elevated()"}],"source_content_type":"text/x-python","patch_set":15,"id":"bab6814e_c29cf96b","side":"PARENT","line":322,"updated":"2016-05-18 12:18:08.000000000","message":"So do we use sign\u003d-1 anywhere else or we should deprecate it ?","commit_id":"e9a3bca86620e66c54c39b8548495ed18e35801b"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"cec0208fc117dedd4b011a697e371c4a592addf9","unresolved":false,"context_lines":[{"line_number":319,"context_line":"                if self.pci_tracker:"},{"line_number":320,"context_line":"                    self.pci_tracker.update_pci_for_migration(context,"},{"line_number":321,"context_line":"                                                              instance,"},{"line_number":322,"context_line":"                                                              sign\u003d-1)"},{"line_number":323,"context_line":"                self._update_usage(usage, sign\u003d-1)"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"                ctxt \u003d context.elevated()"}],"source_content_type":"text/x-python","patch_set":15,"id":"bab6814e_1dd02253","side":"PARENT","line":322,"in_reply_to":"bab6814e_c29cf96b","updated":"2016-05-18 12:45:14.000000000","message":"I am not sure but we may use is for migration, so let see if your migration patch need it and if not we can remove it in another patch","commit_id":"e9a3bca86620e66c54c39b8548495ed18e35801b"},{"author":{"_account_id":17973,"name":"Ludovic Beliveau","email":"lbeliveau@gmail.com","username":"lbeliveau"},"change_message_id":"b7516c0683ca8f36ae14da98e7bb169c1de4a165","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        # SR-IOV ports. On resize we need to merge the direct"},{"line_number":224,"context_line":"        # ports pci_requests with the new instance flavor pci_requests"},{"line_number":225,"context_line":"        # SR-IOV ports pci_request don\u0027t have alias_name so we add only"},{"line_number":226,"context_line":"        # them to the \"new\" pci_requests"},{"line_number":227,"context_line":"        if instance.pci_requests:"},{"line_number":228,"context_line":"            for request in instance.pci_requests.requests:"},{"line_number":229,"context_line":"                if request.alias_name is None:"}],"source_content_type":"text/x-python","patch_set":15,"id":"bab6814e_42cf69b0","line":226,"updated":"2016-05-18 12:18:08.000000000","message":"Nit: This last phrase is a bit too long and hard to understand.  Replace with:\n\nSR-IOV ports pci_request don\u0027t have an alias_name.  On resize  merge the direct ports pci_requests with the new instance flavor pci_requests.","commit_id":"87fcaa3a3316c4d198b69eeceef90c1af443614b"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"cec0208fc117dedd4b011a697e371c4a592addf9","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        # SR-IOV ports. On resize we need to merge the direct"},{"line_number":224,"context_line":"        # ports pci_requests with the new instance flavor pci_requests"},{"line_number":225,"context_line":"        # SR-IOV ports pci_request don\u0027t have alias_name so we add only"},{"line_number":226,"context_line":"        # them to the \"new\" pci_requests"},{"line_number":227,"context_line":"        if instance.pci_requests:"},{"line_number":228,"context_line":"            for request in instance.pci_requests.requests:"},{"line_number":229,"context_line":"                if request.alias_name is None:"}],"source_content_type":"text/x-python","patch_set":15,"id":"bab6814e_62feed6c","line":226,"in_reply_to":"bab6814e_42cf69b0","updated":"2016-05-18 12:45:14.000000000","message":"Done","commit_id":"87fcaa3a3316c4d198b69eeceef90c1af443614b"},{"author":{"_account_id":17973,"name":"Ludovic Beliveau","email":"lbeliveau@gmail.com","username":"lbeliveau"},"change_message_id":"b7516c0683ca8f36ae14da98e7bb169c1de4a165","unresolved":false,"context_lines":[{"line_number":336,"context_line":"        self._update(context.elevated())"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"    @utils.synchronized(COMPUTE_RESOURCE_SEMAPHORE)"},{"line_number":339,"context_line":"    def drop_move_claim(self, context, instance, instance_type\u003dNone,"},{"line_number":340,"context_line":"                        prefix\u003d\u0027new_\u0027):"},{"line_number":341,"context_line":"        \"\"\"Remove usage for an incoming/outgoing migration.\"\"\""},{"line_number":342,"context_line":"        if instance[\u0027uuid\u0027] in self.tracked_migrations:"}],"source_content_type":"text/x-python","patch_set":15,"id":"bab6814e_82795132","line":339,"updated":"2016-05-18 12:18:08.000000000","message":"The name of this method is a bit misleading.  I taugh drop_move_claim() referred to dropping the claim (like a revert or something).\n\nSo this method is actually called when the resize/move has succeeded and we need to cleanup ?","commit_id":"87fcaa3a3316c4d198b69eeceef90c1af443614b"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"cec0208fc117dedd4b011a697e371c4a592addf9","unresolved":false,"context_lines":[{"line_number":336,"context_line":"        self._update(context.elevated())"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"    @utils.synchronized(COMPUTE_RESOURCE_SEMAPHORE)"},{"line_number":339,"context_line":"    def drop_move_claim(self, context, instance, instance_type\u003dNone,"},{"line_number":340,"context_line":"                        prefix\u003d\u0027new_\u0027):"},{"line_number":341,"context_line":"        \"\"\"Remove usage for an incoming/outgoing migration.\"\"\""},{"line_number":342,"context_line":"        if instance[\u0027uuid\u0027] in self.tracked_migrations:"}],"source_content_type":"text/x-python","patch_set":15,"id":"bab6814e_02656144","line":339,"in_reply_to":"bab6814e_82795132","updated":"2016-05-18 12:45:14.000000000","message":"yes it is called when you confirm the resize \nsee \nhttps://github.com/openstack/nova/blob/9a05d38f48ef0f630c5e49e332075b273cee38b9/nova/compute/manager.py#L3340-L3369","commit_id":"87fcaa3a3316c4d198b69eeceef90c1af443614b"},{"author":{"_account_id":17973,"name":"Ludovic Beliveau","email":"lbeliveau@gmail.com","username":"lbeliveau"},"change_message_id":"812ddc213bc55f245220272b9653dd41c2d717b1","unresolved":false,"context_lines":[{"line_number":345,"context_line":"                ctxt \u003d context.elevated()"},{"line_number":346,"context_line":"                instance_type \u003d self._get_instance_type(ctxt, instance, prefix,"},{"line_number":347,"context_line":"                                                        migration)"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"            if instance_type is not None and instance_type.id \u003d\u003d itype[\u0027id\u0027]:"},{"line_number":350,"context_line":"                numa_topology \u003d self._get_migration_context_resource("},{"line_number":351,"context_line":"                    \u0027numa_topology\u0027, instance)"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_08f9e680","line":348,"updated":"2016-05-18 20:15:51.000000000","message":"I did some tests on my devstack testbed.\n\nThe scenario was to boot a guest with one pci_alias, them resize it to a different flavor with the same pci_alias.\n\nIt works, but looking at the database there are two PCI devices in \"allocated\" after the confirm.  See http://pastebin.com/d8ezm45K.\n\nI instrumented the code and it looks like it\u0027s not even going down the path at L350.\n\nThe reason is that instance_type.id !\u003d itype[\u0027id\u0027].\n\nIn my case, flavor was: Flavor(created_at\u003d2016-05-18T17:54:05Z,deleted\u003dFalse,deleted_at\u003dNone,disabled\u003dFalse,ephemeral_gb\u003d0,extra_specs\u003d{pci_passthrough:alias\u003d\u0027a1:1\u0027},flavorid\u003d\u00272\u0027,id\u003d7,is_public\u003dTrue,memory_mb\u003d2048,name\u003d\u0027m1.small\u0027,projects\u003d\u003c?\u003e,root_gb\u003d20,rxtx_factor\u003d1.0,swap\u003d0,updated_at\u003dNone,vcpu_weight\u003d0,vcpus\u003d1)\n\nAnd itype[\u0027id\u0027]: 8.\n\nI don\u0027t know what is the reason of this condition.","commit_id":"c24beff40e0a065ac5acac8db5301804b104400c"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"4fe3550c8c498802dc45f756838f925e84b1e84b","unresolved":false,"context_lines":[{"line_number":345,"context_line":"                ctxt \u003d context.elevated()"},{"line_number":346,"context_line":"                instance_type \u003d self._get_instance_type(ctxt, instance, prefix,"},{"line_number":347,"context_line":"                                                        migration)"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"            if instance_type is not None and instance_type.id \u003d\u003d itype[\u0027id\u0027]:"},{"line_number":350,"context_line":"                numa_topology \u003d self._get_migration_context_resource("},{"line_number":351,"context_line":"                    \u0027numa_topology\u0027, instance)"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_4f3c86e2","line":348,"in_reply_to":"bab6814e_08f9e680","updated":"2016-05-19 06:23:25.000000000","message":"great catch, Ludovic.","commit_id":"c24beff40e0a065ac5acac8db5301804b104400c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d74239f7f1c36a21454c2d5fc62ad9f651585b34","unresolved":false,"context_lines":[{"line_number":718,"context_line":"    def _get_migration_context_resource(self, resource, instance,"},{"line_number":719,"context_line":"                                        prefix\u003d\u0027new_\u0027, itype\u003dNone):"},{"line_number":720,"context_line":"        migration_context \u003d instance.migration_context"},{"line_number":721,"context_line":"        resouce \u003d prefix + resource"},{"line_number":722,"context_line":"        if migration_context and resouce in migration_context:"},{"line_number":723,"context_line":"            return getattr(migration_context, resouce)"},{"line_number":724,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_725417c9","line":721,"range":{"start_line":721,"start_character":8,"end_line":721,"end_character":15},"updated":"2016-05-23 18:47:12.000000000","message":"\"resource\" is misspelled.","commit_id":"c24beff40e0a065ac5acac8db5301804b104400c"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"e0a71ddcf70b771ab8d4326df6687cf9f5fe4686","unresolved":false,"context_lines":[{"line_number":718,"context_line":"    def _get_migration_context_resource(self, resource, instance,"},{"line_number":719,"context_line":"                                        prefix\u003d\u0027new_\u0027, itype\u003dNone):"},{"line_number":720,"context_line":"        migration_context \u003d instance.migration_context"},{"line_number":721,"context_line":"        resouce \u003d prefix + resource"},{"line_number":722,"context_line":"        if migration_context and resouce in migration_context:"},{"line_number":723,"context_line":"            return getattr(migration_context, resouce)"},{"line_number":724,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_9871c07a","line":721,"range":{"start_line":721,"start_character":8,"end_line":721,"end_character":15},"in_reply_to":"bab6814e_725417c9","updated":"2016-05-24 10:54:24.000000000","message":"Done","commit_id":"c24beff40e0a065ac5acac8db5301804b104400c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d74239f7f1c36a21454c2d5fc62ad9f651585b34","unresolved":false,"context_lines":[{"line_number":744,"context_line":"        record \u003d self.tracked_instances.get(uuid, None)"},{"line_number":745,"context_line":"        itype \u003d None"},{"line_number":746,"context_line":"        numa_topology \u003d None"},{"line_number":747,"context_line":"        sign \u003d None"},{"line_number":748,"context_line":"        if same_node:"},{"line_number":749,"context_line":"            # same node resize. record usage for whichever instance type the"},{"line_number":750,"context_line":"            # instance is *not* in:"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_726b7785","line":747,"updated":"2016-05-23 18:47:12.000000000","message":"It seems strange for this to be None or 1. Usually a sign would be -1, 1 or 0. Did you mean \"sentinel\" ? If so, there is almost definitely a better name for this.","commit_id":"c24beff40e0a065ac5acac8db5301804b104400c"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"e0a71ddcf70b771ab8d4326df6687cf9f5fe4686","unresolved":false,"context_lines":[{"line_number":744,"context_line":"        record \u003d self.tracked_instances.get(uuid, None)"},{"line_number":745,"context_line":"        itype \u003d None"},{"line_number":746,"context_line":"        numa_topology \u003d None"},{"line_number":747,"context_line":"        sign \u003d None"},{"line_number":748,"context_line":"        if same_node:"},{"line_number":749,"context_line":"            # same node resize. record usage for whichever instance type the"},{"line_number":750,"context_line":"            # instance is *not* in:"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_138e5127","line":747,"in_reply_to":"bab6814e_726b7785","updated":"2016-05-24 10:54:24.000000000","message":"Done","commit_id":"c24beff40e0a065ac5acac8db5301804b104400c"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1d1a4d5d16994d0107661f56a0a7b0ab9a2f73c7","unresolved":false,"context_lines":[{"line_number":228,"context_line":"        # PCI requests come from two sources: instance flavor and"},{"line_number":229,"context_line":"        # SR-IOV ports. SR-IOV ports pci_request don\u0027t have an alias_name."},{"line_number":230,"context_line":"        # On resize merge the SR-IOV ports pci_requests with the new"},{"line_number":231,"context_line":"        # instance flavor pci_requests."},{"line_number":232,"context_line":"        if instance.pci_requests:"},{"line_number":233,"context_line":"            for request in instance.pci_requests.requests:"},{"line_number":234,"context_line":"                if request.alias_name is None:"}],"source_content_type":"text/x-python","patch_set":19,"id":"9abb7d3a_e07b7e26","line":231,"updated":"2016-05-31 14:17:24.000000000","message":"Ugh...","commit_id":"8deefe8d40bc894ec174eb47e0a3835ee68cab17"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1d1a4d5d16994d0107661f56a0a7b0ab9a2f73c7","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        # instance flavor pci_requests."},{"line_number":232,"context_line":"        if instance.pci_requests:"},{"line_number":233,"context_line":"            for request in instance.pci_requests.requests:"},{"line_number":234,"context_line":"                if request.alias_name is None:"},{"line_number":235,"context_line":"                    new_pci_requests.requests.append(request)"},{"line_number":236,"context_line":"        claim \u003d claims.MoveClaim(context, instance, new_instance_type,"},{"line_number":237,"context_line":"                                 image_meta, self, self.compute_node,"}],"source_content_type":"text/x-python","patch_set":19,"id":"9abb7d3a_40752a30","line":234,"updated":"2016-05-31 14:17:24.000000000","message":"Such a hack that the only way to tell if the PCI request is for an SR-IOV port is by the alias_name being None :( Let\u0027s definitely clean that up in the future to be something that is more explicit and understandable.","commit_id":"8deefe8d40bc894ec174eb47e0a3835ee68cab17"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"476cb99e996af38355ad4469cd7498ed9b4899af","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        # instance flavor pci_requests."},{"line_number":232,"context_line":"        if instance.pci_requests:"},{"line_number":233,"context_line":"            for request in instance.pci_requests.requests:"},{"line_number":234,"context_line":"                if request.alias_name is None:"},{"line_number":235,"context_line":"                    new_pci_requests.requests.append(request)"},{"line_number":236,"context_line":"        claim \u003d claims.MoveClaim(context, instance, new_instance_type,"},{"line_number":237,"context_line":"                                 image_meta, self, self.compute_node,"}],"source_content_type":"text/x-python","patch_set":19,"id":"9abb7d3a_5aeeb2b4","line":234,"in_reply_to":"9abb7d3a_40752a30","updated":"2016-05-31 14:54:51.000000000","message":"I agree","commit_id":"8deefe8d40bc894ec174eb47e0a3835ee68cab17"}],"nova/conf/pci.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"bb6630f2d080047819da0f2acdf224e7ac2aac63","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"Services which consume this:"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"* nova-api and nova-compute"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"Related options:"},{"line_number":52,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"dab17558_4a14e99e","line":49,"range":{"start_line":49,"start_character":0,"end_line":49,"end_character":27},"updated":"2016-05-17 10:32:30.000000000","message":"nit: separate bullet points","commit_id":"3f8def5d7a787c469f7ec5651fb58f40af8c0543"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"a0ae02f59987ddba57ecacdb2b42c0cd85f43c0c","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"Services which consume this:"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"* nova-api and nova-compute"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"Related options:"},{"line_number":52,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"dab17558_3b2e1943","line":49,"range":{"start_line":49,"start_character":0,"end_line":49,"end_character":27},"in_reply_to":"dab17558_4a14e99e","updated":"2016-05-17 11:12:45.000000000","message":"Done","commit_id":"3f8def5d7a787c469f7ec5651fb58f40af8c0543"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1d1a4d5d16994d0107661f56a0a7b0ab9a2f73c7","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"Services which consume this:"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"* nova-api"},{"line_number":50,"context_line":"* nova-compute"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"Related options:"}],"source_content_type":"text/x-python","patch_set":19,"id":"9abb7d3a_a085f607","line":49,"updated":"2016-05-31 14:17:24.000000000","message":"Not sure if this is true?","commit_id":"8deefe8d40bc894ec174eb47e0a3835ee68cab17"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"476cb99e996af38355ad4469cd7498ed9b4899af","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"Services which consume this:"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"* nova-api"},{"line_number":50,"context_line":"* nova-compute"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"Related options:"}],"source_content_type":"text/x-python","patch_set":19,"id":"9abb7d3a_9a0bfa8d","line":49,"in_reply_to":"9abb7d3a_a085f607","updated":"2016-05-31 14:54:51.000000000","message":"so pci request are created by nova-api \nsee https://github.com/openstack/nova/blob/master/nova/compute/api.py#L864-L873\ncompute/api.py is executed by nova-api I check it with debugger. \nwith my change the alias need to be also defined in nova-compute\n\nThe documentation was incorrect.","commit_id":"8deefe8d40bc894ec174eb47e0a3835ee68cab17"}],"nova/objects/instance.py":[{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"5d552d4903ff5cc6352f4b7ededaa56c400cc801","unresolved":false,"context_lines":[{"line_number":845,"context_line":"    def apply_migration_context(self):"},{"line_number":846,"context_line":"        if self.migration_context:"},{"line_number":847,"context_line":"            self.numa_topology \u003d self.migration_context.new_numa_topology"},{"line_number":848,"context_line":"            self.pci_devices \u003d self.migration_context.new_pci_devices"},{"line_number":849,"context_line":"        else:"},{"line_number":850,"context_line":"            LOG.debug(\"Trying to apply a migration context that does not \""},{"line_number":851,"context_line":"                      \"seem to be set for this instance\", instance\u003dself)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_5d96b8f0","line":848,"range":{"start_line":848,"start_character":12,"end_line":848,"end_character":69},"updated":"2016-04-19 09:12:56.000000000","message":"So I think this won\u0027t work without the plumbing added to the pci_manager. We actually need to also update the actual objects in the manager to \u0027allocated\u0027 and flush that to the DB on the next save calling (allocate_instance) is probably fine. \n\nAlso we never really assign PCI devices to an instance, we just make sure that their IDs point to the instance so we really want to make sure that IDs from devices on the source node are cleared, or at least put into state where it is clear what to do on dropping_claim.\n\nAlso the problem with this is that these PciDevice instances are actual objects that were found in the pci_tracker.pci_devs. We never persist these as part of the migration context in the same way we do NUMA json - we just send them over RPC. Normally once the device is in the \u0027claimed\u0027 state, no further updates should happen on it so it seems like there is no risk of concurrent updates happening (for example when the service goes down and then back up) however, due to the way PciDevice objects are normally handled (only saved from a single place) this use is highly surprising and should be well commented.","commit_id":"03c8672fd60519d17891b999e74282f7b0cacae4"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"fb6bf80c89f0ca3a14fef317429f5dd8680f3a95","unresolved":false,"context_lines":[{"line_number":845,"context_line":"    def apply_migration_context(self):"},{"line_number":846,"context_line":"        if self.migration_context:"},{"line_number":847,"context_line":"            self.numa_topology \u003d self.migration_context.new_numa_topology"},{"line_number":848,"context_line":"            self.pci_devices \u003d self.migration_context.new_pci_devices"},{"line_number":849,"context_line":"        else:"},{"line_number":850,"context_line":"            LOG.debug(\"Trying to apply a migration context that does not \""},{"line_number":851,"context_line":"                      \"seem to be set for this instance\", instance\u003dself)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_22daab4c","line":848,"range":{"start_line":848,"start_character":12,"end_line":848,"end_character":69},"in_reply_to":"1a122d0e_32bcbedb","updated":"2016-04-19 14:09:26.000000000","message":"\u003e the adding the pci_manager is done in the resource.tacker._update_usage_from_migration I update the code to call to pci_tracker.update_pci_for_instance also the code there already update the pci_stats in the compute node as well so there is now issue as far as I can tell.\n\nI see what you mean.\n\nthat won\u0027t work though - for migrate - until the migration is confirmed, we have to make sure we hold resources as in-use on both the source and the destination compute host, in case there is a revert.","commit_id":"03c8672fd60519d17891b999e74282f7b0cacae4"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"6f2ddff89cbbeca27135350500ba5cbe15c54ce2","unresolved":false,"context_lines":[{"line_number":845,"context_line":"    def apply_migration_context(self):"},{"line_number":846,"context_line":"        if self.migration_context:"},{"line_number":847,"context_line":"            self.numa_topology \u003d self.migration_context.new_numa_topology"},{"line_number":848,"context_line":"            self.pci_devices \u003d self.migration_context.new_pci_devices"},{"line_number":849,"context_line":"        else:"},{"line_number":850,"context_line":"            LOG.debug(\"Trying to apply a migration context that does not \""},{"line_number":851,"context_line":"                      \"seem to be set for this instance\", instance\u003dself)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_32bcbedb","line":848,"range":{"start_line":848,"start_character":12,"end_line":848,"end_character":69},"in_reply_to":"1a122d0e_5d96b8f0","updated":"2016-04-19 12:46:39.000000000","message":"the adding the pci_manager is done in the resource.tacker._update_usage_from_migration\nI update the code to call to pci_tracker.update_pci_for_instance also the code there already update the pci_stats in the compute node as well so there is now issue as far as I can tell.\n\nSo I guess you are talk about migration because in resize \nThe instance id for the pci is the same. I guess it may require extra logic in need to test migration.\n(I just tested resize).\n\nnot sure I understand you last point. can you explain what should be documented","commit_id":"03c8672fd60519d17891b999e74282f7b0cacae4"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"5d552d4903ff5cc6352f4b7ededaa56c400cc801","unresolved":false,"context_lines":[{"line_number":853,"context_line":"    def revert_migration_context(self):"},{"line_number":854,"context_line":"        if self.migration_context:"},{"line_number":855,"context_line":"            self.numa_topology \u003d self.migration_context.old_numa_topology"},{"line_number":856,"context_line":"            self.pci_devices \u003d self.migration_context.old_pci_devices"},{"line_number":857,"context_line":"        else:"},{"line_number":858,"context_line":"            LOG.debug(\"Trying to revert a migration context that does not \""},{"line_number":859,"context_line":"                      \"seem to be set for this instance\", instance\u003dself)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_10af0782","line":856,"updated":"2016-04-19 09:12:56.000000000","message":"Same here - you would need to call into the pci_tracker and make sure the states are set appropriately, and devices returned to their pools.","commit_id":"03c8672fd60519d17891b999e74282f7b0cacae4"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1bbc5e1f9436319ba5c5c342e5a992312afd3bfe","unresolved":false,"context_lines":[{"line_number":845,"context_line":"    def apply_migration_context(self):"},{"line_number":846,"context_line":"        if self.migration_context:"},{"line_number":847,"context_line":"            self.numa_topology \u003d self.migration_context.new_numa_topology"},{"line_number":848,"context_line":"            self.pci_devices \u003d self.migration_context.new_pci_devices"},{"line_number":849,"context_line":"        else:"},{"line_number":850,"context_line":"            LOG.debug(\"Trying to apply a migration context that does not \""},{"line_number":851,"context_line":"                      \"seem to be set for this instance\", instance\u003dself)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_bac0097e","line":848,"updated":"2016-04-21 23:12:26.000000000","message":"I don\u0027t see anything in this patch that actually *sets* MigrationContext.new_pci_devices or MigrationContext.old_pci_devices, so I\u0027m unclear where these attributes would ever be set?","commit_id":"4e4eced6ac5728dffdb2577887f2e1fb1ddb890b"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"eeff736454725d61fd74f600721694dad299bd88","unresolved":false,"context_lines":[{"line_number":845,"context_line":"    def apply_migration_context(self):"},{"line_number":846,"context_line":"        if self.migration_context:"},{"line_number":847,"context_line":"            self.numa_topology \u003d self.migration_context.new_numa_topology"},{"line_number":848,"context_line":"            self.pci_devices \u003d self.migration_context.new_pci_devices"},{"line_number":849,"context_line":"        else:"},{"line_number":850,"context_line":"            LOG.debug(\"Trying to apply a migration context that does not \""},{"line_number":851,"context_line":"                      \"seem to be set for this instance\", instance\u003dself)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_fd8f1bca","line":848,"in_reply_to":"1a122d0e_bac0097e","updated":"2016-04-22 00:26:38.000000000","message":"see https://review.openstack.org/#/c/307124/3/nova/compute/claims.py L 329-330","commit_id":"4e4eced6ac5728dffdb2577887f2e1fb1ddb890b"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"dd9f1400c964fd1b1fac2378c50a9e6d73e6f2da","unresolved":false,"context_lines":[{"line_number":845,"context_line":"    def apply_migration_context(self):"},{"line_number":846,"context_line":"        if self.migration_context:"},{"line_number":847,"context_line":"            self.numa_topology \u003d self.migration_context.new_numa_topology"},{"line_number":848,"context_line":"            self.pci_devices \u003d self.migration_context.new_pci_devices"},{"line_number":849,"context_line":"        else:"},{"line_number":850,"context_line":"            LOG.debug(\"Trying to apply a migration context that does not \""},{"line_number":851,"context_line":"                      \"seem to be set for this instance\", instance\u003dself)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_bd73e3e6","line":848,"in_reply_to":"1a122d0e_fd8f1bca","updated":"2016-04-22 00:31:21.000000000","message":"Aha, got it :) Thanks!","commit_id":"4e4eced6ac5728dffdb2577887f2e1fb1ddb890b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"319a8b5fc340713658666e33587b9dbc147a3464","unresolved":false,"context_lines":[{"line_number":845,"context_line":"    def apply_migration_context(self):"},{"line_number":846,"context_line":"        if self.migration_context:"},{"line_number":847,"context_line":"            self.numa_topology \u003d self.migration_context.new_numa_topology"},{"line_number":848,"context_line":"            self.pci_devices \u003d self.migration_context.new_pci_devices"},{"line_number":849,"context_line":"        else:"},{"line_number":850,"context_line":"            LOG.debug(\"Trying to apply a migration context that does not \""},{"line_number":851,"context_line":"                      \"seem to be set for this instance\", instance\u003dself)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a122d0e_712a1431","line":848,"updated":"2016-05-02 19:59:42.000000000","message":"So we\u0027ve got migration contexts in the database right now, that don\u0027t have this. We need to gracefully handle this case if we load one of those.\n\nThe scenario comes when people have migrations in process during an upgrade. I.e. a user starts a migration, but doesn\u0027t confirm or finish at which point an admin starts to do an upgrade. This line will crash pretty hard if we load a migration out of the DB without this field.\n\nSimilarly, if I understand correctly, we won\u0027t be able to migrate from an older compute node to a newer one because the old compute will not have written a migration context with the newer object we need, right?","commit_id":"c3de4dd9e69ee4e7b6e69e3fb7ee9ca540f010b5"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"226f14454f836a1f9a23d05bad20859b60309a2c","unresolved":false,"context_lines":[{"line_number":845,"context_line":"    def apply_migration_context(self):"},{"line_number":846,"context_line":"        if self.migration_context:"},{"line_number":847,"context_line":"            self.numa_topology \u003d self.migration_context.new_numa_topology"},{"line_number":848,"context_line":"            self.pci_devices \u003d self.migration_context.new_pci_devices"},{"line_number":849,"context_line":"        else:"},{"line_number":850,"context_line":"            LOG.debug(\"Trying to apply a migration context that does not \""},{"line_number":851,"context_line":"                      \"seem to be set for this instance\", instance\u003dself)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a122d0e_55dc0446","line":848,"in_reply_to":"1a122d0e_712a1431","updated":"2016-05-03 16:50:37.000000000","message":"so I change it to update the migration context hasattr of pci devices.\n\nregarding to  migrate from an older compute node \nyes I believe it won\u0027t work, but also migration from old compute to old compute will not work that it is what I am trying to fix.","commit_id":"c3de4dd9e69ee4e7b6e69e3fb7ee9ca540f010b5"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"900eab3a838095ad10c3a1de5859d53749b0bcd9","unresolved":false,"context_lines":[{"line_number":845,"context_line":"    def apply_migration_context(self):"},{"line_number":846,"context_line":"        if self.migration_context:"},{"line_number":847,"context_line":"            self.numa_topology \u003d self.migration_context.new_numa_topology"},{"line_number":848,"context_line":"            if hasattr(self.migration_context, \"new_pci_devices\"):"},{"line_number":849,"context_line":"                self.pci_devices \u003d self.migration_context.new_pci_devices"},{"line_number":850,"context_line":"            if hasattr(self.migration_context, \"new_pci_requests\"):"},{"line_number":851,"context_line":"                self.pci_requests \u003d self.migration_context.new_pci_requests"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a122d0e_edfc4041","line":848,"updated":"2016-05-04 14:29:29.000000000","message":"This will always be true because every field is a property on the object, even if unset.\n\nWhat you want is:\n\n if \u0027new_pci_devices\u0027 in self.migration_context:\n     ...","commit_id":"b91cfdb77006d0b935bfeca978320a2516732347"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"05cdedc4709be5f8d20a04c50a46598c374c40dd","unresolved":false,"context_lines":[{"line_number":845,"context_line":"    def apply_migration_context(self):"},{"line_number":846,"context_line":"        if self.migration_context:"},{"line_number":847,"context_line":"            self.numa_topology \u003d self.migration_context.new_numa_topology"},{"line_number":848,"context_line":"            if hasattr(self.migration_context, \"new_pci_devices\"):"},{"line_number":849,"context_line":"                self.pci_devices \u003d self.migration_context.new_pci_devices"},{"line_number":850,"context_line":"            if hasattr(self.migration_context, \"new_pci_requests\"):"},{"line_number":851,"context_line":"                self.pci_requests \u003d self.migration_context.new_pci_requests"}],"source_content_type":"text/x-python","patch_set":9,"id":"dab17558_486e3a02","line":848,"in_reply_to":"1a122d0e_edfc4041","updated":"2016-05-08 18:22:46.000000000","message":"Done","commit_id":"b91cfdb77006d0b935bfeca978320a2516732347"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d74239f7f1c36a21454c2d5fc62ad9f651585b34","unresolved":false,"context_lines":[{"line_number":896,"context_line":"    def apply_migration_context(self):"},{"line_number":897,"context_line":"        if self.migration_context:"},{"line_number":898,"context_line":"            self.numa_topology \u003d self.migration_context.new_numa_topology"},{"line_number":899,"context_line":"            if \u0027new_pci_devices\u0027 in self.migration_context:"},{"line_number":900,"context_line":"                self.pci_devices \u003d self.migration_context.new_pci_devices"},{"line_number":901,"context_line":"            if \u0027new_pci_requests\u0027 in self.migration_context:"},{"line_number":902,"context_line":"                self.pci_requests \u003d self.migration_context.new_pci_requests"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_12ccab87","line":899,"updated":"2016-05-23 18:47:12.000000000","message":"When would this ever be something we can\u0027t just set? We should aim for it to always be set in the context (even if None) and set it on the instance explicitly, IMHO.","commit_id":"c24beff40e0a065ac5acac8db5301804b104400c"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"e0a71ddcf70b771ab8d4326df6687cf9f5fe4686","unresolved":false,"context_lines":[{"line_number":896,"context_line":"    def apply_migration_context(self):"},{"line_number":897,"context_line":"        if self.migration_context:"},{"line_number":898,"context_line":"            self.numa_topology \u003d self.migration_context.new_numa_topology"},{"line_number":899,"context_line":"            if \u0027new_pci_devices\u0027 in self.migration_context:"},{"line_number":900,"context_line":"                self.pci_devices \u003d self.migration_context.new_pci_devices"},{"line_number":901,"context_line":"            if \u0027new_pci_requests\u0027 in self.migration_context:"},{"line_number":902,"context_line":"                self.pci_requests \u003d self.migration_context.new_pci_requests"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_585758ca","line":899,"in_reply_to":"bab6814e_12ccab87","updated":"2016-05-24 10:54:24.000000000","message":"I will remove this","commit_id":"c24beff40e0a065ac5acac8db5301804b104400c"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1d1a4d5d16994d0107661f56a0a7b0ab9a2f73c7","unresolved":false,"context_lines":[{"line_number":879,"context_line":"    def apply_migration_context(self):"},{"line_number":880,"context_line":"        if self.migration_context:"},{"line_number":881,"context_line":"            self.numa_topology \u003d self.migration_context.new_numa_topology"},{"line_number":882,"context_line":"            self.pci_devices \u003d self.migration_context.new_pci_devices"},{"line_number":883,"context_line":"            self.pci_requests \u003d self.migration_context.new_pci_requests"},{"line_number":884,"context_line":"        else:"},{"line_number":885,"context_line":"            LOG.debug(\"Trying to apply a migration context that does not \""}],"source_content_type":"text/x-python","patch_set":19,"id":"9abb7d3a_007fa215","line":882,"updated":"2016-05-31 14:17:24.000000000","message":"Don\u0027t you need to do:\n\n if \u0027new_pci_devices\u0027 in self.migration_context:\n\nfor these like you do below?","commit_id":"8deefe8d40bc894ec174eb47e0a3835ee68cab17"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"816e3768394195dbd59ec5a8cf1473eeead7d346","unresolved":false,"context_lines":[{"line_number":879,"context_line":"    def apply_migration_context(self):"},{"line_number":880,"context_line":"        if self.migration_context:"},{"line_number":881,"context_line":"            self.numa_topology \u003d self.migration_context.new_numa_topology"},{"line_number":882,"context_line":"            self.pci_devices \u003d self.migration_context.new_pci_devices"},{"line_number":883,"context_line":"            self.pci_requests \u003d self.migration_context.new_pci_requests"},{"line_number":884,"context_line":"        else:"},{"line_number":885,"context_line":"            LOG.debug(\"Trying to apply a migration context that does not \""}],"source_content_type":"text/x-python","patch_set":19,"id":"9abb7d3a_86844a5e","line":882,"in_reply_to":"9abb7d3a_007fa215","updated":"2016-05-31 14:39:55.000000000","message":"No, see comments on PS16 for this line.","commit_id":"8deefe8d40bc894ec174eb47e0a3835ee68cab17"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7156a8ec030c4e83be6c61c5ff4565ce90c6deed","unresolved":false,"context_lines":[{"line_number":888,"context_line":"    def revert_migration_context(self):"},{"line_number":889,"context_line":"        if self.migration_context:"},{"line_number":890,"context_line":"            self.numa_topology \u003d self.migration_context.old_numa_topology"},{"line_number":891,"context_line":"            if \u0027old_pci_devices\u0027 in self.migration_context:"},{"line_number":892,"context_line":"                self.pci_devices \u003d self.migration_context.old_pci_devices"},{"line_number":893,"context_line":"            if \u0027old_pci_requests\u0027 in self.migration_context:"},{"line_number":894,"context_line":"                self.pci_requests \u003d self.migration_context.old_pci_requests"}],"source_content_type":"text/x-python","patch_set":20,"id":"9abb7d3a_b0be8dab","line":891,"updated":"2016-06-01 21:02:46.000000000","message":"If the `if \u0027new_pci_devices\u0027 in self.migration_context` is not needed above, why is this needed here then?","commit_id":"d5655967d9560e9114b7fad29867db4f5e3fc5be"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"f44b32b013214467a96f87c554371bece3d34d85","unresolved":false,"context_lines":[{"line_number":888,"context_line":"    def revert_migration_context(self):"},{"line_number":889,"context_line":"        if self.migration_context:"},{"line_number":890,"context_line":"            self.numa_topology \u003d self.migration_context.old_numa_topology"},{"line_number":891,"context_line":"            if \u0027old_pci_devices\u0027 in self.migration_context:"},{"line_number":892,"context_line":"                self.pci_devices \u003d self.migration_context.old_pci_devices"},{"line_number":893,"context_line":"            if \u0027old_pci_requests\u0027 in self.migration_context:"},{"line_number":894,"context_line":"                self.pci_requests \u003d self.migration_context.old_pci_requests"}],"source_content_type":"text/x-python","patch_set":20,"id":"9abb7d3a_dfb875ca","line":891,"in_reply_to":"9abb7d3a_b0be8dab","updated":"2016-06-02 02:25:58.000000000","message":"I think this is handle the scenario when a user started a resize with M version and the vm is in resize-verify state\nThan he update to N version and he do the resize-revert. But now it make sense to me to do that also on apply_migration_context because it is the same and the different is that the user will do resize-confirm.\n@Dan,\nso maybe it will be better to add this also to the \napply_migration_context.","commit_id":"d5655967d9560e9114b7fad29867db4f5e3fc5be"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5dd7c80ec35f0a678857d5650508c08ea53f0956","unresolved":false,"context_lines":[{"line_number":888,"context_line":"    def revert_migration_context(self):"},{"line_number":889,"context_line":"        if self.migration_context:"},{"line_number":890,"context_line":"            self.numa_topology \u003d self.migration_context.old_numa_topology"},{"line_number":891,"context_line":"            if \u0027old_pci_devices\u0027 in self.migration_context:"},{"line_number":892,"context_line":"                self.pci_devices \u003d self.migration_context.old_pci_devices"},{"line_number":893,"context_line":"            if \u0027old_pci_requests\u0027 in self.migration_context:"},{"line_number":894,"context_line":"                self.pci_requests \u003d self.migration_context.old_pci_requests"}],"source_content_type":"text/x-python","patch_set":20,"id":"9abb7d3a_b4d76abe","line":891,"in_reply_to":"9abb7d3a_dfb875ca","updated":"2016-06-02 17:06:08.000000000","message":"Yeah, I was thinking specifically of the rolling forward case, but technically we could resize from a new to old node, so checking here too is probably a good idea.\n\nThe thing I care about is that we end up with these set on the instance all the time, regardless of whether they\u0027re in the context. So please initialize them to None in both cases and then set them if available from the context.","commit_id":"d5655967d9560e9114b7fad29867db4f5e3fc5be"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d0384c73c1ab2cfd13b907699ce6f685f18742cd","unresolved":false,"context_lines":[{"line_number":900,"context_line":"            if attr_name in self.migration_context:"},{"line_number":901,"context_line":"                attr_value \u003d getattr("},{"line_number":902,"context_line":"                    self.migration_context, attr_name)"},{"line_number":903,"context_line":"                setattr(self, inst_attr_name, attr_value)"},{"line_number":904,"context_line":""},{"line_number":905,"context_line":"    @contextlib.contextmanager"},{"line_number":906,"context_line":"    def mutated_migration_context(self):"}],"source_content_type":"text/x-python","patch_set":21,"id":"9abb7d3a_d258fefc","line":903,"updated":"2016-06-03 15:55:51.000000000","message":"I\u0027m not sure I like this in terms of readability.. It\u0027s not really much of a savings, IMHO, but that\u0027s fine.","commit_id":"c2c3b97259258eec3c98feabde3b411b519eae6e"}],"nova/objects/instance_pci_requests.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1bbc5e1f9436319ba5c5c342e5a992312afd3bfe","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    def obj_make_compatible(self, primitive, target_version):"},{"line_number":41,"context_line":"        target_version \u003d versionutils.convert_version_to_tuple(target_version)"},{"line_number":42,"context_line":"        if target_version \u003c (1, 1) and \u0027request_id\u0027 in primitive:"},{"line_number":43,"context_line":"            del primitive[\u0027request_id\u0027]"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"# TODO(berrange): Remove NovaObjectDictCompat"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_b7fe6436","line":43,"updated":"2016-04-21 23:12:26.000000000","message":"Here, you should remove is_new from primitive when target version \u003e\u003d 1.2.","commit_id":"4e4eced6ac5728dffdb2577887f2e1fb1ddb890b"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"3b822b0204ea277e705b391c5db3af45e1049ffb","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    def obj_make_compatible(self, primitive, target_version):"},{"line_number":41,"context_line":"        target_version \u003d versionutils.convert_version_to_tuple(target_version)"},{"line_number":42,"context_line":"        if target_version \u003c (1, 1) and \u0027request_id\u0027 in primitive:"},{"line_number":43,"context_line":"            del primitive[\u0027request_id\u0027]"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"# TODO(berrange): Remove NovaObjectDictCompat"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_dd0b3f2a","line":43,"in_reply_to":"1a122d0e_5d49ef8d","updated":"2016-04-22 00:37:47.000000000","message":"sorry meant backward compatible stuff :)","commit_id":"4e4eced6ac5728dffdb2577887f2e1fb1ddb890b"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"eeff736454725d61fd74f600721694dad299bd88","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    def obj_make_compatible(self, primitive, target_version):"},{"line_number":41,"context_line":"        target_version \u003d versionutils.convert_version_to_tuple(target_version)"},{"line_number":42,"context_line":"        if target_version \u003c (1, 1) and \u0027request_id\u0027 in primitive:"},{"line_number":43,"context_line":"            del primitive[\u0027request_id\u0027]"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"# TODO(berrange): Remove NovaObjectDictCompat"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_dd017f3b","line":43,"in_reply_to":"1a122d0e_b7fe6436","updated":"2016-04-22 00:26:38.000000000","message":"yes  I didn\u0027t handle well the hackwork compatible stuff","commit_id":"4e4eced6ac5728dffdb2577887f2e1fb1ddb890b"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"dd9f1400c964fd1b1fac2378c50a9e6d73e6f2da","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    def obj_make_compatible(self, primitive, target_version):"},{"line_number":41,"context_line":"        target_version \u003d versionutils.convert_version_to_tuple(target_version)"},{"line_number":42,"context_line":"        if target_version \u003c (1, 1) and \u0027request_id\u0027 in primitive:"},{"line_number":43,"context_line":"            del primitive[\u0027request_id\u0027]"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"# TODO(berrange): Remove NovaObjectDictCompat"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_5d49ef8d","line":43,"in_reply_to":"1a122d0e_dd017f3b","updated":"2016-04-22 00:31:21.000000000","message":"hackwork compatible huh? :P","commit_id":"4e4eced6ac5728dffdb2577887f2e1fb1ddb890b"}],"nova/objects/migration_context.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1bbc5e1f9436319ba5c5c342e5a992312afd3bfe","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    \"\"\""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    # Version 1.0: Initial version"},{"line_number":36,"context_line":"    # Version 1.1: Add old/new pci_devices and pci_requests"},{"line_number":37,"context_line":"    VERSION \u003d \u00271.1\u0027"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_17063820","line":36,"updated":"2016-04-21 23:12:26.000000000","message":"You mention pci_requests above but this version doesn\u0027t add anything about pci_requests...","commit_id":"4e4eced6ac5728dffdb2577887f2e1fb1ddb890b"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1bbc5e1f9436319ba5c5c342e5a992312afd3bfe","unresolved":false,"context_lines":[{"line_number":47,"context_line":"                                              nullable\u003dTrue),"},{"line_number":48,"context_line":"        \u0027old_pci_devices\u0027: fields.ObjectField(\u0027PciDeviceList\u0027,"},{"line_number":49,"context_line":"                                              nullable\u003dTrue),"},{"line_number":50,"context_line":"    }"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    @classmethod"},{"line_number":53,"context_line":"    def obj_from_db_obj(cls, db_obj):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_f7545c22","line":50,"updated":"2016-04-21 23:12:26.000000000","message":"You need to add an obj_make_primitive() method here that downversions the object definition for clients that don\u0027t understand the new version 1.1:\n\n def obj_make_compatible(self, primitive, target_version):\n     target_version \u003d versionutils.convert_version_to_tuple(target_version)\n     if target_version \u003c (1, 1):\n         primitive.pop(\u0027old_pci_devices\u0027, None)\n         primitive.pop(\u0027new_pci_devices\u0027, None)","commit_id":"4e4eced6ac5728dffdb2577887f2e1fb1ddb890b"},{"author":{"_account_id":17973,"name":"Ludovic Beliveau","email":"lbeliveau@gmail.com","username":"lbeliveau"},"change_message_id":"49d3aceab7fca48206e4c5c8b77af8b863057ce9","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        target_version \u003d versionutils.convert_version_to_tuple(target_version)"},{"line_number":60,"context_line":"        if target_version \u003c (1, 1):"},{"line_number":61,"context_line":"            primitive.pop(\u0027old_pci_devices\u0027, None)"},{"line_number":62,"context_line":"            primitive.pop(\u0027new_pci_devices\u0027, None)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    @classmethod"},{"line_number":65,"context_line":"    def obj_from_db_obj(cls, db_obj):"}],"source_content_type":"text/x-python","patch_set":9,"id":"dab17558_f6f29599","line":62,"updated":"2016-05-06 16:34:26.000000000","message":"I think new_pci_requests and old_pci_requests need to be popped as well.  (I understand that this is a WIP ...)","commit_id":"b91cfdb77006d0b935bfeca978320a2516732347"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"05cdedc4709be5f8d20a04c50a46598c374c40dd","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        target_version \u003d versionutils.convert_version_to_tuple(target_version)"},{"line_number":60,"context_line":"        if target_version \u003c (1, 1):"},{"line_number":61,"context_line":"            primitive.pop(\u0027old_pci_devices\u0027, None)"},{"line_number":62,"context_line":"            primitive.pop(\u0027new_pci_devices\u0027, None)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    @classmethod"},{"line_number":65,"context_line":"    def obj_from_db_obj(cls, db_obj):"}],"source_content_type":"text/x-python","patch_set":9,"id":"dab17558_e84d6e9a","line":62,"in_reply_to":"dab17558_f6f29599","updated":"2016-05-08 18:22:46.000000000","message":"Done","commit_id":"b91cfdb77006d0b935bfeca978320a2516732347"}],"nova/objects/pci_device.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1bbc5e1f9436319ba5c5c342e5a992312afd3bfe","unresolved":false,"context_lines":[{"line_number":466,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":467,"context_line":"        super(PciDeviceList, self).__init__(*args, **kwargs)"},{"line_number":468,"context_line":"        self.objects \u003d []"},{"line_number":469,"context_line":"        self.obj_reset_changes()"},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"    @base.remotable_classmethod"},{"line_number":472,"context_line":"    def get_by_compute_node(cls, context, node_id):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_5afe1506","side":"PARENT","line":469,"updated":"2016-04-21 23:12:26.000000000","message":"This change is unrelated and can be in a separate patch.","commit_id":"b335318a6254e0e4752bcf0665579527b628c963"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"eeff736454725d61fd74f600721694dad299bd88","unresolved":false,"context_lines":[{"line_number":466,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":467,"context_line":"        super(PciDeviceList, self).__init__(*args, **kwargs)"},{"line_number":468,"context_line":"        self.objects \u003d []"},{"line_number":469,"context_line":"        self.obj_reset_changes()"},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"    @base.remotable_classmethod"},{"line_number":472,"context_line":"    def get_by_compute_node(cls, context, node_id):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_3d999320","side":"PARENT","line":469,"in_reply_to":"1a122d0e_5afe1506","updated":"2016-04-22 00:26:38.000000000","message":"ok will split","commit_id":"b335318a6254e0e4752bcf0665579527b628c963"}],"nova/pci/manager.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"319a8b5fc340713658666e33587b9dbc147a3464","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        instance_uuid \u003d pci_requests.instance_uuid"},{"line_number":185,"context_line":"        for dev in devs:"},{"line_number":186,"context_line":"            dev.claim(instance_uuid)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        if instance_numa_topology and any("},{"line_number":189,"context_line":"                                        dev.numa_node is None for dev in devs):"},{"line_number":190,"context_line":"            LOG.warning(_LW(\"Assigning a pci device without numa affinity to\""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a122d0e_9144101c","line":187,"updated":"2016-05-02 19:59:42.000000000","message":"Random whitespace change.","commit_id":"c3de4dd9e69ee4e7b6e69e3fb7ee9ca540f010b5"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"226f14454f836a1f9a23d05bad20859b60309a2c","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        instance_uuid \u003d pci_requests.instance_uuid"},{"line_number":185,"context_line":"        for dev in devs:"},{"line_number":186,"context_line":"            dev.claim(instance_uuid)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        if instance_numa_topology and any("},{"line_number":189,"context_line":"                                        dev.numa_node is None for dev in devs):"},{"line_number":190,"context_line":"            LOG.warning(_LW(\"Assigning a pci device without numa affinity to\""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a122d0e_884b305f","line":187,"in_reply_to":"1a122d0e_9144101c","updated":"2016-05-03 16:50:37.000000000","message":"Done","commit_id":"c3de4dd9e69ee4e7b6e69e3fb7ee9ca540f010b5"},{"author":{"_account_id":17973,"name":"Ludovic Beliveau","email":"lbeliveau@gmail.com","username":"lbeliveau"},"change_message_id":"49d3aceab7fca48206e4c5c8b77af8b863057ce9","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        self._allocate_instance(instance, devs)"},{"line_number":199,"context_line":"        if devs:"},{"line_number":200,"context_line":"            self.allocations[instance[\u0027uuid\u0027]] +\u003d devs"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    def claim_instance(self, context, pci_requests, instance_numa_topology):"},{"line_number":203,"context_line":"        if not self.pci_devs or not pci_requests.requests:"},{"line_number":204,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":9,"id":"dab17558_163119a3","side":"PARENT","line":201,"updated":"2016-05-06 16:34:26.000000000","message":"This is not related to this bug fix.  I would prefer this refactoring change to be in a different patch.  Especially that this is for a bug and it might most likely get back-ported to a different release.","commit_id":"850513766fb24e31cfe6a643fc0bf377573b383e"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"05cdedc4709be5f8d20a04c50a46598c374c40dd","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        self._allocate_instance(instance, devs)"},{"line_number":199,"context_line":"        if devs:"},{"line_number":200,"context_line":"            self.allocations[instance[\u0027uuid\u0027]] +\u003d devs"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    def claim_instance(self, context, pci_requests, instance_numa_topology):"},{"line_number":203,"context_line":"        if not self.pci_devs or not pci_requests.requests:"},{"line_number":204,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":9,"id":"dab17558_28481687","side":"PARENT","line":201,"in_reply_to":"dab17558_163119a3","updated":"2016-05-08 18:22:46.000000000","message":"fair enough. I will undo it.","commit_id":"850513766fb24e31cfe6a643fc0bf377573b383e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"bb6630f2d080047819da0f2acdf224e7ac2aac63","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        return devs"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    def free_device(self, dev, instance):"},{"line_number":212,"context_line":"        \"\"\"free device from pci resource tracker"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        :param dev: cloned pci device object that needs to be free"}],"source_content_type":"text/x-python","patch_set":12,"id":"dab17558_aaff5532","line":212,"range":{"start_line":212,"start_character":0,"end_line":212,"end_character":48},"updated":"2016-05-17 10:32:30.000000000","message":"nit: s/free/Free/, and drop extra newline","commit_id":"3f8def5d7a787c469f7ec5651fb58f40af8c0543"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"a0ae02f59987ddba57ecacdb2b42c0cd85f43c0c","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        return devs"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    def free_device(self, dev, instance):"},{"line_number":212,"context_line":"        \"\"\"free device from pci resource tracker"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        :param dev: cloned pci device object that needs to be free"}],"source_content_type":"text/x-python","patch_set":12,"id":"dab17558_9b1d8511","line":212,"range":{"start_line":212,"start_character":0,"end_line":212,"end_character":48},"in_reply_to":"dab17558_aaff5532","updated":"2016-05-17 11:12:45.000000000","message":"Done","commit_id":"3f8def5d7a787c469f7ec5651fb58f40af8c0543"}]}
