)]}'
{"nova/compute/api.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"3f43d53a3a326f27cbd0f27ac55031b84f0d1a17","unresolved":false,"context_lines":[{"line_number":4368,"context_line":"        bdm \u003d objects.BlockDeviceMapping.get_by_volume_and_instance("},{"line_number":4369,"context_line":"            context, old_volume[\u0027id\u0027], instance.uuid)"},{"line_number":4370,"context_line":"        new_attachment_id \u003d None"},{"line_number":4371,"context_line":"        if bdm.attachment_id is None:"},{"line_number":4372,"context_line":"            # This is an old-style attachment so reserve the new volume before"},{"line_number":4373,"context_line":"            # we cast to the compute host."},{"line_number":4374,"context_line":"            self.volume_api.reserve_volume(context, new_volume[\u0027id\u0027])"},{"line_number":4375,"context_line":"        else:"},{"line_number":4376,"context_line":"            try:"},{"line_number":4377,"context_line":"                self._check_volume_already_attached_to_instance("},{"line_number":4378,"context_line":"                    context, instance, new_volume[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_2ee4813b","line":4375,"range":{"start_line":4371,"start_character":8,"end_line":4375,"end_character":13},"updated":"2019-10-14 21:15:50.000000000","message":"Based on the code comment in the code that\u0027s being removed, it says it\u0027s safe to remove once all calls of reserve_volume are gone. But this call is here. Should it be removed as well? Does its presence mean we shouldn\u0027t remove the compat code quite yet?","commit_id":"56d3f4657c446360db53779cf025d40a44bf04bb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bb5295c4ab17c8932159cbb091e07df7a33493a3","unresolved":false,"context_lines":[{"line_number":4368,"context_line":"        bdm \u003d objects.BlockDeviceMapping.get_by_volume_and_instance("},{"line_number":4369,"context_line":"            context, old_volume[\u0027id\u0027], instance.uuid)"},{"line_number":4370,"context_line":"        new_attachment_id \u003d None"},{"line_number":4371,"context_line":"        if bdm.attachment_id is None:"},{"line_number":4372,"context_line":"            # This is an old-style attachment so reserve the new volume before"},{"line_number":4373,"context_line":"            # we cast to the compute host."},{"line_number":4374,"context_line":"            self.volume_api.reserve_volume(context, new_volume[\u0027id\u0027])"},{"line_number":4375,"context_line":"        else:"},{"line_number":4376,"context_line":"            try:"},{"line_number":4377,"context_line":"                self._check_volume_already_attached_to_instance("},{"line_number":4378,"context_line":"                    context, instance, new_volume[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_d8a9cf7b","line":4375,"range":{"start_line":4371,"start_character":8,"end_line":4375,"end_character":13},"in_reply_to":"3fa7e38b_2ee4813b","updated":"2019-10-16 16:45:38.000000000","message":"Different situations. The code being removed is boot from volume so we ensure we\u0027re creating a new attachment.\n\nIn this case we\u0027re swapping what could be a legacy attached volume and need to use the old flow.\n\nAnd we could have legacy attached BDMs because:\n\n1. boot from volume and nova created the volume before this merged: https://review.opendev.org/#/c/541420/\n\n2. we haven\u0027t migrated the old style attachment: https://review.opendev.org/#/c/549130/","commit_id":"56d3f4657c446360db53779cf025d40a44bf04bb"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"94f7033962c8076eb8dff521f0abe1f41deada8f","unresolved":false,"context_lines":[{"line_number":4368,"context_line":"        bdm \u003d objects.BlockDeviceMapping.get_by_volume_and_instance("},{"line_number":4369,"context_line":"            context, old_volume[\u0027id\u0027], instance.uuid)"},{"line_number":4370,"context_line":"        new_attachment_id \u003d None"},{"line_number":4371,"context_line":"        if bdm.attachment_id is None:"},{"line_number":4372,"context_line":"            # This is an old-style attachment so reserve the new volume before"},{"line_number":4373,"context_line":"            # we cast to the compute host."},{"line_number":4374,"context_line":"            self.volume_api.reserve_volume(context, new_volume[\u0027id\u0027])"},{"line_number":4375,"context_line":"        else:"},{"line_number":4376,"context_line":"            try:"},{"line_number":4377,"context_line":"                self._check_volume_already_attached_to_instance("},{"line_number":4378,"context_line":"                    context, instance, new_volume[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_c63250f2","line":4375,"range":{"start_line":4371,"start_character":8,"end_line":4375,"end_character":13},"in_reply_to":"3fa7e38b_d8a9cf7b","updated":"2019-10-16 18:30:05.000000000","message":"Makes sense, thanks for the detailed explanation.","commit_id":"56d3f4657c446360db53779cf025d40a44bf04bb"}]}
