)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0f1e24aa077f9e4f5d03539d61cca0acea5786e9","unresolved":true,"context_lines":[{"line_number":9,"context_line":"This makes us invalidate our cache of the PCI-in-placement resource"},{"line_number":10,"context_line":"providers when we go to do instance_claim(). This is not technically"},{"line_number":11,"context_line":"required right now, but is setup for the next patch where we will"},{"line_number":12,"context_line":"update that inventory during claim and we need to make sure we are"},{"line_number":13,"context_line":"working with the latest version. Without this, we may consider a"},{"line_number":14,"context_line":"cached version of the inventory to be the same as the proposed one,"},{"line_number":15,"context_line":"and thus not actually update placement when we need to."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Related to blueprint one-time-use-devices"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"c20a0401_c83dc4d4","line":15,"range":{"start_line":12,"start_character":0,"end_line":15,"end_character":55},"updated":"2025-03-28 14:17:36.000000000","message":"I would mention that one scenario this can happen when an external client (i.e. external to nova-compute) changes the inventory via the Placement API. The PCI in Placement feature by design allow such operation as documented in [1].\n\n[1]https://github.com/openstack/nova/blob/98226b60f3fe7b20e8d7f208c12f8d0086cd83d0/nova/compute/pci_placement_translator.py#L252-L261","commit_id":"e3d1dabd18eb7b9e28662fee7bbf5e3adf9ced16"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"50f5cfb32470eef50d86363311c5e150bb9e85fe","unresolved":true,"context_lines":[{"line_number":9,"context_line":"This makes us invalidate our cache of the PCI-in-placement resource"},{"line_number":10,"context_line":"providers when we go to do instance_claim(). This is not technically"},{"line_number":11,"context_line":"required right now, but is setup for the next patch where we will"},{"line_number":12,"context_line":"update that inventory during claim and we need to make sure we are"},{"line_number":13,"context_line":"working with the latest version. Without this, we may consider a"},{"line_number":14,"context_line":"cached version of the inventory to be the same as the proposed one,"},{"line_number":15,"context_line":"and thus not actually update placement when we need to."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Related to blueprint one-time-use-devices"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"f920bf61_8ed1f5a4","line":15,"range":{"start_line":12,"start_character":0,"end_line":15,"end_character":55},"in_reply_to":"8fa48057_ce9bb59a","updated":"2025-04-01 14:11:59.000000000","message":"Okay, I\u0027ll add a few more words here.","commit_id":"e3d1dabd18eb7b9e28662fee7bbf5e3adf9ced16"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f18e7d976e9f6dabdcce24f25b5f96c4ec068b47","unresolved":true,"context_lines":[{"line_number":9,"context_line":"This makes us invalidate our cache of the PCI-in-placement resource"},{"line_number":10,"context_line":"providers when we go to do instance_claim(). This is not technically"},{"line_number":11,"context_line":"required right now, but is setup for the next patch where we will"},{"line_number":12,"context_line":"update that inventory during claim and we need to make sure we are"},{"line_number":13,"context_line":"working with the latest version. Without this, we may consider a"},{"line_number":14,"context_line":"cached version of the inventory to be the same as the proposed one,"},{"line_number":15,"context_line":"and thus not actually update placement when we need to."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Related to blueprint one-time-use-devices"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"e598da59_6517daf1","line":15,"range":{"start_line":12,"start_character":0,"end_line":15,"end_character":55},"in_reply_to":"c20a0401_c83dc4d4","updated":"2025-03-28 14:39:20.000000000","message":"I\u0027m not sure I understand what you\u0027re getting at. In that linked code you\u0027re not changing the fields you mention, so there is no concern over the cache being wrong, right? The place where we get into trouble is when we *do* modify one of those that are allowed/expected to be modified externally, right?\n\nIn short: are you thinking that there\u0027s an existing bug that this will fix (and thus should be mentioned here)?","commit_id":"e3d1dabd18eb7b9e28662fee7bbf5e3adf9ced16"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8f8bf10bdc7339633a7d467910cc9d4f0d162671","unresolved":true,"context_lines":[{"line_number":9,"context_line":"This makes us invalidate our cache of the PCI-in-placement resource"},{"line_number":10,"context_line":"providers when we go to do instance_claim(). This is not technically"},{"line_number":11,"context_line":"required right now, but is setup for the next patch where we will"},{"line_number":12,"context_line":"update that inventory during claim and we need to make sure we are"},{"line_number":13,"context_line":"working with the latest version. Without this, we may consider a"},{"line_number":14,"context_line":"cached version of the inventory to be the same as the proposed one,"},{"line_number":15,"context_line":"and thus not actually update placement when we need to."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Related to blueprint one-time-use-devices"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"8fa48057_ce9bb59a","line":15,"range":{"start_line":12,"start_character":0,"end_line":15,"end_character":55},"in_reply_to":"e598da59_6517daf1","updated":"2025-04-01 14:05:56.000000000","message":"\u003e the next patch where we will update that inventory during claim and we need to make sure we are working with the latest version.\n\nI try to give an example where the version known by the nova-compute\u0027s cache and the latest version in Placement could differ. One such case is where an external tool updates the inventory in Placement so the nova\u0027s view and the placement\u0027s view diverges and the cache needs to be invalidated. \n\nThen, one can say no-no nova does not support the case where an external tool updates the inventory in Placement that was created by nova. \n\nSo a counter to that reasoning is the comment in the code I\u0027m pointing at. The PCI in Placement feature was designed from the start with the goal not to limit the user to change the inventory (except total and max_unit) of the PCI devices.\n\nBottom line I\u0027m trying to show why it is a valid case that the cache goes out of sync in the first place.\n\n---\n\n\u003e In short: are you thinking that there\u0027s an existing bug that this will fix (and thus should be mentioned here)?\n\nNo I don\u0027t think there is a bug that this PR alone will fix. You are right that requires the subsequent patch where both nova and the external tool will update the same field, reserved, in the same inventory.","commit_id":"e3d1dabd18eb7b9e28662fee7bbf5e3adf9ced16"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b5ff951e100b57ef9821fcaaaea8552c9744efb1","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This makes us invalidate our cache of the PCI-in-placement resource"},{"line_number":10,"context_line":"providers when we go to do instance_claim(). This is not technically"},{"line_number":11,"context_line":"required right now, but is setup for the next patch where we will"},{"line_number":12,"context_line":"update that inventory during claim and we need to make sure we are"},{"line_number":13,"context_line":"working with the latest version. Without this, we may consider a"},{"line_number":14,"context_line":"cached version of the inventory to be the same as the proposed one,"},{"line_number":15,"context_line":"and thus not actually update placement when we need to."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Related to blueprint one-time-use-devices"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"e05c25db_edfc0d18","line":15,"range":{"start_line":12,"start_character":0,"end_line":15,"end_character":55},"in_reply_to":"f920bf61_8ed1f5a4","updated":"2025-04-01 17:06:43.000000000","message":"Done","commit_id":"e3d1dabd18eb7b9e28662fee7bbf5e3adf9ced16"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b4ed4bd5a03d916caf072427cd5f37d5d3f15919","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"079a60ae_75e78955","updated":"2025-03-13 13:48:11.000000000","message":"recheck zuul issue reportedly fixed","commit_id":"3a7f87fe2a8b25d48a9bb89067a99e0751261a3f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"69426599d9d1ce609d79b03264c8e2f821a7e86d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"c7339ecd_b29161e9","updated":"2025-03-28 17:21:23.000000000","message":"I\u0027m going to refresh this with the fix to look for the managed trait, and will address the others if needed pending the outcome of discussion.","commit_id":"e3d1dabd18eb7b9e28662fee7bbf5e3adf9ced16"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5b87213c01634877a7d9178f3769664a3df34478","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"7627baff_c6e3c28f","updated":"2025-03-28 20:24:04.000000000","message":"FYI, I pushed this up to squash in Gibi\u0027s suggestion patch, I haven\u0027t actually run/fixed tests since (as you can see).","commit_id":"7b6b1b85c2274865b4269446785a7c09f81e7f49"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"0adedf1bc8af6a097026e5320638dbbc3848b817","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"80d975bb_261eace0","updated":"2025-04-01 13:34:42.000000000","message":"recheck neutron client got proxy exception talking to neutron (man this patch is unlucky)","commit_id":"b88a59da96d19f68ba1da6bcb5c3d4910530a6db"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f20361b8716a3c2e9b2cf3214c09c5451bb2abc6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"b6c4c808_beb31734","updated":"2025-03-31 17:21:43.000000000","message":"recheck post failure","commit_id":"b88a59da96d19f68ba1da6bcb5c3d4910530a6db"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"0ea447bea4ce54e005cd5bc8a1e977feeaf05327","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"508c290a_6900c5d7","updated":"2025-03-31 20:37:26.000000000","message":"recheck unrelated ceph job timeout","commit_id":"b88a59da96d19f68ba1da6bcb5c3d4910530a6db"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"59d556bf3d06e100f96653df49fd44873a909f92","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"47bab725_6c711603","updated":"2025-04-04 14:43:04.000000000","message":"+2 holding +w because of the question inline but it could be tweaked later anyway so just letting you respond incase you think we shoudl do it in this change\nor add a comment explaining why.","commit_id":"c5efabbd07bc081e6d3b7ceb4ca138707edfae9b"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"dfd66a8ccc3cdc6eb6e7cf22891dfd39e8795f1f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"feae3914_8e6ffbd0","updated":"2025-04-02 07:44:40.000000000","message":"Thanks looks good","commit_id":"c5efabbd07bc081e6d3b7ceb4ca138707edfae9b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a6a708cbad9e159f58e66f8e0529288eb7e65fe5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"206ab968_f219d093","updated":"2025-04-07 15:10:09.000000000","message":"recheck tempest fix merged","commit_id":"c5efabbd07bc081e6d3b7ceb4ca138707edfae9b"}],"nova/compute/resource_tracker.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0f1e24aa077f9e4f5d03539d61cca0acea5786e9","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"16660f8e_37bb9b74","updated":"2025-03-28 14:17:36.000000000","message":"I\u0027m wondering if we need to do the invalidation at more _update() calls.\n\n*  abort_instance_claim an abort_instance_claim: these sounds like rollback scenarios. We touched upon rollback before and as the OTU code will never remove the reservation just add it I think it is OK to ignore these paths and not invalidate the cache.\n\n* update_usage: called indirectly from the below cases. In each case the VM is going away so as we don\u0027t want to remove the reservation we don\u0027t need to invalidate.\n  * _complete_deletion \n  * _error_out_instance_on_exception\n  * _reschedule_resize_or_reraise\n  * _shelve_offload_instance\n\n* _init_compute_node: I\u0027m pretty sure the cache is empty to we don\u0027t need an extra invalidate here\n\n* _update_available_resource: this is called periodically and it might re-sync / heal resource allocation for an instance (e.g. like for live migration without NUMA where move_claim isn\u0027t used). The PCI allocation might also healed if only report_in_placement is true but pci_in_placement is false (e.g. during a rolling enablement of the feature). If such PCI allocation healing happens for an OTU device then we probably need to invalidate the cache.","commit_id":"e3d1dabd18eb7b9e28662fee7bbf5e3adf9ced16"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8f8bf10bdc7339633a7d467910cc9d4f0d162671","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"aaf5023c_967dd695","in_reply_to":"026b4de9_0d375f0e","updated":"2025-04-01 14:05:56.000000000","message":"OK. Your reasoning make sense. Thanks.","commit_id":"e3d1dabd18eb7b9e28662fee7bbf5e3adf9ced16"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f18e7d976e9f6dabdcce24f25b5f96c4ec068b47","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"026b4de9_0d375f0e","in_reply_to":"16660f8e_37bb9b74","updated":"2025-03-28 14:39:20.000000000","message":"So, in my case where I discovered this, it was the heal that ultimately fixed the allocation. It was the race between the external un-reserve and an incoming boot where our cache failed to cause us to reserve it again (because we thought, incorrectly, that it was already reserved).\n\nIn the periodic case, if healing needs to happen, then we\u0027re already in a situation where we\u0027re running unreserved and need to reserve it, which means I think it\u0027s less important if it happens *this* periodic run or *next* periodic run. The cache is already time-invalidated, and it was short enough that the very next run of the periodic was enough to heal the reservation after the initial boot didn\u0027t.\n\nSo I guess my point is, I think we should not invalidate during the periodic, because:\n1. It will actually result in less caching when things are good and,\n2. It won\u0027t prevent the healing because the cache is time-limited anyway.","commit_id":"e3d1dabd18eb7b9e28662fee7bbf5e3adf9ced16"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0f1e24aa077f9e4f5d03539d61cca0acea5786e9","unresolved":true,"context_lines":[{"line_number":148,"context_line":"        if not allocs:"},{"line_number":149,"context_line":"            return"},{"line_number":150,"context_line":"        for rp, rp_allocs in allocs.items():"},{"line_number":151,"context_line":"            if any(rc.startswith(\u0027CUSTOM_PCI_\u0027)"},{"line_number":152,"context_line":"                   for rc in rp_allocs[\u0027resources\u0027].keys()):"},{"line_number":153,"context_line":"                self.reportclient.invalidate_resource_provider(rp,"},{"line_number":154,"context_line":"                                                               cacheonly\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":3,"id":"4ce33fa2_22c57937","line":151,"updated":"2025-03-28 14:17:36.000000000","message":"This cannot capture all the cases as dev_spec allows any kind of custom resource classes to be used [2]. But we have a programatically[1] injected trait on every PCI in Placement RPs, COMPUTE_MANAGED_PCI_DEVICE. So just looking at the allocations isn\u0027t enough, you have to look at the traits on the RPs in the allocation.\n\n[1]https://github.com/openstack/nova/blob/98226b60f3fe7b20e8d7f208c12f8d0086cd83d0/nova/compute/pci_placement_translator.py#L78-L83\n[2]https://docs.openstack.org/nova/latest/configuration/config.html#pci.device_spec","commit_id":"e3d1dabd18eb7b9e28662fee7bbf5e3adf9ced16"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f18e7d976e9f6dabdcce24f25b5f96c4ec068b47","unresolved":true,"context_lines":[{"line_number":148,"context_line":"        if not allocs:"},{"line_number":149,"context_line":"            return"},{"line_number":150,"context_line":"        for rp, rp_allocs in allocs.items():"},{"line_number":151,"context_line":"            if any(rc.startswith(\u0027CUSTOM_PCI_\u0027)"},{"line_number":152,"context_line":"                   for rc in rp_allocs[\u0027resources\u0027].keys()):"},{"line_number":153,"context_line":"                self.reportclient.invalidate_resource_provider(rp,"},{"line_number":154,"context_line":"                                                               cacheonly\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ebed16e8_9b1f124d","line":151,"in_reply_to":"4ce33fa2_22c57937","updated":"2025-03-28 14:39:20.000000000","message":"Ah, okay, yeah, I almost put a comment here about the \"magic number\" `CUSTOM_PCI_` prefix string being similarly magic-number-ed in `pci_placement_translator`. But I forgot you let people choose an arbitrary name.","commit_id":"e3d1dabd18eb7b9e28662fee7bbf5e3adf9ced16"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"69426599d9d1ce609d79b03264c8e2f821a7e86d","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        if not allocs:"},{"line_number":149,"context_line":"            return"},{"line_number":150,"context_line":"        for rp, rp_allocs in allocs.items():"},{"line_number":151,"context_line":"            if any(rc.startswith(\u0027CUSTOM_PCI_\u0027)"},{"line_number":152,"context_line":"                   for rc in rp_allocs[\u0027resources\u0027].keys()):"},{"line_number":153,"context_line":"                self.reportclient.invalidate_resource_provider(rp,"},{"line_number":154,"context_line":"                                                               cacheonly\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":3,"id":"958e68af_32ed035c","line":151,"in_reply_to":"ebed16e8_9b1f124d","updated":"2025-03-28 17:21:23.000000000","message":"Done","commit_id":"e3d1dabd18eb7b9e28662fee7bbf5e3adf9ced16"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8f8bf10bdc7339633a7d467910cc9d4f0d162671","unresolved":true,"context_lines":[{"line_number":151,"context_line":"            try:"},{"line_number":152,"context_line":"                p_data \u003d self.provider_tree.data(rp)"},{"line_number":153,"context_line":"            except ValueError:"},{"line_number":154,"context_line":"                # Not all allocations for an instance are necessarily against"},{"line_number":155,"context_line":"                # a provider in our tree"},{"line_number":156,"context_line":"                continue"},{"line_number":157,"context_line":"            for rc in rp_allocs[\u0027resources\u0027].keys():"},{"line_number":158,"context_line":"                if os_traits.COMPUTE_MANAGED_PCI_DEVICE in p_data.traits:"},{"line_number":159,"context_line":"                    self.reportclient.invalidate_resource_provider("}],"source_content_type":"text/x-python","patch_set":5,"id":"83e2e373_8b4c9704","line":156,"range":{"start_line":154,"start_character":0,"end_line":156,"end_character":24},"updated":"2025-04-01 14:05:56.000000000","message":"Just curious, what is the case where the allocation is not against our current tree? Is it evacuate where the allocation contains both source and dest RPs?","commit_id":"b88a59da96d19f68ba1da6bcb5c3d4910530a6db"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"dfd66a8ccc3cdc6eb6e7cf22891dfd39e8795f1f","unresolved":false,"context_lines":[{"line_number":151,"context_line":"            try:"},{"line_number":152,"context_line":"                p_data \u003d self.provider_tree.data(rp)"},{"line_number":153,"context_line":"            except ValueError:"},{"line_number":154,"context_line":"                # Not all allocations for an instance are necessarily against"},{"line_number":155,"context_line":"                # a provider in our tree"},{"line_number":156,"context_line":"                continue"},{"line_number":157,"context_line":"            for rc in rp_allocs[\u0027resources\u0027].keys():"},{"line_number":158,"context_line":"                if os_traits.COMPUTE_MANAGED_PCI_DEVICE in p_data.traits:"},{"line_number":159,"context_line":"                    self.reportclient.invalidate_resource_provider("}],"source_content_type":"text/x-python","patch_set":5,"id":"84389001_6e1ad1bf","line":156,"range":{"start_line":154,"start_character":0,"end_line":156,"end_character":24},"in_reply_to":"531d0f9b_f3abd9ce","updated":"2025-04-02 07:44:40.000000000","message":"Acknowledged","commit_id":"b88a59da96d19f68ba1da6bcb5c3d4910530a6db"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"50f5cfb32470eef50d86363311c5e150bb9e85fe","unresolved":true,"context_lines":[{"line_number":151,"context_line":"            try:"},{"line_number":152,"context_line":"                p_data \u003d self.provider_tree.data(rp)"},{"line_number":153,"context_line":"            except ValueError:"},{"line_number":154,"context_line":"                # Not all allocations for an instance are necessarily against"},{"line_number":155,"context_line":"                # a provider in our tree"},{"line_number":156,"context_line":"                continue"},{"line_number":157,"context_line":"            for rc in rp_allocs[\u0027resources\u0027].keys():"},{"line_number":158,"context_line":"                if os_traits.COMPUTE_MANAGED_PCI_DEVICE in p_data.traits:"},{"line_number":159,"context_line":"                    self.reportclient.invalidate_resource_provider("}],"source_content_type":"text/x-python","patch_set":5,"id":"531d0f9b_f3abd9ce","line":156,"range":{"start_line":154,"start_character":0,"end_line":156,"end_character":24},"in_reply_to":"83e2e373_8b4c9704","updated":"2025-04-01 14:11:59.000000000","message":"Well, at the very least, the test case I\u0027m adding here. Even if today we don\u0027t have instances with allocations against multiple (non-nested) providers, we could in the future (like for cinder resources or anything else) and this would fail. I was just trying to be complete here, especially when I realized I wasn\u0027t covering that case, added the test, and saw it crashes with a `KeyError` :)","commit_id":"b88a59da96d19f68ba1da6bcb5c3d4910530a6db"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8f8bf10bdc7339633a7d467910cc9d4f0d162671","unresolved":true,"context_lines":[{"line_number":154,"context_line":"                # Not all allocations for an instance are necessarily against"},{"line_number":155,"context_line":"                # a provider in our tree"},{"line_number":156,"context_line":"                continue"},{"line_number":157,"context_line":"            for rc in rp_allocs[\u0027resources\u0027].keys():"},{"line_number":158,"context_line":"                if os_traits.COMPUTE_MANAGED_PCI_DEVICE in p_data.traits:"},{"line_number":159,"context_line":"                    self.reportclient.invalidate_resource_provider("},{"line_number":160,"context_line":"                        rp, cacheonly\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ffdba381_0c73f5b5","line":157,"updated":"2025-04-01 14:05:56.000000000","message":"I don\u0027t think we need to iterate on RCs here. Traits are global to the whole RP not local to each RC inventory.","commit_id":"b88a59da96d19f68ba1da6bcb5c3d4910530a6db"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b5ff951e100b57ef9821fcaaaea8552c9744efb1","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                # Not all allocations for an instance are necessarily against"},{"line_number":155,"context_line":"                # a provider in our tree"},{"line_number":156,"context_line":"                continue"},{"line_number":157,"context_line":"            for rc in rp_allocs[\u0027resources\u0027].keys():"},{"line_number":158,"context_line":"                if os_traits.COMPUTE_MANAGED_PCI_DEVICE in p_data.traits:"},{"line_number":159,"context_line":"                    self.reportclient.invalidate_resource_provider("},{"line_number":160,"context_line":"                        rp, cacheonly\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":5,"id":"317277e0_7563b259","line":157,"in_reply_to":"a79aa62c_a70151d1","updated":"2025-04-01 17:06:43.000000000","message":"Done","commit_id":"b88a59da96d19f68ba1da6bcb5c3d4910530a6db"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"50f5cfb32470eef50d86363311c5e150bb9e85fe","unresolved":true,"context_lines":[{"line_number":154,"context_line":"                # Not all allocations for an instance are necessarily against"},{"line_number":155,"context_line":"                # a provider in our tree"},{"line_number":156,"context_line":"                continue"},{"line_number":157,"context_line":"            for rc in rp_allocs[\u0027resources\u0027].keys():"},{"line_number":158,"context_line":"                if os_traits.COMPUTE_MANAGED_PCI_DEVICE in p_data.traits:"},{"line_number":159,"context_line":"                    self.reportclient.invalidate_resource_provider("},{"line_number":160,"context_line":"                        rp, cacheonly\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":5,"id":"a79aa62c_a70151d1","line":157,"in_reply_to":"ffdba381_0c73f5b5","updated":"2025-04-01 14:11:59.000000000","message":"LOL, right, sorry, this is still left from the prefix approach.","commit_id":"b88a59da96d19f68ba1da6bcb5c3d4910530a6db"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"59d556bf3d06e100f96653df49fd44873a909f92","unresolved":true,"context_lines":[{"line_number":154,"context_line":"                # Not all allocations for an instance are necessarily against"},{"line_number":155,"context_line":"                # a provider in our tree"},{"line_number":156,"context_line":"                continue"},{"line_number":157,"context_line":"            if os_traits.COMPUTE_MANAGED_PCI_DEVICE in p_data.traits:"},{"line_number":158,"context_line":"                self.reportclient.invalidate_resource_provider("},{"line_number":159,"context_line":"                    rp, cacheonly\u003dTrue)"},{"line_number":160,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"133f1fc5_dabaf92d","line":157,"updated":"2025-04-04 14:43:04.000000000","message":"ah cool your using the trait we added for pci in placement +1\ni was concered yo umight have tried to look at the invetories or somehting but this is exactly the correct way to do this\n\nwith that said. we are also going to add a trait to signal that the RP is OTU\n\nso you coudl restrict this more to only pci in placement  RP that are one time use.\n\nis there merrit in that or not?","commit_id":"c5efabbd07bc081e6d3b7ceb4ca138707edfae9b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"dd82975ab55f37acb77761c11331a9ef0475cf8f","unresolved":true,"context_lines":[{"line_number":154,"context_line":"                # Not all allocations for an instance are necessarily against"},{"line_number":155,"context_line":"                # a provider in our tree"},{"line_number":156,"context_line":"                continue"},{"line_number":157,"context_line":"            if os_traits.COMPUTE_MANAGED_PCI_DEVICE in p_data.traits:"},{"line_number":158,"context_line":"                self.reportclient.invalidate_resource_provider("},{"line_number":159,"context_line":"                    rp, cacheonly\u003dTrue)"},{"line_number":160,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"e3610936_076e7ca1","line":157,"in_reply_to":"133f1fc5_dabaf92d","updated":"2025-04-04 14:44:50.000000000","message":"We do add a trait, in the next patch, to indicate that the device is being managed as OTU. Makes it easier to find and audit those devices in case a cleaning event got skipped.","commit_id":"c5efabbd07bc081e6d3b7ceb4ca138707edfae9b"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"456e946425dbb6323a6fa0b49dccd376a025c8d7","unresolved":true,"context_lines":[{"line_number":154,"context_line":"                # Not all allocations for an instance are necessarily against"},{"line_number":155,"context_line":"                # a provider in our tree"},{"line_number":156,"context_line":"                continue"},{"line_number":157,"context_line":"            if os_traits.COMPUTE_MANAGED_PCI_DEVICE in p_data.traits:"},{"line_number":158,"context_line":"                self.reportclient.invalidate_resource_provider("},{"line_number":159,"context_line":"                    rp, cacheonly\u003dTrue)"},{"line_number":160,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7c9c6833_470610c2","line":157,"in_reply_to":"e3610936_076e7ca1","updated":"2025-04-04 15:27:16.000000000","message":"we chatted about this on irc\n\nwhat i was asking was why not\n\nif os_traits.COMPUTE_MANAGED_PCI_DEVICE in p_data.traits and os_traits.HW_PCI_ONE_TIME_USE:\n\ntldr is i shoudl readd the commit message better.\n\nthere is a existing facilaty to modify reseved for pci in placement.\n\ni kidn fo think tha tis a existing bug but its out of scope of this patch so elevating to +2w","commit_id":"c5efabbd07bc081e6d3b7ceb4ca138707edfae9b"}],"nova/tests/unit/compute/test_resource_tracker.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"dfd66a8ccc3cdc6eb6e7cf22891dfd39e8795f1f","unresolved":true,"context_lines":[{"line_number":4379,"context_line":"            str(uuids.pci): {"},{"line_number":4380,"context_line":"                \u0027resources\u0027: {"},{"line_number":4381,"context_line":"                    \u0027CUSTOM_PCI_DEAD_BEEF\u0027: 1,"},{"line_number":4382,"context_line":"                    \u0027SOME_OTHER_TRAIT\u0027: 1,"},{"line_number":4383,"context_line":"                }"},{"line_number":4384,"context_line":"            }"},{"line_number":4385,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":6,"id":"78b24f41_8c0dec5c","line":4382,"updated":"2025-04-02 07:44:40.000000000","message":"nit: SOME_OTHER_RESOURCE","commit_id":"c5efabbd07bc081e6d3b7ceb4ca138707edfae9b"}]}
