)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"071f1c619026489584fcd6a2db5cb5d741cdb465","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This first step in resolving bug#1419577 ensures that the source"},{"line_number":10,"context_line":"provides the destination with the current block_device_info when calling"},{"line_number":11,"context_line":"for a live migration rollback."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"In Pike this will then allow the source to refresh each bdm,"},{"line_number":14,"context_line":"potentially reverting any changes made to the connection_info by the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"ba5da102_61db6c1c","line":11,"updated":"2016-10-26 08:30:50.000000000","message":"Can you describe the problem here instead of just referencing the bug?","commit_id":"870cc14faff14e491478d8c37ba16cb96b2fe8c8"}],"nova/compute/manager.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f80b4467c7c769d67da43543a171451d9751bcfe","unresolved":false,"context_lines":[{"line_number":5582,"context_line":"        # NOTE(lyarwood): Refresh connection_info on the source host to revert"},{"line_number":5583,"context_line":"        # any changes made during pre_live_migration on the destination."},{"line_number":5584,"context_line":"        self._get_instance_block_device_info(context, instance,"},{"line_number":5585,"context_line":"                                             refresh_conn_info\u003dTrue, bdms\u003dbdms)"},{"line_number":5586,"context_line":"        self._notify_about_instance_usage(context, instance,"},{"line_number":5587,"context_line":"                                          \"live_migration._rollback.end\")"},{"line_number":5588,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"bacf61ea_47d8ef53","line":5585,"updated":"2016-07-28 13:55:28.000000000","message":"It took me a bit to figure out why this method does anything when it\u0027s named \"get_something\" and we don\u0027t use the result. Turns out, it\u0027s just really poorly named and rather obscure.\n\nThis calls block_device.refresh_conn_infos(), which loops through all our BDMs that are volumes (i.e. have connection_info already), and calls volume_api.initialize_connection() on them to get updated connection_info. That new info is stored on the BDM object, which is save()d by the super-obscure update_db decorator in virt/block_device.py.\n\nSo, merely calling \"_get_instance_block_device_info()\" will dig through the BDMs, call to cinder, and save to our database. Very non-obvious, but it seems to be the right thing to do here.\n\nI do worry that given that it makes multiple calls to cinder and the database that it is rather high risk for failure. I wonder if we should wrap this an at least make sure we run _set_migration_status() in a finally block so that we don\u0027t just leave it hanging forever?","commit_id":"28d7354aea9099cf33487ccd24c268b0196fef59"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4535f30e080dcf9acfa4d1ec4436417b6e34d961","unresolved":false,"context_lines":[{"line_number":5584,"context_line":"        # NOTE(lyarwood): Refresh connection_info on the source host to revert"},{"line_number":5585,"context_line":"        # any changes made during pre_live_migration on the destination."},{"line_number":5586,"context_line":"        self._get_instance_block_device_info(context, instance,"},{"line_number":5587,"context_line":"                                             refresh_conn_info\u003dTrue, bdms\u003dbdms)"},{"line_number":5588,"context_line":"        self._notify_about_instance_usage(context, instance,"},{"line_number":5589,"context_line":"                                          \"live_migration._rollback.end\")"},{"line_number":5590,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"bacf61ea_87b027f6","line":5587,"updated":"2016-07-28 13:55:55.000000000","message":"See comments on the previous patch about being careful on errors.","commit_id":"a45057e1261e3ffa3321299aeff179b569635ab1"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"dcbd205c26ed3d158b1bd4aa1014b35b33f3080d","unresolved":false,"context_lines":[{"line_number":5585,"context_line":"                migrate_data)"},{"line_number":5586,"context_line":""},{"line_number":5587,"context_line":"        if do_cleanup:"},{"line_number":5588,"context_line":"            self.compute_rpcapi.rollback_live_migration_at_destination("},{"line_number":5589,"context_line":"                    context, instance, dest, destroy_disks\u003ddestroy_disks,"},{"line_number":5590,"context_line":"                    migrate_data\u003dmigrate_data)"},{"line_number":5591,"context_line":"        try:"},{"line_number":5592,"context_line":"            # NOTE(lyarwood): Refresh connection_info on the source host to"},{"line_number":5593,"context_line":"            # revert any changes made during pre_live_migration."}],"source_content_type":"text/x-python","patch_set":12,"id":"bacf61ea_5ae9da7f","line":5590,"range":{"start_line":5588,"start_character":12,"end_line":5590,"end_character":46},"updated":"2016-07-28 16:45:06.000000000","message":"This method is rpc-cast. And moreover, it also calls _get_instance_block_device_info on destination node(see below) So it looks like a potential race condition.","commit_id":"e46c403f4883c1bfe5b1fbfb10cba7ca4c0cc85f"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"f074ac3998d8f78e67d9e32a45fce216f69541f6","unresolved":false,"context_lines":[{"line_number":5585,"context_line":"                migrate_data)"},{"line_number":5586,"context_line":""},{"line_number":5587,"context_line":"        if do_cleanup:"},{"line_number":5588,"context_line":"            self.compute_rpcapi.rollback_live_migration_at_destination("},{"line_number":5589,"context_line":"                    context, instance, dest, destroy_disks\u003ddestroy_disks,"},{"line_number":5590,"context_line":"                    migrate_data\u003dmigrate_data)"},{"line_number":5591,"context_line":"        try:"},{"line_number":5592,"context_line":"            # NOTE(lyarwood): Refresh connection_info on the source host to"},{"line_number":5593,"context_line":"            # revert any changes made during pre_live_migration."}],"source_content_type":"text/x-python","patch_set":12,"id":"bacf61ea_5e496eb6","line":5590,"range":{"start_line":5588,"start_character":12,"end_line":5590,"end_character":46},"in_reply_to":"bacf61ea_5ae9da7f","updated":"2016-07-31 14:16:03.000000000","message":"Nice catch, this is going to race. I guess we need to provide the destination\u0027s block_device_info to the above call before we then refresh it for the source host below.","commit_id":"e46c403f4883c1bfe5b1fbfb10cba7ca4c0cc85f"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"f363b6bd2bca97f446e5abe17b03e73baf9a9fde","unresolved":false,"context_lines":[{"line_number":5585,"context_line":"                migrate_data)"},{"line_number":5586,"context_line":""},{"line_number":5587,"context_line":"        if do_cleanup:"},{"line_number":5588,"context_line":"            self.compute_rpcapi.rollback_live_migration_at_destination("},{"line_number":5589,"context_line":"                    context, instance, dest, destroy_disks\u003ddestroy_disks,"},{"line_number":5590,"context_line":"                    migrate_data\u003dmigrate_data)"},{"line_number":5591,"context_line":"        try:"},{"line_number":5592,"context_line":"            # NOTE(lyarwood): Refresh connection_info on the source host to"},{"line_number":5593,"context_line":"            # revert any changes made during pre_live_migration."}],"source_content_type":"text/x-python","patch_set":12,"id":"bacf61ea_f2895f27","line":5590,"range":{"start_line":5588,"start_character":12,"end_line":5590,"end_character":46},"in_reply_to":"bacf61ea_5e496eb6","updated":"2016-08-01 10:42:47.000000000","message":"I tried to figure out what might happen if you call initialize_connection multiple times for the same VM and the same volume, but looks like you might receive different connection_info, all depends on a cinder backend. In such case the safest way to solve it is to pass block_device_info so that destination host will use exactly the same connection_info to perform cleanup that was used during pre_live_migration phase.\n\nAs long as underlying cinder driver returns exactly the same connection info it is not an issue, but this is a potential security risk if something changes below, so yeah, we definitely need to fix it.","commit_id":"e46c403f4883c1bfe5b1fbfb10cba7ca4c0cc85f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"67b84c8a30ab93de1d4ef5a8a77c3e91fd0dd365","unresolved":false,"context_lines":[{"line_number":5603,"context_line":"            # update the migration status to reflect this."},{"line_number":5604,"context_line":"            self._notify_about_instance_usage(context, instance,"},{"line_number":5605,"context_line":"                                              \"live_migration._rollback.end\")"},{"line_number":5606,"context_line":"            self._set_migration_status(migration, migration_status)"},{"line_number":5607,"context_line":""},{"line_number":5608,"context_line":"    @wrap_exception()"},{"line_number":5609,"context_line":"    @wrap_instance_event(prefix\u003d\u0027compute\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"bacf61ea_f960a337","line":5606,"updated":"2016-07-28 15:14:21.000000000","message":"Yep, this looks good to me. We should test this though (as you said in IRC).","commit_id":"e46c403f4883c1bfe5b1fbfb10cba7ca4c0cc85f"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"dcbd205c26ed3d158b1bd4aa1014b35b33f3080d","unresolved":false,"context_lines":[{"line_number":5635,"context_line":"            # always run this even if setup_networks_on_host fails"},{"line_number":5636,"context_line":"            # NOTE(vish): The mapping is passed in so the driver can disconnect"},{"line_number":5637,"context_line":"            #             from remote volumes if necessary"},{"line_number":5638,"context_line":"            block_device_info \u003d self._get_instance_block_device_info(context,"},{"line_number":5639,"context_line":"                                                                     instance)"},{"line_number":5640,"context_line":"            if isinstance(migrate_data, dict):"},{"line_number":5641,"context_line":"                migrate_data \u003d \\"}],"source_content_type":"text/x-python","patch_set":12,"id":"bacf61ea_fa7c0eed","line":5638,"updated":"2016-07-28 16:45:06.000000000","message":"here. I wonder, what data set will we get.","commit_id":"e46c403f4883c1bfe5b1fbfb10cba7ca4c0cc85f"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"5056b5eb012ef8fe8be2dde16bc06d26e14d85b6","unresolved":false,"context_lines":[{"line_number":5665,"context_line":"    def rollback_live_migration_at_destination(self, context, instance,"},{"line_number":5666,"context_line":"                                               destroy_disks,"},{"line_number":5667,"context_line":"                                               migrate_data,"},{"line_number":5668,"context_line":"                                               block_device_info):"},{"line_number":5669,"context_line":"        \"\"\"Cleaning up image directory that is created pre_live_migration."},{"line_number":5670,"context_line":""},{"line_number":5671,"context_line":"        :param context: security context"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa6399be_c494c28c","line":5668,"updated":"2016-10-20 09:12:07.000000000","message":"ACK thanks","commit_id":"3c7960fe256c2b1d66e39cbef243857804a7a887"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"a0f868df7b766f8c4ae86d4780218e6aec0a4dc3","unresolved":false,"context_lines":[{"line_number":5665,"context_line":"    def rollback_live_migration_at_destination(self, context, instance,"},{"line_number":5666,"context_line":"                                               destroy_disks,"},{"line_number":5667,"context_line":"                                               migrate_data,"},{"line_number":5668,"context_line":"                                               block_device_info):"},{"line_number":5669,"context_line":"        \"\"\"Cleaning up image directory that is created pre_live_migration."},{"line_number":5670,"context_line":""},{"line_number":5671,"context_line":"        :param context: security context"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa6399be_12e612b4","line":5668,"range":{"start_line":5668,"start_character":47,"end_line":5668,"end_character":64},"updated":"2016-10-19 18:33:22.000000000","message":"This needs to be None by default. Otherwise live migration from old nova compute to new one will fail here as old nova compute will not pass block_device_info through RPC","commit_id":"3c7960fe256c2b1d66e39cbef243857804a7a887"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"ed6869f6ea3cec6c84b785a15e5cd3b7e709de1c","unresolved":false,"context_lines":[{"line_number":5690,"context_line":"            # always run this even if setup_networks_on_host fails"},{"line_number":5691,"context_line":"            if block_device_info is None:"},{"line_number":5692,"context_line":"                block_device_info \u003d self._get_instance_block_device_info("},{"line_number":5693,"context_line":"                    context, instance)"},{"line_number":5694,"context_line":"            # TODO(tdurakov): remove dict to object conversion once RPC API"},{"line_number":5695,"context_line":"            # version is bumped to 5.x"},{"line_number":5696,"context_line":"            if isinstance(migrate_data, dict):"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa6399be_f19c276c","line":5693,"updated":"2016-10-20 10:20:22.000000000","message":"Okay that should work better, shame we can\u0027t close this out during Ocata but at least we have a plan. Thanks again Pawel, I\u0027ll rework this change later today/tomorrow.","commit_id":"4a874cf5c4fdd9efed0d8d95e22e5e18ae599d6b"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"5a01080589c717c37fbc798b8303d98ac76b6473","unresolved":false,"context_lines":[{"line_number":5690,"context_line":"            # always run this even if setup_networks_on_host fails"},{"line_number":5691,"context_line":"            if block_device_info is None:"},{"line_number":5692,"context_line":"                block_device_info \u003d self._get_instance_block_device_info("},{"line_number":5693,"context_line":"                    context, instance)"},{"line_number":5694,"context_line":"            # TODO(tdurakov): remove dict to object conversion once RPC API"},{"line_number":5695,"context_line":"            # version is bumped to 5.x"},{"line_number":5696,"context_line":"            if isinstance(migrate_data, dict):"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa6399be_5fc79f97","line":5693,"updated":"2016-10-20 09:39:13.000000000","message":"Thinking about this more after pushing this can still race if the source is new and the destination is old. Outside of turning this into a call instead of a cast from the new compute I can\u0027t think how we can avoid this.","commit_id":"4a874cf5c4fdd9efed0d8d95e22e5e18ae599d6b"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"0ce358412af0d94c3b80f06fbf6cee0b9730420f","unresolved":false,"context_lines":[{"line_number":5690,"context_line":"            # always run this even if setup_networks_on_host fails"},{"line_number":5691,"context_line":"            if block_device_info is None:"},{"line_number":5692,"context_line":"                block_device_info \u003d self._get_instance_block_device_info("},{"line_number":5693,"context_line":"                    context, instance)"},{"line_number":5694,"context_line":"            # TODO(tdurakov): remove dict to object conversion once RPC API"},{"line_number":5695,"context_line":"            # version is bumped to 5.x"},{"line_number":5696,"context_line":"            if isinstance(migrate_data, dict):"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa6399be_bfd99bf5","line":5693,"in_reply_to":"fa6399be_5fc79f97","updated":"2016-10-20 09:56:03.000000000","message":"Yeah, that\u0027s true. Probably this change needs to be split into two changes. Pass block_device_info through RPC in Ocata, and then refresh connection on source side in Pike","commit_id":"4a874cf5c4fdd9efed0d8d95e22e5e18ae599d6b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"84738da891c8755d022350ecd0efd2854f99630f","unresolved":false,"context_lines":[{"line_number":5646,"context_line":""},{"line_number":5647,"context_line":"        self._notify_about_instance_usage(context, instance,"},{"line_number":5648,"context_line":"                                          \"live_migration._rollback.end\")"},{"line_number":5649,"context_line":""},{"line_number":5650,"context_line":"        self._set_migration_status(migration, migration_status)"},{"line_number":5651,"context_line":""},{"line_number":5652,"context_line":"    @wrap_exception()"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5da102_81c5e05c","side":"PARENT","line":5649,"updated":"2016-10-26 08:26:45.000000000","message":"Gah, this too.","commit_id":"7e36553fa16e599b65abb2ad1f032fdfc08cf1c8"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"f77f97c4f9053909f4abf5f7b78a2ec381403d26","unresolved":false,"context_lines":[{"line_number":5659,"context_line":"            self.compute_rpcapi.rollback_live_migration_at_destination("},{"line_number":5660,"context_line":"                    context, instance, dest, destroy_disks\u003ddestroy_disks,"},{"line_number":5661,"context_line":"                    migrate_data\u003dmigrate_data,"},{"line_number":5662,"context_line":"                    block_device_info\u003dblock_device_info)"},{"line_number":5663,"context_line":"        # TODO(lyarwood): Once Ocata has released refresh the block_device_info"},{"line_number":5664,"context_line":"        # on the source host to ensure the connection_info of each bdm is up to"},{"line_number":5665,"context_line":"        # date before use, addressing bug#1419577"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5da102_92e5500a","line":5662,"updated":"2016-11-03 13:41:40.000000000","message":"If we generate the info on this machine, I don\u0027t believe it will actually match the info needed on the destination host. This will make the disconnect fail on the destination host for a variety of cinder drivers (but not the iSCSI one we use in the gate).","commit_id":"08587188a5a2bbc476bb7b0ae1cb5f0c34e97179"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"f045bacb50b2972e602a3a5b33c85154162b83c4","unresolved":false,"context_lines":[{"line_number":5659,"context_line":"            self.compute_rpcapi.rollback_live_migration_at_destination("},{"line_number":5660,"context_line":"                    context, instance, dest, destroy_disks\u003ddestroy_disks,"},{"line_number":5661,"context_line":"                    migrate_data\u003dmigrate_data,"},{"line_number":5662,"context_line":"                    block_device_info\u003dblock_device_info)"},{"line_number":5663,"context_line":"        # TODO(lyarwood): Once Ocata has released refresh the block_device_info"},{"line_number":5664,"context_line":"        # on the source host to ensure the connection_info of each bdm is up to"},{"line_number":5665,"context_line":"        # date before use, addressing bug#1419577"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5da102_67055544","line":5662,"in_reply_to":"ba5da102_8ce450ac","updated":"2016-11-03 17:01:05.000000000","message":"The connector isn\u0027t really important here, as I think I said elsewhere in the review on L5646 we call termiante_connection locally on the destination host for these volumes using the correct connector.\n\nThis change is just about getting the correct version of block_device_info back to the destination for rollback_live_migration_at_destination that in libvirt simply calls destroy().","commit_id":"08587188a5a2bbc476bb7b0ae1cb5f0c34e97179"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"3bac5286122e308c360ff5cbfd55c9df01503076","unresolved":false,"context_lines":[{"line_number":5659,"context_line":"            self.compute_rpcapi.rollback_live_migration_at_destination("},{"line_number":5660,"context_line":"                    context, instance, dest, destroy_disks\u003ddestroy_disks,"},{"line_number":5661,"context_line":"                    migrate_data\u003dmigrate_data,"},{"line_number":5662,"context_line":"                    block_device_info\u003dblock_device_info)"},{"line_number":5663,"context_line":"        # TODO(lyarwood): Once Ocata has released refresh the block_device_info"},{"line_number":5664,"context_line":"        # on the source host to ensure the connection_info of each bdm is up to"},{"line_number":5665,"context_line":"        # date before use, addressing bug#1419577"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5da102_fba3c7af","line":5662,"in_reply_to":"ba5da102_92e5500a","updated":"2016-11-03 14:47:40.000000000","message":"This is essentially a DB lookup without refresh_conn_info\u003dTrue so we shouldn\u0027t be overwriting anything that was updated by the DB here. But anyway in my last comment I tried to highlight that we could stash this much earlier in migrate_data during pre_live_migration as we already do with the bdms. \n\nThis should allow us to then call _get_instance_block_device_info with refresh_conn_info\u003dTrue below the RPC cast to rollback_live_migration_at_destination and not have a race between the destination fetching block_device_info from the DB and source refreshing it.","commit_id":"08587188a5a2bbc476bb7b0ae1cb5f0c34e97179"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"84f1f204ba96fc68805024fc3f7dabc99db904ef","unresolved":false,"context_lines":[{"line_number":5659,"context_line":"            self.compute_rpcapi.rollback_live_migration_at_destination("},{"line_number":5660,"context_line":"                    context, instance, dest, destroy_disks\u003ddestroy_disks,"},{"line_number":5661,"context_line":"                    migrate_data\u003dmigrate_data,"},{"line_number":5662,"context_line":"                    block_device_info\u003dblock_device_info)"},{"line_number":5663,"context_line":"        # TODO(lyarwood): Once Ocata has released refresh the block_device_info"},{"line_number":5664,"context_line":"        # on the source host to ensure the connection_info of each bdm is up to"},{"line_number":5665,"context_line":"        # date before use, addressing bug#1419577"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5da102_d5ec12bd","line":5662,"in_reply_to":"ba5da102_92e5500a","updated":"2016-11-03 14:00:00.000000000","message":"Totally thinking out loud... could we not just revert to the stashed connector, and stash the old value in it. So when we call rollback_live_migration_at_destination, it can get the bdm_info and used the stashed connecting, but any other actions now use the correct information post rollback.\n\n( i.e. stashed_connector \u003d connection_info.get(\u0027connector\u0027) see https://github.com/openstack/nova/commit/a686185fc02ec421fd27270a343c19f668b95da6)","commit_id":"08587188a5a2bbc476bb7b0ae1cb5f0c34e97179"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"58811256cdc95f587ebca4f709e02cfb58e9ae97","unresolved":false,"context_lines":[{"line_number":5659,"context_line":"            self.compute_rpcapi.rollback_live_migration_at_destination("},{"line_number":5660,"context_line":"                    context, instance, dest, destroy_disks\u003ddestroy_disks,"},{"line_number":5661,"context_line":"                    migrate_data\u003dmigrate_data,"},{"line_number":5662,"context_line":"                    block_device_info\u003dblock_device_info)"},{"line_number":5663,"context_line":"        # TODO(lyarwood): Once Ocata has released refresh the block_device_info"},{"line_number":5664,"context_line":"        # on the source host to ensure the connection_info of each bdm is up to"},{"line_number":5665,"context_line":"        # date before use, addressing bug#1419577"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5da102_8ce450ac","line":5662,"in_reply_to":"ba5da102_fba3c7af","updated":"2016-11-03 16:30:58.000000000","message":"What I mean is, we already store old connector info nested on initialise_connection on the destination host, because of this patch:\nhttps://github.com/openstack/nova/commit/a686185fc02ec421fd27270a343c19f668b95da6#diff-d24869e36361bb430acd67658a83b0b5R398\n\nSo rather than stash it somewhere different, we can use the same place to store info here. We can restore the connector info that was stashed above, and stash the old info back in the stash for rollback_live_migration_at_destination to use, again avoid any race.\n\nMaybe I am miss understanding the intent here?","commit_id":"08587188a5a2bbc476bb7b0ae1cb5f0c34e97179"}],"nova/compute/rpcapi.py":[{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"a0f868df7b766f8c4ae86d4780218e6aec0a4dc3","unresolved":false,"context_lines":[{"line_number":880,"context_line":"        version \u003d \u00274.14\u0027"},{"line_number":881,"context_line":"        client \u003d self.router.by_host(ctxt, host)"},{"line_number":882,"context_line":"        if not client.can_send_version(version):"},{"line_number":883,"context_line":"            version \u003d \u00274.8\u0027"},{"line_number":884,"context_line":"            if not client.can_send_version(version):"},{"line_number":885,"context_line":"                version \u003d \u00274.0\u0027"},{"line_number":886,"context_line":"                if migrate_data:"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa6399be_328f96cd","line":883,"updated":"2016-10-19 18:33:22.000000000","message":"I have a feeling that this is hard to read. What do you think about changing it to something like:\n\nextra \u003d {\u0027destroy_disks\u0027: destroy_disks,\n         \u0027migrate_data\u0027: migrate_data,\n         \u0027block_device_info\u0027: block_device_info,\nif not client.can_send_version(version):\n    version \u003d \u00274.8\u0027\n    extra.pop(block_device_info)\nif not client.can_send_version(version):\n    version \u003d \u00274.0\u0027\n    extra[\u0027migrate_data\u0027] \u003d migrate_data.to_legacy_dict()","commit_id":"3c7960fe256c2b1d66e39cbef243857804a7a887"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"5056b5eb012ef8fe8be2dde16bc06d26e14d85b6","unresolved":false,"context_lines":[{"line_number":880,"context_line":"        version \u003d \u00274.14\u0027"},{"line_number":881,"context_line":"        client \u003d self.router.by_host(ctxt, host)"},{"line_number":882,"context_line":"        if not client.can_send_version(version):"},{"line_number":883,"context_line":"            version \u003d \u00274.8\u0027"},{"line_number":884,"context_line":"            if not client.can_send_version(version):"},{"line_number":885,"context_line":"                version \u003d \u00274.0\u0027"},{"line_number":886,"context_line":"                if migrate_data:"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa6399be_e48d467d","line":883,"updated":"2016-10-20 09:12:07.000000000","message":"IMHO they are both just as readable as the other however yours is smaller so I\u0027ll take it, thanks! :)","commit_id":"3c7960fe256c2b1d66e39cbef243857804a7a887"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"e81c9e43daca195cb3ed600932ce2a957c146e43","unresolved":false,"context_lines":[{"line_number":886,"context_line":"            version \u003d \u00274.8\u0027"},{"line_number":887,"context_line":"            extra.pop(\u0027block_device_info\u0027)"},{"line_number":888,"context_line":"        if not client.can_send_version(version):"},{"line_number":889,"context_line":"            version \u003d \u00274.0\u0027"},{"line_number":890,"context_line":"            extra[\u0027migrate_data\u0027] \u003d migrate_data.to_legacy_dict()"},{"line_number":891,"context_line":"        cctxt \u003d client.prepare(server\u003dhost, version\u003dversion)"},{"line_number":892,"context_line":"        cctxt.cast(ctxt, \u0027rollback_live_migration_at_destination\u0027,"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba5da102_9200ccac","line":889,"updated":"2016-10-26 10:01:17.000000000","message":"I wonder whether we still need a guard here so that we will make sure that migrate_data is not None before calling migrate_data.to_legacy_dict(). Perhaps no, because we do allow back and forth live migrations between N and N+1 release, so migrate_data should always be populated already (it is there since Mitaka or even Liberty).","commit_id":"29cbc82d539e3dfb898ddb75c9b62d0605adf51e"}],"nova/tests/unit/compute/test_compute.py":[{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"c951abe46c560b29a16eef113062ac58e2dc854a","unresolved":false,"context_lines":[{"line_number":5511,"context_line":"        src_conn_info \u003d jsonutils.dumps({\u0027data\u0027: {\u0027target_luns\u0027: \u0027src\u0027}})"},{"line_number":5512,"context_line":"        dest_conn_info \u003d jsonutils.dumps({\u0027data\u0027: {\u0027target_luns\u0027: \u0027dest\u0027}})"},{"line_number":5513,"context_line":"        dest_host \u003d updated_instance[\u0027host\u0027]"},{"line_number":5514,"context_line":"        fake_bdms \u003d block_device_obj.block_device_make_list(c,"},{"line_number":5515,"context_line":"            [objects.BlockDeviceMapping("},{"line_number":5516,"context_line":"                **fake_block_device.FakeDbBlockDeviceDict("},{"line_number":5517,"context_line":"                    {\u0027id\u0027: 1,"},{"line_number":5518,"context_line":"                     \u0027volume_id\u0027: uuids.volume_id_1,"},{"line_number":5519,"context_line":"                     \u0027source_type\u0027: \u0027volume\u0027,"},{"line_number":5520,"context_line":"                     \u0027destination_type\u0027: \u0027volume\u0027,"},{"line_number":5521,"context_line":"                     \u0027connection_info\u0027: dest_conn_info})),"},{"line_number":5522,"context_line":"            objects.BlockDeviceMapping("},{"line_number":5523,"context_line":"                **fake_block_device.FakeDbBlockDeviceDict("},{"line_number":5524,"context_line":"                    {\u0027id\u0027: 2,"},{"line_number":5525,"context_line":"                     \u0027volume_id\u0027: uuids.volume_id_2,"},{"line_number":5526,"context_line":"                     \u0027source_type\u0027: \u0027volume\u0027,"},{"line_number":5527,"context_line":"                     \u0027destination_type\u0027: \u0027volume\u0027,"},{"line_number":5528,"context_line":"                     \u0027connection_info\u0027: dest_conn_info}))])"},{"line_number":5529,"context_line":"        migrate_data \u003d migrate_data_obj.XenapiLiveMigrateData("},{"line_number":5530,"context_line":"            block_migration\u003dTrue)"},{"line_number":5531,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1aa78d24_17632043","line":5528,"range":{"start_line":5514,"start_character":0,"end_line":5528,"end_character":59},"updated":"2016-07-07 12:29:54.000000000","message":"This test currently fails with `nova.exception.BDMNotFound: No Block Device Mapping with id 1.`. I assume that I\u0027m abusing FakeDbBlockDeviceDict here and that it can\u0027t be used like this. Any advice on possible alternatives would be appreciated.","commit_id":"ae2008a8458be83427b4bac1a3250b6fe4a97c9c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"04b1ffbee47f917a1026d6daf61475808e73fe7e","unresolved":false,"context_lines":[{"line_number":5651,"context_line":"        ]"},{"line_number":5652,"context_line":"        migrate_data \u003d migrate_data_obj.XenapiLiveMigrateData("},{"line_number":5653,"context_line":"            block_migration\u003dTrue)"},{"line_number":5654,"context_line":""},{"line_number":5655,"context_line":"        block_device_info \u003d {"},{"line_number":5656,"context_line":"                \u0027swap\u0027: None, \u0027ephemerals\u0027: [], \u0027block_device_mapping\u0027: [],"},{"line_number":5657,"context_line":"                \u0027root_device_name\u0027: None}"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5da102_a15d84ee","side":"PARENT","line":5654,"updated":"2016-10-26 08:24:03.000000000","message":"Unrelated whitespace change -- probably rebase noise.","commit_id":"7e36553fa16e599b65abb2ad1f032fdfc08cf1c8"}],"nova/virt/block_device.py":[{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"7c7a2ee062049e22d69e5379adab0b59c611172a","unresolved":false,"context_lines":[{"line_number":519,"context_line":"    return block_device_mapping"},{"line_number":520,"context_line":""},{"line_number":521,"context_line":""},{"line_number":522,"context_line":"def refresh_conn_infos(block_device_mapping, *refresh_args, **refresh_kwargs):"},{"line_number":523,"context_line":"    for device in block_device_mapping:"},{"line_number":524,"context_line":"        refresh_func \u003d getattr(device, \u0027refresh_connection_info\u0027)"},{"line_number":525,"context_line":"        if callable(refresh_func):"},{"line_number":526,"context_line":"            device.refresh_connection_info(*refresh_args, **refresh_kwargs)"},{"line_number":527,"context_line":"    return block_device_mapping"},{"line_number":528,"context_line":""},{"line_number":529,"context_line":""},{"line_number":530,"context_line":"def legacy_block_devices(block_device_mapping):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_016550e0","line":527,"range":{"start_line":522,"start_character":0,"end_line":527,"end_character":31},"updated":"2016-07-08 16:23:42.000000000","message":"The previous map onto a methodcaller just didn\u0027t appear to work in py3. I\u0027ve simplified the method allowing my tests to pass locally on py34. Happy to split this out into a separate change with additional tests if this is an acceptable approach.","commit_id":"af7b47ad9545a520b11c37be5a0f91a5ec861d79"}]}
