)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"76d1ed1469c98e4d51ff47eddd066441d7e9fc68","unresolved":false,"context_lines":[{"line_number":10,"context_line":"the PCI device\u0027s MAC address in order to find its associated VIF."},{"line_number":11,"context_line":"Previously, this was done by calling"},{"line_number":12,"context_line":"pci_utils.get_mac_by_pci_address() and passing pf_interface\u003dTrue. This"},{"line_number":13,"context_line":"was incorrect. It caused _get_sysfs_netdev_path() to return a"},{"line_number":14,"context_line":"nonexistent sysfs path to get_ifname_by_pci_address(). The latter\u0027s"},{"line_number":15,"context_line":"os.listdir() call then raised an Exception. This was caught and"},{"line_number":16,"context_line":"bubbled up as a PciDeviceNotFoundById exception. This caused"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7faddb67_0102793f","line":13,"range":{"start_line":13,"start_character":25,"end_line":13,"end_character":49},"updated":"2019-07-22 15:17:01.000000000","message":"https://github.com/openstack/nova/blob/19.0.0/nova/pci/utils.py#L167","commit_id":"bda5ae1fd1035ab99285dcd121fe30f95a117c4d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"76d1ed1469c98e4d51ff47eddd066441d7e9fc68","unresolved":false,"context_lines":[{"line_number":10,"context_line":"the PCI device\u0027s MAC address in order to find its associated VIF."},{"line_number":11,"context_line":"Previously, this was done by calling"},{"line_number":12,"context_line":"pci_utils.get_mac_by_pci_address() and passing pf_interface\u003dTrue. This"},{"line_number":13,"context_line":"was incorrect. It caused _get_sysfs_netdev_path() to return a"},{"line_number":14,"context_line":"nonexistent sysfs path to get_ifname_by_pci_address(). The latter\u0027s"},{"line_number":15,"context_line":"os.listdir() call then raised an Exception. This was caught and"},{"line_number":16,"context_line":"bubbled up as a PciDeviceNotFoundById exception. This caused"},{"line_number":17,"context_line":"_build_hostdev_metadata() in the libvirt driver to skip that"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7faddb67_419dd108","line":14,"range":{"start_line":13,"start_character":50,"end_line":14,"end_character":22},"updated":"2019-07-22 15:17:01.000000000","message":"https://github.com/openstack/nova/blob/19.0.0/nova/pci/utils.py#L143-L144","commit_id":"bda5ae1fd1035ab99285dcd121fe30f95a117c4d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"76d1ed1469c98e4d51ff47eddd066441d7e9fc68","unresolved":false,"context_lines":[{"line_number":11,"context_line":"Previously, this was done by calling"},{"line_number":12,"context_line":"pci_utils.get_mac_by_pci_address() and passing pf_interface\u003dTrue. This"},{"line_number":13,"context_line":"was incorrect. It caused _get_sysfs_netdev_path() to return a"},{"line_number":14,"context_line":"nonexistent sysfs path to get_ifname_by_pci_address(). The latter\u0027s"},{"line_number":15,"context_line":"os.listdir() call then raised an Exception. This was caught and"},{"line_number":16,"context_line":"bubbled up as a PciDeviceNotFoundById exception. This caused"},{"line_number":17,"context_line":"_build_hostdev_metadata() in the libvirt driver to skip that"},{"line_number":18,"context_line":"interface\u0027s metadata."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7faddb67_41b6318d","line":16,"range":{"start_line":14,"start_character":23,"end_line":16,"end_character":48},"updated":"2019-07-22 15:17:01.000000000","message":"https://github.com/openstack/nova/blob/19.0.0/nova/pci/utils.py#L154-L159","commit_id":"bda5ae1fd1035ab99285dcd121fe30f95a117c4d"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"61a644498fe4db025dd3ac466071698c319a2412","unresolved":false,"context_lines":[{"line_number":21,"context_line":"request the PCI address of its parent PF. As this is not what"},{"line_number":22,"context_line":"_build_hostdev_metadata() needs, this patch stops doing that."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Closes bug: 1836389"},{"line_number":25,"context_line":"Change-Id: I2ebd81345d99d6498e807a0ff0f5cbac8d0ad5ff"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7faddb67_7c18b683","line":24,"range":{"start_line":24,"start_character":0,"end_line":24,"end_character":19},"updated":"2019-07-22 16:19:04.000000000","message":"if you respin i would prefer if this was partial-bug instead of closes bug.\n\nthe logic intoduced by this patch is strictly less broken then the previous code. however the design of the original code and the new code assumes the PF is bould to a networking driver like i40e or ixgbe and not to vfio-pci.\n\nsaid another way the code relies on the PF having a kenel netdev associtated with it from which is can read the mac address via sysfs.\n\nrather then skipping the metadata entirely if we have no mac adress it would be better if we could use the pci address for coralation and populate the info we know.\n\ngiven that it appears we never supported the vfio-pci case previously and that this will address the the current issue in a eaisly backportable way i think im ok to +1 this but\nin general i would prefer to have a todo in the code and change this to partial bug if you dont mind respining","commit_id":"bda5ae1fd1035ab99285dcd121fe30f95a117c4d"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"be4ef0cfe0144319ee02ef3a96c9329d1e1f539f","unresolved":false,"context_lines":[{"line_number":17,"context_line":"_build_hostdev_metadata() in the libvirt driver to skip that"},{"line_number":18,"context_line":"interface\u0027s metadata."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"pf_interface\u003dTrue is used when passing a VF\u0027s PCI address in order to"},{"line_number":21,"context_line":"request the PCI address of its parent PF. As this is not what"},{"line_number":22,"context_line":"_build_hostdev_metadata() needs, this patch stops doing that."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"In the case of PFs using VFIO-PCI (as opposed to a regular networking"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5faad753_6839c53f","line":21,"range":{"start_line":20,"start_character":0,"end_line":21,"end_character":41},"updated":"2019-09-06 20:24:44.000000000","message":"If applying this patch, there are not any callers which specify pf_interface\u003dTrue to get_mac_by_pci_address().\nThen the above means there is not any code which requests the PCI address of its parent PF, right?","commit_id":"28c184c4f472b85be2aaa3d3426c5244978cd45d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"850d796bbd3b35cc716d7ffeac2e74219675a9a1","unresolved":false,"context_lines":[{"line_number":17,"context_line":"_build_hostdev_metadata() in the libvirt driver to skip that"},{"line_number":18,"context_line":"interface\u0027s metadata."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"pf_interface\u003dTrue is used when passing a VF\u0027s PCI address in order to"},{"line_number":21,"context_line":"request the PCI address of its parent PF. As this is not what"},{"line_number":22,"context_line":"_build_hostdev_metadata() needs, this patch stops doing that."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"In the case of PFs using VFIO-PCI (as opposed to a regular networking"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3fa7e38b_b8fa2540","line":21,"range":{"start_line":20,"start_character":0,"end_line":21,"end_character":41},"in_reply_to":"5faad753_6839c53f","updated":"2019-09-25 09:27:05.000000000","message":"Good point. Yeah, with this removed the \u0027pf_interface\u0027 kwarg for \u0027get_mac_by_pci_address\u0027 is dead. Can you remove that here, please? Shouldn\u0027t cause an issue with backports since this is true going back to stable/queens","commit_id":"28c184c4f472b85be2aaa3d3426c5244978cd45d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1e1ebcce91ada326ac450dbf2209b0a41feec7b5","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"In the case of PFs using VFIO-PCI (as opposed to a regular networking"},{"line_number":25,"context_line":"kernel driver), PciDeviceNotFoundById is expected to be raised, as"},{"line_number":26,"context_line":"those devices have no associated netdev. Instead of the previous"},{"line_number":27,"context_line":"debug-level generic notice, this patch promotes the log message to a"},{"line_number":28,"context_line":"warning explaining that device tagging does not work with VFIO-PCI"},{"line_number":29,"context_line":"devices."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Partial bug: 1836389"},{"line_number":32,"context_line":"Change-Id: I2ebd81345d99d6498e807a0ff0f5cbac8d0ad5ff"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"bf51134e_ae96a83d","line":29,"range":{"start_line":26,"start_character":41,"end_line":29,"end_character":8},"updated":"2020-07-17 15:38:59.000000000","message":"As far as I remember I saw this debug message coming periodically in the compute manager. Will this be the case for the warning too? I feel that this is too verbose. If so then can we log the warning only once per device from that periodic?","commit_id":"28c184c4f472b85be2aaa3d3426c5244978cd45d"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"76d1ed1469c98e4d51ff47eddd066441d7e9fc68","unresolved":false,"context_lines":[{"line_number":9447,"context_line":"            *[x[2:] for x in (dev.domain, dev.bus, dev.slot, dev.function)])"},{"line_number":9448,"context_line":"        try:"},{"line_number":9449,"context_line":"            mac \u003d pci_utils.get_mac_by_pci_address(pci_address,"},{"line_number":9450,"context_line":"                                                   pf_interface\u003dTrue)"},{"line_number":9451,"context_line":"        except exception.PciDeviceNotFoundById:"},{"line_number":9452,"context_line":"            LOG.debug(\u0027Not exposing metadata for not found PCI device %s\u0027,"},{"line_number":9453,"context_line":"                      pci_address)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_61700dde","side":"PARENT","line":9450,"updated":"2019-07-22 15:17:01.000000000","message":"This was wrong since the whole thing was originally added in abd01a757b8","commit_id":"ff0feed25d56c8ccd2298d5b5b82e636880fa986"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dfef6269ef0f36263edf34bcb8bb32915d12aa22","unresolved":false,"context_lines":[{"line_number":9447,"context_line":"            *[x[2:] for x in (dev.domain, dev.bus, dev.slot, dev.function)])"},{"line_number":9448,"context_line":"        try:"},{"line_number":9449,"context_line":"            mac \u003d pci_utils.get_mac_by_pci_address(pci_address,"},{"line_number":9450,"context_line":"                                                   pf_interface\u003dTrue)"},{"line_number":9451,"context_line":"        except exception.PciDeviceNotFoundById:"},{"line_number":9452,"context_line":"            LOG.debug(\u0027Not exposing metadata for not found PCI device %s\u0027,"},{"line_number":9453,"context_line":"                      pci_address)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_fcc34689","side":"PARENT","line":9450,"in_reply_to":"7faddb67_61700dde","updated":"2019-07-22 15:32:03.000000000","message":"Why wasn\u0027t it caught then? Since we don\u0027t have functional testing for this stuff I\u0027d have expected Artom to be manually testing it. IOW, has anyone manually verified this fixes the issue?","commit_id":"ff0feed25d56c8ccd2298d5b5b82e636880fa986"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"4b1109641924fe8ba35e7248096b4d90e005220e","unresolved":false,"context_lines":[{"line_number":9447,"context_line":"            *[x[2:] for x in (dev.domain, dev.bus, dev.slot, dev.function)])"},{"line_number":9448,"context_line":"        try:"},{"line_number":9449,"context_line":"            mac \u003d pci_utils.get_mac_by_pci_address(pci_address,"},{"line_number":9450,"context_line":"                                                   pf_interface\u003dTrue)"},{"line_number":9451,"context_line":"        except exception.PciDeviceNotFoundById:"},{"line_number":9452,"context_line":"            LOG.debug(\u0027Not exposing metadata for not found PCI device %s\u0027,"},{"line_number":9453,"context_line":"                      pci_address)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_3ca9de8f","side":"PARENT","line":9450,"in_reply_to":"7faddb67_fcc34689","updated":"2019-07-22 15:41:03.000000000","message":"I was careless in the original patch and did the fix based on just logs (SRIOV hardware was hard to get, maybe a bit easier now). Then due to an error in our internal bugzilla (my error, full mea culpa here), our QE didn\u0027t look at it, and it went straight to release.\n\n*This* patch I have actually tested, and made sure the internal bugzilla fields are set correctly to ensure QE coverage.\n\nHowever as Sean is about to comment (or has already commented), turns out this patch is incomplete, and only works for networking driver-bound PFs (which was the case in the env I had when testing this). It\u0027s still better than nothing, but doesn\u0027t cover all the cases, so the plan is to convert it to a Partial-bug, and then hunt for SRIOV hardware to develop a complete fix.","commit_id":"ff0feed25d56c8ccd2298d5b5b82e636880fa986"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"dcf3af0fac3cdff7b485e331a0da8a66dac809b4","unresolved":false,"context_lines":[{"line_number":9452,"context_line":"                      pci_address)"},{"line_number":9453,"context_line":"            return None"},{"line_number":9454,"context_line":""},{"line_number":9455,"context_line":"        vif \u003d vifs_to_expose.get(mac)"},{"line_number":9456,"context_line":"        if not vif:"},{"line_number":9457,"context_line":"            LOG.debug(\u0027No VIF found with MAC %s, not building metadata\u0027, mac)"},{"line_number":9458,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_52eda189","line":9455,"updated":"2019-07-22 18:10:17.000000000","message":"So we in the VFIO-PCI case we can\u0027t get a MAC for the device. So that means if we\u0027re going to expose it in the device metadata we need 2 things:\n\n1. Expose something *other* than the tag, as the tag alone is useless. This can be the \u003ctarget\u003e PCI address, see comment on L9461.\n\n2. Find a way to associate a device tag to a device in the instance XML. Currently that\u0027s done with MAC addresses, but it\u0027s probably possible to do it with PCI addresses as well, however that\u0027ll most likely involve some sort of database migration, as currently the only place we store NIC tags is in VirtualInterface objects, and the only other piece of information that\u0027s stored there is the MAC address.","commit_id":"bda5ae1fd1035ab99285dcd121fe30f95a117c4d"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"dcf3af0fac3cdff7b485e331a0da8a66dac809b4","unresolved":false,"context_lines":[{"line_number":9458,"context_line":"            return None"},{"line_number":9459,"context_line":""},{"line_number":9460,"context_line":"        device \u003d objects.NetworkInterfaceMetadata(mac\u003dmac)"},{"line_number":9461,"context_line":"        device.bus \u003d objects.PCIDeviceBus(address\u003dpci_address)"},{"line_number":9462,"context_line":"        if \u0027tag\u0027 in vif and vif.tag:"},{"line_number":9463,"context_line":"            device.tags \u003d [vif.tag]"},{"line_number":9464,"context_line":"        vlan \u003d vlans_by_mac.get(mac)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_17addb30","line":9461,"updated":"2019-07-22 18:10:17.000000000","message":"This is wrong, should be the address from \u003ctarget\u003e, not \u003csource\u003e, but the latter is all that LibvirtConfigGuestHostdevPCI currently supports.\n\nThis isn\u0027t strictly speaking the same bug, so follow-up patch?","commit_id":"bda5ae1fd1035ab99285dcd121fe30f95a117c4d"}]}
