)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"59f9f6fb0705eb2ae471a039e1ee7de39dd953c9","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This patch fixes this by disconnecting the encryptor at the source"},{"line_number":14,"context_line":"before trying to disconnect the volume and connecting the encryptor"},{"line_number":15,"context_line":"before trying to connect the volume at the target"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I15eaba6b28e412fc36a18d7ba7f9b18de3973d12"},{"line_number":18,"context_line":"Closes-Bug: #1633033"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"da6895a0_da55e61d","line":15,"updated":"2016-10-21 12:31:08.000000000","message":"That\u0027s not correct, you need to have the volume connected before you can attach the encryptor. That\u0027s actually happening in attach_volume even with your changes.","commit_id":"07410fbafce027f31ba48d7543619be08eeb3032"}],"nova/objects/migrate_data.py":[{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"63faaec9184b995638b71bd1d016d11bd7b6f8d1","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        \u0027graphics_listen_addr_spice\u0027: fields.IPAddressField(nullable\u003dTrue),"},{"line_number":129,"context_line":"        \u0027serial_listen_addr\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":130,"context_line":"        \u0027serial_listen_ports\u0027: fields.ListOfIntegersField(),"},{"line_number":131,"context_line":"        \u0027pre_bdms\u0027: fields.ListOfObjectsField(\u0027LibvirtLiveMigrateBDMInfo\u0027),"},{"line_number":132,"context_line":"        \u0027bdms\u0027: fields.ListOfObjectsField(\u0027LibvirtLiveMigrateBDMInfo\u0027),"},{"line_number":133,"context_line":"        \u0027target_connect_addr\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":134,"context_line":"        \u0027supported_perf_events\u0027: fields.ListOfStringsField(),"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_4b9c175d","line":131,"range":{"start_line":131,"start_character":9,"end_line":131,"end_character":17},"updated":"2016-11-28 11:23:17.000000000","message":"I still think src_bdms is a better name tbh.","commit_id":"e89e77bf6386f5ce29853bfa1980a60e58525fcd"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"d85e6b3a8d21d1acf70926e390418313325b337e","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        \u0027graphics_listen_addr_spice\u0027: fields.IPAddressField(nullable\u003dTrue),"},{"line_number":129,"context_line":"        \u0027serial_listen_addr\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":130,"context_line":"        \u0027serial_listen_ports\u0027: fields.ListOfIntegersField(),"},{"line_number":131,"context_line":"        \u0027pre_bdms\u0027: fields.ListOfObjectsField(\u0027LibvirtLiveMigrateBDMInfo\u0027),"},{"line_number":132,"context_line":"        \u0027bdms\u0027: fields.ListOfObjectsField(\u0027LibvirtLiveMigrateBDMInfo\u0027),"},{"line_number":133,"context_line":"        \u0027target_connect_addr\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":134,"context_line":"        \u0027supported_perf_events\u0027: fields.ListOfStringsField(),"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_041817d2","line":131,"range":{"start_line":131,"start_character":9,"end_line":131,"end_character":17},"in_reply_to":"5a74a57a_4b9c175d","updated":"2016-11-29 11:10:28.000000000","message":"Done","commit_id":"e89e77bf6386f5ce29853bfa1980a60e58525fcd"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"a6fa8b64525c49d7e7d2bba538c18f279920caf1","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        super(LibvirtLiveMigrateData, self).obj_make_compatible("},{"line_number":139,"context_line":"            primitive, target_version)"},{"line_number":140,"context_line":"        target_version \u003d versionutils.convert_version_to_tuple(target_version)"},{"line_number":141,"context_line":"        if target_version \u003c (1, 4):"},{"line_number":142,"context_line":"            if \u0027src_bdms\u0027 in primitive:"},{"line_number":143,"context_line":"                del primitive[\u0027src_bdms\u0027]"},{"line_number":144,"context_line":"        if target_version \u003c (1, 3):"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a74a57a_817850fa","line":141,"updated":"2016-11-30 14:58:51.000000000","message":"We usually verify that method by adding a new test to assert that the primitive of the version 1.3 will not have the key src_bdms defined.","commit_id":"0834c33c2e97f39d7836fa5e059272d7c26b34c9"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"59f9f6fb0705eb2ae471a039e1ee7de39dd953c9","unresolved":false,"context_lines":[{"line_number":3512,"context_line":"            vol_dev \u003d block_device.prepend_dev(vol[\u0027mount_device\u0027])"},{"line_number":3513,"context_line":"            info \u003d disk_mapping[vol_dev]"},{"line_number":3514,"context_line":"            if instance.host \u003d\u003d CONF.host:"},{"line_number":3515,"context_line":"                self._connect_volume(connection_info, info)"},{"line_number":3516,"context_line":"            cfg \u003d self._get_volume_config(connection_info, info)"},{"line_number":3517,"context_line":"            devices.append(cfg)"},{"line_number":3518,"context_line":"            vol[\u0027connection_info\u0027] \u003d connection_info"}],"source_content_type":"text/x-python","patch_set":1,"id":"da6895a0_fa30ea09","line":3515,"updated":"2016-10-21 12:31:08.000000000","message":"Is this needed during pre-LM?","commit_id":"07410fbafce027f31ba48d7543619be08eeb3032"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"59f9f6fb0705eb2ae471a039e1ee7de39dd953c9","unresolved":false,"context_lines":[{"line_number":6486,"context_line":""},{"line_number":6487,"context_line":"        for bdm in block_device_mapping:"},{"line_number":6488,"context_line":"            bdm.attach(context, instance, self._volume_api, self,"},{"line_number":6489,"context_line":"                       do_check_attach\u003dFalse, do_driver_attach\u003dTrue)"},{"line_number":6490,"context_line":""},{"line_number":6491,"context_line":"        # We call plug_vifs before the compute manager calls"},{"line_number":6492,"context_line":"        # ensure_filtering_rules_for_instance, to ensure bridge is set up"}],"source_content_type":"text/x-python","patch_set":1,"id":"da6895a0_1a367e03","line":6489,"updated":"2016-10-21 12:31:08.000000000","message":"Can\u0027t we just encryptor.attach_volume at this point instead of using bdm.attach and all of it\u0027s additional logic? Really all we need is a bdm.connect method for situations like this where we just need to connect to the underlying volume.","commit_id":"07410fbafce027f31ba48d7543619be08eeb3032"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"b037d4c897420ccaa9bb9244cf8b9e39bba54994","unresolved":false,"context_lines":[{"line_number":6676,"context_line":"            volume_id \u003d vol[\u0027connection_info\u0027][\u0027serial\u0027]"},{"line_number":6677,"context_line":"            connection_info \u003d volume_api.initialize_connection(context,"},{"line_number":6678,"context_line":"                                                               volume_id,"},{"line_number":6679,"context_line":"                                                               connector)"},{"line_number":6680,"context_line":""},{"line_number":6681,"context_line":"            # TODO(leeantho) The following multipath_id logic is temporary"},{"line_number":6682,"context_line":"            # and will be removed in the future once os-brick is updated"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5da102_2d4d493e","side":"PARENT","line":6679,"updated":"2016-11-02 08:55:36.000000000","message":"I\u0027m struggling to understand why we don\u0027t just use the connection_info returned by initialize_connection here. The above will return the connection_info for the current source host and should allow us to detach the encryptor below before disconnecting from the volume. The actual reasoning for stashing the pre_bdms really isn\u0027t clear to me.","commit_id":"094e3282afa7d558057236356b820503260cb33e"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"3e1f16e0fd885db63f64924f0dde4ba83b6cc97a","unresolved":false,"context_lines":[{"line_number":6676,"context_line":"            volume_id \u003d vol[\u0027connection_info\u0027][\u0027serial\u0027]"},{"line_number":6677,"context_line":"            connection_info \u003d volume_api.initialize_connection(context,"},{"line_number":6678,"context_line":"                                                               volume_id,"},{"line_number":6679,"context_line":"                                                               connector)"},{"line_number":6680,"context_line":""},{"line_number":6681,"context_line":"            # TODO(leeantho) The following multipath_id logic is temporary"},{"line_number":6682,"context_line":"            # and will be removed in the future once os-brick is updated"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5da102_ae6bd6b5","side":"PARENT","line":6679,"in_reply_to":"ba5da102_2d4d493e","updated":"2016-11-03 15:36:07.000000000","message":"My observations are that it doesn\u0027t work that way, the bdm table record is updated with the connection_info relating to the target host in pre_live_migration and seems to be missing the device_path which is needed by the encryptor setup","commit_id":"094e3282afa7d558057236356b820503260cb33e"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"b037d4c897420ccaa9bb9244cf8b9e39bba54994","unresolved":false,"context_lines":[{"line_number":3527,"context_line":"            self._connect_volume(connection_info, info)"},{"line_number":3528,"context_line":"            vol_id \u003d connection_info.get(\u0027serial\u0027, None)"},{"line_number":3529,"context_line":"            connector \u003d self.get_volume_connector(instance)"},{"line_number":3530,"context_line":"            connection_info \u003d self._volume_api.initialize_connection("},{"line_number":3531,"context_line":"                                            context, vol_id, connector)"},{"line_number":3532,"context_line":"            encryption \u003d encryptors.get_encryption_metadata("},{"line_number":3533,"context_line":"                context, self._volume_api, vol[\u0027id\u0027], connection_info)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5da102_ed3ef189","line":3530,"updated":"2016-11-02 08:55:36.000000000","message":"We already have this, why are we fetching it again?","commit_id":"03244a161e94518d349921c5ed7adb109fc21efc"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"9a0be6abafdbb1e55abf9d183d6461b002de64c6","unresolved":false,"context_lines":[{"line_number":3527,"context_line":"            self._connect_volume(connection_info, info)"},{"line_number":3528,"context_line":"            vol_id \u003d connection_info.get(\u0027serial\u0027, None)"},{"line_number":3529,"context_line":"            connector \u003d self.get_volume_connector(instance)"},{"line_number":3530,"context_line":"            connection_info \u003d self._volume_api.initialize_connection("},{"line_number":3531,"context_line":"                                            context, vol_id, connector)"},{"line_number":3532,"context_line":"            encryption \u003d encryptors.get_encryption_metadata("},{"line_number":3533,"context_line":"                context, self._volume_api, vol[\u0027id\u0027], connection_info)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5da102_12cdc030","line":3530,"in_reply_to":"ba5da102_ed3ef189","updated":"2016-11-03 13:43:13.000000000","message":"Actually, I believe its worse than that, if we call initialise, some drivers will actually create resources for a new connection.","commit_id":"03244a161e94518d349921c5ed7adb109fc21efc"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"3e1f16e0fd885db63f64924f0dde4ba83b6cc97a","unresolved":false,"context_lines":[{"line_number":3527,"context_line":"            self._connect_volume(connection_info, info)"},{"line_number":3528,"context_line":"            vol_id \u003d connection_info.get(\u0027serial\u0027, None)"},{"line_number":3529,"context_line":"            connector \u003d self.get_volume_connector(instance)"},{"line_number":3530,"context_line":"            connection_info \u003d self._volume_api.initialize_connection("},{"line_number":3531,"context_line":"                                            context, vol_id, connector)"},{"line_number":3532,"context_line":"            encryption \u003d encryptors.get_encryption_metadata("},{"line_number":3533,"context_line":"                context, self._volume_api, vol[\u0027id\u0027], connection_info)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5da102_f3577523","line":3530,"in_reply_to":"ba5da102_ed3ef189","updated":"2016-11-03 15:36:07.000000000","message":"Done","commit_id":"03244a161e94518d349921c5ed7adb109fc21efc"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"b037d4c897420ccaa9bb9244cf8b9e39bba54994","unresolved":false,"context_lines":[{"line_number":3534,"context_line":"            if encryption:"},{"line_number":3535,"context_line":"                encryptor \u003d self._get_volume_encryptor(connection_info,"},{"line_number":3536,"context_line":"                                                       encryption)"},{"line_number":3537,"context_line":"                encryptor.attach_volume(context, **encryption)"},{"line_number":3538,"context_line":"            cfg \u003d self._get_volume_config(connection_info, info)"},{"line_number":3539,"context_line":"            devices.append(cfg)"},{"line_number":3540,"context_line":"            vol[\u0027connection_info\u0027] \u003d connection_info"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5da102_0d440519","line":3537,"updated":"2016-11-02 08:55:36.000000000","message":"Maybe create some _attach_volume_encryptor _detach_volume_encryptor util methods for the above?","commit_id":"03244a161e94518d349921c5ed7adb109fc21efc"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"3e1f16e0fd885db63f64924f0dde4ba83b6cc97a","unresolved":false,"context_lines":[{"line_number":3534,"context_line":"            if encryption:"},{"line_number":3535,"context_line":"                encryptor \u003d self._get_volume_encryptor(connection_info,"},{"line_number":3536,"context_line":"                                                       encryption)"},{"line_number":3537,"context_line":"                encryptor.attach_volume(context, **encryption)"},{"line_number":3538,"context_line":"            cfg \u003d self._get_volume_config(connection_info, info)"},{"line_number":3539,"context_line":"            devices.append(cfg)"},{"line_number":3540,"context_line":"            vol[\u0027connection_info\u0027] \u003d connection_info"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5da102_33348dfa","line":3537,"in_reply_to":"ba5da102_0d440519","updated":"2016-11-03 15:36:07.000000000","message":"Done","commit_id":"03244a161e94518d349921c5ed7adb109fc21efc"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"e6a706a1a48c7687147bca14e448643a01d87919","unresolved":false,"context_lines":[{"line_number":6705,"context_line":"    def post_live_migration(self, context, instance, block_device_info,"},{"line_number":6706,"context_line":"                            migrate_data\u003dNone):"},{"line_number":6707,"context_line":"        # Disconnect from volume server"},{"line_number":6708,"context_line":"        block_device_mapping \u003d driver.block_device_info_get_mapping("},{"line_number":6709,"context_line":"                block_device_info)"},{"line_number":6710,"context_line":"        connector \u003d self.get_volume_connector(instance)"},{"line_number":6711,"context_line":"        volume_api \u003d self._volume_api"},{"line_number":6712,"context_line":"        for vol in block_device_mapping:"},{"line_number":6713,"context_line":"            # Retrieve connection info from Cinder\u0027s initialize_connection API."}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5da102_932e2fa3","line":6710,"range":{"start_line":6708,"start_character":0,"end_line":6710,"end_character":55},"updated":"2016-11-03 15:43:40.000000000","message":"We can remove this now that we are stashing the BDMs no?","commit_id":"8732b3d1aa24979e1ecaf2971c01c18eeb569439"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"e6a706a1a48c7687147bca14e448643a01d87919","unresolved":false,"context_lines":[{"line_number":6713,"context_line":"            # Retrieve connection info from Cinder\u0027s initialize_connection API."},{"line_number":6714,"context_line":"            # The info returned will be accurate for the source server."},{"line_number":6715,"context_line":"            volume_id \u003d vol[\u0027connection_info\u0027][\u0027serial\u0027]"},{"line_number":6716,"context_line":"            pre_bdms \u003d [pre_bdms for pre_bdms in migrate_data.pre_bdms"},{"line_number":6717,"context_line":"                        if getattr(pre_bdms, \u0027serial\u0027, None) \u003d\u003d volume_id]"},{"line_number":6718,"context_line":"            if len(pre_bdms):"},{"line_number":6719,"context_line":"                connection_info \u003d jsonutils.loads("},{"line_number":6720,"context_line":"                                        pre_bdms[0].connection_info_json)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5da102_763fc9b3","line":6717,"range":{"start_line":6716,"start_character":0,"end_line":6717,"end_character":74},"updated":"2016-11-03 15:43:40.000000000","message":"As above we should be able to just iterate over the pre_bdms here and not check against the bdms in block_device_info as they should be the same.","commit_id":"8732b3d1aa24979e1ecaf2971c01c18eeb569439"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"e6a706a1a48c7687147bca14e448643a01d87919","unresolved":false,"context_lines":[{"line_number":6716,"context_line":"            pre_bdms \u003d [pre_bdms for pre_bdms in migrate_data.pre_bdms"},{"line_number":6717,"context_line":"                        if getattr(pre_bdms, \u0027serial\u0027, None) \u003d\u003d volume_id]"},{"line_number":6718,"context_line":"            if len(pre_bdms):"},{"line_number":6719,"context_line":"                connection_info \u003d jsonutils.loads("},{"line_number":6720,"context_line":"                                        pre_bdms[0].connection_info_json)"},{"line_number":6721,"context_line":"            else:"},{"line_number":6722,"context_line":"                connection_info \u003d volume_api.initialize_connection(context,"},{"line_number":6723,"context_line":"                                                                   volume_id,"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5da102_93570f25","line":6720,"range":{"start_line":6719,"start_character":0,"end_line":6720,"end_character":73},"updated":"2016-11-03 15:43:40.000000000","message":"LibvirtLiveMigrateBDMInfo.connection_info does this for you","commit_id":"8732b3d1aa24979e1ecaf2971c01c18eeb569439"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"e6a706a1a48c7687147bca14e448643a01d87919","unresolved":false,"context_lines":[{"line_number":6718,"context_line":"            if len(pre_bdms):"},{"line_number":6719,"context_line":"                connection_info \u003d jsonutils.loads("},{"line_number":6720,"context_line":"                                        pre_bdms[0].connection_info_json)"},{"line_number":6721,"context_line":"            else:"},{"line_number":6722,"context_line":"                connection_info \u003d volume_api.initialize_connection(context,"},{"line_number":6723,"context_line":"                                                                   volume_id,"},{"line_number":6724,"context_line":"                                                                   connector)"},{"line_number":6725,"context_line":""},{"line_number":6726,"context_line":"            encryption \u003d encryptors.get_encryption_metadata(context,"},{"line_number":6727,"context_line":"                                self._volume_api, volume_id, connection_info)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5da102_161f6d5b","line":6724,"range":{"start_line":6721,"start_character":0,"end_line":6724,"end_character":77},"updated":"2016-11-03 15:43:40.000000000","message":"I don\u0027t think we want to do this? If we don\u0027t have a BDM for the volume I can\u0027t see how we could have an attached encryptor. Maybe I\u0027m missing something.","commit_id":"8732b3d1aa24979e1ecaf2971c01c18eeb569439"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"dd7c83631a08196c99e91e4829f4dee92c5b6591","unresolved":false,"context_lines":[{"line_number":6742,"context_line":"            if len(pre_bdms):"},{"line_number":6743,"context_line":"                connection_info \u003d pre_bdms[0].connection_info"},{"line_number":6744,"context_line":"            else:"},{"line_number":6745,"context_line":"                connection_info \u003d self._volume_api.initialize_connection("},{"line_number":6746,"context_line":"                                                                   context,"},{"line_number":6747,"context_line":"                                                                   volume_id,"},{"line_number":6748,"context_line":"                                                                   connector)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_3dbaf8c0","line":6745,"updated":"2016-11-25 13:32:04.000000000","message":"So you iterate on the block device mapping of an instance I guess we could expect that volume_id will match and pre_bdms will never be empty, right ?\n\nSo that \u0027else\u0027 condition is for ? Also I guess we can reasonably pretend that if len(pre_bdms) \u003d\u003d 0 so it\u0027s not necessary to try to load the encryptor.\n\nBasically I think you have a problem in your algorithm and except that all of your fix sounds good.","commit_id":"e89e77bf6386f5ce29853bfa1980a60e58525fcd"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"d85e6b3a8d21d1acf70926e390418313325b337e","unresolved":false,"context_lines":[{"line_number":6742,"context_line":"            if len(pre_bdms):"},{"line_number":6743,"context_line":"                connection_info \u003d pre_bdms[0].connection_info"},{"line_number":6744,"context_line":"            else:"},{"line_number":6745,"context_line":"                connection_info \u003d self._volume_api.initialize_connection("},{"line_number":6746,"context_line":"                                                                   context,"},{"line_number":6747,"context_line":"                                                                   volume_id,"},{"line_number":6748,"context_line":"                                                                   connector)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_24d0b3c8","line":6745,"in_reply_to":"5a74a57a_2b80bbf6","updated":"2016-11-29 11:10:28.000000000","message":"Done","commit_id":"e89e77bf6386f5ce29853bfa1980a60e58525fcd"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"77d84b93e0576d348dd0004653e714a4ef896150","unresolved":false,"context_lines":[{"line_number":6742,"context_line":"            if len(pre_bdms):"},{"line_number":6743,"context_line":"                connection_info \u003d pre_bdms[0].connection_info"},{"line_number":6744,"context_line":"            else:"},{"line_number":6745,"context_line":"                connection_info \u003d self._volume_api.initialize_connection("},{"line_number":6746,"context_line":"                                                                   context,"},{"line_number":6747,"context_line":"                                                                   volume_id,"},{"line_number":6748,"context_line":"                                                                   connector)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_c8e4b6e1","line":6745,"in_reply_to":"5a74a57a_3dbaf8c0","updated":"2016-11-28 07:31:47.000000000","message":"I agree it should always find a match but I was trying to be defensive.  Although we don\u0027t allow attach/detach volume during live migration I was concerned about the scenario where a volume was detached at the time the live migration started and manged to sneak through because of a race condition.  I\u0027ve got not reason to expect this is possible but the alternative is to raise an exception or just not attach the encryptor as you suggest.  Actually I like the idea of raising an exception better than ignoring it.  However this is in post migration so rollback is not possible so we\u0027d need to place the instance in a error state, see https://review.openstack.org/379491","commit_id":"e89e77bf6386f5ce29853bfa1980a60e58525fcd"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"63faaec9184b995638b71bd1d016d11bd7b6f8d1","unresolved":false,"context_lines":[{"line_number":6742,"context_line":"            if len(pre_bdms):"},{"line_number":6743,"context_line":"                connection_info \u003d pre_bdms[0].connection_info"},{"line_number":6744,"context_line":"            else:"},{"line_number":6745,"context_line":"                connection_info \u003d self._volume_api.initialize_connection("},{"line_number":6746,"context_line":"                                                                   context,"},{"line_number":6747,"context_line":"                                                                   volume_id,"},{"line_number":6748,"context_line":"                                                                   connector)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_2b80bbf6","line":6745,"in_reply_to":"5a74a57a_c8e4b6e1","updated":"2016-11-28 11:23:17.000000000","message":"I still don\u0027t think this is valid, we should just iterate over the pre_bdms and use the stashed connection_info to detach any encryptors. If the volumes were not attached at the start of the migration then we should have no reason to expect them at the end.","commit_id":"e89e77bf6386f5ce29853bfa1980a60e58525fcd"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"2b6cdce7d8057248f1ce9d5077c44a6ce09cdee4","unresolved":false,"context_lines":[{"line_number":6625,"context_line":"                instance.image_meta, bdm)"},{"line_number":6626,"context_line":"            self._connect_volume(connection_info, disk_info)"},{"line_number":6627,"context_line":""},{"line_number":6628,"context_line":"            vol_id \u003d connection_info.get(\u0027serial\u0027, None)"},{"line_number":6629,"context_line":"            if vol_id is None:"},{"line_number":6630,"context_line":"                msg \u003d \"serial missing from connection_info\""},{"line_number":6631,"context_line":"                raise exception.InvalidBDMFormat(details\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a74a57a_7c707640","line":6628,"updated":"2016-11-29 14:59:49.000000000","message":"nit: what about to call that \u0027volume_id\u0027 and avoid line 6634","commit_id":"47545132033055194a269894730805ab81b031e5"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"2b6cdce7d8057248f1ce9d5077c44a6ce09cdee4","unresolved":false,"context_lines":[{"line_number":6798,"context_line":"    def post_live_migration(self, context, instance, block_device_info,"},{"line_number":6799,"context_line":"                            migrate_data\u003dNone):"},{"line_number":6800,"context_line":"        # Disconnect from volume server"},{"line_number":6801,"context_line":"        for vol in migrate_data.src_bdms:"},{"line_number":6802,"context_line":"            # Retrieve bdm info from migrate data."},{"line_number":6803,"context_line":"            # The info returned will be accurate for the source server."},{"line_number":6804,"context_line":"            volume_id \u003d vol[\u0027connection_info\u0027][\u0027serial\u0027]"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a74a57a_7cd5d6e2","line":6801,"updated":"2016-11-29 14:59:49.000000000","message":"I would be not so optimistic about the value of src_bdms. what about if migrating from a node which is running on a previous release ?","commit_id":"47545132033055194a269894730805ab81b031e5"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"2b8e9fae645e641c243841fde99972714ed32067","unresolved":false,"context_lines":[{"line_number":6802,"context_line":"            # Retrieve bdm info from migrate data."},{"line_number":6803,"context_line":"            # The info returned will be accurate for the source server."},{"line_number":6804,"context_line":"            volume_id \u003d vol[\u0027connection_info\u0027][\u0027serial\u0027]"},{"line_number":6805,"context_line":"            src_bdms \u003d [src_bdms for src_bdms in migrate_data.src_bdms"},{"line_number":6806,"context_line":"                        if getattr(src_bdms, \u0027serial\u0027, None) \u003d\u003d volume_id]"},{"line_number":6807,"context_line":"            if len(src_bdms) \u003d\u003d 0:"},{"line_number":6808,"context_line":"                LOG.warning(("}],"source_content_type":"text/x-python","patch_set":12,"id":"5a74a57a_e2c75362","line":6805,"updated":"2016-11-30 10:26:31.000000000","message":"Yes I think it\u0027s the safer way to do that even if I understand the point of Lee to iterate over src_bdms.\n\nYou may add a TODO note to indicate that, for Q* we could update the part to only iterate over src_bdms.","commit_id":"0834c33c2e97f39d7836fa5e059272d7c26b34c9"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"a6fa8b64525c49d7e7d2bba538c18f279920caf1","unresolved":false,"context_lines":[{"line_number":6802,"context_line":"            # Retrieve bdm info from migrate data."},{"line_number":6803,"context_line":"            # The info returned will be accurate for the source server."},{"line_number":6804,"context_line":"            volume_id \u003d vol[\u0027connection_info\u0027][\u0027serial\u0027]"},{"line_number":6805,"context_line":"            src_bdms \u003d [src_bdms for src_bdms in migrate_data.src_bdms"},{"line_number":6806,"context_line":"                        if getattr(src_bdms, \u0027serial\u0027, None) \u003d\u003d volume_id]"},{"line_number":6807,"context_line":"            if len(src_bdms) \u003d\u003d 0:"},{"line_number":6808,"context_line":"                LOG.warning(("}],"source_content_type":"text/x-python","patch_set":12,"id":"5a74a57a_5c48df5b","line":6805,"in_reply_to":"5a74a57a_e2c75362","updated":"2016-11-30 14:58:51.000000000","message":"So unfortunatly and for the same reason I have indicated before you can\u0027t do that. For an instance migrated from an old compute node, the version of LibvirtMigrateData will be 1.3 so without that field defined.\n\nI would recommend to add a condition with like:\n\n  if migrate_data.obj_attr_is_set(\u0027src_bdms\u0027) and migrate_data..src_bdms:\n    ...","commit_id":"0834c33c2e97f39d7836fa5e059272d7c26b34c9"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"1434f9f627195808b2ec53a62138e5078df1a027","unresolved":false,"context_lines":[{"line_number":6838,"context_line":"                block_device_info)"},{"line_number":6839,"context_line":""},{"line_number":6840,"context_line":"        # TODO(paul-carlton2) Remove block_device_mapping iteration and"},{"line_number":6841,"context_line":"        # replace withiteration over migrate_data.src.bdms and remove old"},{"line_number":6842,"context_line":"        # method of getting connection info in Q release"},{"line_number":6843,"context_line":"        connector \u003d self.get_volume_connector(instance)"},{"line_number":6844,"context_line":"        volume_api \u003d self._volume_api"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a71b18c_7d51f9d7","line":6841,"updated":"2016-12-02 13:56:34.000000000","message":"with iteration","commit_id":"3169cadbb202479444716cd3f04cd80429033912"}]}
