)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"311c0b8baa89060358d69a5917287d35a24f5b77","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"bb0a5b93_d0b45ce3","line":42,"updated":"2025-07-22 11:37:26.000000000","message":"im not conviced this approch really gives ues any benifit\nwe are already on the comptue node at this point so we can and likely should just try to attach the device and catch the error if there is no space.","commit_id":"366e13f14ee9e73a1b23441198c075a2af62092b"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8bbd0d2fc993f17bb4a5e8985aa6559687d5d537","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"09699394_22cf2818","line":42,"in_reply_to":"96189cd1_6bf952f1","updated":"2025-08-27 20:22:26.000000000","message":"i can see that argument.\n\nif this purly based on checkign the xml for the free pci slot __and__ you account fo rthe fact that most disk bus type dont actully need a pci slot per disk then this si perhaps ok\n\nbut if you using ide, sata, scsi or usb today adding a disk does not need a pic slot provide we already have a bus contoler aviable.\n\nso we this code to be robust against false positives.","commit_id":"366e13f14ee9e73a1b23441198c075a2af62092b"},{"author":{"_account_id":37477,"name":"Florian","display_name":"FloD","email":"Florian.Doerheim@digits.schwarz","username":"FloD"},"change_message_id":"03e58b271740ff5070fe55fdfa0f26128fc0f47f","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"96189cd1_6bf952f1","line":42,"in_reply_to":"bb0a5b93_d0b45ce3","updated":"2025-08-26 10:02:30.000000000","message":"The advantage of checking the PCI devices before the libvirt exception is that unnecessary volume attachment resources will not be created or reserved on cinder site. Which need also to be deleted after the exception.\n\nSo that means that the failure scope will be around Nova and it\u0027s block_device_mapping only.","commit_id":"366e13f14ee9e73a1b23441198c075a2af62092b"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"f62b7d2063c77af7d3fabe046aa44484911c44a6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"4f465008_18806eff","updated":"2025-08-08 14:14:45.000000000","message":"by the way my prefencei si to not try and check at all.\ni woudl prefer if we try and add the device and if that fails due to a lack of free pci slot when we get the error form libvirt we can update the error message in teh instance action to say that clearly to the user.","commit_id":"a5c55e68c8925b49b0b353e78829bf55900eed35"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"dade58d4c45be0ca541ed643f93790d0f6530102","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"09afcf91_5463a8c6","updated":"2025-08-08 14:13:05.000000000","message":"im still not conviced we shoudl do this.\n\nif we do you shoudl do this by checkign if the runnign domain has any free pci or pcie slost and you shoudl do this for all machine types.","commit_id":"a5c55e68c8925b49b0b353e78829bf55900eed35"},{"author":{"_account_id":37477,"name":"Florian","display_name":"FloD","email":"Florian.Doerheim@digits.schwarz","username":"FloD"},"change_message_id":"e90ac9ac98d5daff1f1f3b3fc323eab07cffd531","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"f0c8c34f_1f1bdd5b","updated":"2025-10-30 10:54:18.000000000","message":"recheck - timeout in CI","commit_id":"9dcc66d1ac4ffe23bd8ae4992cecfe552cab8c22"}],"nova/virt/libvirt/config.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"98eef1dcca6faa0c5d33dd7f70abf23893fd8b06","unresolved":true,"context_lines":[{"line_number":3403,"context_line":"        # root ports, bridges, etc. The convention is that a controller with"},{"line_number":3404,"context_line":"        # index \u0027N\u0027 manages bus \u00270xN\u0027 (in hex)."},{"line_number":3405,"context_line":"        for controller_pcie_root_port in root.findall("},{"line_number":3406,"context_line":"            \".//controller[@model\u003d\u0027pcie-root-port\u0027]\"):"},{"line_number":3407,"context_line":"            pcie_port_alias_element \u003d controller_pcie_root_port.find(\u0027alias\u0027)"},{"line_number":3408,"context_line":"            pcie_root_target_element \u003d controller_pcie_root_port.find(\u0027target\u0027)"},{"line_number":3409,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"df3fca81_bb96176d","line":3406,"updated":"2025-08-27 20:27:47.000000000","message":"this only works for `machine_type\u003dq35` or oen of the related types\n\nif its i440fx then we have 32 pci slots not pcie that are used instead.","commit_id":"f89844aa44be8bd64b4ada3d00931d33477387f4"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"311c0b8baa89060358d69a5917287d35a24f5b77","unresolved":true,"context_lines":[{"line_number":2334,"context_line":""},{"line_number":2335,"context_line":"        if (CONF.compute.max_disk_devices_to_attach \u003c\u003d len(guest.get_all_devices()) "},{"line_number":2336,"context_line":"            and not CONF.compute.max_disk_devices_to_attach \u003d\u003d -1):"},{"line_number":2337,"context_line":"            raise exception.TooManyDiskDevices(maximum\u003dCONF.compute.max_disk_devices_to_attach)"},{"line_number":2338,"context_line":""},{"line_number":2339,"context_line":"        disk_dev \u003d mountpoint.rpartition(\"/\")[2]"},{"line_number":2340,"context_line":"        bdm \u003d {"}],"source_content_type":"text/x-python","patch_set":1,"id":"760cb71e_01d4a567","line":2337,"updated":"2025-07-22 11:37:26.000000000","message":"you cant just count the device returned form .get_all_devices() as that will include non-pcie devices too.  like virtio-scsi disk which share a virtio scsic controller so you have multipel disk using a single pci slot.\n\nit also does not account for usb devices or other devices on other busses.\n\nas we build out supprot in the future for pci extention bridges and swtich this limit will also change so i honetly seee this approch as adding technial debt for little value.\n\nwhat we can do however is improve the current error handeling and perhaps impove the error messages displayed to an enduser or admin.","commit_id":"366e13f14ee9e73a1b23441198c075a2af62092b"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"dade58d4c45be0ca541ed643f93790d0f6530102","unresolved":false,"context_lines":[{"line_number":2334,"context_line":""},{"line_number":2335,"context_line":"        if (CONF.compute.max_disk_devices_to_attach \u003c\u003d len(guest.get_all_devices()) "},{"line_number":2336,"context_line":"            and not CONF.compute.max_disk_devices_to_attach \u003d\u003d -1):"},{"line_number":2337,"context_line":"            raise exception.TooManyDiskDevices(maximum\u003dCONF.compute.max_disk_devices_to_attach)"},{"line_number":2338,"context_line":""},{"line_number":2339,"context_line":"        disk_dev \u003d mountpoint.rpartition(\"/\")[2]"},{"line_number":2340,"context_line":"        bdm \u003d {"}],"source_content_type":"text/x-python","patch_set":1,"id":"18adf482_74497df7","line":2337,"in_reply_to":"00639471_82e1510c","updated":"2025-08-08 14:13:05.000000000","message":"this is moving the right direction but this is still not correct code.","commit_id":"366e13f14ee9e73a1b23441198c075a2af62092b"},{"author":{"_account_id":37477,"name":"Florian","display_name":"FloD","email":"Florian.Doerheim@digits.schwarz","username":"FloD"},"change_message_id":"a43eb3c1279f01bd3bed9947bc9797cbbd5a6bb0","unresolved":true,"context_lines":[{"line_number":2334,"context_line":""},{"line_number":2335,"context_line":"        if (CONF.compute.max_disk_devices_to_attach \u003c\u003d len(guest.get_all_devices()) "},{"line_number":2336,"context_line":"            and not CONF.compute.max_disk_devices_to_attach \u003d\u003d -1):"},{"line_number":2337,"context_line":"            raise exception.TooManyDiskDevices(maximum\u003dCONF.compute.max_disk_devices_to_attach)"},{"line_number":2338,"context_line":""},{"line_number":2339,"context_line":"        disk_dev \u003d mountpoint.rpartition(\"/\")[2]"},{"line_number":2340,"context_line":"        bdm \u003d {"}],"source_content_type":"text/x-python","patch_set":1,"id":"a094edce_2e1a231c","line":2337,"in_reply_to":"760cb71e_01d4a567","updated":"2025-07-22 13:57:53.000000000","message":"we checked with an virtio-scsi instance and could confirm that it will not count in the get_all_devices() length.\n\nIs there a methode which truly get all pci devices on the nova-compute/libvirt site?\nOr do we have to create a own specialist methode like get_all_devices() which goes to the instance XML and filter everything related to a pci device like pci passtrough, vnc, vgpus, sata controller, config drive, usb controller, keyboard, mouse devices","commit_id":"366e13f14ee9e73a1b23441198c075a2af62092b"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"18cdc4b71b13e0aba54bffc61166802565b35269","unresolved":true,"context_lines":[{"line_number":2334,"context_line":""},{"line_number":2335,"context_line":"        if (CONF.compute.max_disk_devices_to_attach \u003c\u003d len(guest.get_all_devices()) "},{"line_number":2336,"context_line":"            and not CONF.compute.max_disk_devices_to_attach \u003d\u003d -1):"},{"line_number":2337,"context_line":"            raise exception.TooManyDiskDevices(maximum\u003dCONF.compute.max_disk_devices_to_attach)"},{"line_number":2338,"context_line":""},{"line_number":2339,"context_line":"        disk_dev \u003d mountpoint.rpartition(\"/\")[2]"},{"line_number":2340,"context_line":"        bdm \u003d {"}],"source_content_type":"text/x-python","patch_set":1,"id":"e7ec6143_a753fb9d","line":2337,"in_reply_to":"a094edce_2e1a231c","updated":"2025-07-22 17:46:27.000000000","message":"https://github.com/openstack/nova/blob/master/nova/virt/libvirt/guest.py#L420-L450\n\nso get all devices pulls the guxt domain xml and extracts all fo the device element.\n\nthat should incllude any disk, filesytem hostdev ecttra that we can parse\n\nhttps://github.com/openstack/nova/blob/master/nova/virt/libvirt/config.py#L3319-L3349\n\ni dont see how you are filterign out non pci devices in this patch.\n\nin general however im not sure a agree with this overall approch.\n\nthis si a lot of extra complexity for very little gain.","commit_id":"366e13f14ee9e73a1b23441198c075a2af62092b"},{"author":{"_account_id":37477,"name":"Florian","display_name":"FloD","email":"Florian.Doerheim@digits.schwarz","username":"FloD"},"change_message_id":"be8b794ec30b4afee01fff7a02f8641c79e41ad3","unresolved":true,"context_lines":[{"line_number":2334,"context_line":""},{"line_number":2335,"context_line":"        if (CONF.compute.max_disk_devices_to_attach \u003c\u003d len(guest.get_all_devices()) "},{"line_number":2336,"context_line":"            and not CONF.compute.max_disk_devices_to_attach \u003d\u003d -1):"},{"line_number":2337,"context_line":"            raise exception.TooManyDiskDevices(maximum\u003dCONF.compute.max_disk_devices_to_attach)"},{"line_number":2338,"context_line":""},{"line_number":2339,"context_line":"        disk_dev \u003d mountpoint.rpartition(\"/\")[2]"},{"line_number":2340,"context_line":"        bdm \u003d {"}],"source_content_type":"text/x-python","patch_set":1,"id":"00639471_82e1510c","line":2337,"in_reply_to":"e7ec6143_a753fb9d","updated":"2025-08-08 11:34:35.000000000","message":"I created an updated version of it.\n\nWe now only check for Q35 hardware systems to see which pcie-root-port devices are being used, based on all PCI devices that have the address field in the instance XML.\n\nThe address field contains the bus number used by the specific PCI device, and based on the pcie-root-port chassis number, we can map the correct bus to the correct pcie-root-port.\n\nThis allows us to calculate which PCIe ports are in use and which are not.","commit_id":"366e13f14ee9e73a1b23441198c075a2af62092b"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"dade58d4c45be0ca541ed643f93790d0f6530102","unresolved":true,"context_lines":[{"line_number":2336,"context_line":"            not CONF.libvirt.num_pcie_ports \u003d\u003d 0 and"},{"line_number":2337,"context_line":"            \u0027q35\u0027 in str(CONF.libvirt.hw_machine_type)):"},{"line_number":2338,"context_line":"            raise exception.TooManyDiskDevices("},{"line_number":2339,"context_line":"                maximum\u003dCONF.libvirt.num_pcie_ports)"},{"line_number":2340,"context_line":""},{"line_number":2341,"context_line":"        disk_dev \u003d mountpoint.rpartition(\"/\")[2]"},{"line_number":2342,"context_line":"        bdm \u003d {"}],"source_content_type":"text/x-python","patch_set":6,"id":"61b164d3_c04f298e","line":2339,"updated":"2025-08-08 14:13:05.000000000","message":"this is better but its still not corefct.\n\nnot all voluem consume a pci device i.e. if its hw_disk_bus scsi and if we are goign to count the number of free pcie slost then you should not be checkign the config option you should be checkign if the pci slot is used.\n\n\nwe would do it always.\nyou have already padded the cost of gettign the decvices form teh xml which is the expensive part.","commit_id":"a5c55e68c8925b49b0b353e78829bf55900eed35"},{"author":{"_account_id":37477,"name":"Florian","display_name":"FloD","email":"Florian.Doerheim@digits.schwarz","username":"FloD"},"change_message_id":"03e58b271740ff5070fe55fdfa0f26128fc0f47f","unresolved":true,"context_lines":[{"line_number":2336,"context_line":"            not CONF.libvirt.num_pcie_ports \u003d\u003d 0 and"},{"line_number":2337,"context_line":"            \u0027q35\u0027 in str(CONF.libvirt.hw_machine_type)):"},{"line_number":2338,"context_line":"            raise exception.TooManyDiskDevices("},{"line_number":2339,"context_line":"                maximum\u003dCONF.libvirt.num_pcie_ports)"},{"line_number":2340,"context_line":""},{"line_number":2341,"context_line":"        disk_dev \u003d mountpoint.rpartition(\"/\")[2]"},{"line_number":2342,"context_line":"        bdm \u003d {"}],"source_content_type":"text/x-python","patch_set":6,"id":"a7f23a49_0fc7fc0c","line":2339,"in_reply_to":"61b164d3_c04f298e","updated":"2025-08-26 10:02:30.000000000","message":"You are right the check for CONF.libvirt.num_pcie_ports isn\u0027t really necessary.\nI will change that","commit_id":"a5c55e68c8925b49b0b353e78829bf55900eed35"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"98eef1dcca6faa0c5d33dd7f70abf23893fd8b06","unresolved":true,"context_lines":[{"line_number":2335,"context_line":"        if not num_free_pci_ports and \u0027q35\u0027 in str("},{"line_number":2336,"context_line":"            CONF.libvirt.hw_machine_type):"},{"line_number":2337,"context_line":"            raise exception.TooManyDiskDevices("},{"line_number":2338,"context_line":"                maximum\u003dCONF.libvirt.num_pcie_ports)"},{"line_number":2339,"context_line":""},{"line_number":2340,"context_line":"        disk_dev \u003d mountpoint.rpartition(\"/\")[2]"},{"line_number":2341,"context_line":"        bdm \u003d {"}],"source_content_type":"text/x-python","patch_set":10,"id":"3c59cefb_ee04a862","line":2338,"updated":"2025-08-27 20:27:47.000000000","message":"the machine type is also an atirbute of the image \n\nwe only look at the config otpion if not set in the image and we also have another fallback to select the defautl based on the architecture.\n\nsothisi snot correct.\n\ni think we have  afucntion to get the machinetyp given an instance somewhere in the driver but i dont recall what its called off hand.","commit_id":"f89844aa44be8bd64b4ada3d00931d33477387f4"},{"author":{"_account_id":37477,"name":"Florian","display_name":"FloD","email":"Florian.Doerheim@digits.schwarz","username":"FloD"},"change_message_id":"62a2e1c5f7785b64dab0c0bb811561f61389e58e","unresolved":true,"context_lines":[{"line_number":2335,"context_line":"        if not num_free_pci_ports and \u0027q35\u0027 in str("},{"line_number":2336,"context_line":"            CONF.libvirt.hw_machine_type):"},{"line_number":2337,"context_line":"            raise exception.TooManyDiskDevices("},{"line_number":2338,"context_line":"                maximum\u003dCONF.libvirt.num_pcie_ports)"},{"line_number":2339,"context_line":""},{"line_number":2340,"context_line":"        disk_dev \u003d mountpoint.rpartition(\"/\")[2]"},{"line_number":2341,"context_line":"        bdm \u003d {"}],"source_content_type":"text/x-python","patch_set":10,"id":"3b3faa6f_2663ae46","line":2338,"in_reply_to":"3c59cefb_ee04a862","updated":"2026-04-28 12:56:39.000000000","message":"The variable that holds the hw_machine type info from the image was in the instance.system_metadata[\u0027image_hw_machine_type\u0027] field.\n\nI added it there","commit_id":"f89844aa44be8bd64b4ada3d00931d33477387f4"}]}
