)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b139a752f961d3302c9b8c19b1e760081f2ad8b6","unresolved":false,"context_lines":[{"line_number":3825,"context_line":"            self.driver.destroy(context, instance, network_info,"},{"line_number":3826,"context_line":"                                block_device_info, destroy_disks)"},{"line_number":3827,"context_line":""},{"line_number":3828,"context_line":"            self._terminate_volume_connections(context, instance, bdms)"},{"line_number":3829,"context_line":""},{"line_number":3830,"context_line":"            migration.status \u003d \u0027reverted\u0027"},{"line_number":3831,"context_line":"            with migration.obj_as_admin():"}],"source_content_type":"text/x-python","patch_set":2,"id":"df87a7cf_2e253209","line":3828,"updated":"2017-12-11 23:23:44.000000000","message":"Yup this will create a new attachment for the original source host and delete the old attachment for the dest host (where the instance is now).","commit_id":"8c60b9c8126cd4f8dc135ba6942635bb51b8df54"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"2263a42e0ff0d8d3f4ba8c408f1af736423d1898","unresolved":false,"context_lines":[{"line_number":3901,"context_line":"            network_info \u003d self.network_api.get_instance_nw_info(context,"},{"line_number":3902,"context_line":"                                                                 instance)"},{"line_number":3903,"context_line":""},{"line_number":3904,"context_line":"            block_device_info \u003d self._get_instance_block_device_info("},{"line_number":3905,"context_line":"                    context, instance, refresh_conn_info\u003dTrue)"},{"line_number":3906,"context_line":""},{"line_number":3907,"context_line":"            power_on \u003d old_vm_state !\u003d vm_states.STOPPED"},{"line_number":3908,"context_line":"            self.driver.finish_revert_migration(context, instance,"}],"source_content_type":"text/x-python","patch_set":2,"id":"df87a7cf_eefbcaba","line":3905,"range":{"start_line":3904,"start_character":0,"end_line":3905,"end_character":62},"updated":"2017-12-11 23:06:16.000000000","message":"We likely need to call _update_volume_attachments before this and _complete_volume_attachments after finish_revert_migration as from volume attachment perspective reverting does the same magic starting with _terminate_volume_connections in revert_resize.","commit_id":"8c60b9c8126cd4f8dc135ba6942635bb51b8df54"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b139a752f961d3302c9b8c19b1e760081f2ad8b6","unresolved":false,"context_lines":[{"line_number":3901,"context_line":"            network_info \u003d self.network_api.get_instance_nw_info(context,"},{"line_number":3902,"context_line":"                                                                 instance)"},{"line_number":3903,"context_line":""},{"line_number":3904,"context_line":"            block_device_info \u003d self._get_instance_block_device_info("},{"line_number":3905,"context_line":"                    context, instance, refresh_conn_info\u003dTrue)"},{"line_number":3906,"context_line":""},{"line_number":3907,"context_line":"            power_on \u003d old_vm_state !\u003d vm_states.STOPPED"},{"line_number":3908,"context_line":"            self.driver.finish_revert_migration(context, instance,"}],"source_content_type":"text/x-python","patch_set":2,"id":"df87a7cf_8e7b1ef3","line":3905,"range":{"start_line":3904,"start_character":0,"end_line":3905,"end_character":62},"in_reply_to":"df87a7cf_eefbcaba","updated":"2017-12-11 23:23:44.000000000","message":"Yup, excellent point.","commit_id":"8c60b9c8126cd4f8dc135ba6942635bb51b8df54"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"ee6ad31444c3b3465672f5da2ed928f78d99ed1b","unresolved":false,"context_lines":[{"line_number":4336,"context_line":"               self.host, action\u003dfields.NotificationAction.RESIZE_FINISH,"},{"line_number":4337,"context_line":"               phase\u003dfields.NotificationPhase.START, bdms\u003dbdms)"},{"line_number":4338,"context_line":""},{"line_number":4339,"context_line":"        # We need to update any volume attachments using the destination"},{"line_number":4340,"context_line":"        # host connector so that we can update the BDM.connection_info"},{"line_number":4341,"context_line":"        # before calling driver.finish_migration otherwise the driver"},{"line_number":4342,"context_line":"        # won\u0027t know how to connect the volumes to this host."},{"line_number":4343,"context_line":"        # Note that _get_instance_block_device_info with"},{"line_number":4344,"context_line":"        # refresh_conn_info\u003dTrue will update the BDM.connection_info value"},{"line_number":4345,"context_line":"        # in the database so we must do this before calling that method."},{"line_number":4346,"context_line":"        self._update_volume_attachments(context, instance, bdms)"},{"line_number":4347,"context_line":""},{"line_number":4348,"context_line":"        block_device_info \u003d self._get_instance_block_device_info("}],"source_content_type":"text/x-python","patch_set":2,"id":"df87a7cf_3f156340","line":4345,"range":{"start_line":4339,"start_character":8,"end_line":4345,"end_character":72},"updated":"2017-12-11 21:48:25.000000000","message":"At this point the volume state is also supposed to be \u0027reserved\u0027 which we would like to move to \u0027attaching\u0027 and then back to \u0027in-use\u0027 with the attachment_complete call below.","commit_id":"8c60b9c8126cd4f8dc135ba6942635bb51b8df54"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"012a7e4a8b0a85c07ec622824a8faf43f2292608","unresolved":false,"context_lines":[{"line_number":3864,"context_line":"        with self._error_out_instance_on_exception(context, instance):"},{"line_number":3865,"context_line":"            self._notify_about_instance_usage("},{"line_number":3866,"context_line":"                    context, instance, \"resize.revert.start\")"},{"line_number":3867,"context_line":"            compute_utils.notify_about_instance_action(context, instance,"},{"line_number":3868,"context_line":"                self.host, action\u003dfields.NotificationAction.RESIZE_REVERT,"},{"line_number":3869,"context_line":"                    phase\u003dfields.NotificationPhase.START)"},{"line_number":3870,"context_line":""},{"line_number":3871,"context_line":"            # NOTE(mriedem): delete stashed old_vm_state information; we"},{"line_number":3872,"context_line":"            # default to ACTIVE for backwards compatibility if old_vm_state"}],"source_content_type":"text/x-python","patch_set":3,"id":"df87a7cf_e248bb5c","line":3869,"range":{"start_line":3867,"start_character":12,"end_line":3869,"end_character":57},"updated":"2017-12-12 02:52:25.000000000","message":"We can get the BDMs before this and pass them in here - but let\u0027s do that in a follow up change.","commit_id":"e73721c541b43988d9f86fe510221180b00c8ad3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"012a7e4a8b0a85c07ec622824a8faf43f2292608","unresolved":false,"context_lines":[{"line_number":3940,"context_line":""},{"line_number":3941,"context_line":"            self._notify_about_instance_usage("},{"line_number":3942,"context_line":"                    context, instance, \"resize.revert.end\")"},{"line_number":3943,"context_line":"            compute_utils.notify_about_instance_action(context, instance,"},{"line_number":3944,"context_line":"                self.host, action\u003dfields.NotificationAction.RESIZE_REVERT,"},{"line_number":3945,"context_line":"                    phase\u003dfields.NotificationPhase.END)"},{"line_number":3946,"context_line":""},{"line_number":3947,"context_line":"    def _revert_allocation(self, context, instance, migration):"},{"line_number":3948,"context_line":"        \"\"\"Revert an allocation that is held by migration to our instance.\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"df87a7cf_22430344","line":3945,"range":{"start_line":3943,"start_character":12,"end_line":3945,"end_character":55},"updated":"2017-12-12 02:52:25.000000000","message":"we could pass the bdms in here now","commit_id":"e73721c541b43988d9f86fe510221180b00c8ad3"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"1e2621f3717716f2efac6be9b9cd3cf55320c6bb","unresolved":false,"context_lines":[{"line_number":4210,"context_line":"                    block_device_info,"},{"line_number":4211,"context_line":"                    timeout, retry_interval)"},{"line_number":4212,"context_line":""},{"line_number":4213,"context_line":"            self._terminate_volume_connections(context, instance, bdms)"},{"line_number":4214,"context_line":""},{"line_number":4215,"context_line":"            migration_p \u003d obj_base.obj_to_primitive(migration)"},{"line_number":4216,"context_line":"            self.network_api.migrate_instance_start(context,"}],"source_content_type":"text/x-python","patch_set":5,"id":"df87a7cf_c6ded96b","line":4213,"updated":"2017-12-12 18:16:21.000000000","message":"Here\u0027s the same for resize.","commit_id":"22402aecce7ce289e752120f8c782de74a1143e8"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"1e2621f3717716f2efac6be9b9cd3cf55320c6bb","unresolved":false,"context_lines":[{"line_number":4255,"context_line":"                    attachment_id \u003d self.volume_api.attachment_create("},{"line_number":4256,"context_line":"                        context, bdm.volume_id, instance.uuid)[\u0027id\u0027]"},{"line_number":4257,"context_line":"                    self.volume_api.attachment_delete(context,"},{"line_number":4258,"context_line":"                                                      bdm.attachment_id)"},{"line_number":4259,"context_line":"                    bdm.attachment_id \u003d attachment_id"},{"line_number":4260,"context_line":"                    bdm.save()"},{"line_number":4261,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"df87a7cf_a68ab560","line":4258,"updated":"2017-12-12 18:16:21.000000000","message":"Here\u0027s where we delete and create without a connector during revert_resize.","commit_id":"22402aecce7ce289e752120f8c782de74a1143e8"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"1e2621f3717716f2efac6be9b9cd3cf55320c6bb","unresolved":false,"context_lines":[{"line_number":4755,"context_line":""},{"line_number":4756,"context_line":"        # the instance is going to be removed from the host so we want to"},{"line_number":4757,"context_line":"        # terminate all the connections with the volume server and the host"},{"line_number":4758,"context_line":"        self._terminate_volume_connections(context, instance, bdms)"},{"line_number":4759,"context_line":""},{"line_number":4760,"context_line":"        instance.power_state \u003d current_power_state"},{"line_number":4761,"context_line":"        # NOTE(mriedem): The vm_state has to be set before updating the"}],"source_content_type":"text/x-python","patch_set":5,"id":"df87a7cf_c6757965","line":4758,"updated":"2017-12-12 18:16:21.000000000","message":"Is this still correct for shelve offload? As of a recent-ish change, _terminate_volume_connections doesn\u0027t only terminate connections for new-style attachments, it also creates a new attachment without a host connector. We don\u0027t want that for shelve offload, do we?","commit_id":"22402aecce7ce289e752120f8c782de74a1143e8"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"835b38e8859cf1fc5bfd5a89b77b3b125de29af3","unresolved":false,"context_lines":[{"line_number":4755,"context_line":""},{"line_number":4756,"context_line":"        # the instance is going to be removed from the host so we want to"},{"line_number":4757,"context_line":"        # terminate all the connections with the volume server and the host"},{"line_number":4758,"context_line":"        self._terminate_volume_connections(context, instance, bdms)"},{"line_number":4759,"context_line":""},{"line_number":4760,"context_line":"        instance.power_state \u003d current_power_state"},{"line_number":4761,"context_line":"        # NOTE(mriedem): The vm_state has to be set before updating the"}],"source_content_type":"text/x-python","patch_set":5,"id":"df87a7cf_c629f9e5","line":4758,"in_reply_to":"df87a7cf_c6757965","updated":"2017-12-12 18:49:18.000000000","message":"This got answered on IRC, the create of the new attachment keeps the volume reserved to ensure it will be available for unshelve later. So all is well.","commit_id":"22402aecce7ce289e752120f8c782de74a1143e8"}],"nova/virt/block_device.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5a755aa202b6907fe88e981e6b41d41b359850be","unresolved":false,"context_lines":[{"line_number":549,"context_line":"                \u0027driver_volume_type\u0027)"},{"line_number":550,"context_line":"            attachment_ref \u003d volume_api.attachment_get(context,"},{"line_number":551,"context_line":"                                                       self[\u0027attachment_id\u0027])"},{"line_number":552,"context_line":"            connection_info \u003d attachment_ref[\u0027connection_info\u0027]"},{"line_number":553,"context_line":"            new_driver_volume_type \u003d connection_info.get(\u0027driver_volume_type\u0027)"},{"line_number":554,"context_line":"            if not new_driver_volume_type:"},{"line_number":555,"context_line":"                connection_info[\u0027driver_volume_type\u0027] \u003d old_driver_volume_type"}],"source_content_type":"text/x-python","patch_set":1,"id":"df87a7cf_2b62090b","line":552,"updated":"2017-12-11 19:55:52.000000000","message":"Alternatively, if connection_info is empty, we could call:\n\nconnection_info \u003d volume_api.initialize_connection(context,\n                                                               self.volume_id,\n                                                               connector)\n\nWhich is what we have above, and that\u0027s how it would be used for the old flow.\n\nWe don\u0027t get the connection_info for the new attachment unless we update it with the host connector, and in the new flow today that only happens via attach, which is not something that the virt driver calls on the dest host during during a resize.","commit_id":"9a472d9f362a8e68c7f55de81634481098f0eac2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1d209dcd835ff1018d260a712535fd59da82b52c","unresolved":false,"context_lines":[{"line_number":549,"context_line":"                \u0027driver_volume_type\u0027)"},{"line_number":550,"context_line":"            attachment_ref \u003d volume_api.attachment_get(context,"},{"line_number":551,"context_line":"                                                       self[\u0027attachment_id\u0027])"},{"line_number":552,"context_line":"            connection_info \u003d attachment_ref[\u0027connection_info\u0027]"},{"line_number":553,"context_line":"            new_driver_volume_type \u003d connection_info.get(\u0027driver_volume_type\u0027)"},{"line_number":554,"context_line":"            if not new_driver_volume_type:"},{"line_number":555,"context_line":"                connection_info[\u0027driver_volume_type\u0027] \u003d old_driver_volume_type"}],"source_content_type":"text/x-python","patch_set":1,"id":"df87a7cf_4e6afb19","line":552,"in_reply_to":"df87a7cf_2b62090b","updated":"2017-12-11 20:18:24.000000000","message":"If we don\u0027t call _volume_attach in here we also wouldn\u0027t ever actually complete the new volume attachment on the dest host...and doing all of that from within this refresh_connection_method is pretty bad. The finish_resize routine in the compute manager could call _prep_block_devices but I\u0027m not sure if that break the virt drivers since the virt drivers are doing their own connect_volume call.","commit_id":"9a472d9f362a8e68c7f55de81634481098f0eac2"}]}
