)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"01d71d594b76f359fff969b53360eeb78b9b0b58","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"defcd6e9_3cdfdd92","updated":"2026-04-23 16:21:10.000000000","message":"A few minor issues noted inline.  Otherwise, LGTM.","commit_id":"eb064f10a78b27e3300c794276c3e92c45641833"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"f09f55813ed0d013799ec86dc5a629e80bad91e7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"ef297d78_87970b19","updated":"2026-04-23 05:50:58.000000000","message":"Thank you!!","commit_id":"eb064f10a78b27e3300c794276c3e92c45641833"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"cc21253baa6f8cb51f68395db156f4c48253372d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"db7d923f_6d0c14e0","updated":"2026-04-23 05:22:25.000000000","message":"Thanks Abhishek for the review!","commit_id":"eb064f10a78b27e3300c794276c3e92c45641833"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"a94c7b96e3e296434340d0d9220c37488eb2eb44","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"7c773a74_d28a6962","updated":"2026-04-28 00:15:44.000000000","message":"Revisions LGTM.","commit_id":"5e561642d138edf9a30da8544b3d8b7dcab96b7f"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"f72cb548874743c15d0bf5f463ffdd6cf2da0855","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"976daff6_fa8f3d89","updated":"2026-04-24 08:42:31.000000000","message":"Thanks Brian for the review!","commit_id":"5e561642d138edf9a30da8544b3d8b7dcab96b7f"}],"cirros.raw":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"01d71d594b76f359fff969b53360eeb78b9b0b58","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"2f9a3d67_db048839","updated":"2026-04-23 16:21:10.000000000","message":"I don\u0027t think this is used anywhere?  Did you commit it by mistake?","commit_id":"eb064f10a78b27e3300c794276c3e92c45641833"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"f72cb548874743c15d0bf5f463ffdd6cf2da0855","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"131f8f39_69ea01dd","in_reply_to":"2f9a3d67_db048839","updated":"2026-04-24 08:42:31.000000000","message":"oh yes ... I was testing the code with some file downloads and this might be a side effect of `git add .`\nRemoved now","commit_id":"eb064f10a78b27e3300c794276c3e92c45641833"}],"glance_store/common/cinder_utils.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"a6204d0c0d79f4b8fb4c3a606792b797c12f8422","unresolved":true,"context_lines":[{"line_number":52,"context_line":"        # Only retry on specific volume status errors"},{"line_number":53,"context_line":"        error_msg \u003d str(e).lower()"},{"line_number":54,"context_line":"        # Check for either of the two expected error patterns"},{"line_number":55,"context_line":"        if (\u0027status must be available or downloading to reserve\u0027"},{"line_number":56,"context_line":"                in error_msg or"},{"line_number":57,"context_line":"                \u0027status must be available or in-use or downloading \u0027"},{"line_number":58,"context_line":"                \u0027to reserve\u0027 in error_msg):"},{"line_number":59,"context_line":"            return True"},{"line_number":60,"context_line":"    return False"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7c2a909c_dca55dae","line":58,"range":{"start_line":55,"start_character":0,"end_line":58,"end_character":43},"updated":"2026-04-17 10:16:14.000000000","message":"may be creating a list of message and later check that using loop? this way in future we can add more messages to the list if required.","commit_id":"b96593dbbb56fd6eb375be0c85a39f55f72823f4"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"cc21253baa6f8cb51f68395db156f4c48253372d","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        # Only retry on specific volume status errors"},{"line_number":53,"context_line":"        error_msg \u003d str(e).lower()"},{"line_number":54,"context_line":"        # Check for either of the two expected error patterns"},{"line_number":55,"context_line":"        if (\u0027status must be available or downloading to reserve\u0027"},{"line_number":56,"context_line":"                in error_msg or"},{"line_number":57,"context_line":"                \u0027status must be available or in-use or downloading \u0027"},{"line_number":58,"context_line":"                \u0027to reserve\u0027 in error_msg):"},{"line_number":59,"context_line":"            return True"},{"line_number":60,"context_line":"    return False"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"99c054b7_81778533","line":58,"range":{"start_line":55,"start_character":0,"end_line":58,"end_character":43},"in_reply_to":"7c2a909c_dca55dae","updated":"2026-04-23 05:22:25.000000000","message":"Done","commit_id":"b96593dbbb56fd6eb375be0c85a39f55f72823f4"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"a6204d0c0d79f4b8fb4c3a606792b797c12f8422","unresolved":true,"context_lines":[{"line_number":63,"context_line":"class API(object):"},{"line_number":64,"context_line":"    \"\"\"API for interacting with the cinder.\"\"\""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def __init__(self, config\u003dNone):"},{"line_number":67,"context_line":"        \"\"\"Initialize the API with optional configuration."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        :param config: Configuration object containing retry parameters"},{"line_number":70,"context_line":"        \"\"\""},{"line_number":71,"context_line":"        self.config \u003d config"},{"line_number":72,"context_line":"        # Set retry parameter with defaults"},{"line_number":73,"context_line":"        if config:"},{"line_number":74,"context_line":"            self.attachment_create_retry_attempts \u003d getattr("},{"line_number":75,"context_line":"                config, \u0027cinder_attachment_retry_attempts\u0027, 5)"},{"line_number":76,"context_line":"        else:"},{"line_number":77,"context_line":"            # Default values when no config is provided (25 seconds)"},{"line_number":78,"context_line":"            self.attachment_create_retry_attempts \u003d 5"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    @handle_exceptions"},{"line_number":81,"context_line":"    def create(self, client, size, name,"}],"source_content_type":"text/x-python","patch_set":1,"id":"89b37845_e975f5ee","line":78,"range":{"start_line":66,"start_character":0,"end_line":78,"end_character":53},"updated":"2026-04-17 10:16:14.000000000","message":"instead of passing entire config why not should we just pass retry_attempts?","commit_id":"b96593dbbb56fd6eb375be0c85a39f55f72823f4"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"f09f55813ed0d013799ec86dc5a629e80bad91e7","unresolved":false,"context_lines":[{"line_number":63,"context_line":"class API(object):"},{"line_number":64,"context_line":"    \"\"\"API for interacting with the cinder.\"\"\""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def __init__(self, config\u003dNone):"},{"line_number":67,"context_line":"        \"\"\"Initialize the API with optional configuration."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        :param config: Configuration object containing retry parameters"},{"line_number":70,"context_line":"        \"\"\""},{"line_number":71,"context_line":"        self.config \u003d config"},{"line_number":72,"context_line":"        # Set retry parameter with defaults"},{"line_number":73,"context_line":"        if config:"},{"line_number":74,"context_line":"            self.attachment_create_retry_attempts \u003d getattr("},{"line_number":75,"context_line":"                config, \u0027cinder_attachment_retry_attempts\u0027, 5)"},{"line_number":76,"context_line":"        else:"},{"line_number":77,"context_line":"            # Default values when no config is provided (25 seconds)"},{"line_number":78,"context_line":"            self.attachment_create_retry_attempts \u003d 5"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    @handle_exceptions"},{"line_number":81,"context_line":"    def create(self, client, size, name,"}],"source_content_type":"text/x-python","patch_set":1,"id":"4079b13f_e4d95ce8","line":78,"range":{"start_line":66,"start_character":0,"end_line":78,"end_character":53},"in_reply_to":"37607e11_a0351c9e","updated":"2026-04-23 05:50:58.000000000","message":"Acknowledged","commit_id":"b96593dbbb56fd6eb375be0c85a39f55f72823f4"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"cc21253baa6f8cb51f68395db156f4c48253372d","unresolved":true,"context_lines":[{"line_number":63,"context_line":"class API(object):"},{"line_number":64,"context_line":"    \"\"\"API for interacting with the cinder.\"\"\""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def __init__(self, config\u003dNone):"},{"line_number":67,"context_line":"        \"\"\"Initialize the API with optional configuration."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        :param config: Configuration object containing retry parameters"},{"line_number":70,"context_line":"        \"\"\""},{"line_number":71,"context_line":"        self.config \u003d config"},{"line_number":72,"context_line":"        # Set retry parameter with defaults"},{"line_number":73,"context_line":"        if config:"},{"line_number":74,"context_line":"            self.attachment_create_retry_attempts \u003d getattr("},{"line_number":75,"context_line":"                config, \u0027cinder_attachment_retry_attempts\u0027, 5)"},{"line_number":76,"context_line":"        else:"},{"line_number":77,"context_line":"            # Default values when no config is provided (25 seconds)"},{"line_number":78,"context_line":"            self.attachment_create_retry_attempts \u003d 5"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    @handle_exceptions"},{"line_number":81,"context_line":"    def create(self, client, size, name,"}],"source_content_type":"text/x-python","patch_set":1,"id":"37607e11_a0351c9e","line":78,"range":{"start_line":66,"start_character":0,"end_line":78,"end_character":53},"in_reply_to":"89b37845_e975f5ee","updated":"2026-04-23 05:22:25.000000000","message":"My idea was if we want to pass any other config option in the future, we would need to add another parameter changing the signature of the constructor again.\nThis helps make the API interface extensible so that any config that needs to be shared between the cinder store and this utility class is easier and flexible.","commit_id":"b96593dbbb56fd6eb375be0c85a39f55f72823f4"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"a6204d0c0d79f4b8fb4c3a606792b797c12f8422","unresolved":true,"context_lines":[{"line_number":146,"context_line":"                return attachment_ref"},{"line_number":147,"context_line":"            except cinder_exception.ClientException as ex:"},{"line_number":148,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":149,"context_line":"                    # While handling simultaneous requests, the volume can be"},{"line_number":150,"context_line":"                    # in different states and we retry on attachment_create"},{"line_number":151,"context_line":"                    # until the volume reaches a valid state for attachment."},{"line_number":152,"context_line":"                    # Hence, it is better to not log 400 cases as no action"}],"source_content_type":"text/x-python","patch_set":1,"id":"f28484fc_5a7c006d","line":149,"range":{"start_line":149,"start_character":20,"end_line":149,"end_character":22},"updated":"2026-04-17 10:16:14.000000000","message":"nit: we basically follow format like # NOTE(lpid or ircnick): .....","commit_id":"b96593dbbb56fd6eb375be0c85a39f55f72823f4"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"cc21253baa6f8cb51f68395db156f4c48253372d","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                return attachment_ref"},{"line_number":147,"context_line":"            except cinder_exception.ClientException as ex:"},{"line_number":148,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":149,"context_line":"                    # While handling simultaneous requests, the volume can be"},{"line_number":150,"context_line":"                    # in different states and we retry on attachment_create"},{"line_number":151,"context_line":"                    # until the volume reaches a valid state for attachment."},{"line_number":152,"context_line":"                    # Hence, it is better to not log 400 cases as no action"}],"source_content_type":"text/x-python","patch_set":1,"id":"dbfbf217_8f4c952c","line":149,"range":{"start_line":149,"start_character":20,"end_line":149,"end_character":22},"in_reply_to":"f28484fc_5a7c006d","updated":"2026-04-23 05:22:25.000000000","message":"I think we removed that convention in Cinder but i can\u0027t really find reference to it.\nSince this is glance_store, and it might still be relevant, added it.","commit_id":"b96593dbbb56fd6eb375be0c85a39f55f72823f4"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"a6204d0c0d79f4b8fb4c3a606792b797c12f8422","unresolved":true,"context_lines":[{"line_number":164,"context_line":"                            and _retry_on_bad_request(ex)):"},{"line_number":165,"context_line":"                        volume_state \u003d \u0027\u0027"},{"line_number":166,"context_line":"                        error_msg \u003d str(ex)"},{"line_number":167,"context_line":"                        # Doing a GET API call to cinder for logging the"},{"line_number":168,"context_line":"                        # volume status would add overhead for simultaneous"},{"line_number":169,"context_line":"                        # requests. The status already exists in the error"},{"line_number":170,"context_line":"                        # message, we just need to extract it."},{"line_number":171,"context_line":"                        if \u0027current status is\u0027 in error_msg:"},{"line_number":172,"context_line":"                            try:"},{"line_number":173,"context_line":"                                # Example log:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f5824bf_70509d5b","line":170,"range":{"start_line":167,"start_character":0,"end_line":170,"end_character":62},"updated":"2026-04-17 10:16:14.000000000","message":"ditto","commit_id":"b96593dbbb56fd6eb375be0c85a39f55f72823f4"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"cc21253baa6f8cb51f68395db156f4c48253372d","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                            and _retry_on_bad_request(ex)):"},{"line_number":165,"context_line":"                        volume_state \u003d \u0027\u0027"},{"line_number":166,"context_line":"                        error_msg \u003d str(ex)"},{"line_number":167,"context_line":"                        # Doing a GET API call to cinder for logging the"},{"line_number":168,"context_line":"                        # volume status would add overhead for simultaneous"},{"line_number":169,"context_line":"                        # requests. The status already exists in the error"},{"line_number":170,"context_line":"                        # message, we just need to extract it."},{"line_number":171,"context_line":"                        if \u0027current status is\u0027 in error_msg:"},{"line_number":172,"context_line":"                            try:"},{"line_number":173,"context_line":"                                # Example log:"}],"source_content_type":"text/x-python","patch_set":1,"id":"99e396ba_8e5a737a","line":170,"range":{"start_line":167,"start_character":0,"end_line":170,"end_character":62},"in_reply_to":"7f5824bf_70509d5b","updated":"2026-04-23 05:22:25.000000000","message":"Done","commit_id":"b96593dbbb56fd6eb375be0c85a39f55f72823f4"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"a6204d0c0d79f4b8fb4c3a606792b797c12f8422","unresolved":true,"context_lines":[{"line_number":170,"context_line":"                        # message, we just need to extract it."},{"line_number":171,"context_line":"                        if \u0027current status is\u0027 in error_msg:"},{"line_number":172,"context_line":"                            try:"},{"line_number":173,"context_line":"                                # Example log:"},{"line_number":174,"context_line":"                                # \"... but the current status is reserved.\""},{"line_number":175,"context_line":"                                status_part \u003d error_msg.split("},{"line_number":176,"context_line":"                                    \u0027current status is\u0027)[1]"},{"line_number":177,"context_line":"                                volume_state \u003d (status_part.split(\u0027.\u0027)[0]"}],"source_content_type":"text/x-python","patch_set":1,"id":"8fed70a2_4575adf6","line":174,"range":{"start_line":173,"start_character":0,"end_line":174,"end_character":75},"updated":"2026-04-17 10:16:14.000000000","message":"is this really needed?","commit_id":"b96593dbbb56fd6eb375be0c85a39f55f72823f4"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"cc21253baa6f8cb51f68395db156f4c48253372d","unresolved":true,"context_lines":[{"line_number":170,"context_line":"                        # message, we just need to extract it."},{"line_number":171,"context_line":"                        if \u0027current status is\u0027 in error_msg:"},{"line_number":172,"context_line":"                            try:"},{"line_number":173,"context_line":"                                # Example log:"},{"line_number":174,"context_line":"                                # \"... but the current status is reserved.\""},{"line_number":175,"context_line":"                                status_part \u003d error_msg.split("},{"line_number":176,"context_line":"                                    \u0027current status is\u0027)[1]"},{"line_number":177,"context_line":"                                volume_state \u003d (status_part.split(\u0027.\u0027)[0]"}],"source_content_type":"text/x-python","patch_set":1,"id":"9e510f0b_d0ec389b","line":174,"range":{"start_line":173,"start_character":0,"end_line":174,"end_character":75},"in_reply_to":"8fed70a2_4575adf6","updated":"2026-04-23 05:22:25.000000000","message":"Yes, it\u0027s an example log I\u0027ve added for reviewers (and my personal reference) to know what we are really trying to achieve with the following lines by splitting and separating the actual volume status.","commit_id":"b96593dbbb56fd6eb375be0c85a39f55f72823f4"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"f09f55813ed0d013799ec86dc5a629e80bad91e7","unresolved":false,"context_lines":[{"line_number":170,"context_line":"                        # message, we just need to extract it."},{"line_number":171,"context_line":"                        if \u0027current status is\u0027 in error_msg:"},{"line_number":172,"context_line":"                            try:"},{"line_number":173,"context_line":"                                # Example log:"},{"line_number":174,"context_line":"                                # \"... but the current status is reserved.\""},{"line_number":175,"context_line":"                                status_part \u003d error_msg.split("},{"line_number":176,"context_line":"                                    \u0027current status is\u0027)[1]"},{"line_number":177,"context_line":"                                volume_state \u003d (status_part.split(\u0027.\u0027)[0]"}],"source_content_type":"text/x-python","patch_set":1,"id":"14c74b54_8e45077e","line":174,"range":{"start_line":173,"start_character":0,"end_line":174,"end_character":75},"in_reply_to":"9e510f0b_d0ec389b","updated":"2026-04-23 05:50:58.000000000","message":"Acknowledged","commit_id":"b96593dbbb56fd6eb375be0c85a39f55f72823f4"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"01d71d594b76f359fff969b53360eeb78b9b0b58","unresolved":true,"context_lines":[{"line_number":76,"context_line":"            self.attachment_create_retry_attempts \u003d getattr("},{"line_number":77,"context_line":"                config, \u0027cinder_attachment_retry_attempts\u0027, 5)"},{"line_number":78,"context_line":"        else:"},{"line_number":79,"context_line":"            # Default values when no config is provided (25 seconds)"},{"line_number":80,"context_line":"            self.attachment_create_retry_attempts \u003d 5"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    @handle_exceptions"}],"source_content_type":"text/x-python","patch_set":2,"id":"fec20a35_37e751eb","line":79,"range":{"start_line":79,"start_character":14,"end_line":79,"end_character":68},"updated":"2026-04-23 16:21:10.000000000","message":"two things: (1) only one value, and (2) with the exponential backup with 10000ms ceiling, isn\u0027t the default wait going to be 34sec?","commit_id":"eb064f10a78b27e3300c794276c3e92c45641833"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"a94c7b96e3e296434340d0d9220c37488eb2eb44","unresolved":false,"context_lines":[{"line_number":76,"context_line":"            self.attachment_create_retry_attempts \u003d getattr("},{"line_number":77,"context_line":"                config, \u0027cinder_attachment_retry_attempts\u0027, 5)"},{"line_number":78,"context_line":"        else:"},{"line_number":79,"context_line":"            # Default values when no config is provided (25 seconds)"},{"line_number":80,"context_line":"            self.attachment_create_retry_attempts \u003d 5"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    @handle_exceptions"}],"source_content_type":"text/x-python","patch_set":2,"id":"3291eced_5ad87074","line":79,"range":{"start_line":79,"start_character":14,"end_line":79,"end_character":68},"in_reply_to":"73333c5c_63c8633b","updated":"2026-04-28 00:15:44.000000000","message":"Thanks for the explanation, I forgot that the first attempt counts in the number of retries.","commit_id":"eb064f10a78b27e3300c794276c3e92c45641833"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"f72cb548874743c15d0bf5f463ffdd6cf2da0855","unresolved":false,"context_lines":[{"line_number":76,"context_line":"            self.attachment_create_retry_attempts \u003d getattr("},{"line_number":77,"context_line":"                config, \u0027cinder_attachment_retry_attempts\u0027, 5)"},{"line_number":78,"context_line":"        else:"},{"line_number":79,"context_line":"            # Default values when no config is provided (25 seconds)"},{"line_number":80,"context_line":"            self.attachment_create_retry_attempts \u003d 5"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    @handle_exceptions"}],"source_content_type":"text/x-python","patch_set":2,"id":"73333c5c_63c8633b","line":79,"range":{"start_line":79,"start_character":14,"end_line":79,"end_character":68},"in_reply_to":"fec20a35_37e751eb","updated":"2026-04-24 08:42:31.000000000","message":"Changed s/values/value\nThe first attempt is counted in the retries (which is not intuitive but that\u0027s how it works) so 2+4+8+10\u003d24 seconds\nBased on the logs below, I\u0027ve changed this to 24 seconds\n\n`Apr 24 08:14:39 rdhasman-glance-cinder devstack@g-api.service[3591319]: DEBUG glance_store.common.cinder_utils [None req-59add12f-e28a-47dd-8c18-820f26cb86be admin admin] Attachment create failed for volume a3b94f2a-5f92-4605-aaee-47c2b3ea67b3. Volume state: reserved. Retrying in 2 seconds. {{(pid\u003d3591319) _do_attachment_create /opt/stack/data/venv/lib/python3.10/site-packages/glance_store/common/cinder_utils.py:192}}`\n\n...\n\n`Apr 24 08:15:03 rdhasman-glance-cinder devstack@g-api.service[3591319]: CRITICAL glance [None req-59add12f-e28a-47dd-8c18-820f26cb86be admin admin] Unhandled error: cinderclient.exceptions.BadRequest: Invalid volume: Volume a3b94f2a-5f92-4605-aaee-47c2b3ea67b3 status must be available or in-use or downloading to reserve, but the current status is reserved. (HTTP 400) (Request-ID: req-9407878a-46a5-419f-8b4d-66daed9c30c2)`","commit_id":"eb064f10a78b27e3300c794276c3e92c45641833"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"01d71d594b76f359fff969b53360eeb78b9b0b58","unresolved":true,"context_lines":[{"line_number":182,"context_line":"                            except (IndexError, AttributeError):"},{"line_number":183,"context_line":"                                pass"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"                        # Wait time between every attempt is expoential"},{"line_number":186,"context_line":"                        # backoff"},{"line_number":187,"context_line":"                        wait_time_s \u003d min("},{"line_number":188,"context_line":"                            1 * (2 ** (retry_attempts)),"}],"source_content_type":"text/x-python","patch_set":2,"id":"c34adc27_f3fe5046","line":185,"range":{"start_line":185,"start_character":61,"end_line":185,"end_character":71},"updated":"2026-04-23 16:21:10.000000000","message":"nit: exponential\n\nMight be better anyway to say something instead like \"compute the wait time based on the values we passed when defining the retry decorator above\", because this is exponential backoff with a ceiling","commit_id":"eb064f10a78b27e3300c794276c3e92c45641833"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"f72cb548874743c15d0bf5f463ffdd6cf2da0855","unresolved":false,"context_lines":[{"line_number":182,"context_line":"                            except (IndexError, AttributeError):"},{"line_number":183,"context_line":"                                pass"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"                        # Wait time between every attempt is expoential"},{"line_number":186,"context_line":"                        # backoff"},{"line_number":187,"context_line":"                        wait_time_s \u003d min("},{"line_number":188,"context_line":"                            1 * (2 ** (retry_attempts)),"}],"source_content_type":"text/x-python","patch_set":2,"id":"edb1d5d3_85a3963e","line":185,"range":{"start_line":185,"start_character":61,"end_line":185,"end_character":71},"in_reply_to":"c34adc27_f3fe5046","updated":"2026-04-24 08:42:31.000000000","message":"Done","commit_id":"eb064f10a78b27e3300c794276c3e92c45641833"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"01d71d594b76f359fff969b53360eeb78b9b0b58","unresolved":true,"context_lines":[{"line_number":185,"context_line":"                        # Wait time between every attempt is expoential"},{"line_number":186,"context_line":"                        # backoff"},{"line_number":187,"context_line":"                        wait_time_s \u003d min("},{"line_number":188,"context_line":"                            1 * (2 ** (retry_attempts)),"},{"line_number":189,"context_line":"                            10"},{"line_number":190,"context_line":"                        )"},{"line_number":191,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"57ed7f7b_bae06e9d","line":188,"range":{"start_line":188,"start_character":28,"end_line":188,"end_character":32},"updated":"2026-04-23 16:21:10.000000000","message":"don\u0027t think you need this multiplication by 1 here","commit_id":"eb064f10a78b27e3300c794276c3e92c45641833"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"f72cb548874743c15d0bf5f463ffdd6cf2da0855","unresolved":false,"context_lines":[{"line_number":185,"context_line":"                        # Wait time between every attempt is expoential"},{"line_number":186,"context_line":"                        # backoff"},{"line_number":187,"context_line":"                        wait_time_s \u003d min("},{"line_number":188,"context_line":"                            1 * (2 ** (retry_attempts)),"},{"line_number":189,"context_line":"                            10"},{"line_number":190,"context_line":"                        )"},{"line_number":191,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"0cd17ad0_d7818a7e","line":188,"range":{"start_line":188,"start_character":28,"end_line":188,"end_character":32},"in_reply_to":"57ed7f7b_bae06e9d","updated":"2026-04-24 08:42:31.000000000","message":"Yeah, initially I had the multiplier here which was also passed as a config, then i substituted values and changed that to 1 here but didn\u0027t realize it wasn\u0027t needed\nRemoved now","commit_id":"eb064f10a78b27e3300c794276c3e92c45641833"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"01d71d594b76f359fff969b53360eeb78b9b0b58","unresolved":true,"context_lines":[{"line_number":194,"context_line":"                            \u0027%(volume_id)s. Volume state: %(state)s. \u0027"},{"line_number":195,"context_line":"                            \u0027Retrying in %(wait_time)d seconds.\u0027,"},{"line_number":196,"context_line":"                            {\u0027volume_id\u0027: volume_id,"},{"line_number":197,"context_line":"                             \u0027state\u0027: volume_state,"},{"line_number":198,"context_line":"                             \u0027wait_time\u0027: wait_time_s})"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        return _do_attachment_create()"}],"source_content_type":"text/x-python","patch_set":2,"id":"2bdf99ce_25206e16","line":197,"range":{"start_line":197,"start_character":38,"end_line":197,"end_character":50},"updated":"2026-04-23 16:21:10.000000000","message":"might want to make this\n```\nvolume_state or \u0027\u003cunknown\u003e\u0027,\n```\nin case the error message parsing failed above","commit_id":"eb064f10a78b27e3300c794276c3e92c45641833"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"f72cb548874743c15d0bf5f463ffdd6cf2da0855","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                            \u0027%(volume_id)s. Volume state: %(state)s. \u0027"},{"line_number":195,"context_line":"                            \u0027Retrying in %(wait_time)d seconds.\u0027,"},{"line_number":196,"context_line":"                            {\u0027volume_id\u0027: volume_id,"},{"line_number":197,"context_line":"                             \u0027state\u0027: volume_state,"},{"line_number":198,"context_line":"                             \u0027wait_time\u0027: wait_time_s})"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        return _do_attachment_create()"}],"source_content_type":"text/x-python","patch_set":2,"id":"b7559913_eb1e039c","line":197,"range":{"start_line":197,"start_character":38,"end_line":197,"end_character":50},"in_reply_to":"2bdf99ce_25206e16","updated":"2026-04-24 08:42:31.000000000","message":"I\u0027ve already initialized the volume_state to \u0027\u0027 on L#168\nBut if we want the \u0027\u003cunknown\u003e\u0027 as a default, I can set that\n\nUPDATE: I\u0027ve set it to \u0027\u003cunknown\u003e\u0027 while initializing\n`Attachment create failed for volume a3b94f2a-5f92-4605-aaee-47c2b3ea67b3. Volume state: \u003cunknown\u003e. Retrying in 4 seconds.`","commit_id":"eb064f10a78b27e3300c794276c3e92c45641833"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"a94c7b96e3e296434340d0d9220c37488eb2eb44","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                            \u0027%(volume_id)s. Volume state: %(state)s. \u0027"},{"line_number":195,"context_line":"                            \u0027Retrying in %(wait_time)d seconds.\u0027,"},{"line_number":196,"context_line":"                            {\u0027volume_id\u0027: volume_id,"},{"line_number":197,"context_line":"                             \u0027state\u0027: volume_state,"},{"line_number":198,"context_line":"                             \u0027wait_time\u0027: wait_time_s})"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        return _do_attachment_create()"}],"source_content_type":"text/x-python","patch_set":2,"id":"d70ca236_3d6400da","line":197,"range":{"start_line":197,"start_character":38,"end_line":197,"end_character":50},"in_reply_to":"b7559913_eb1e039c","updated":"2026-04-28 00:15:44.000000000","message":"Initializing to \u0027\u003cunknown\u003e\u0027 seems fine to me.","commit_id":"eb064f10a78b27e3300c794276c3e92c45641833"}],"glance_store/tests/unit/cinder/test_cinder_base.py":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"01d71d594b76f359fff969b53360eeb78b9b0b58","unresolved":true,"context_lines":[{"line_number":1010,"context_line":"            fake_socket.side_effect \u003d [socket.gaierror, fake_socket_return]"},{"line_number":1011,"context_line":"            res \u003d self.store._get_host_ip(\u0027fake_host\u0027)"},{"line_number":1012,"context_line":"            self.assertEqual(fake_ip, res)"},{"line_number":1013,"context_line":""},{"line_number":1014,"context_line":"    def _test_cinder_attachment_retry_attempts_default(self):"},{"line_number":1015,"context_line":"        # Test default value for cinder_attachment_retry_attempts config"},{"line_number":1016,"context_line":"        self.store.configure()"}],"source_content_type":"text/x-python","patch_set":2,"id":"72b22e8a_8c2741b3","line":1013,"updated":"2026-04-23 16:21:10.000000000","message":"I don\u0027t know about these tests.  The first and third one seem to be testing whether oslo.config works, which is presumably tested elsewhere.","commit_id":"eb064f10a78b27e3300c794276c3e92c45641833"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"f72cb548874743c15d0bf5f463ffdd6cf2da0855","unresolved":false,"context_lines":[{"line_number":1010,"context_line":"            fake_socket.side_effect \u003d [socket.gaierror, fake_socket_return]"},{"line_number":1011,"context_line":"            res \u003d self.store._get_host_ip(\u0027fake_host\u0027)"},{"line_number":1012,"context_line":"            self.assertEqual(fake_ip, res)"},{"line_number":1013,"context_line":""},{"line_number":1014,"context_line":"    def _test_cinder_attachment_retry_attempts_default(self):"},{"line_number":1015,"context_line":"        # Test default value for cinder_attachment_retry_attempts config"},{"line_number":1016,"context_line":"        self.store.configure()"}],"source_content_type":"text/x-python","patch_set":2,"id":"d3d1b41e_4e3d675d","line":1013,"in_reply_to":"72b22e8a_8c2741b3","updated":"2026-04-24 08:42:31.000000000","message":"Makes sense, removed them","commit_id":"eb064f10a78b27e3300c794276c3e92c45641833"}],"glance_store/tests/unit/common/test_cinder_utils.py":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"01d71d594b76f359fff969b53360eeb78b9b0b58","unresolved":true,"context_lines":[{"line_number":185,"context_line":"            mock.call(self.fake_attach_id),"},{"line_number":186,"context_line":"            mock.call(self.fake_attach_id),"},{"line_number":187,"context_line":"            mock.call(self.fake_attach_id)])"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"    def test_api_init_with_no_config(self):"},{"line_number":190,"context_line":"        # Test API initialization without config"},{"line_number":191,"context_line":"        api \u003d cinder_utils.API()"}],"source_content_type":"text/x-python","patch_set":2,"id":"7274451f_ae3affb7","line":188,"updated":"2026-04-23 16:21:10.000000000","message":"Some of these are close to testing the retry library, but overall they make sure you are using the library correctly, so I have no objections.","commit_id":"eb064f10a78b27e3300c794276c3e92c45641833"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"f72cb548874743c15d0bf5f463ffdd6cf2da0855","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            mock.call(self.fake_attach_id),"},{"line_number":186,"context_line":"            mock.call(self.fake_attach_id),"},{"line_number":187,"context_line":"            mock.call(self.fake_attach_id)])"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"    def test_api_init_with_no_config(self):"},{"line_number":190,"context_line":"        # Test API initialization without config"},{"line_number":191,"context_line":"        api \u003d cinder_utils.API()"}],"source_content_type":"text/x-python","patch_set":2,"id":"024ca724_6bfd7ed6","line":188,"in_reply_to":"7274451f_ae3affb7","updated":"2026-04-24 08:42:31.000000000","message":"Acknowledged","commit_id":"eb064f10a78b27e3300c794276c3e92c45641833"}],"releasenotes/notes/cinder-attachment-retry-38db6999290825d5.yaml":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"01d71d594b76f359fff969b53360eeb78b9b0b58","unresolved":true,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Added a new configuration option ``cinder_attachment_retry_attempts``"},{"line_number":5,"context_line":"    to configure the number of retries that needs to be performed when"},{"line_number":6,"context_line":"    trying to attach the image-volume."},{"line_number":7,"context_line":"fixes:"},{"line_number":8,"context_line":"  - |"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"09783ab6_0806d422","line":5,"range":{"start_line":5,"start_character":44,"end_line":5,"end_character":65},"updated":"2026-04-23 16:21:10.000000000","message":"nit: \"can be attempted\".\n\nAlso, if you do revise this, might be a good idea to say what the default value is.","commit_id":"eb064f10a78b27e3300c794276c3e92c45641833"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"f72cb548874743c15d0bf5f463ffdd6cf2da0855","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Added a new configuration option ``cinder_attachment_retry_attempts``"},{"line_number":5,"context_line":"    to configure the number of retries that needs to be performed when"},{"line_number":6,"context_line":"    trying to attach the image-volume."},{"line_number":7,"context_line":"fixes:"},{"line_number":8,"context_line":"  - |"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"13fe59cc_e3477eb1","line":5,"range":{"start_line":5,"start_character":44,"end_line":5,"end_character":65},"in_reply_to":"09783ab6_0806d422","updated":"2026-04-24 08:42:31.000000000","message":"Done","commit_id":"eb064f10a78b27e3300c794276c3e92c45641833"}]}
