)]}'
{"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d0e3e75c5f1d1d661b15bb81faaa32d79c8c907b","unresolved":false,"context_lines":[{"line_number":7516,"context_line":"        instance \u003d objects.Instance(**self.test_instance)"},{"line_number":7517,"context_line":"        drvr._live_migration_operation(self.context, instance, \u0027dest\u0027,"},{"line_number":7518,"context_line":"                          True, migrate_data, dom, disk_paths)"},{"line_number":7519,"context_line":"        mock_migrateToURI3.assert_called_once_with("},{"line_number":7520,"context_line":"            drvr._live_migration_uri(\u0027dest\u0027),"},{"line_number":7521,"context_line":"            params\u003dparams,"},{"line_number":7522,"context_line":"            flags\u003ddrvr._block_migration_flags)"}],"source_content_type":"text/x-python","patch_set":12,"id":"7aa08908_e8a476ba","line":7519,"range":{"start_line":7519,"start_character":8,"end_line":7519,"end_character":26},"updated":"2016-06-09 18:01:02.000000000","message":"nit: I know the existing test is doing this too, but it\u0027s a bit gross to be mocking the thing that\u0027s called within Guest.migrate - we really should just mock Guest.migrate and assert the call to that, but I don\u0027t want to hold this up right now on making that change.","commit_id":"56f8ef982cafbae5770ea6552642fcee872eb5ed"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8e188b3e24c21243fd74cbc736a04968a1e376a9","unresolved":false,"context_lines":[{"line_number":7516,"context_line":"        instance \u003d objects.Instance(**self.test_instance)"},{"line_number":7517,"context_line":"        drvr._live_migration_operation(self.context, instance, \u0027dest\u0027,"},{"line_number":7518,"context_line":"                          True, migrate_data, dom, disk_paths)"},{"line_number":7519,"context_line":"        mock_migrateToURI3.assert_called_once_with("},{"line_number":7520,"context_line":"            drvr._live_migration_uri(\u0027dest\u0027),"},{"line_number":7521,"context_line":"            params\u003dparams,"},{"line_number":7522,"context_line":"            flags\u003ddrvr._block_migration_flags)"}],"source_content_type":"text/x-python","patch_set":12,"id":"7aa08908_cc92679f","line":7519,"range":{"start_line":7519,"start_character":8,"end_line":7519,"end_character":26},"in_reply_to":"7aa08908_e8a476ba","updated":"2016-06-09 20:08:45.000000000","message":"BTW, this is busted:\n\nhttp://logs.openstack.org/86/327886/2/check/gate-nova-python27-db/d93442c/console.html#_2016-06-09_19_25_42_729","commit_id":"56f8ef982cafbae5770ea6552642fcee872eb5ed"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"f4e6d802e0d625816d2658fb98d7928bb98371ad","unresolved":false,"context_lines":[{"line_number":6044,"context_line":"                    # implemented for tunneled migration. This is urgly but"},{"line_number":6045,"context_line":"                    # we need to remove this flag only block migration"},{"line_number":6046,"context_line":"                    # and with migrateToURI3"},{"line_number":6047,"context_line":"                    if migrate_data.block_migration:"},{"line_number":6048,"context_line":"                        migration_flags \u0026\u003d ~libvirt.VIR_MIGRATE_TUNNELLED"},{"line_number":6049,"context_line":"                    dom.migrateToURI3("},{"line_number":6050,"context_line":"                        self._live_migration_uri(dest),"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_757404ce","line":6047,"range":{"start_line":6047,"start_character":20,"end_line":6047,"end_character":52},"updated":"2016-04-29 02:52:12.000000000","message":"So, if we are block_migration and has VIR_MIGRATE_TUNNELLED, we can not use dom.migrateToURI3 but  dom.migrateToURI2, just did a quick test on it.","commit_id":"4a79731cc0a052cd2317cc1fc3f44d62b9e639a8"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"7ea7a4d5cc2810ed1670dd5f71c70130218a6465","unresolved":false,"context_lines":[{"line_number":6045,"context_line":"                    # we need to remove this flag only block migration"},{"line_number":6046,"context_line":"                    # and with migrateToURI3"},{"line_number":6047,"context_line":"                    if migrate_data.block_migration:"},{"line_number":6048,"context_line":"                        migration_flags \u0026\u003d ~libvirt.VIR_MIGRATE_TUNNELLED"},{"line_number":6049,"context_line":"                    dom.migrateToURI3("},{"line_number":6050,"context_line":"                        self._live_migration_uri(dest),"},{"line_number":6051,"context_line":"                        params,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_fd32cdf0","line":6048,"updated":"2016-04-28 14:27:17.000000000","message":"We cannot remove VIR_MIGRATE_TUNNELLED this way. It is a potential security issue.\n\nHere you should fallback to migrateToURI2 in case device_names list is empty instead of removing VIR_MIGRATE_TUNNELLED flag.\n\nAlso we have this new flag called live_migration_tunnelled. When it is set to \u0027None\u0027 nova should choose suitable method for encrypting data transferred between hosts. This is a good point to start with implementing logic for \u0027None\u0027 value.","commit_id":"4a79731cc0a052cd2317cc1fc3f44d62b9e639a8"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"9cb9985dfc6ea6e41bd24dd9cd66cc7a944dec79","unresolved":false,"context_lines":[{"line_number":6045,"context_line":"                    # we need to remove this flag only block migration"},{"line_number":6046,"context_line":"                    # and with migrateToURI3"},{"line_number":6047,"context_line":"                    if migrate_data.block_migration:"},{"line_number":6048,"context_line":"                        migration_flags \u0026\u003d ~libvirt.VIR_MIGRATE_TUNNELLED"},{"line_number":6049,"context_line":"                    dom.migrateToURI3("},{"line_number":6050,"context_line":"                        self._live_migration_uri(dest),"},{"line_number":6051,"context_line":"                        params,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_355bac87","line":6048,"in_reply_to":"1a122d0e_956a80b1","updated":"2016-04-29 02:41:37.000000000","message":"device_names is not empty if block migration. beside, if we passing a [] to \u0027migrate_disks\u0027, libvirt will do right thing.","commit_id":"4a79731cc0a052cd2317cc1fc3f44d62b9e639a8"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"5508d62071ede89120bcbf8129bc280242a91860","unresolved":false,"context_lines":[{"line_number":6045,"context_line":"                    # we need to remove this flag only block migration"},{"line_number":6046,"context_line":"                    # and with migrateToURI3"},{"line_number":6047,"context_line":"                    if migrate_data.block_migration:"},{"line_number":6048,"context_line":"                        migration_flags \u0026\u003d ~libvirt.VIR_MIGRATE_TUNNELLED"},{"line_number":6049,"context_line":"                    dom.migrateToURI3("},{"line_number":6050,"context_line":"                        self._live_migration_uri(dest),"},{"line_number":6051,"context_line":"                        params,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_956a80b1","line":6048,"in_reply_to":"1a122d0e_eba67aa9","updated":"2016-04-29 01:21:25.000000000","message":"Let me do a test on this.","commit_id":"4a79731cc0a052cd2317cc1fc3f44d62b9e639a8"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"3341484882c69ab603a946691982197082e293cc","unresolved":false,"context_lines":[{"line_number":6045,"context_line":"                    # we need to remove this flag only block migration"},{"line_number":6046,"context_line":"                    # and with migrateToURI3"},{"line_number":6047,"context_line":"                    if migrate_data.block_migration:"},{"line_number":6048,"context_line":"                        migration_flags \u0026\u003d ~libvirt.VIR_MIGRATE_TUNNELLED"},{"line_number":6049,"context_line":"                    dom.migrateToURI3("},{"line_number":6050,"context_line":"                        self._live_migration_uri(dest),"},{"line_number":6051,"context_line":"                        params,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_eba67aa9","line":6048,"in_reply_to":"1a122d0e_fd32cdf0","updated":"2016-04-28 22:12:18.000000000","message":"Another idea is to not pass \u0027migrate_disks\u0027 parameter when device_names is empty.","commit_id":"4a79731cc0a052cd2317cc1fc3f44d62b9e639a8"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"9cb9985dfc6ea6e41bd24dd9cd66cc7a944dec79","unresolved":false,"context_lines":[{"line_number":6045,"context_line":"                    # we need to remove this flag only block migration"},{"line_number":6046,"context_line":"                    # and with migrateToURI3"},{"line_number":6047,"context_line":"                    if migrate_data.block_migration:"},{"line_number":6048,"context_line":"                        migration_flags \u0026\u003d ~libvirt.VIR_MIGRATE_TUNNELLED"},{"line_number":6049,"context_line":"                    dom.migrateToURI3("},{"line_number":6050,"context_line":"                        self._live_migration_uri(dest),"},{"line_number":6051,"context_line":"                        params,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_f5649449","line":6048,"in_reply_to":"1a122d0e_fd32cdf0","updated":"2016-04-29 02:41:37.000000000","message":"If you are doing block migration , device_names should not be empty.\n\nFor live_migration_tunnelled, there is _handle_live_migration_tunnelled to do this. I will consider to handle flags there, but I don\u0027t think that makes sense since we can only konw what kinds of migration(block migration or not) when the live migration operation started.","commit_id":"4a79731cc0a052cd2317cc1fc3f44d62b9e639a8"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"f4e6d802e0d625816d2658fb98d7928bb98371ad","unresolved":false,"context_lines":[{"line_number":6467,"context_line":"        disk_paths \u003d []"},{"line_number":6468,"context_line":"        device_names \u003d []"},{"line_number":6469,"context_line":"        if migrate_data.block_migration:"},{"line_number":6470,"context_line":"            disk_paths, device_names \u003d self._live_migration_copy_disk_paths("},{"line_number":6471,"context_line":"                context, instance, guest)"},{"line_number":6472,"context_line":""},{"line_number":6473,"context_line":"        # TODO(sahid): We are converting all calls from a"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_d5e358a2","line":6470,"range":{"start_line":6470,"start_character":24,"end_line":6470,"end_character":36},"updated":"2016-04-29 02:52:12.000000000","message":"only block_migration has device_names.","commit_id":"4a79731cc0a052cd2317cc1fc3f44d62b9e639a8"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"e641e7d16f1b0ba0314f59fea2b59db1b6cc8b2e","unresolved":false,"context_lines":[{"line_number":6039,"context_line":"                # implemented for tunneled migration. So we can"},{"line_number":6040,"context_line":"                # not use migrateToURI3 to do block_migration"},{"line_number":6041,"context_line":"                # with VIR_MIGRATE_TUNNELLED flag"},{"line_number":6042,"context_line":"                if (migrate_data.block_migration and"},{"line_number":6043,"context_line":"                    (migration_flags \u0026 libvirt.VIR_MIGRATE_TUNNELLED) !\u003d 0):"},{"line_number":6044,"context_line":"                    tunneled_migration_supported \u003d False"},{"line_number":6045,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_456becf1","line":6042,"range":{"start_line":6042,"start_character":19,"end_line":6042,"end_character":48},"updated":"2016-05-01 12:32:00.000000000","message":"hi Pawel, do you mean\nif (device_names and (migration_flags \u0026 libvirt.VIR_MIGRATE_TUNNELLED) !\u003d 0):\n   ...","commit_id":"055e180a5fd9cf365703deda4f1d1477ee453ec3"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"e86ccb8efeb21f0363d9d2f8b4642841368a0037","unresolved":false,"context_lines":[{"line_number":6045,"context_line":""},{"line_number":6046,"context_line":"                if (tunneled_migration_supported and"},{"line_number":6047,"context_line":"                    self._host.has_min_version("},{"line_number":6048,"context_line":"                    MIN_LIBVIRT_BLOCK_LM_WITH_VOLUMES_VERSION)):"},{"line_number":6049,"context_line":"                    params \u003d {"},{"line_number":6050,"context_line":"                        \u0027bandwidth\u0027: CONF.libvirt.live_migration_bandwidth,"},{"line_number":6051,"context_line":"                        \u0027destination_xml\u0027: new_xml_str,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_a18e5476","line":6048,"updated":"2016-04-29 14:19:46.000000000","message":"This condition introduces another bug, so that in case of device_names is not an empty list it will result in volumes being copied to themselves.\n\nYou should rather go for something like:\n\nif self._host.has_min_version(...) and device_names\n\nFor every non-block migration device_names is always empty, so you don\u0027t need to check block_migration flag there. In case that devices_names contains any data we need to use migrateToURI3.","commit_id":"055e180a5fd9cf365703deda4f1d1477ee453ec3"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"e6716c4b4e4e36bcd9d33ed9f21a5fcbf837ab73","unresolved":false,"context_lines":[{"line_number":6040,"context_line":"                # not use migrateToURI3 to do block_migration"},{"line_number":6041,"context_line":"                # with VIR_MIGRATE_TUNNELLED flag"},{"line_number":6042,"context_line":"                if ((len(device_names) \u003e 0) and"},{"line_number":6043,"context_line":"                    (migration_flags \u0026 libvirt.VIR_MIGRATE_TUNNELLED) !\u003d 0):"},{"line_number":6044,"context_line":"                    tunneled_migration_supported \u003d False"},{"line_number":6045,"context_line":""},{"line_number":6046,"context_line":"                if (tunneled_migration_supported and"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_c09dc658","line":6043,"updated":"2016-05-04 15:49:38.000000000","message":"There is a bug in this condition. If an instance has additional volumes attached (device_names \u003e 1) and tunnelling is on it will fallback to migrateToURI2.\n\nBasically if len(device_names) \u003e 1 we always need to use migrateToURI3 even when tunneling is on. We cannot use migrateToURI2 for VMs with additional volumes attached because it is buggy and copies volumes to themselves.","commit_id":"19179eec2abc9f276f7d886233bf62f87d1c4bd3"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"9e07dc7d8d9943e309f448c3b38f29b750f20da8","unresolved":false,"context_lines":[{"line_number":6040,"context_line":"                # not use migrateToURI3 to do block_migration"},{"line_number":6041,"context_line":"                # with VIR_MIGRATE_TUNNELLED flag"},{"line_number":6042,"context_line":"                if ((len(device_names) \u003e 0) and"},{"line_number":6043,"context_line":"                    (migration_flags \u0026 libvirt.VIR_MIGRATE_TUNNELLED) !\u003d 0):"},{"line_number":6044,"context_line":"                    tunneled_migration_supported \u003d False"},{"line_number":6045,"context_line":""},{"line_number":6046,"context_line":"                if (tunneled_migration_supported and"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_e499bf6e","line":6043,"in_reply_to":"1a122d0e_22a0ebf3","updated":"2016-05-05 15:51:54.000000000","message":"Selective disk migration does not work when tunnelling is enabled and it is okay to throw such exception. We cannot use migrateToURI2 for VMs with additional volumes because we will once again run into this bug: https://bugs.launchpad.net/nova/+bug/1398999","commit_id":"19179eec2abc9f276f7d886233bf62f87d1c4bd3"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"243b6fd44ca008481b497182eeed961fcc18568f","unresolved":false,"context_lines":[{"line_number":6040,"context_line":"                # not use migrateToURI3 to do block_migration"},{"line_number":6041,"context_line":"                # with VIR_MIGRATE_TUNNELLED flag"},{"line_number":6042,"context_line":"                if ((len(device_names) \u003e 0) and"},{"line_number":6043,"context_line":"                    (migration_flags \u0026 libvirt.VIR_MIGRATE_TUNNELLED) !\u003d 0):"},{"line_number":6044,"context_line":"                    tunneled_migration_supported \u003d False"},{"line_number":6045,"context_line":""},{"line_number":6046,"context_line":"                if (tunneled_migration_supported and"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_22a0ebf3","line":6043,"in_reply_to":"1a122d0e_c09dc658","updated":"2016-05-05 01:00:32.000000000","message":"hi Pawel thanks for your comments,\ncan you reply your suggestion to fix this bug https://launchpad.net/bugs/1576093 .\n\nIf we enabled tunneling and len(device_names)\u003e1 libvirt will report \"Selecting disks to migrate is not implemented for tunneled migration\". I wonder why you say we should using migrateToURI3 in such case.","commit_id":"19179eec2abc9f276f7d886233bf62f87d1c4bd3"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"c8236db16510ee5079d2f23861a8ce0ba773a727","unresolved":false,"context_lines":[{"line_number":6040,"context_line":"                # not use migrateToURI3 to do block_migration"},{"line_number":6041,"context_line":"                # with VIR_MIGRATE_TUNNELLED flag"},{"line_number":6042,"context_line":"                if ((len(device_names) \u003e 0) and"},{"line_number":6043,"context_line":"                    (migration_flags \u0026 libvirt.VIR_MIGRATE_TUNNELLED) !\u003d 0):"},{"line_number":6044,"context_line":"                    tunneled_migration_supported \u003d False"},{"line_number":6045,"context_line":""},{"line_number":6046,"context_line":"                if (tunneled_migration_supported and"}],"source_content_type":"text/x-python","patch_set":3,"id":"dab17558_d05fb573","line":6043,"in_reply_to":"1a122d0e_e499bf6e","updated":"2016-05-06 02:28:43.000000000","message":"thanks Pawel,\nokay, so your suggestion is just throw exception in such case in stead of silent removing VIR_MIGRATE_TUNNELLED ?\n\nThe logic here is so much confusing, I need to have some rethinking.","commit_id":"19179eec2abc9f276f7d886233bf62f87d1c4bd3"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"651b5bd119d686e8ebe5a553ef7df8b649a58d57","unresolved":false,"context_lines":[{"line_number":5801,"context_line":"        guest \u003d libvirt_guest.Guest(dom)"},{"line_number":5802,"context_line":""},{"line_number":5803,"context_line":"        try:"},{"line_number":5804,"context_line":"            if migrate_data.block_migration:"},{"line_number":5805,"context_line":"                migration_flags \u003d self._block_migration_flags"},{"line_number":5806,"context_line":"            else:"},{"line_number":5807,"context_line":"                migration_flags \u003d self._live_migration_flags"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_1a6ddccc","line":5804,"updated":"2016-05-12 09:29:37.000000000","message":"here","commit_id":"9f4a80b270abb39420c21e8fb87e4b8e1dc18ea3"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"0207733c690d1771d06e7c027e9835c756ab672b","unresolved":false,"context_lines":[{"line_number":5801,"context_line":"        guest \u003d libvirt_guest.Guest(dom)"},{"line_number":5802,"context_line":""},{"line_number":5803,"context_line":"        try:"},{"line_number":5804,"context_line":"            if migrate_data.block_migration:"},{"line_number":5805,"context_line":"                migration_flags \u003d self._block_migration_flags"},{"line_number":5806,"context_line":"            else:"},{"line_number":5807,"context_line":"                migration_flags \u003d self._live_migration_flags"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_7aeea8b5","line":5804,"in_reply_to":"dab17558_1a6ddccc","updated":"2016-05-12 09:34:21.000000000","message":"self._live_migration_flags is a private property that is set during init_host and it contains already calculated migration flags. We can use this property earlier to check if tunnelling is turned on.","commit_id":"9f4a80b270abb39420c21e8fb87e4b8e1dc18ea3"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"39ebe6d3499526a4977018ca91db53b8eb1d86c5","unresolved":false,"context_lines":[{"line_number":5833,"context_line":"                                               serial_listen_addr)"},{"line_number":5834,"context_line":"                if self._host.has_min_version("},{"line_number":5835,"context_line":"                        MIN_LIBVIRT_BLOCK_LM_WITH_VOLUMES_VERSION):"},{"line_number":5836,"context_line":"                    if ((len(device_names) \u003e 0) and"},{"line_number":5837,"context_line":"                        (migration_flags \u0026"},{"line_number":5838,"context_line":"                         libvirt.VIR_MIGRATE_TUNNELLED !\u003d 0)):"},{"line_number":5839,"context_line":"                        raise exception.TunnelledLiveMigrationNotSupported()"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_94924a4a","line":5836,"updated":"2016-05-12 07:28:16.000000000","message":"This does not solve issue when len(device_names) \u003d\u003d 0 and libvirt \u003e\u003d 1.2.17 is used. It will still result in an exception. This should be more like:\n\nif self._host.has_min_version(MIN_LIBVIRT_BLOCK_LM_WITH_VOLUMES_VERSION) and len(device_names) \u003e 0:\n migrateToURI3\nelse:\n migrateToURI2","commit_id":"9f4a80b270abb39420c21e8fb87e4b8e1dc18ea3"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"39ebe6d3499526a4977018ca91db53b8eb1d86c5","unresolved":false,"context_lines":[{"line_number":6269,"context_line":"        if migrate_data.block_migration:"},{"line_number":6270,"context_line":"            disk_paths, device_names \u003d self._live_migration_copy_disk_paths("},{"line_number":6271,"context_line":"                context, instance, guest)"},{"line_number":6272,"context_line":""},{"line_number":6273,"context_line":"        # TODO(sahid): We are converting all calls from a"},{"line_number":6274,"context_line":"        # virDomain object to use nova.virt.libvirt.Guest."},{"line_number":6275,"context_line":"        # We should be able to remove dom at the end."}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_d4b332e8","line":6272,"updated":"2016-05-12 07:28:16.000000000","message":"Here we should check:\nif tunnelling \u003d\u003d 1 and device_names:\n raise exception","commit_id":"9f4a80b270abb39420c21e8fb87e4b8e1dc18ea3"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"b1186fe0737d56fcdeefea81e157a0eb177b7ea2","unresolved":false,"context_lines":[{"line_number":6269,"context_line":"        if migrate_data.block_migration:"},{"line_number":6270,"context_line":"            disk_paths, device_names \u003d self._live_migration_copy_disk_paths("},{"line_number":6271,"context_line":"                context, instance, guest)"},{"line_number":6272,"context_line":""},{"line_number":6273,"context_line":"        # TODO(sahid): We are converting all calls from a"},{"line_number":6274,"context_line":"        # virDomain object to use nova.virt.libvirt.Guest."},{"line_number":6275,"context_line":"        # We should be able to remove dom at the end."}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_8a494d91","line":6272,"in_reply_to":"dab17558_d4b332e8","updated":"2016-05-13 01:24:18.000000000","message":"In this case, we can not use tunnel migration for block migration, is the acceptable?\n\ncan we use migrateToURI2 just what we did before?\n\nI am kinds of lost.","commit_id":"9f4a80b270abb39420c21e8fb87e4b8e1dc18ea3"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"ad0ad4b97ec96a450222921600127dff6cbb8958","unresolved":false,"context_lines":[{"line_number":6269,"context_line":"        if migrate_data.block_migration:"},{"line_number":6270,"context_line":"            disk_paths, device_names \u003d self._live_migration_copy_disk_paths("},{"line_number":6271,"context_line":"                context, instance, guest)"},{"line_number":6272,"context_line":""},{"line_number":6273,"context_line":"        # TODO(sahid): We are converting all calls from a"},{"line_number":6274,"context_line":"        # virDomain object to use nova.virt.libvirt.Guest."},{"line_number":6275,"context_line":"        # We should be able to remove dom at the end."}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_f0c0cc7e","line":6272,"in_reply_to":"dab17558_d4b332e8","updated":"2016-05-13 02:28:59.000000000","message":"The logic is wrong, if we want to check if block migration with cinder, we still need to check the length of block device mapping.","commit_id":"9f4a80b270abb39420c21e8fb87e4b8e1dc18ea3"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"651b5bd119d686e8ebe5a553ef7df8b649a58d57","unresolved":false,"context_lines":[{"line_number":6269,"context_line":"        if migrate_data.block_migration:"},{"line_number":6270,"context_line":"            disk_paths, device_names \u003d self._live_migration_copy_disk_paths("},{"line_number":6271,"context_line":"                context, instance, guest)"},{"line_number":6272,"context_line":""},{"line_number":6273,"context_line":"        # TODO(sahid): We are converting all calls from a"},{"line_number":6274,"context_line":"        # virDomain object to use nova.virt.libvirt.Guest."},{"line_number":6275,"context_line":"        # We should be able to remove dom at the end."}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_9ab8ac2c","line":6272,"in_reply_to":"dab17558_d4b332e8","updated":"2016-05-12 09:29:37.000000000","message":"We don\u0027t know flags yet here. migration_flags is from line","commit_id":"9f4a80b270abb39420c21e8fb87e4b8e1dc18ea3"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"002ad435c1a3205cdbbfe12f453a4393069929c1","unresolved":false,"context_lines":[{"line_number":5377,"context_line":"                    raise exception.MigrationPreCheckError(reason\u003dmsg)"},{"line_number":5378,"context_line":"                # Notes(eliqiao): Tunnelled block migration is not"},{"line_number":5379,"context_line":"                # supported with volume:"},{"line_number":5380,"context_line":"                # 1. migrateToURI2 will lead copy volume to them selives"},{"line_number":5381,"context_line":"                # 2. migrateToURI3 doesn\u0027t implement selecting disks for"},{"line_number":5382,"context_line":"                #     tunnelled migrate"},{"line_number":5383,"context_line":"                if (bdm and"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_788e227a","line":5380,"range":{"start_line":5380,"start_character":60,"end_line":5380,"end_character":72},"updated":"2016-05-17 09:23:24.000000000","message":"themselves","commit_id":"90c7ad7b47af8c7c803f4f0da51efc8645f6060d"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"002ad435c1a3205cdbbfe12f453a4393069929c1","unresolved":false,"context_lines":[{"line_number":5379,"context_line":"                # supported with volume:"},{"line_number":5380,"context_line":"                # 1. migrateToURI2 will lead copy volume to them selives"},{"line_number":5381,"context_line":"                # 2. migrateToURI3 doesn\u0027t implement selecting disks for"},{"line_number":5382,"context_line":"                #     tunnelled migrate"},{"line_number":5383,"context_line":"                if (bdm and"},{"line_number":5384,"context_line":"                    (self._block_migration_flags \u0026"},{"line_number":5385,"context_line":"                     libvirt.VIR_MIGRATE_TUNNELLED !\u003d 0)):"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_98ef861d","line":5382,"range":{"start_line":5382,"start_character":32,"end_line":5382,"end_character":39},"updated":"2016-05-17 09:23:24.000000000","message":"migration","commit_id":"90c7ad7b47af8c7c803f4f0da51efc8645f6060d"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"002ad435c1a3205cdbbfe12f453a4393069929c1","unresolved":false,"context_lines":[{"line_number":5382,"context_line":"                #     tunnelled migrate"},{"line_number":5383,"context_line":"                if (bdm and"},{"line_number":5384,"context_line":"                    (self._block_migration_flags \u0026"},{"line_number":5385,"context_line":"                     libvirt.VIR_MIGRATE_TUNNELLED !\u003d 0)):"},{"line_number":5386,"context_line":"                    msg \u003d (_(\u0027Cannot block migrate instance %s with \u0027"},{"line_number":5387,"context_line":"                             \u0027mapped volumes with VIR_MIGRATE_TUNNELLED flag, \u0027"},{"line_number":5388,"context_line":"                             \u0027selecting disks to migrate is not implemented \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_6c758e30","line":5385,"updated":"2016-05-17 09:23:24.000000000","message":"This check is OK, it will make sure that we won\u0027t proceed if instance has mapped volumes and tunnelling is on.","commit_id":"90c7ad7b47af8c7c803f4f0da51efc8645f6060d"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"002ad435c1a3205cdbbfe12f453a4393069929c1","unresolved":false,"context_lines":[{"line_number":5384,"context_line":"                    (self._block_migration_flags \u0026"},{"line_number":5385,"context_line":"                     libvirt.VIR_MIGRATE_TUNNELLED !\u003d 0)):"},{"line_number":5386,"context_line":"                    msg \u003d (_(\u0027Cannot block migrate instance %s with \u0027"},{"line_number":5387,"context_line":"                             \u0027mapped volumes with VIR_MIGRATE_TUNNELLED flag, \u0027"},{"line_number":5388,"context_line":"                             \u0027selecting disks to migrate is not implemented \u0027"},{"line_number":5389,"context_line":"                             \u0027for tunneled migration. Please consider remove \u0027"},{"line_number":5390,"context_line":"                             \u0027live_migration_tunnelled\u003dTrue\u0027),"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_b827eab4","line":5387,"range":{"start_line":5387,"start_character":50,"end_line":5387,"end_character":71},"updated":"2016-05-17 09:23:24.000000000","message":"We should avoid using VIR_MIGRATE_TUNNELLED, because now we have configuration option live_migration_tunnelled to cover security aspect of live migration. Also I think that we can rephrase it a bit, e.g., \"Block live migration of an instance with mapped volumes does not work when live_migration_tunnelled is set to True.\"","commit_id":"90c7ad7b47af8c7c803f4f0da51efc8645f6060d"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"fdcdfdfebfdfe81e32cf6233ea19c3fc00d12bb1","unresolved":false,"context_lines":[{"line_number":5753,"context_line":"                    # Notes(eliqiao): Fall back to migrateToURI2 if has"},{"line_number":5754,"context_line":"                    # VIR_MIGRATE_TUNNELLED  due to migrateToURI3 doesn\u0027t"},{"line_number":5755,"context_line":"                    # implement selecting disks to for tunneled"},{"line_number":5756,"context_line":"                    if (len(device_names) \u003e 0 and"},{"line_number":5757,"context_line":"                        (migration_flags \u0026"},{"line_number":5758,"context_line":"                         libvirt.VIR_MIGRATE_TUNNELLED !\u003d 0)):"},{"line_number":5759,"context_line":"                        dom.migrateToURI2("}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_29cae5a1","line":5756,"range":{"start_line":5756,"start_character":24,"end_line":5756,"end_character":45},"updated":"2016-05-13 08:40:15.000000000","message":"Do we need to check it there?","commit_id":"90c7ad7b47af8c7c803f4f0da51efc8645f6060d"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"684aa54c7f0ffb64db744d10e9d9ba58fececbee","unresolved":false,"context_lines":[{"line_number":5753,"context_line":"                    # Notes(eliqiao): Fall back to migrateToURI2 if has"},{"line_number":5754,"context_line":"                    # VIR_MIGRATE_TUNNELLED  due to migrateToURI3 doesn\u0027t"},{"line_number":5755,"context_line":"                    # implement selecting disks to for tunneled"},{"line_number":5756,"context_line":"                    if (len(device_names) \u003e 0 and"},{"line_number":5757,"context_line":"                        (migration_flags \u0026"},{"line_number":5758,"context_line":"                         libvirt.VIR_MIGRATE_TUNNELLED !\u003d 0)):"},{"line_number":5759,"context_line":"                        dom.migrateToURI2("}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_f3c16881","line":5756,"range":{"start_line":5756,"start_character":24,"end_line":5756,"end_character":45},"in_reply_to":"dab17558_29cae5a1","updated":"2016-05-17 06:11:28.000000000","message":"yes, we do, libvirt cares about {\u0027migrate_disks\u0027: device_names}, if device_names is not [], will raise exception.\n\nThese still cases, which are using shared storage (device_names\u003d0), we should let them pass(using migrateToURI3)","commit_id":"90c7ad7b47af8c7c803f4f0da51efc8645f6060d"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"002ad435c1a3205cdbbfe12f453a4393069929c1","unresolved":false,"context_lines":[{"line_number":5753,"context_line":"                    # Notes(eliqiao): Fall back to migrateToURI2 if has"},{"line_number":5754,"context_line":"                    # VIR_MIGRATE_TUNNELLED  due to migrateToURI3 doesn\u0027t"},{"line_number":5755,"context_line":"                    # implement selecting disks to for tunneled"},{"line_number":5756,"context_line":"                    if (len(device_names) \u003e 0 and"},{"line_number":5757,"context_line":"                        (migration_flags \u0026"},{"line_number":5758,"context_line":"                         libvirt.VIR_MIGRATE_TUNNELLED !\u003d 0)):"},{"line_number":5759,"context_line":"                        dom.migrateToURI2("}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_47e18529","line":5756,"range":{"start_line":5756,"start_character":24,"end_line":5756,"end_character":45},"in_reply_to":"dab17558_f3c16881","updated":"2016-05-17 09:23:24.000000000","message":"I just tested it and looks like we don\u0027t need this check there. We also can simplify this a bit. You can try this sample here, it worked for me in every case:\nhttp://paste.openstack.org/show/rar7AZEGTqzMVkp0wUNI/","commit_id":"90c7ad7b47af8c7c803f4f0da51efc8645f6060d"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"0d5b7a9dcf504166ff9f30d12da924b1ff8940be","unresolved":false,"context_lines":[{"line_number":5379,"context_line":"                if (bdm and"},{"line_number":5380,"context_line":"                    (self._block_migration_flags \u0026"},{"line_number":5381,"context_line":"                     libvirt.VIR_MIGRATE_TUNNELLED !\u003d 0)):"},{"line_number":5382,"context_line":"                    msg \u003d (_(\u0027Block live migration of instance %s with \u0027"},{"line_number":5383,"context_line":"                             \u0027mapped volumes with live_migration_tunnelled\u003d\u0027"},{"line_number":5384,"context_line":"                             \u0027True\u0027), instance.uuid)"},{"line_number":5385,"context_line":"                    LOG.error(msg, instance\u003dinstance)"},{"line_number":5386,"context_line":"                    raise exception.MigrationPreCheckError(reason\u003dmsg)"},{"line_number":5387,"context_line":"        elif not (dest_check_data.is_shared_block_storage or"}],"source_content_type":"text/x-python","patch_set":7,"id":"bab6814e_26c3cb8a","line":5384,"range":{"start_line":5382,"start_character":29,"end_line":5384,"end_character":37},"updated":"2016-05-20 16:05:46.000000000","message":"the message is not clear, what about something more similar to the message we have at line 5367, e.g.:\n\"Cannot block migrate instance with mapped volumes in tunnel mode\" ...or something similar","commit_id":"25684bb299db111cbecfb0687fc12a9cee934bd5"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"fb92debe585aa009e2ece54fb47f7d8307c146f1","unresolved":false,"context_lines":[{"line_number":5379,"context_line":"                if (bdm and"},{"line_number":5380,"context_line":"                    (self._block_migration_flags \u0026"},{"line_number":5381,"context_line":"                     libvirt.VIR_MIGRATE_TUNNELLED !\u003d 0)):"},{"line_number":5382,"context_line":"                    msg \u003d (_(\u0027Block live migration of instance %s with \u0027"},{"line_number":5383,"context_line":"                             \u0027mapped volumes with live_migration_tunnelled\u003d\u0027"},{"line_number":5384,"context_line":"                             \u0027True\u0027), instance.uuid)"},{"line_number":5385,"context_line":"                    LOG.error(msg, instance\u003dinstance)"},{"line_number":5386,"context_line":"                    raise exception.MigrationPreCheckError(reason\u003dmsg)"},{"line_number":5387,"context_line":"        elif not (dest_check_data.is_shared_block_storage or"}],"source_content_type":"text/x-python","patch_set":7,"id":"bab6814e_11fe91ad","line":5384,"range":{"start_line":5382,"start_character":29,"end_line":5384,"end_character":37},"in_reply_to":"bab6814e_26c3cb8a","updated":"2016-05-23 08:27:59.000000000","message":"Done","commit_id":"25684bb299db111cbecfb0687fc12a9cee934bd5"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"0d5b7a9dcf504166ff9f30d12da924b1ff8940be","unresolved":false,"context_lines":[{"line_number":5755,"context_line":"                    # even when an instance does not have volumes mapped."},{"line_number":5756,"context_line":"                    # This is because selective disk migration is not"},{"line_number":5757,"context_line":"                    # supported in tunnelled block live migration"},{"line_number":5758,"context_line":"                    if (migration_flags \u0026"},{"line_number":5759,"context_line":"                        libvirt.VIR_MIGRATE_TUNNELLED !\u003d 0):"},{"line_number":5760,"context_line":"                        params.pop(\u0027migrate_disks\u0027)"},{"line_number":5761,"context_line":""},{"line_number":5762,"context_line":"                    dom.migrateToURI3("},{"line_number":5763,"context_line":"                        self._live_migration_uri(dest),"}],"source_content_type":"text/x-python","patch_set":7,"id":"bab6814e_46608f01","line":5760,"range":{"start_line":5758,"start_character":0,"end_line":5760,"end_character":51},"updated":"2016-05-20 16:05:46.000000000","message":"can we test this logic? then we are guarantee that with a failure if something change here.\nAll the logic is quite confusing/complicated and I\u0027d like to have every single line covered by a test to catch any changes in this area.","commit_id":"25684bb299db111cbecfb0687fc12a9cee934bd5"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"fb92debe585aa009e2ece54fb47f7d8307c146f1","unresolved":false,"context_lines":[{"line_number":5755,"context_line":"                    # even when an instance does not have volumes mapped."},{"line_number":5756,"context_line":"                    # This is because selective disk migration is not"},{"line_number":5757,"context_line":"                    # supported in tunnelled block live migration"},{"line_number":5758,"context_line":"                    if (migration_flags \u0026"},{"line_number":5759,"context_line":"                        libvirt.VIR_MIGRATE_TUNNELLED !\u003d 0):"},{"line_number":5760,"context_line":"                        params.pop(\u0027migrate_disks\u0027)"},{"line_number":5761,"context_line":""},{"line_number":5762,"context_line":"                    dom.migrateToURI3("},{"line_number":5763,"context_line":"                        self._live_migration_uri(dest),"}],"source_content_type":"text/x-python","patch_set":7,"id":"bab6814e_bf0f9135","line":5760,"range":{"start_line":5758,"start_character":0,"end_line":5760,"end_character":51},"in_reply_to":"bab6814e_46608f01","updated":"2016-05-23 08:27:59.000000000","message":"This is already tested by test_block_live_migration_tunnelled_migrateToURI3 - mock assert makes sure that we removed migrate_disks from params.\n\nAlso there is a test for non-tunnelled block live migration with migrateToURI3: test_live_migration_uses_migrateToURI3","commit_id":"25684bb299db111cbecfb0687fc12a9cee934bd5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3355a059d708745cf2f68d3fd8da6d5159ceccc4","unresolved":false,"context_lines":[{"line_number":5371,"context_line":"                    (self._block_migration_flags \u0026"},{"line_number":5372,"context_line":"                     libvirt.VIR_MIGRATE_TUNNELLED !\u003d 0)):"},{"line_number":5373,"context_line":"                    msg \u003d (_(\u0027Cannot block migrate instance %(uuid)s with\u0027"},{"line_number":5374,"context_line":"                             \u0027 mapped volumes. Selective block device\u0027"},{"line_number":5375,"context_line":"                             \u0027 migration is not supported with tunnelled\u0027"},{"line_number":5376,"context_line":"                             \u0027 block migrations.\u0027) % {\u0027uuid\u0027: instance.uuid})"},{"line_number":5377,"context_line":"                    LOG.error(msg, instance\u003dinstance)"},{"line_number":5378,"context_line":"                    raise exception.MigrationPreCheckError(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7aa08908_cd73337f","line":5375,"range":{"start_line":5374,"start_character":47,"end_line":5375,"end_character":57},"updated":"2016-06-07 13:11:10.000000000","message":"Does this have anything to do with the 1.2.17 version check above? In other words, is it OK to check the tunneled flag outside the version check or should those go together?","commit_id":"f6bb5661b9fbbf4a73fe6368d88afc96b348d0d4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6eb0da96efd5ee0cb22f4808338e5f870c9e7189","unresolved":false,"context_lines":[{"line_number":5371,"context_line":"                    (self._block_migration_flags \u0026"},{"line_number":5372,"context_line":"                     libvirt.VIR_MIGRATE_TUNNELLED !\u003d 0)):"},{"line_number":5373,"context_line":"                    msg \u003d (_(\u0027Cannot block migrate instance %(uuid)s with\u0027"},{"line_number":5374,"context_line":"                             \u0027 mapped volumes. Selective block device\u0027"},{"line_number":5375,"context_line":"                             \u0027 migration is not supported with tunnelled\u0027"},{"line_number":5376,"context_line":"                             \u0027 block migrations.\u0027) % {\u0027uuid\u0027: instance.uuid})"},{"line_number":5377,"context_line":"                    LOG.error(msg, instance\u003dinstance)"},{"line_number":5378,"context_line":"                    raise exception.MigrationPreCheckError(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7aa08908_5fec0a8f","line":5375,"range":{"start_line":5374,"start_character":47,"end_line":5375,"end_character":57},"in_reply_to":"7aa08908_2d675726","updated":"2016-06-07 13:29:26.000000000","message":"Heh, good point - basically if you have a BDMs then you have to use libvirt\u003e\u003d1.2.17 to block migrate them and you can\u0027t use tunneling.","commit_id":"f6bb5661b9fbbf4a73fe6368d88afc96b348d0d4"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"f21ff2ed8843af3a8250f536aae3d91749fe4a20","unresolved":false,"context_lines":[{"line_number":5371,"context_line":"                    (self._block_migration_flags \u0026"},{"line_number":5372,"context_line":"                     libvirt.VIR_MIGRATE_TUNNELLED !\u003d 0)):"},{"line_number":5373,"context_line":"                    msg \u003d (_(\u0027Cannot block migrate instance %(uuid)s with\u0027"},{"line_number":5374,"context_line":"                             \u0027 mapped volumes. Selective block device\u0027"},{"line_number":5375,"context_line":"                             \u0027 migration is not supported with tunnelled\u0027"},{"line_number":5376,"context_line":"                             \u0027 block migrations.\u0027) % {\u0027uuid\u0027: instance.uuid})"},{"line_number":5377,"context_line":"                    LOG.error(msg, instance\u003dinstance)"},{"line_number":5378,"context_line":"                    raise exception.MigrationPreCheckError(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7aa08908_c231165c","line":5375,"range":{"start_line":5374,"start_character":47,"end_line":5375,"end_character":57},"in_reply_to":"7aa08908_5fec0a8f","updated":"2016-06-08 02:25:33.000000000","message":"in addition, in case you are in block migration and you have BDMs and you still want to use tunneling.","commit_id":"f6bb5661b9fbbf4a73fe6368d88afc96b348d0d4"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"320f3ac367cbb1b570d687d3f5e3fdc574cc7fef","unresolved":false,"context_lines":[{"line_number":5371,"context_line":"                    (self._block_migration_flags \u0026"},{"line_number":5372,"context_line":"                     libvirt.VIR_MIGRATE_TUNNELLED !\u003d 0)):"},{"line_number":5373,"context_line":"                    msg \u003d (_(\u0027Cannot block migrate instance %(uuid)s with\u0027"},{"line_number":5374,"context_line":"                             \u0027 mapped volumes. Selective block device\u0027"},{"line_number":5375,"context_line":"                             \u0027 migration is not supported with tunnelled\u0027"},{"line_number":5376,"context_line":"                             \u0027 block migrations.\u0027) % {\u0027uuid\u0027: instance.uuid})"},{"line_number":5377,"context_line":"                    LOG.error(msg, instance\u003dinstance)"},{"line_number":5378,"context_line":"                    raise exception.MigrationPreCheckError(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7aa08908_2d675726","line":5375,"range":{"start_line":5374,"start_character":47,"end_line":5375,"end_character":57},"in_reply_to":"7aa08908_cd73337f","updated":"2016-06-07 13:17:39.000000000","message":"Above condition (line @5353) already checks version, if it is not met we won\u0027t get to this piece of code.","commit_id":"f6bb5661b9fbbf4a73fe6368d88afc96b348d0d4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3355a059d708745cf2f68d3fd8da6d5159ceccc4","unresolved":false,"context_lines":[{"line_number":5748,"context_line":"                # bug #1398999"},{"line_number":5749,"context_line":"                if (migration_flags \u0026"},{"line_number":5750,"context_line":"                    libvirt.VIR_MIGRATE_TUNNELLED !\u003d 0):"},{"line_number":5751,"context_line":"                    params.pop(\u0027migrate_disks\u0027)"},{"line_number":5752,"context_line":""},{"line_number":5753,"context_line":"            guest.migrate(self._live_migration_uri(dest),"},{"line_number":5754,"context_line":"                          flags\u003dmigration_flags,"}],"source_content_type":"text/x-python","patch_set":9,"id":"7aa08908_2dd75724","line":5751,"updated":"2016-06-07 13:11:10.000000000","message":"We should maybe log something in this case, at least at debug level.","commit_id":"f6bb5661b9fbbf4a73fe6368d88afc96b348d0d4"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"509e444e513bf157c9fd6fa4070ff3a553634b03","unresolved":false,"context_lines":[{"line_number":5748,"context_line":"                # bug #1398999"},{"line_number":5749,"context_line":"                if (migration_flags \u0026"},{"line_number":5750,"context_line":"                    libvirt.VIR_MIGRATE_TUNNELLED !\u003d 0):"},{"line_number":5751,"context_line":"                    params.pop(\u0027migrate_disks\u0027)"},{"line_number":5752,"context_line":""},{"line_number":5753,"context_line":"            guest.migrate(self._live_migration_uri(dest),"},{"line_number":5754,"context_line":"                          flags\u003dmigration_flags,"}],"source_content_type":"text/x-python","patch_set":9,"id":"7aa08908_ff35f6d9","line":5751,"in_reply_to":"7aa08908_2dd75724","updated":"2016-06-07 13:18:53.000000000","message":"Yeah, we can log something like \"Tunnelled block live migration so copying all disks to destination.\"","commit_id":"f6bb5661b9fbbf4a73fe6368d88afc96b348d0d4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7045138935cc2ab114c77fee0f78d2f36ce380f6","unresolved":false,"context_lines":[{"line_number":5873,"context_line":""},{"line_number":5874,"context_line":"        # TODO(pkoniszewski): Remove this if-statement when we bump min libvirt"},{"line_number":5875,"context_line":"        # version to \u003e\u003d 1.2.17"},{"line_number":5876,"context_line":"        if self._host.has_min_version("},{"line_number":5877,"context_line":"                MIN_LIBVIRT_BLOCK_LM_WITH_VOLUMES_VERSION):"},{"line_number":5878,"context_line":"            bdm_list \u003d objects.BlockDeviceMappingList.get_by_instance_uuid("},{"line_number":5879,"context_line":"                context, instance.uuid)"},{"line_number":5880,"context_line":"            block_device_info \u003d driver.get_block_device_info(instance,"}],"source_content_type":"text/x-python","patch_set":9,"id":"7aa08908_c57bbc79","line":5877,"range":{"start_line":5876,"start_character":8,"end_line":5877,"end_character":59},"updated":"2016-06-08 12:49:00.000000000","message":"This is checked to set the migrate_disks key in the params dict and use migrateToURI3.\n\nBut with this change we later check if the tunneled flag is on and then pop migrate_disks from params.\n\nIt would be more performant to check the block migration flags in this method and just return an empty list so we don\u0027t pull the BDMs from the database over conductor since we aren\u0027t going to use them later.\n\nThere is already tight coupling everywhere this version is checked, so I don\u0027t think that would make this much worse and saves us the pointless round-trip to conductor.","commit_id":"f6bb5661b9fbbf4a73fe6368d88afc96b348d0d4"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"1950ce9cb1ba620e2cbcf948dd29a7dabe247f0f","unresolved":false,"context_lines":[{"line_number":5873,"context_line":""},{"line_number":5874,"context_line":"        # TODO(pkoniszewski): Remove this if-statement when we bump min libvirt"},{"line_number":5875,"context_line":"        # version to \u003e\u003d 1.2.17"},{"line_number":5876,"context_line":"        if self._host.has_min_version("},{"line_number":5877,"context_line":"                MIN_LIBVIRT_BLOCK_LM_WITH_VOLUMES_VERSION):"},{"line_number":5878,"context_line":"            bdm_list \u003d objects.BlockDeviceMappingList.get_by_instance_uuid("},{"line_number":5879,"context_line":"                context, instance.uuid)"},{"line_number":5880,"context_line":"            block_device_info \u003d driver.get_block_device_info(instance,"}],"source_content_type":"text/x-python","patch_set":9,"id":"7aa08908_85da1f15","line":5877,"range":{"start_line":5876,"start_character":8,"end_line":5877,"end_character":59},"in_reply_to":"7aa08908_c57bbc79","updated":"2016-06-09 08:06:07.000000000","message":"Good point, we can avoid some calls by checking tunnelled flag earlier.","commit_id":"f6bb5661b9fbbf4a73fe6368d88afc96b348d0d4"}]}
