)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"b1e25c4096529f9f2346f748537ddff7cf5e4513","unresolved":false,"context_lines":[{"line_number":7723,"context_line":"                    # is stored in dict with the key being the bdm.volume_id"},{"line_number":7724,"context_line":"                    # so it can be restored on rollback."},{"line_number":7725,"context_line":"                    #"},{"line_number":7726,"context_line":"                    # Also note that attachment_update is not needed as we"},{"line_number":7727,"context_line":"                    # are providing the connector in the create call."},{"line_number":7728,"context_line":"                    attach_ref \u003d self.volume_api.attachment_create("},{"line_number":7729,"context_line":"                        context, bdm.volume_id, bdm.instance_uuid,"},{"line_number":7730,"context_line":"                        connector\u003dconnector, mountpoint\u003dbdm.device_name)"},{"line_number":7731,"context_line":""},{"line_number":7732,"context_line":"                    # save current attachment so we can detach it on success,"},{"line_number":7733,"context_line":"                    # or restore it on a rollback."}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4c43b2_7246c0c2","line":7730,"range":{"start_line":7726,"start_character":0,"end_line":7730,"end_character":72},"updated":"2020-04-19 15:02:33.000000000","message":"Is this the actual issue here?","commit_id":"2cb59f5d427c919c8012b72461c8442260ed836a"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"3294da73c8128e223232e394ddb2dc7bea32504e","unresolved":false,"context_lines":[{"line_number":7723,"context_line":"                    # is stored in dict with the key being the bdm.volume_id"},{"line_number":7724,"context_line":"                    # so it can be restored on rollback."},{"line_number":7725,"context_line":"                    #"},{"line_number":7726,"context_line":"                    # Also note that attachment_update is not needed as we"},{"line_number":7727,"context_line":"                    # are providing the connector in the create call."},{"line_number":7728,"context_line":"                    attach_ref \u003d self.volume_api.attachment_create("},{"line_number":7729,"context_line":"                        context, bdm.volume_id, bdm.instance_uuid,"},{"line_number":7730,"context_line":"                        connector\u003dconnector, mountpoint\u003dbdm.device_name)"},{"line_number":7731,"context_line":""},{"line_number":7732,"context_line":"                    # save current attachment so we can detach it on success,"},{"line_number":7733,"context_line":"                    # or restore it on a rollback."}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4c43b2_328a78be","line":7730,"range":{"start_line":7726,"start_character":0,"end_line":7730,"end_character":72},"in_reply_to":"3f4c43b2_7246c0c2","updated":"2020-04-19 15:28:31.000000000","message":"To answer my own question, no this isn\u0027t an issue, as the comment suggests when the connector is provided c-api will also call attachment_update for us.\n\nhttps://github.com/openstack/cinder/blob/99c09bddceca754b550955db7e6786686316d525/cinder/volume/api.py#L2171-L2177","commit_id":"2cb59f5d427c919c8012b72461c8442260ed836a"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"3294da73c8128e223232e394ddb2dc7bea32504e","unresolved":false,"context_lines":[{"line_number":7780,"context_line":"                        bdm.attachment_id \u003d old_attachments[bdm.volume_id]"},{"line_number":7781,"context_line":"                        bdm.save()"},{"line_number":7782,"context_line":""},{"line_number":7783,"context_line":"        # Volume connections are complete, tell cinder that all the"},{"line_number":7784,"context_line":"        # attachments have completed."},{"line_number":7785,"context_line":"        for bdm in bdms:"},{"line_number":7786,"context_line":"            if bdm.is_volume and bdm.attachment_id is not None:"},{"line_number":7787,"context_line":"                self.volume_api.attachment_complete(context,"},{"line_number":7788,"context_line":"                                                    bdm.attachment_id)"},{"line_number":7789,"context_line":"        # update connection info"},{"line_number":7790,"context_line":"        block_device_info \u003d block_device_info or {}"},{"line_number":7791,"context_line":"        block_device_mapping \u003d block_device_info.get(\u0027block_device_mapping\u0027) \\"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4c43b2_929b8c16","line":7788,"range":{"start_line":7783,"start_character":0,"end_line":7788,"end_character":70},"updated":"2020-04-19 15:28:31.000000000","message":"https://github.com/openstack/cinder/blob/99c09bddceca754b550955db7e6786686316d525/cinder/api/v3/attachments.py#L273-L292 \n\n^ If this isn\u0027t setting the volume to in-use then is there something wrong with c-api?","commit_id":"2cb59f5d427c919c8012b72461c8442260ed836a"},{"author":{"_account_id":29071,"name":"norman shen","email":"yshxxsjt715@gmail.com","username":"ushen"},"change_message_id":"27fc91caaf61f2f9933d6c06392ad52bfc4a6d46","unresolved":false,"context_lines":[{"line_number":7780,"context_line":"                        bdm.attachment_id \u003d old_attachments[bdm.volume_id]"},{"line_number":7781,"context_line":"                        bdm.save()"},{"line_number":7782,"context_line":""},{"line_number":7783,"context_line":"        # Volume connections are complete, tell cinder that all the"},{"line_number":7784,"context_line":"        # attachments have completed."},{"line_number":7785,"context_line":"        for bdm in bdms:"},{"line_number":7786,"context_line":"            if bdm.is_volume and bdm.attachment_id is not None:"},{"line_number":7787,"context_line":"                self.volume_api.attachment_complete(context,"},{"line_number":7788,"context_line":"                                                    bdm.attachment_id)"},{"line_number":7789,"context_line":"        # update connection info"},{"line_number":7790,"context_line":"        block_device_info \u003d block_device_info or {}"},{"line_number":7791,"context_line":"        block_device_mapping \u003d block_device_info.get(\u0027block_device_mapping\u0027) \\"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4c43b2_fb1f4b58","line":7788,"range":{"start_line":7783,"start_character":0,"end_line":7788,"end_character":70},"in_reply_to":"3f4c43b2_52546421","updated":"2020-04-20 01:11:11.000000000","message":"then, I think it\u0027s better to remove it? I personally thought connection_info is pretty confusing...","commit_id":"2cb59f5d427c919c8012b72461c8442260ed836a"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"bd9c9628b0db26f1b39320cc9a7ebbf742121dc3","unresolved":false,"context_lines":[{"line_number":7780,"context_line":"                        bdm.attachment_id \u003d old_attachments[bdm.volume_id]"},{"line_number":7781,"context_line":"                        bdm.save()"},{"line_number":7782,"context_line":""},{"line_number":7783,"context_line":"        # Volume connections are complete, tell cinder that all the"},{"line_number":7784,"context_line":"        # attachments have completed."},{"line_number":7785,"context_line":"        for bdm in bdms:"},{"line_number":7786,"context_line":"            if bdm.is_volume and bdm.attachment_id is not None:"},{"line_number":7787,"context_line":"                self.volume_api.attachment_complete(context,"},{"line_number":7788,"context_line":"                                                    bdm.attachment_id)"},{"line_number":7789,"context_line":"        # update connection info"},{"line_number":7790,"context_line":"        block_device_info \u003d block_device_info or {}"},{"line_number":7791,"context_line":"        block_device_mapping \u003d block_device_info.get(\u0027block_device_mapping\u0027) \\"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4c43b2_52546421","line":7788,"range":{"start_line":7783,"start_character":0,"end_line":7788,"end_character":70},"in_reply_to":"3f4c43b2_929b8c16","updated":"2020-04-19 15:39:05.000000000","message":"Ah sorry it\u0027s because bdm[\u0027connection_info\u0027] isn\u0027t updated and the status field within the dict is still attaching.\n\nI don\u0027t think this is a valid issue tbh, we shouldn\u0027t be using the connection_info to track the status of the volume or it\u0027s attachments.","commit_id":"2cb59f5d427c919c8012b72461c8442260ed836a"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"a10ae7c61a84bcae8585f327469e8e904cdb163e","unresolved":false,"context_lines":[{"line_number":7780,"context_line":"                        bdm.attachment_id \u003d old_attachments[bdm.volume_id]"},{"line_number":7781,"context_line":"                        bdm.save()"},{"line_number":7782,"context_line":""},{"line_number":7783,"context_line":"        # Volume connections are complete, tell cinder that all the"},{"line_number":7784,"context_line":"        # attachments have completed."},{"line_number":7785,"context_line":"        for bdm in bdms:"},{"line_number":7786,"context_line":"            if bdm.is_volume and bdm.attachment_id is not None:"},{"line_number":7787,"context_line":"                self.volume_api.attachment_complete(context,"},{"line_number":7788,"context_line":"                                                    bdm.attachment_id)"},{"line_number":7789,"context_line":"        # update connection info"},{"line_number":7790,"context_line":"        block_device_info \u003d block_device_info or {}"},{"line_number":7791,"context_line":"        block_device_mapping \u003d block_device_info.get(\u0027block_device_mapping\u0027) \\"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4c43b2_0c5abc81","line":7788,"range":{"start_line":7783,"start_character":0,"end_line":7788,"end_character":70},"in_reply_to":"3f4c43b2_fb1f4b58","updated":"2020-04-20 07:20:20.000000000","message":"Yeah, I can\u0027t see any use of this on the Nova side, assuming it\u0027s not used on the Cinder side we should remove it there.\n\nWhich volume backend are you using?","commit_id":"2cb59f5d427c919c8012b72461c8442260ed836a"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"b1e25c4096529f9f2346f748537ddff7cf5e4513","unresolved":false,"context_lines":[{"line_number":7794,"context_line":"            # legacy driver casting block_device_mapping to"},{"line_number":7795,"context_line":"            # a list of dicts"},{"line_number":7796,"context_line":"            if not isinstance(bdm, dict):"},{"line_number":7797,"context_line":"                bdm[\u0027connection_info\u0027][\u0027status\u0027] \u003d \u0027in-use\u0027"},{"line_number":7798,"context_line":"                bdm.save()"},{"line_number":7799,"context_line":""},{"line_number":7800,"context_line":"        self._notify_about_instance_usage("}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4c43b2_b215e89e","line":7797,"range":{"start_line":7797,"start_character":0,"end_line":7797,"end_character":59},"updated":"2020-04-19 15:02:33.000000000","message":"Nope, we shouldn\u0027t be touching the state within the conncection_info like this.","commit_id":"2cb59f5d427c919c8012b72461c8442260ed836a"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"3294da73c8128e223232e394ddb2dc7bea32504e","unresolved":false,"context_lines":[{"line_number":7794,"context_line":"            # legacy driver casting block_device_mapping to"},{"line_number":7795,"context_line":"            # a list of dicts"},{"line_number":7796,"context_line":"            if not isinstance(bdm, dict):"},{"line_number":7797,"context_line":"                bdm[\u0027connection_info\u0027][\u0027status\u0027] \u003d \u0027in-use\u0027"},{"line_number":7798,"context_line":"                bdm.save()"},{"line_number":7799,"context_line":""},{"line_number":7800,"context_line":"        self._notify_about_instance_usage("}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4c43b2_729080ee","line":7797,"range":{"start_line":7797,"start_character":0,"end_line":7797,"end_character":59},"in_reply_to":"3f4c43b2_b215e89e","updated":"2020-04-19 15:28:31.000000000","message":"Additionally you shouldn\u0027t be relying on the status within the connection_info. I wonder why it\u0027s even stashed there tbh.","commit_id":"2cb59f5d427c919c8012b72461c8442260ed836a"}]}
