)]}'
{"nova/tests/unit/virt/libvirt/test_migration.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"e1c218a9be4e34c7de3e0a95d74435c4f842ee24","unresolved":false,"context_lines":[{"line_number":597,"context_line":"        \u003cmac address\u003d\"DE:AD:BE:EF:CA:FE\"/\u003e"},{"line_number":598,"context_line":"        \u003cmodel type\u003d\"virtio\"/\u003e"},{"line_number":599,"context_line":"        \u003csource mode\u003d\"server\" path\u003d\"/vhost-user/test.sock\" type\u003d\"unix\"/\u003e"},{"line_number":600,"context_line":"        \u003ctarget dev\u003d\"tapa188171c-ea\"/\u003e"},{"line_number":601,"context_line":"        \u003cvirtualport type\u003d\"openvswitch\"\u003e"},{"line_number":602,"context_line":"            \u003cparameters interfaceid\u003d\"%s\"/\u003e"},{"line_number":603,"context_line":"        \u003c/virtualport\u003e"},{"line_number":604,"context_line":"        \u003caddress type\u003d\u0027pci\u0027 domain\u003d\u00270x0000\u0027 bus\u003d\u00270x00\u0027 slot\u003d\u00270x04\u0027"},{"line_number":605,"context_line":"                 function\u003d\u00270x0\u0027/\u003e"},{"line_number":606,"context_line":"    \u003c/interface\u003e"}],"source_content_type":"text/x-python","patch_set":20,"id":"9f6a8fd7_4b6b8e1e","line":603,"range":{"start_line":600,"start_character":8,"end_line":603,"end_character":22},"updated":"2018-04-27 11:45:45.000000000","message":"i think this is wrong for vhost-user\nwe shoudl not have a tap on the host and i dont think we use the virtualport section in nova because teh port plugging is done by os-vif not libvirt.\n\ni may have givent you a non openstack xml for reference.\nif i did that on me.","commit_id":"cf19c4a5fc74f62c7bf6ef0505595ecd00515467"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6b77d31bbc673a74fb3dc35a96c806c494889f3b","unresolved":false,"context_lines":[{"line_number":597,"context_line":"        \u003cmac address\u003d\"DE:AD:BE:EF:CA:FE\"/\u003e"},{"line_number":598,"context_line":"        \u003cmodel type\u003d\"virtio\"/\u003e"},{"line_number":599,"context_line":"        \u003csource mode\u003d\"server\" path\u003d\"/vhost-user/test.sock\" type\u003d\"unix\"/\u003e"},{"line_number":600,"context_line":"        \u003ctarget dev\u003d\"tapa188171c-ea\"/\u003e"},{"line_number":601,"context_line":"        \u003cvirtualport type\u003d\"openvswitch\"\u003e"},{"line_number":602,"context_line":"            \u003cparameters interfaceid\u003d\"%s\"/\u003e"},{"line_number":603,"context_line":"        \u003c/virtualport\u003e"},{"line_number":604,"context_line":"        \u003caddress type\u003d\u0027pci\u0027 domain\u003d\u00270x0000\u0027 bus\u003d\u00270x00\u0027 slot\u003d\u00270x04\u0027"},{"line_number":605,"context_line":"                 function\u003d\u00270x0\u0027/\u003e"},{"line_number":606,"context_line":"    \u003c/interface\u003e"}],"source_content_type":"text/x-python","patch_set":20,"id":"5f7c97a3_9108c6d9","line":603,"range":{"start_line":600,"start_character":8,"end_line":603,"end_character":22},"in_reply_to":"9f6a8fd7_4b6b8e1e","updated":"2018-05-08 13:06:22.000000000","message":"Well, this is the thing I was talking about in the migration code - we take the source vif xml and then we\u0027re just updating it, excluding the address, based on the destination vif data - so if we\u0027re changing vif types we can end up with weird-looking interface xml like this and I\u0027m not sure if that will confuse/break libvirt/qemu or not, or if it\u0027s smart enough to know that only certain fields matter based on the type of interface. To trim out what doesn\u0027t belong in the dest vif xml would basically mean needing to redo this using our os-vif utilities I think.","commit_id":"cf19c4a5fc74f62c7bf6ef0505595ecd00515467"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"dc489e48e09f5b05405a1f4a1fddd7246a6caace","unresolved":false,"context_lines":[{"line_number":598,"context_line":"        \u003cmodel type\u003d\"virtio\"/\u003e"},{"line_number":599,"context_line":"        \u003csource mode\u003d\"server\" path\u003d\"/vhost-user/test.sock\" type\u003d\"unix\"/\u003e"},{"line_number":600,"context_line":"        \u003ctarget dev\u003d\"tapa188171c-ea\"/\u003e"},{"line_number":601,"context_line":"        \u003cvirtualport type\u003d\"openvswitch\"\u003e"},{"line_number":602,"context_line":"            \u003cparameters interfaceid\u003d\"%s\"/\u003e"},{"line_number":603,"context_line":"        \u003c/virtualport\u003e"},{"line_number":604,"context_line":"        \u003caddress type\u003d\u0027pci\u0027 domain\u003d\u00270x0000\u0027 bus\u003d\u00270x00\u0027 slot\u003d\u00270x04\u0027"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_0bd323d5","line":601,"updated":"2018-06-19 07:58:00.000000000","message":"vhostuser interfae does not support virtualport, right?","commit_id":"f670319a17cd7a0cbc930fb6a7264929e0b295f8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b2114523988b3a29d4865fee76564846e756cb70","unresolved":false,"context_lines":[{"line_number":598,"context_line":"        \u003cmodel type\u003d\"virtio\"/\u003e"},{"line_number":599,"context_line":"        \u003csource mode\u003d\"server\" path\u003d\"/vhost-user/test.sock\" type\u003d\"unix\"/\u003e"},{"line_number":600,"context_line":"        \u003ctarget dev\u003d\"tapa188171c-ea\"/\u003e"},{"line_number":601,"context_line":"        \u003cvirtualport type\u003d\"openvswitch\"\u003e"},{"line_number":602,"context_line":"            \u003cparameters interfaceid\u003d\"%s\"/\u003e"},{"line_number":603,"context_line":"        \u003c/virtualport\u003e"},{"line_number":604,"context_line":"        \u003caddress type\u003d\u0027pci\u0027 domain\u003d\u00270x0000\u0027 bus\u003d\u00270x00\u0027 slot\u003d\u00270x04\u0027"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_14e49f0d","line":601,"in_reply_to":"5f7c97a3_0bd323d5","updated":"2018-06-19 13:11:32.000000000","message":"Not sure, this was probably just copied from elsewhere, or added here to see it\u0027s set.","commit_id":"f670319a17cd7a0cbc930fb6a7264929e0b295f8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5ed69b91c10aec918fb99daf19e57063487e2820","unresolved":false,"context_lines":[{"line_number":598,"context_line":"        \u003cmodel type\u003d\"virtio\"/\u003e"},{"line_number":599,"context_line":"        \u003csource mode\u003d\"server\" path\u003d\"/vhost-user/test.sock\" type\u003d\"unix\"/\u003e"},{"line_number":600,"context_line":"        \u003ctarget dev\u003d\"tapa188171c-ea\"/\u003e"},{"line_number":601,"context_line":"        \u003cvirtualport type\u003d\"openvswitch\"\u003e"},{"line_number":602,"context_line":"            \u003cparameters interfaceid\u003d\"%s\"/\u003e"},{"line_number":603,"context_line":"        \u003c/virtualport\u003e"},{"line_number":604,"context_line":"        \u003caddress type\u003d\u0027pci\u0027 domain\u003d\u00270x0000\u0027 bus\u003d\u00270x00\u0027 slot\u003d\u00270x04\u0027"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_e4e5cda5","line":601,"in_reply_to":"5f7c97a3_14e49f0d","updated":"2018-06-29 15:00:51.000000000","message":"Oh nevermind I think it\u0027s here because the source and dest xmls are merged and only the overlapping elements are updated for the new dest values, and address always remains the same.","commit_id":"f670319a17cd7a0cbc930fb6a7264929e0b295f8"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"020c0fbdf982fdceb3cc1e2ac7a401356625d5e8","unresolved":false,"context_lines":[{"line_number":675,"context_line":"        \"\"\"Simulates updating the guest xml for live migrating from a host"},{"line_number":676,"context_line":"        using OVS to a host using vhostuser as the networking backend."},{"line_number":677,"context_line":"        \"\"\""},{"line_number":678,"context_line":"        vif_ovs \u003d network_model.VIF(id\u003duuids.vif,"},{"line_number":679,"context_line":"                                    address\u003d\u0027DE:AD:BE:EF:CA:FE\u0027,"},{"line_number":680,"context_line":"                                    details\u003d{\u0027port_filter\u0027: False},"},{"line_number":681,"context_line":"                                    devname\u003d\u0027tap-xxx-yyy-zzz\u0027,"},{"line_number":682,"context_line":"                                    ovs_interfaceid\u003duuids.ovs)"},{"line_number":683,"context_line":"        source_vif \u003d vif_ovs"},{"line_number":684,"context_line":"        migrate_vifs \u003d ["},{"line_number":685,"context_line":"            objects.VIFMigrateData("},{"line_number":686,"context_line":"                port_id\u003duuids.port_id,"}],"source_content_type":"text/x-python","patch_set":30,"id":"5f7c97a3_c348f5b5","line":683,"range":{"start_line":678,"start_character":0,"end_line":683,"end_character":28},"updated":"2018-07-23 11:09:01.000000000","message":"nit: vif_ovs is not used below so these two lines can be combined to one.","commit_id":"2b52cde565d542c03f004b48ee9c1a6a25f5b7cd"}],"nova/virt/libvirt/migration.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5ee8a93079a5aa97749f5c7fca4552317c415bed","unresolved":false,"context_lines":[{"line_number":242,"context_line":"        # nova.virt.libvirt.vif.LibvirtGenericVIFDriver.get_config"},{"line_number":243,"context_line":"        # with all but the \u0027vif\u0027 kwarg set already."},{"line_number":244,"context_line":"        vif_config \u003d get_vif_config(vif\u003dvif)"},{"line_number":245,"context_line":"        LOG.info(\u0027TODO: update guest XML with vif config: %s\u0027, vif_config)"},{"line_number":246,"context_line":"    return xml_doc"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"df7087c5_a83fba85","line":245,"updated":"2018-03-19 21:56:47.000000000","message":"This plumbing is at least working because we\u0027re getting this far:\n\nhttp://logs.openstack.org/73/552173/4/check/legacy-tempest-dsvm-multinode-live-migration/df87ad0/logs/screen-n-cpu.txt.gz#_Mar_19_14_12_01_843574\n\nhttp://logs.openstack.org/73/552173/4/check/legacy-tempest-dsvm-multinode-live-migration/df87ad0/logs/subnode-2/screen-n-cpu.txt.gz#_Mar_19_14_15_31_009900\n\nShould dump that xml to see what it looks like for debug.","commit_id":"ec2b5f1c082f47c4edb1d1cd1ebd22b76881b116"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"50352fbbefa368cf7ecbe0143b50487129cc2cee","unresolved":false,"context_lines":[{"line_number":242,"context_line":"        # nova.virt.libvirt.vif.LibvirtGenericVIFDriver.get_config"},{"line_number":243,"context_line":"        # with all but the \u0027vif\u0027 kwarg set already."},{"line_number":244,"context_line":"        vif_config \u003d get_vif_config(vif\u003dvif)"},{"line_number":245,"context_line":"        LOG.info(\u0027TODO: update guest XML with vif config: %s\u0027,"},{"line_number":246,"context_line":"                 vif_config.to_xml())"},{"line_number":247,"context_line":"    return xml_doc"},{"line_number":248,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"df7087c5_3402090d","line":245,"updated":"2018-03-20 21:59:15.000000000","message":"In action:\n\nhttp://logs.openstack.org/73/552173/5/check/legacy-tempest-dsvm-multinode-live-migration/f1afe92/logs/screen-n-cpu.txt.gz#_Mar_19_23_09_59_000442\n\nMar 19 23:09:59.000442 ubuntu-xenial-ovh-bhs1-0003066678 nova-compute[31067]: INFO nova.virt.libvirt.migration [None req-0d59cbca-9f4b-4aa4-acae-f9b1f63731f8 service nova] TODO: update guest XML with vif config: \u003cinterface type\u003d\"bridge\"\u003e\nMar 19 23:09:59.000603 ubuntu-xenial-ovh-bhs1-0003066678 nova-compute[31067]:   \u003cmac address\u003d\"fa:16:3e:15:b5:70\"/\u003e\nMar 19 23:09:59.000726 ubuntu-xenial-ovh-bhs1-0003066678 nova-compute[31067]:   \u003cmodel type\u003d\"virtio\"/\u003e\nMar 19 23:09:59.000833 ubuntu-xenial-ovh-bhs1-0003066678 nova-compute[31067]:   \u003cdriver name\u003d\"qemu\"/\u003e\nMar 19 23:09:59.000986 ubuntu-xenial-ovh-bhs1-0003066678 nova-compute[31067]:   \u003csource bridge\u003d\"qbr45dd19b9-35\"/\u003e\nMar 19 23:09:59.001148 ubuntu-xenial-ovh-bhs1-0003066678 nova-compute[31067]:   \u003ctarget dev\u003d\"tap45dd19b9-35\"/\u003e\nMar 19 23:09:59.001277 ubuntu-xenial-ovh-bhs1-0003066678 nova-compute[31067]: \u003c/interface\u003e\nMar 19 23:09:59.001408 ubuntu-xenial-ovh-bhs1-0003066678 nova-compute[31067]:","commit_id":"9bb0d24c92bd7414556d62d934abb5f6b116b787"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"665a9e351b5e9678126b9997a51bf239009c9432","unresolved":false,"context_lines":[{"line_number":241,"context_line":"    for interface_dev in interface_nodes:"},{"line_number":242,"context_line":"        mac \u003d interface_dev.find(\u0027mac\u0027) or {}"},{"line_number":243,"context_line":"        mac_addr \u003d mac.get(\u0027address\u0027)"},{"line_number":244,"context_line":"        if mac_addr:"},{"line_number":245,"context_line":"            migrate_vif \u003d migrate_vif_by_mac.get(mac_addr)"},{"line_number":246,"context_line":"            if migrate_vif:"},{"line_number":247,"context_line":"                # Start with the source vif from the source host and"}],"source_content_type":"text/x-python","patch_set":17,"id":"9f6a8fd7_0344cd45","line":244,"range":{"start_line":244,"start_character":8,"end_line":244,"end_character":20},"updated":"2018-04-25 15:34:17.000000000","message":"Apparently this can be False, or isn\u0027t written correctly, because we\u0027re hitting it in CI:\n\nhttp://logs.openstack.org/37/522537/22/check/legacy-tempest-dsvm-multinode-live-migration/b84843f/logs/screen-n-cpu.txt.gz#_Apr_25_00_38_46_991779","commit_id":"e6d71485e2bbb96bf72bc57f8ecfc0b6f9334026"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d1ec366247ce93a0987de44f3a5b2be599aa8627","unresolved":false,"context_lines":[{"line_number":274,"context_line":"            continue"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"        conf_xml \u003d vif_config.to_xml()"},{"line_number":277,"context_line":"        LOG.debug(\u0027Updating guest XML with vif config: %s\u0027, conf_xml)"},{"line_number":278,"context_line":"        # Update the type on the interface element in case vif_type changed."},{"line_number":279,"context_line":"        interface_dev.set(\u0027type\u0027, vif_config.net_type)"},{"line_number":280,"context_line":"        # TODO(mriedem): The below code is copied from _update_volume_xml and"}],"source_content_type":"text/x-python","patch_set":19,"id":"9f6a8fd7_ddc9bb5a","line":277,"updated":"2018-04-26 12:06:10.000000000","message":"Looks like we\u0027re getting here correctly based on the live migration run in the patch and the top of the series that enables all of this code.\n\nhttp://logs.openstack.org/37/522537/24/check/legacy-tempest-dsvm-multinode-live-migration/71b1e6b/logs/screen-n-cpu.txt.gz#_Apr_25_23_07_17_105665\n\nApr 25 23:07:17.105665 ubuntu-xenial-rax-ord-0003742169 nova-compute[32415]: DEBUG nova.virt.libvirt.migration [None req-d93dac37-882e-49d9-9a36-018a380fb75a service nova] Updating guest XML with vif config: \u003cinterface type\u003d\"bridge\"\u003e\nApr 25 23:07:17.106000 ubuntu-xenial-rax-ord-0003742169 nova-compute[32415]:   \u003cmac address\u003d\"fa:16:3e:8d:ae:69\"/\u003e\nApr 25 23:07:17.106307 ubuntu-xenial-rax-ord-0003742169 nova-compute[32415]:   \u003cmodel type\u003d\"virtio\"/\u003e\nApr 25 23:07:17.106604 ubuntu-xenial-rax-ord-0003742169 nova-compute[32415]:   \u003cdriver name\u003d\"qemu\"/\u003e\nApr 25 23:07:17.107150 ubuntu-xenial-rax-ord-0003742169 nova-compute[32415]:   \u003csource bridge\u003d\"qbrdcdfc074-9e\"/\u003e\nApr 25 23:07:17.107472 ubuntu-xenial-rax-ord-0003742169 nova-compute[32415]:   \u003ctarget dev\u003d\"tapdcdfc074-9e\"/\u003e\nApr 25 23:07:17.107997 ubuntu-xenial-rax-ord-0003742169 nova-compute[32415]: \u003c/interface\u003e\nApr 25 23:07:17.108297 ubuntu-xenial-rax-ord-0003742169 nova-compute[32415]:  {{(pid\u003d32415) _update_vif_xml /opt/stack/new/nova/nova/virt/libvirt/migration.py:277}}","commit_id":"b75df352ebecef1e020b9a59f9615cb4e5afd148"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"e1c218a9be4e34c7de3e0a95d74435c4f842ee24","unresolved":false,"context_lines":[{"line_number":274,"context_line":"            continue"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"        conf_xml \u003d vif_config.to_xml()"},{"line_number":277,"context_line":"        LOG.debug(\u0027Updating guest XML with vif config: %s\u0027, conf_xml)"},{"line_number":278,"context_line":"        # Update the type on the interface element in case vif_type changed."},{"line_number":279,"context_line":"        interface_dev.set(\u0027type\u0027, vif_config.net_type)"},{"line_number":280,"context_line":"        # TODO(mriedem): The below code is copied from _update_volume_xml and"}],"source_content_type":"text/x-python","patch_set":19,"id":"9f6a8fd7_6b3a1235","line":277,"in_reply_to":"9f6a8fd7_ddc9bb5a","updated":"2018-04-27 11:45:45.000000000","message":"ill see if i can figure out how to get a ci job working with linuxbridge and ovs in the same cloud. i have done that manually several times but its been a while.\n\nthe main gotya is that by defualt linux bridge and ovs use different udp ports for vxlan so you have to fix that in the config or everything breaks.","commit_id":"b75df352ebecef1e020b9a59f9615cb4e5afd148"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"e1c218a9be4e34c7de3e0a95d74435c4f842ee24","unresolved":false,"context_lines":[{"line_number":252,"context_line":"                # TODO(mriedem): If the vif type changes, should we even"},{"line_number":253,"context_line":"                # start with the source_vif or should we just get a fresh"},{"line_number":254,"context_line":"                # dest conf based on the VIFMigrateData attributes? But"},{"line_number":255,"context_line":"                # if we do that, will we have the appropriate network"},{"line_number":256,"context_line":"                # information for the vif? Can you even have different"},{"line_number":257,"context_line":"                # vif types on the same network?"},{"line_number":258,"context_line":"                vif \u003d copy.deepcopy(migrate_vif.source_vif)"},{"line_number":259,"context_line":"                vif[\u0027type\u0027] \u003d migrate_vif.vif_type"}],"source_content_type":"text/x-python","patch_set":20,"id":"9f6a8fd7_eb65c246","line":256,"range":{"start_line":255,"start_character":33,"end_line":256,"end_character":41},"updated":"2018-04-27 11:45:45.000000000","message":"you should have all of the info in the vif object however you might need to pull the virtual pci devices adress from the interface element as we discussed on irc.","commit_id":"cf19c4a5fc74f62c7bf6ef0505595ecd00515467"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6b77d31bbc673a74fb3dc35a96c806c494889f3b","unresolved":false,"context_lines":[{"line_number":252,"context_line":"                # TODO(mriedem): If the vif type changes, should we even"},{"line_number":253,"context_line":"                # start with the source_vif or should we just get a fresh"},{"line_number":254,"context_line":"                # dest conf based on the VIFMigrateData attributes? But"},{"line_number":255,"context_line":"                # if we do that, will we have the appropriate network"},{"line_number":256,"context_line":"                # information for the vif? Can you even have different"},{"line_number":257,"context_line":"                # vif types on the same network?"},{"line_number":258,"context_line":"                vif \u003d copy.deepcopy(migrate_vif.source_vif)"},{"line_number":259,"context_line":"                vif[\u0027type\u0027] \u003d migrate_vif.vif_type"}],"source_content_type":"text/x-python","patch_set":20,"id":"5f7c97a3_71e96a18","line":256,"range":{"start_line":255,"start_character":33,"end_line":256,"end_character":41},"in_reply_to":"9f6a8fd7_eb65c246","updated":"2018-05-08 13:06:22.000000000","message":"That\u0027s handled below, see the \"if item_dst.tag !\u003d \u0027address\u0027:\" logic.","commit_id":"cf19c4a5fc74f62c7bf6ef0505595ecd00515467"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"e1c218a9be4e34c7de3e0a95d74435c4f842ee24","unresolved":false,"context_lines":[{"line_number":253,"context_line":"                # start with the source_vif or should we just get a fresh"},{"line_number":254,"context_line":"                # dest conf based on the VIFMigrateData attributes? But"},{"line_number":255,"context_line":"                # if we do that, will we have the appropriate network"},{"line_number":256,"context_line":"                # information for the vif? Can you even have different"},{"line_number":257,"context_line":"                # vif types on the same network?"},{"line_number":258,"context_line":"                vif \u003d copy.deepcopy(migrate_vif.source_vif)"},{"line_number":259,"context_line":"                vif[\u0027type\u0027] \u003d migrate_vif.vif_type"},{"line_number":260,"context_line":"                vif[\u0027vnic_type\u0027] \u003d migrate_vif.vnic_type"}],"source_content_type":"text/x-python","patch_set":20,"id":"9f6a8fd7_8b5a0681","line":257,"range":{"start_line":256,"start_character":43,"end_line":257,"end_character":47},"updated":"2018-04-27 11:45:45.000000000","message":"yes you can have multiple vif_types connected to the same network even within a single host. simplest example is sriov and anything else.","commit_id":"cf19c4a5fc74f62c7bf6ef0505595ecd00515467"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6b77d31bbc673a74fb3dc35a96c806c494889f3b","unresolved":false,"context_lines":[{"line_number":253,"context_line":"                # start with the source_vif or should we just get a fresh"},{"line_number":254,"context_line":"                # dest conf based on the VIFMigrateData attributes? But"},{"line_number":255,"context_line":"                # if we do that, will we have the appropriate network"},{"line_number":256,"context_line":"                # information for the vif? Can you even have different"},{"line_number":257,"context_line":"                # vif types on the same network?"},{"line_number":258,"context_line":"                vif \u003d copy.deepcopy(migrate_vif.source_vif)"},{"line_number":259,"context_line":"                vif[\u0027type\u0027] \u003d migrate_vif.vif_type"},{"line_number":260,"context_line":"                vif[\u0027vnic_type\u0027] \u003d migrate_vif.vnic_type"}],"source_content_type":"text/x-python","patch_set":20,"id":"5f7c97a3_71d2ca5e","line":257,"range":{"start_line":256,"start_character":43,"end_line":257,"end_character":47},"in_reply_to":"9f6a8fd7_8b5a0681","updated":"2018-05-08 13:06:22.000000000","message":"I\u0027ll remove this TODO then.","commit_id":"cf19c4a5fc74f62c7bf6ef0505595ecd00515467"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"741f4fbf57eb89c3a06e33501943da94f31d49d9","unresolved":false,"context_lines":[{"line_number":249,"context_line":"                # override the destination host port binding specific"},{"line_number":250,"context_line":"                # information. We\u0027ll have to assume that the rest is"},{"line_number":251,"context_line":"                # compatible with the destination host."},{"line_number":252,"context_line":"                vif \u003d copy.deepcopy(migrate_vif.source_vif)"},{"line_number":253,"context_line":"                vif[\u0027type\u0027] \u003d migrate_vif.vif_type"},{"line_number":254,"context_line":"                vif[\u0027vnic_type\u0027] \u003d migrate_vif.vnic_type"},{"line_number":255,"context_line":"                vif[\u0027profile\u0027] \u003d migrate_vif.profile"},{"line_number":256,"context_line":"                vif[\u0027details\u0027] \u003d migrate_vif.vif_details"},{"line_number":257,"context_line":"                # get_vif_config is a partial function of"},{"line_number":258,"context_line":"                # nova.virt.libvirt.vif.LibvirtGenericVIFDriver.get_config"},{"line_number":259,"context_line":"                # with all but the \u0027vif\u0027 kwarg set already."}],"source_content_type":"text/x-python","patch_set":21,"id":"5f7c97a3_609bcec8","line":256,"range":{"start_line":252,"start_character":16,"end_line":256,"end_character":56},"updated":"2018-05-08 16:02:53.000000000","message":"This can just be migrate_vif.get_dest_vif() now.","commit_id":"cd8302387394d9438b768b44d26a22300796a145"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"dc489e48e09f5b05405a1f4a1fddd7246a6caace","unresolved":false,"context_lines":[{"line_number":248,"context_line":"                # get_vif_config is a partial function of"},{"line_number":249,"context_line":"                # nova.virt.libvirt.vif.LibvirtGenericVIFDriver.get_config"},{"line_number":250,"context_line":"                # with all but the \u0027vif\u0027 kwarg set already."},{"line_number":251,"context_line":"                vif_config \u003d get_vif_config(vif\u003dvif)"},{"line_number":252,"context_line":"            else:"},{"line_number":253,"context_line":"                LOG.debug(\u0027Unable to find migrate_vif for interface with \u0027"},{"line_number":254,"context_line":"                          \u0027MAC address: %s\u0027, mac_addr)"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_4b0efb8c","line":251,"updated":"2018-06-19 07:58:00.000000000","message":"get_vif_config is returning the vif config based on some host configurations. That would not work since you are executing that code in source.\n\nThere is a comment here:\n\n  https://review.openstack.org/#/c/515423/\n\nWhat is your thinking?","commit_id":"f670319a17cd7a0cbc930fb6a7264929e0b295f8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b2114523988b3a29d4865fee76564846e756cb70","unresolved":false,"context_lines":[{"line_number":248,"context_line":"                # get_vif_config is a partial function of"},{"line_number":249,"context_line":"                # nova.virt.libvirt.vif.LibvirtGenericVIFDriver.get_config"},{"line_number":250,"context_line":"                # with all but the \u0027vif\u0027 kwarg set already."},{"line_number":251,"context_line":"                vif_config \u003d get_vif_config(vif\u003dvif)"},{"line_number":252,"context_line":"            else:"},{"line_number":253,"context_line":"                LOG.debug(\u0027Unable to find migrate_vif for interface with \u0027"},{"line_number":254,"context_line":"                          \u0027MAC address: %s\u0027, mac_addr)"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_34767b41","line":251,"in_reply_to":"5f7c97a3_4b0efb8c","updated":"2018-06-19 13:11:32.000000000","message":"I have a rather large comment to that effect here:\n\nhttps://review.openstack.org/#/c/551370/23/nova/virt/libvirt/driver.py@6904\n\nThe virt type and version compat between the source and destination host are validated in conductor:\n\nhttps://github.com/openstack/nova/blob/afcf078715554e3efe5b71d583586dc112159299/nova/conductor/tasks/live_migrate.py#L204\n\nIf there are things beyond that which we need, we\u0027d either have to pull those from the dest host and store in the migrate data object (and make sure they are things we can store in the source vif field of that object), or we\u0027ll have to go with what I left in the comment in driver.py which is getting the vif objects from the dest host during pre_live_migration, serializing those and storing them in the libvirt live migrate data object and then just re-using them from the source when building the dest guest xml here.","commit_id":"f670319a17cd7a0cbc930fb6a7264929e0b295f8"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"3c9760edd304e5bec93c74bbac9795f7eecd582d","unresolved":false,"context_lines":[{"line_number":258,"context_line":"                      etree.tostring(interface_dev, encoding\u003d\u0027unicode\u0027))"},{"line_number":259,"context_line":"            continue"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"        conf_xml \u003d vif_config.to_xml()"},{"line_number":262,"context_line":"        LOG.debug(\u0027Updating guest XML with vif config: %s\u0027, conf_xml)"},{"line_number":263,"context_line":"        # Update the type on the interface element in case vif_type changed."},{"line_number":264,"context_line":"        interface_dev.set(\u0027type\u0027, vif_config.net_type)"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_cc2ca103","line":261,"updated":"2018-06-15 09:53:33.000000000","message":"Instead of updating fields which could create some issues, we could just remove the interface element to replace it with conf_xml.\n\nWe could remove all the source interfaces to then place the new ones generated by get_vif_config()","commit_id":"f670319a17cd7a0cbc930fb6a7264929e0b295f8"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"756d7bd9aa13ee463d4421634b5d3e8e39fee09b","unresolved":false,"context_lines":[{"line_number":258,"context_line":"                      etree.tostring(interface_dev, encoding\u003d\u0027unicode\u0027))"},{"line_number":259,"context_line":"            continue"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"        conf_xml \u003d vif_config.to_xml()"},{"line_number":262,"context_line":"        LOG.debug(\u0027Updating guest XML with vif config: %s\u0027, conf_xml)"},{"line_number":263,"context_line":"        # Update the type on the interface element in case vif_type changed."},{"line_number":264,"context_line":"        interface_dev.set(\u0027type\u0027, vif_config.net_type)"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_5590baed","line":261,"in_reply_to":"5f7c97a3_54969740","updated":"2018-06-20 13:52:08.000000000","message":"I would have not bet on it. The behavior of libvirt is sometime difficult to predict. There are some XML validations which can raise an error, also sometimes libvirt could just ignore the extra elements, and some other times libvirt will pass the extra arguments to QEMU which will raise an error if not valid...","commit_id":"f670319a17cd7a0cbc930fb6a7264929e0b295f8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b2114523988b3a29d4865fee76564846e756cb70","unresolved":false,"context_lines":[{"line_number":258,"context_line":"                      etree.tostring(interface_dev, encoding\u003d\u0027unicode\u0027))"},{"line_number":259,"context_line":"            continue"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"        conf_xml \u003d vif_config.to_xml()"},{"line_number":262,"context_line":"        LOG.debug(\u0027Updating guest XML with vif config: %s\u0027, conf_xml)"},{"line_number":263,"context_line":"        # Update the type on the interface element in case vif_type changed."},{"line_number":264,"context_line":"        interface_dev.set(\u0027type\u0027, vif_config.net_type)"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_54969740","line":261,"in_reply_to":"5f7c97a3_6b873714","updated":"2018-06-19 13:11:32.000000000","message":"\u003e The problem is we want to be able to live-migrate with different kind of vif type. They can be totally different in configuration some attributes may be missed, example multiqueue configuration, or some attributes may be not supported between interfaces.\n\nYeah the one thing I wondered about was how strict libvirt/qemu validate that vif types have only certain fields in the interface xml in the guest - if we change the type, for example, and the dest xml has some elements from the source xml which don\u0027t apply to the dest xml, does it matter? Will libvirt/qemu ignore the elements? I would assume the parsing in libvirt/qemu is similar to our config object model parsing in that certain elements are assumed to exist for certain types of vifs, and ignored for others, like virtualport on a vhostuser interface.","commit_id":"f670319a17cd7a0cbc930fb6a7264929e0b295f8"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"dc489e48e09f5b05405a1f4a1fddd7246a6caace","unresolved":false,"context_lines":[{"line_number":258,"context_line":"                      etree.tostring(interface_dev, encoding\u003d\u0027unicode\u0027))"},{"line_number":259,"context_line":"            continue"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"        conf_xml \u003d vif_config.to_xml()"},{"line_number":262,"context_line":"        LOG.debug(\u0027Updating guest XML with vif config: %s\u0027, conf_xml)"},{"line_number":263,"context_line":"        # Update the type on the interface element in case vif_type changed."},{"line_number":264,"context_line":"        interface_dev.set(\u0027type\u0027, vif_config.net_type)"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_6b873714","line":261,"in_reply_to":"5f7c97a3_92d1b2cf","updated":"2018-06-19 07:58:00.000000000","message":"Yes I saw that. _update_volume_xml  is not really a good example.\n\nThe problem is we want to be able to live-migrate with different kind of vif type. They can be totally different in configuration some attributes may be missed, example multiqueue configuration, or some attributes may be not supported between interfaces.\n\nBut in same time we don\u0027t want to change the PCI address generated by libvirt for the network device. So you approach may be the good one.","commit_id":"f670319a17cd7a0cbc930fb6a7264929e0b295f8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"90e6fb2ff780ff003e1977ea359da7c3ecc2ed74","unresolved":false,"context_lines":[{"line_number":258,"context_line":"                      etree.tostring(interface_dev, encoding\u003d\u0027unicode\u0027))"},{"line_number":259,"context_line":"            continue"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"        conf_xml \u003d vif_config.to_xml()"},{"line_number":262,"context_line":"        LOG.debug(\u0027Updating guest XML with vif config: %s\u0027, conf_xml)"},{"line_number":263,"context_line":"        # Update the type on the interface element in case vif_type changed."},{"line_number":264,"context_line":"        interface_dev.set(\u0027type\u0027, vif_config.net_type)"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_92d1b2cf","line":261,"in_reply_to":"5f7c97a3_cc2ca103","updated":"2018-06-18 22:52:02.000000000","message":"This is basically a copy of _update_volume_xml but for VIFs, so unless we plan on changing how that works, I don\u0027t really plan on changing this.","commit_id":"f670319a17cd7a0cbc930fb6a7264929e0b295f8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5bbe092f46895ac09ff7525f67d9a4e38085d807","unresolved":false,"context_lines":[{"line_number":314,"context_line":""},{"line_number":315,"context_line":"        conf_xml \u003d vif_config.to_xml()"},{"line_number":316,"context_line":"        LOG.debug(\u0027Updating guest XML with vif config: %s\u0027, conf_xml)"},{"line_number":317,"context_line":"        # Update the type on the interface element in case vif_type changed."},{"line_number":318,"context_line":"        interface_dev.set(\u0027type\u0027, vif_config.net_type)"},{"line_number":319,"context_line":"        # TODO(mriedem): The below code is copied from _update_volume_xml and"},{"line_number":320,"context_line":"        # we could move it into a common utility method."},{"line_number":321,"context_line":"        xml_doc2 \u003d etree.XML(conf_xml, parser)"},{"line_number":322,"context_line":"        for cnt, item_src in enumerate(interface_dev):"},{"line_number":323,"context_line":"            # If source and destination have same item, update"},{"line_number":324,"context_line":"            # the item using destination value."}],"source_content_type":"text/x-python","patch_set":27,"id":"5f7c97a3_0fcbb4a3","line":321,"range":{"start_line":317,"start_character":8,"end_line":321,"end_character":46},"updated":"2018-06-25 16:23:47.000000000","message":"As sahid pointed out earlier, we should probably do a full overwrite of the interfaces and preserve only the address.\n\nhttps://review.openstack.org/#/c/551370/23/nova/virt/libvirt/migration.py@261","commit_id":"93a89dd4c7e4e8219381f8df4d3d0b573cd5449d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a6d5dde648f71553836ebec25044cd6163a57027","unresolved":false,"context_lines":[{"line_number":314,"context_line":""},{"line_number":315,"context_line":"        conf_xml \u003d vif_config.to_xml()"},{"line_number":316,"context_line":"        LOG.debug(\u0027Updating guest XML with vif config: %s\u0027, conf_xml)"},{"line_number":317,"context_line":"        # Update the type on the interface element in case vif_type changed."},{"line_number":318,"context_line":"        interface_dev.set(\u0027type\u0027, vif_config.net_type)"},{"line_number":319,"context_line":"        # TODO(mriedem): The below code is copied from _update_volume_xml and"},{"line_number":320,"context_line":"        # we could move it into a common utility method."},{"line_number":321,"context_line":"        xml_doc2 \u003d etree.XML(conf_xml, parser)"},{"line_number":322,"context_line":"        for cnt, item_src in enumerate(interface_dev):"},{"line_number":323,"context_line":"            # If source and destination have same item, update"},{"line_number":324,"context_line":"            # the item using destination value."}],"source_content_type":"text/x-python","patch_set":27,"id":"5f7c97a3_7a4dd639","line":321,"range":{"start_line":317,"start_character":8,"end_line":321,"end_character":46},"in_reply_to":"5f7c97a3_0fcbb4a3","updated":"2018-06-29 15:56:29.000000000","message":"Done","commit_id":"93a89dd4c7e4e8219381f8df4d3d0b573cd5449d"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"47a676fa279551e5f9840eb64d19b14bd6d9309f","unresolved":false,"context_lines":[{"line_number":280,"context_line":""},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"def _update_vif_xml(xml_doc, migrate_data, get_vif_config):"},{"line_number":283,"context_line":"    if not (\u0027vifs\u0027 in migrate_data and migrate_data.vifs):"},{"line_number":284,"context_line":"        return xml_doc"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"    # Loop over each interface element in the original xml and find the"},{"line_number":287,"context_line":"    # corresponding vif based on mac and then overwrite the xml with the new"}],"source_content_type":"text/x-python","patch_set":28,"id":"5f7c97a3_799dc46a","line":284,"range":{"start_line":283,"start_character":1,"end_line":284,"end_character":22},"updated":"2018-07-02 15:34:02.000000000","message":"This can be removed the check line 88 is already doing it based on driver.py","commit_id":"bffe00b7722aad2e9a482a1991f5c9f29fb68b50"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0678b0cf8af9e197ebcbd85c45d49a6e72df4e2d","unresolved":false,"context_lines":[{"line_number":280,"context_line":""},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"def _update_vif_xml(xml_doc, migrate_data, get_vif_config):"},{"line_number":283,"context_line":"    if not (\u0027vifs\u0027 in migrate_data and migrate_data.vifs):"},{"line_number":284,"context_line":"        return xml_doc"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"    # Loop over each interface element in the original xml and find the"},{"line_number":287,"context_line":"    # corresponding vif based on mac and then overwrite the xml with the new"}],"source_content_type":"text/x-python","patch_set":28,"id":"5f7c97a3_b831fe5b","line":284,"range":{"start_line":283,"start_character":1,"end_line":284,"end_character":22},"in_reply_to":"5f7c97a3_799dc46a","updated":"2018-07-03 14:08:20.000000000","message":"Done","commit_id":"bffe00b7722aad2e9a482a1991f5c9f29fb68b50"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"47a676fa279551e5f9840eb64d19b14bd6d9309f","unresolved":false,"context_lines":[{"line_number":297,"context_line":"        mac_addr \u003d mac.get(\u0027address\u0027)"},{"line_number":298,"context_line":"        if mac_addr:"},{"line_number":299,"context_line":"            migrate_vif \u003d migrate_vif_by_mac.get(mac_addr)"},{"line_number":300,"context_line":"            if migrate_vif:"},{"line_number":301,"context_line":"                vif \u003d migrate_vif.get_dest_vif()"},{"line_number":302,"context_line":"                # get_vif_config is a partial function of"},{"line_number":303,"context_line":"                # nova.virt.libvirt.vif.LibvirtGenericVIFDriver.get_config"}],"source_content_type":"text/x-python","patch_set":28,"id":"5f7c97a3_b99a7c6c","line":300,"range":{"start_line":300,"start_character":12,"end_line":300,"end_character":27},"updated":"2018-07-02 15:34:02.000000000","message":"Same here, no need of this condition.","commit_id":"bffe00b7722aad2e9a482a1991f5c9f29fb68b50"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0678b0cf8af9e197ebcbd85c45d49a6e72df4e2d","unresolved":false,"context_lines":[{"line_number":297,"context_line":"        mac_addr \u003d mac.get(\u0027address\u0027)"},{"line_number":298,"context_line":"        if mac_addr:"},{"line_number":299,"context_line":"            migrate_vif \u003d migrate_vif_by_mac.get(mac_addr)"},{"line_number":300,"context_line":"            if migrate_vif:"},{"line_number":301,"context_line":"                vif \u003d migrate_vif.get_dest_vif()"},{"line_number":302,"context_line":"                # get_vif_config is a partial function of"},{"line_number":303,"context_line":"                # nova.virt.libvirt.vif.LibvirtGenericVIFDriver.get_config"}],"source_content_type":"text/x-python","patch_set":28,"id":"5f7c97a3_f810d6ad","line":300,"range":{"start_line":300,"start_character":12,"end_line":300,"end_character":27},"in_reply_to":"5f7c97a3_b99a7c6c","updated":"2018-07-03 14:08:20.000000000","message":"Done","commit_id":"bffe00b7722aad2e9a482a1991f5c9f29fb68b50"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"6b1b36fbfb35dcaa5c1eb955360f6684a8ae1300","unresolved":false,"context_lines":[{"line_number":297,"context_line":"        mac_addr \u003d mac.get(\u0027address\u0027)"},{"line_number":298,"context_line":"        if mac_addr:"},{"line_number":299,"context_line":"            migrate_vif \u003d migrate_vif_by_mac.get(mac_addr)"},{"line_number":300,"context_line":"            if migrate_vif:"},{"line_number":301,"context_line":"                vif \u003d migrate_vif.get_dest_vif()"},{"line_number":302,"context_line":"                # get_vif_config is a partial function of"},{"line_number":303,"context_line":"                # nova.virt.libvirt.vif.LibvirtGenericVIFDriver.get_config"}],"source_content_type":"text/x-python","patch_set":28,"id":"5f7c97a3_ee5f9e72","line":300,"range":{"start_line":300,"start_character":12,"end_line":300,"end_character":27},"in_reply_to":"5f7c97a3_d16ff5c1","updated":"2018-07-04 07:05:11.000000000","message":"I would have used the same pattern that you did in your next patch for the MAC addr check (raising a NovaException). The KeyError is often difficult to debug.","commit_id":"bffe00b7722aad2e9a482a1991f5c9f29fb68b50"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"981800f3ed1269bdacc1b2c615f16e2323a3b1d0","unresolved":false,"context_lines":[{"line_number":297,"context_line":"        mac_addr \u003d mac.get(\u0027address\u0027)"},{"line_number":298,"context_line":"        if mac_addr:"},{"line_number":299,"context_line":"            migrate_vif \u003d migrate_vif_by_mac.get(mac_addr)"},{"line_number":300,"context_line":"            if migrate_vif:"},{"line_number":301,"context_line":"                vif \u003d migrate_vif.get_dest_vif()"},{"line_number":302,"context_line":"                # get_vif_config is a partial function of"},{"line_number":303,"context_line":"                # nova.virt.libvirt.vif.LibvirtGenericVIFDriver.get_config"}],"source_content_type":"text/x-python","patch_set":28,"id":"5f7c97a3_73db72e9","line":300,"range":{"start_line":300,"start_character":12,"end_line":300,"end_character":27},"in_reply_to":"5f7c97a3_ee5f9e72","updated":"2018-07-04 13:36:53.000000000","message":"Yeah, I was on the fence about that. I can make it an explicit failure if we want, let\u0027s see what others think.","commit_id":"bffe00b7722aad2e9a482a1991f5c9f29fb68b50"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"40c7edf00897c7c09e7b23b9eb712b8842d50c5e","unresolved":false,"context_lines":[{"line_number":297,"context_line":"        mac_addr \u003d mac.get(\u0027address\u0027)"},{"line_number":298,"context_line":"        if mac_addr:"},{"line_number":299,"context_line":"            migrate_vif \u003d migrate_vif_by_mac.get(mac_addr)"},{"line_number":300,"context_line":"            if migrate_vif:"},{"line_number":301,"context_line":"                vif \u003d migrate_vif.get_dest_vif()"},{"line_number":302,"context_line":"                # get_vif_config is a partial function of"},{"line_number":303,"context_line":"                # nova.virt.libvirt.vif.LibvirtGenericVIFDriver.get_config"}],"source_content_type":"text/x-python","patch_set":28,"id":"5f7c97a3_d16ff5c1","line":300,"range":{"start_line":300,"start_character":12,"end_line":300,"end_character":27},"in_reply_to":"5f7c97a3_f810d6ad","updated":"2018-07-03 15:52:15.000000000","message":"Oh actually test_update_vif_xml_no_matching_vif was covering this scenario in the case that we have an interface element which can\u0027t be found in our migrate data. In that case something went wrong so likely we should abort there as well. It shouldn\u0027t happen but really it\u0027s just a sanity check. I guess I could change migrate_vif_by_mac.get(mac_addr) to migrate_vif_by_mac[mac_addr] and we\u0027d get a KeyError which would abort the live migration...but that\u0027s not as nice to debug.","commit_id":"bffe00b7722aad2e9a482a1991f5c9f29fb68b50"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"47a676fa279551e5f9840eb64d19b14bd6d9309f","unresolved":false,"context_lines":[{"line_number":308,"context_line":"                LOG.debug(\u0027Unable to find migrate_vif for interface with \u0027"},{"line_number":309,"context_line":"                          \u0027MAC address: %s\u0027, mac_addr)"},{"line_number":310,"context_line":"                continue"},{"line_number":311,"context_line":"        else:"},{"line_number":312,"context_line":"            LOG.debug(\u0027Unable to find MAC address in interface XML: %s\u0027,"},{"line_number":313,"context_line":"                      etree.tostring(interface_dev, encoding\u003d\u0027unicode\u0027))"},{"line_number":314,"context_line":"            continue"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"        # At this point we want to replace the interface elements with the"},{"line_number":317,"context_line":"        # destination vif config xml *except* for the guest PCI address."}],"source_content_type":"text/x-python","patch_set":28,"id":"5f7c97a3_d9a3b89a","line":314,"range":{"start_line":311,"start_character":0,"end_line":314,"end_character":20},"updated":"2018-07-02 15:34:02.000000000","message":"That situation does not look possible so I would say we should abort the migration.","commit_id":"bffe00b7722aad2e9a482a1991f5c9f29fb68b50"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0678b0cf8af9e197ebcbd85c45d49a6e72df4e2d","unresolved":false,"context_lines":[{"line_number":308,"context_line":"                LOG.debug(\u0027Unable to find migrate_vif for interface with \u0027"},{"line_number":309,"context_line":"                          \u0027MAC address: %s\u0027, mac_addr)"},{"line_number":310,"context_line":"                continue"},{"line_number":311,"context_line":"        else:"},{"line_number":312,"context_line":"            LOG.debug(\u0027Unable to find MAC address in interface XML: %s\u0027,"},{"line_number":313,"context_line":"                      etree.tostring(interface_dev, encoding\u003d\u0027unicode\u0027))"},{"line_number":314,"context_line":"            continue"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"        # At this point we want to replace the interface elements with the"},{"line_number":317,"context_line":"        # destination vif config xml *except* for the guest PCI address."}],"source_content_type":"text/x-python","patch_set":28,"id":"5f7c97a3_7824c60e","line":314,"range":{"start_line":311,"start_character":0,"end_line":314,"end_character":20},"in_reply_to":"5f7c97a3_d9a3b89a","updated":"2018-07-03 14:08:20.000000000","message":"Yeah I didn\u0027t think this could happen and was wondering if debug was appropriate or if it should be an error. I\u0027ll change to an error.","commit_id":"bffe00b7722aad2e9a482a1991f5c9f29fb68b50"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"47a676fa279551e5f9840eb64d19b14bd6d9309f","unresolved":false,"context_lines":[{"line_number":315,"context_line":""},{"line_number":316,"context_line":"        # At this point we want to replace the interface elements with the"},{"line_number":317,"context_line":"        # destination vif config xml *except* for the guest PCI address."},{"line_number":318,"context_line":"        # NOTE(mriedem): Should we skip this if the type doesn\u0027t change?"},{"line_number":319,"context_line":"        conf_xml \u003d vif_config.to_xml()"},{"line_number":320,"context_line":"        LOG.debug(\u0027Updating guest XML with vif config: %s\u0027, conf_xml)"},{"line_number":321,"context_line":"        dest_interface_elem \u003d etree.XML(conf_xml, parser)"}],"source_content_type":"text/x-python","patch_set":28,"id":"5f7c97a3_b9691c8d","line":318,"updated":"2018-07-02 15:34:02.000000000","message":"I don\u0027t see any reason to do that instead of making the code a bit more complicated","commit_id":"bffe00b7722aad2e9a482a1991f5c9f29fb68b50"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0678b0cf8af9e197ebcbd85c45d49a6e72df4e2d","unresolved":false,"context_lines":[{"line_number":315,"context_line":""},{"line_number":316,"context_line":"        # At this point we want to replace the interface elements with the"},{"line_number":317,"context_line":"        # destination vif config xml *except* for the guest PCI address."},{"line_number":318,"context_line":"        # NOTE(mriedem): Should we skip this if the type doesn\u0027t change?"},{"line_number":319,"context_line":"        conf_xml \u003d vif_config.to_xml()"},{"line_number":320,"context_line":"        LOG.debug(\u0027Updating guest XML with vif config: %s\u0027, conf_xml)"},{"line_number":321,"context_line":"        dest_interface_elem \u003d etree.XML(conf_xml, parser)"}],"source_content_type":"text/x-python","patch_set":28,"id":"5f7c97a3_78692624","line":318,"in_reply_to":"5f7c97a3_b9691c8d","updated":"2018-07-03 14:08:20.000000000","message":"Well, I assume the vast majority of cases are going to *not* be changing vif types during live migration so if the vif type doesn\u0027t change we could save some time by not doing the extra parsing and element replacement. The time saved is probably not noticeable though.","commit_id":"bffe00b7722aad2e9a482a1991f5c9f29fb68b50"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"47a676fa279551e5f9840eb64d19b14bd6d9309f","unresolved":false,"context_lines":[{"line_number":317,"context_line":"        # destination vif config xml *except* for the guest PCI address."},{"line_number":318,"context_line":"        # NOTE(mriedem): Should we skip this if the type doesn\u0027t change?"},{"line_number":319,"context_line":"        conf_xml \u003d vif_config.to_xml()"},{"line_number":320,"context_line":"        LOG.debug(\u0027Updating guest XML with vif config: %s\u0027, conf_xml)"},{"line_number":321,"context_line":"        dest_interface_elem \u003d etree.XML(conf_xml, parser)"},{"line_number":322,"context_line":"        # Save off the hw address presented to the guest since that can\u0027t"},{"line_number":323,"context_line":"        # change during live migration."}],"source_content_type":"text/x-python","patch_set":28,"id":"5f7c97a3_99dc6018","line":320,"range":{"start_line":320,"start_character":8,"end_line":320,"end_character":69},"updated":"2018-07-02 15:34:02.000000000","message":"I would suggest to pass guest to your function so you can add the instance ID to get more context for your debug logs. (or you can extract it from the xml at the beginning.)","commit_id":"bffe00b7722aad2e9a482a1991f5c9f29fb68b50"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"14c42417925d8a79616dbb785ce26dd1625c7695","unresolved":false,"context_lines":[{"line_number":317,"context_line":"        # destination vif config xml *except* for the guest PCI address."},{"line_number":318,"context_line":"        # NOTE(mriedem): Should we skip this if the type doesn\u0027t change?"},{"line_number":319,"context_line":"        conf_xml \u003d vif_config.to_xml()"},{"line_number":320,"context_line":"        LOG.debug(\u0027Updating guest XML with vif config: %s\u0027, conf_xml)"},{"line_number":321,"context_line":"        dest_interface_elem \u003d etree.XML(conf_xml, parser)"},{"line_number":322,"context_line":"        # Save off the hw address presented to the guest since that can\u0027t"},{"line_number":323,"context_line":"        # change during live migration."}],"source_content_type":"text/x-python","patch_set":28,"id":"5f7c97a3_2e18441c","line":320,"range":{"start_line":320,"start_character":8,"end_line":320,"end_character":69},"in_reply_to":"5f7c97a3_9880c29e","updated":"2018-07-03 15:03:01.000000000","message":"Yes, fair enough.","commit_id":"bffe00b7722aad2e9a482a1991f5c9f29fb68b50"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0678b0cf8af9e197ebcbd85c45d49a6e72df4e2d","unresolved":false,"context_lines":[{"line_number":317,"context_line":"        # destination vif config xml *except* for the guest PCI address."},{"line_number":318,"context_line":"        # NOTE(mriedem): Should we skip this if the type doesn\u0027t change?"},{"line_number":319,"context_line":"        conf_xml \u003d vif_config.to_xml()"},{"line_number":320,"context_line":"        LOG.debug(\u0027Updating guest XML with vif config: %s\u0027, conf_xml)"},{"line_number":321,"context_line":"        dest_interface_elem \u003d etree.XML(conf_xml, parser)"},{"line_number":322,"context_line":"        # Save off the hw address presented to the guest since that can\u0027t"},{"line_number":323,"context_line":"        # change during live migration."}],"source_content_type":"text/x-python","patch_set":28,"id":"5f7c97a3_9880c29e","line":320,"range":{"start_line":320,"start_character":8,"end_line":320,"end_character":69},"in_reply_to":"5f7c97a3_99dc6018","updated":"2018-07-03 14:08:20.000000000","message":"The logs will have the request id from the context in them which I think is sufficient, but I can also parse out the uuid from the domain xml.","commit_id":"bffe00b7722aad2e9a482a1991f5c9f29fb68b50"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"47a676fa279551e5f9840eb64d19b14bd6d9309f","unresolved":false,"context_lines":[{"line_number":324,"context_line":"        address \u003d interface_dev.find(\u0027address\u0027)"},{"line_number":325,"context_line":"        # Now clear the interface\u0027s current elements and insert everything"},{"line_number":326,"context_line":"        # from the destination vif config xml."},{"line_number":327,"context_line":"        # NOTE(mriedem): There is probably a cleaner way to do this by"},{"line_number":328,"context_line":"        # updating the matching destination interface xml with the source"},{"line_number":329,"context_line":"        # hw address and then overwrite the source interface element by insert."},{"line_number":330,"context_line":"        interface_dev.clear()"},{"line_number":331,"context_line":"        # Insert attributes."},{"line_number":332,"context_line":"        for attr_name, attr_value in dest_interface_elem.items():"}],"source_content_type":"text/x-python","patch_set":28,"id":"5f7c97a3_d9a2d83f","line":329,"range":{"start_line":327,"start_character":8,"end_line":329,"end_character":79},"updated":"2018-07-02 15:34:02.000000000","message":"I think an other cleaner way would be to use our config objects.\n\nIf all of the config classes defined in libvirt/config.py have the parse_str() method so it would be possible to transform the xml_doc in a LibvirtconfigObject, then we could have some easy methods to do the replaces instead dealing with XML tree.","commit_id":"bffe00b7722aad2e9a482a1991f5c9f29fb68b50"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"6b1b36fbfb35dcaa5c1eb955360f6684a8ae1300","unresolved":false,"context_lines":[{"line_number":295,"context_line":"        mac \u003d mac if mac is not None else {}"},{"line_number":296,"context_line":"        mac_addr \u003d mac.get(\u0027address\u0027)"},{"line_number":297,"context_line":"        if mac_addr:"},{"line_number":298,"context_line":"            migrate_vif \u003d migrate_vif_by_mac[mac_addr]"},{"line_number":299,"context_line":"            vif \u003d migrate_vif.get_dest_vif()"},{"line_number":300,"context_line":"            # get_vif_config is a partial function of"},{"line_number":301,"context_line":"            # nova.virt.libvirt.vif.LibvirtGenericVIFDriver.get_config"}],"source_content_type":"text/x-python","patch_set":29,"id":"5f7c97a3_6ed86eef","line":298,"range":{"start_line":298,"start_character":12,"end_line":298,"end_character":54},"updated":"2018-07-04 07:05:11.000000000","message":"As indicated I would have converted the KeyError in a NovaException like you did line 308. Since it\u0027s a corner case I\u0027m not going to push also that you made the unittest.","commit_id":"9b3b6c057918383432718843f420881af3594adc"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"020c0fbdf982fdceb3cc1e2ac7a401356625d5e8","unresolved":false,"context_lines":[{"line_number":297,"context_line":"        if mac_addr:"},{"line_number":298,"context_line":"            migrate_vif \u003d migrate_vif_by_mac[mac_addr]"},{"line_number":299,"context_line":"            vif \u003d migrate_vif.get_dest_vif()"},{"line_number":300,"context_line":"            # get_vif_config is a partial function of"},{"line_number":301,"context_line":"            # nova.virt.libvirt.vif.LibvirtGenericVIFDriver.get_config"},{"line_number":302,"context_line":"            # with all but the \u0027vif\u0027 kwarg set already and returns a"},{"line_number":303,"context_line":"            # LibvirtConfigGuestInterface object."},{"line_number":304,"context_line":"            vif_config \u003d get_vif_config(vif\u003dvif)"},{"line_number":305,"context_line":"        else:"},{"line_number":306,"context_line":"            # This shouldn\u0027t happen but if it does, we need to abort the"}],"source_content_type":"text/x-python","patch_set":30,"id":"5f7c97a3_63b481f2","line":303,"range":{"start_line":300,"start_character":12,"end_line":303,"end_character":49},"updated":"2018-07-23 11:09:01.000000000","message":"That is more like a doc for the \u0027get_vif_config\u0027 param. of this function, so I would move it to there.","commit_id":"2b52cde565d542c03f004b48ee9c1a6a25f5b7cd"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"517cca7f384b8bf2c31b7f857e494b72f9cd0fb0","unresolved":false,"context_lines":[{"line_number":297,"context_line":"        if mac_addr:"},{"line_number":298,"context_line":"            migrate_vif \u003d migrate_vif_by_mac[mac_addr]"},{"line_number":299,"context_line":"            vif \u003d migrate_vif.get_dest_vif()"},{"line_number":300,"context_line":"            # get_vif_config is a partial function of"},{"line_number":301,"context_line":"            # nova.virt.libvirt.vif.LibvirtGenericVIFDriver.get_config"},{"line_number":302,"context_line":"            # with all but the \u0027vif\u0027 kwarg set already and returns a"},{"line_number":303,"context_line":"            # LibvirtConfigGuestInterface object."},{"line_number":304,"context_line":"            vif_config \u003d get_vif_config(vif\u003dvif)"},{"line_number":305,"context_line":"        else:"},{"line_number":306,"context_line":"            # This shouldn\u0027t happen but if it does, we need to abort the"}],"source_content_type":"text/x-python","patch_set":30,"id":"5f7c97a3_16b128e1","line":303,"range":{"start_line":300,"start_character":12,"end_line":303,"end_character":49},"in_reply_to":"5f7c97a3_63b481f2","updated":"2018-07-24 14:54:22.000000000","message":"I dunno, this seems like a reasonable place to me, right when we\u0027re going to use it.","commit_id":"2b52cde565d542c03f004b48ee9c1a6a25f5b7cd"}]}
