)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"b35eb9252bd420143b0c2a91af84f396915728e7","unresolved":true,"context_lines":[{"line_number":11,"context_line":"If the device_type is absent, then the comparison was failing with a"},{"line_number":12,"context_line":"key_error."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Closes-bug: #2129570"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I0569562556ce3582f4b1916f6e9483418a5739ab"},{"line_number":17,"context_line":"Signed-off-by: Arnaud Morin \u003carnaud.morin@ovhcloud.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"efaad873_e0cd2c85","line":14,"updated":"2025-10-22 16:33:20.000000000","message":"you are really not ment ot have 2 alsia with the same name\n\n\nthis si also a left over behavior that was inteneded to be unsupproted years ago with the intiall intoduction fo sriov hotplug migration and pci in placment\n\nenither of which supprot merging aliases like this\n\nan ailas is really inteded to eb a 1:1 mappign to exactly 1 pci vendor id and proudct id that does nto change across the entire cloud.\n\nthe merging code is somethign we activly dicussed removing\n\nso im not sure if we shoudl consider https://bugs.launchpad.net/nova/+bug/2129570 valid.\n\ni activly do not think we should supprot that today.\n\nwhen we discussed https://specs.openstack.org/openstack/nova-specs/specs/2025.1/implemented/migrate-vfio-devices-using-kernel-variant-drivers.html\n\nthis came up as well.\n\nthat feature and several other rely on this 1:1 mapping.\n\nthis is also realated to \nhttps://bugs.launchpad.net/nova/+bug/2115726\n\nif we are goign to attpet to suprpot this we shoudl have a funtioanl repoduce first so we can agree on if the semantics are vlaid or not \nbefore moving to a fix.","commit_id":"2ff9682c30601e26ec0a86f72c14212c665b4e62"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"7d0dac3812d004b2c466fdc882bbc76200627621","unresolved":true,"context_lines":[{"line_number":11,"context_line":"If the device_type is absent, then the comparison was failing with a"},{"line_number":12,"context_line":"key_error."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Closes-bug: #2129570"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I0569562556ce3582f4b1916f6e9483418a5739ab"},{"line_number":17,"context_line":"Signed-off-by: Arnaud Morin \u003carnaud.morin@ovhcloud.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"15e3c87f_6eb51e1f","line":14,"in_reply_to":"efaad873_e0cd2c85","updated":"2025-10-22 16:38:02.000000000","message":"@rene.ribaud@gmail.com you had a patch to make sure that if we have mutlipe defintioatn of the same aliase we only too the first or last one somewhere right?\n\ninstead of trying to merge them.\n\nit shoudl be a config warning at a minium but we do have comment that suggest this shoudl work\n\nhttps://github.com/openstack/nova/blob/a2fa7b1fa197b91aacac3aed9ba138905018465d/nova/pci/request.py#L17C1-L39C8 \n\nhowever as i noted several feature in nova rely on the vendor/product id being a single value so that move operation do not result in the device changing.","commit_id":"2ff9682c30601e26ec0a86f72c14212c665b4e62"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"326598e03147e0510ec61f64fe8952db234b9ee3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"2983c66e_15fde06e","updated":"2025-10-22 16:42:38.000000000","message":"this was the patch @gibizer@gmail.com wrote it no rene\n\nhttps://review.opendev.org/c/openstack/nova/+/944062/6","commit_id":"2ff9682c30601e26ec0a86f72c14212c665b4e62"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"c4b20dae1fcf41c499aaaa0681a41ab5448f827f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"62f8d57e_c01d6175","updated":"2025-10-23 10:38:08.000000000","message":"-1 is for lack of tests","commit_id":"657ad9c5e07f469623f370fbd1813685be659d33"}],"nova/pci/request.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ccf2189a5f2a398c5a9332d07b13f707b5f3d285","unresolved":true,"context_lines":[{"line_number":199,"context_line":""},{"line_number":200,"context_line":"            # If device_type is missing, consider type-PCI as the default"},{"line_number":201,"context_line":"            spec[\u0027dev_type\u0027] \u003d spec.pop(\u0027device_type\u0027,"},{"line_number":202,"context_line":"                                        obj_fields.PciDeviceType.STANDARD)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"            live_migratable \u003d spec.pop(\u0027live_migratable\u0027, None)"},{"line_number":205,"context_line":"            if live_migratable is not None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"f33b47e3_f2b9df34","line":202,"updated":"2025-10-22 16:23:41.000000000","message":"-1 we cannot use  obj_fields.PciDeviceType.STANDARD as a default.\n\nsetting that or obj_fields.PciDeviceType.SRIOV_VF will change the semantics of the alis\n\nan alisa without a dev_type set can select either a VF ro type-pci device\n\nif we default to either we will break some device that use the same vendor id and product id for the device and its VFs\n\nthis is uncommon now as normally a diffent driver is used for each but in the early days fo sriov that was not the case and some device deiver we witeen to work for both the whole device and the vf.\n\nearly version of the intel qat device were and example.\n\nwe also depend on this outside the aisl for neutron vnic-type\u003ddirect ports\n\nagain they were orgianlly allwoed to selct VFs or type-pci prots\n\nwe only later intoduced the vnic-type\u003ddirect-phsyical to retrect the selection to PFs\n\nwe need to handel this issue by not assumign that this is set when we do the comparison.","commit_id":"2ff9682c30601e26ec0a86f72c14212c665b4e62"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"c4b20dae1fcf41c499aaaa0681a41ab5448f827f","unresolved":true,"context_lines":[{"line_number":199,"context_line":""},{"line_number":200,"context_line":"            # If device_type is missing, consider type-PCI as the default"},{"line_number":201,"context_line":"            spec[\u0027dev_type\u0027] \u003d spec.pop(\u0027device_type\u0027,"},{"line_number":202,"context_line":"                                        obj_fields.PciDeviceType.STANDARD)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"            live_migratable \u003d spec.pop(\u0027live_migratable\u0027, None)"},{"line_number":205,"context_line":"            if live_migratable is not None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"dd432b31_e25d4937","line":202,"in_reply_to":"1a24cb58_fbb6341e","updated":"2025-10-23 10:38:08.000000000","message":"We rely on the alias referring to a single device so that we can support live migration and so that when you cold migrate or spawn new VMs with the same flavor, they receive the same device so that you can select the device by selecting the flavor.\n\nWithout that, your workload needs to tolerate receiving multiple different devices from the same API request. This is not how this is intened to work, so in your case, they really should be different flavors and aliases.\n\nNova officially does not support using PCI passthrough with stateful devices like NVMe SSDs, but that\u0027s a slightly different matter. The introduction of One Time Use devices last cycle does not change that fact.\n\nIf we really wanted to support a flavor that could get one or a set of devices properly, the correct way would be to extend the current PCI passthrough support to support that natively.\n\nThe existing support is a legacy holdover that was intended to be removed quite a long time ago.\n\nWe can likely fix the comparison logic to not fail in this case, but from my perspective, your usage of PCI passthrough with aliases that are not a 1:1 mapping to a single device is not intended to be supported today, and NVMe SSDs are explicitly not supported either. So fixing this edge case will not change that even if it resolved your current problem.\n\nUntil we have native support to fully clean the SSD before a VM is marked as deleted in the DB, which OTU device does not do, we do not meet the multi-tenancy requirement from my perspective to officially support using PCI passthrough with NVMe devices like this.\n\nOne approach I plan to investigate for this use case this cycle is using Cyborg to properly handle the device cleaning, but ultimately it would be easier to do this properly in Nova, but that\u0027s not the direction the project is currently taking.","commit_id":"2ff9682c30601e26ec0a86f72c14212c665b4e62"},{"author":{"_account_id":11583,"name":"Arnaud Morin","email":"arnaud.morin@gmail.com","username":"arnaudmorin"},"change_message_id":"15e3d7c65872af640b87e810d86c9076169f82f4","unresolved":true,"context_lines":[{"line_number":199,"context_line":""},{"line_number":200,"context_line":"            # If device_type is missing, consider type-PCI as the default"},{"line_number":201,"context_line":"            spec[\u0027dev_type\u0027] \u003d spec.pop(\u0027device_type\u0027,"},{"line_number":202,"context_line":"                                        obj_fields.PciDeviceType.STANDARD)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"            live_migratable \u003d spec.pop(\u0027live_migratable\u0027, None)"},{"line_number":205,"context_line":"            if live_migratable is not None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a24cb58_fbb6341e","line":202,"in_reply_to":"f33b47e3_f2b9df34","updated":"2025-10-23 08:08:08.000000000","message":"Ok, the fact is that we actually need the 2 aliases with the same name.\nWhy?\nWe have some servers with some nvme devices, that we are giving to instances using passthrough.\nThe first devices we were having in prod were having product_id a808.\nThe second batch of devices we are receiving have product_id a80a.\nI cannot create a new flavor only because of this.\nThe fact that nova is able to have two aliases with the same name is kind of saving us.\n\nI also understand the placement issue described in the spec.\n\nI have two options to fix my specific issue:\n- fix the code here to avoid the key error\n- force my two aliases to have the device_type set\n\nI am pretty sure some operators in the wild are using the same name for multiple aliases, thinking that this is a supported feature (it it based on code, see [1])\n\n\nSo I definetly think we should fix the key error, no matter the futur of pci in placement.\n\n\n\n[1] https://opendev.org/openstack/nova/src/commit/eff7dfd693af2f3e938d0bc5b633954badc1f932/nova/pci/request.py#L27","commit_id":"2ff9682c30601e26ec0a86f72c14212c665b4e62"},{"author":{"_account_id":11583,"name":"Arnaud Morin","email":"arnaud.morin@gmail.com","username":"arnaudmorin"},"change_message_id":"019b9f3a75f08680e21c2cff397490040e132891","unresolved":true,"context_lines":[{"line_number":218,"context_line":"                reason \u003d _(\"NUMA policy mismatch for alias \u0027%s\u0027\") % name"},{"line_number":219,"context_line":"                raise exception.PciInvalidAlias(reason\u003dreason)"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"            if \u0027dev_type\u0027 in aliases[name][1][0] and \u0027dev_type\u0027 in spec:"},{"line_number":222,"context_line":"                if aliases[name][1][0][\u0027dev_type\u0027] !\u003d spec[\u0027dev_type\u0027]:"},{"line_number":223,"context_line":"                    reason \u003d _(\"Device type mismatch for alias \u0027%s\u0027\") % name"},{"line_number":224,"context_line":"                    raise exception.PciInvalidAlias(reason\u003dreason)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bce6530c_a0cc0730","line":221,"updated":"2025-10-23 08:17:36.000000000","message":"this patchset is a different approach.\nInstead of setting a default value, we avoid doing a comparison if the dev_type is absent.\nBased on your comment @smooney@redhat.com , this approach sounds less problematic","commit_id":"657ad9c5e07f469623f370fbd1813685be659d33"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"c4b20dae1fcf41c499aaaa0681a41ab5448f827f","unresolved":true,"context_lines":[{"line_number":218,"context_line":"                reason \u003d _(\"NUMA policy mismatch for alias \u0027%s\u0027\") % name"},{"line_number":219,"context_line":"                raise exception.PciInvalidAlias(reason\u003dreason)"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"            if \u0027dev_type\u0027 in aliases[name][1][0] and \u0027dev_type\u0027 in spec:"},{"line_number":222,"context_line":"                if aliases[name][1][0][\u0027dev_type\u0027] !\u003d spec[\u0027dev_type\u0027]:"},{"line_number":223,"context_line":"                    reason \u003d _(\"Device type mismatch for alias \u0027%s\u0027\") % name"},{"line_number":224,"context_line":"                    raise exception.PciInvalidAlias(reason\u003dreason)"}],"source_content_type":"text/x-python","patch_set":2,"id":"4fffc53e_966e28a5","line":221,"in_reply_to":"bce6530c_a0cc0730","updated":"2025-10-23 10:38:08.000000000","message":"yep this is a better approach.\n\nWe still need to create a functional reproducer test to demonstrate the bug in a seperate commit and thne this need to be rebased on top of that as a second patch\n\ndo you plan to work on that in the next revision?","commit_id":"657ad9c5e07f469623f370fbd1813685be659d33"}]}
