)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"660410babd1c663d444c21af8bf2ae46e19647af","unresolved":false,"context_lines":[{"line_number":13,"context_line":"being set to \u0027killed\u0027 in DB but the image data remains as it is in"},{"line_number":14,"context_line":"the backend."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Adding image.delete() call in _delete() method to cleanup the data"},{"line_number":17,"context_line":"from backend. Also moving signature verification part after setting"},{"line_number":18,"context_line":"up the \u0027location\u0027 in image.location since location is required to delete"},{"line_number":19,"context_line":"the data after failure."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: I2a1a7addd33050cc8845aec24479aa4d1bc26ca0"},{"line_number":22,"context_line":"Closes-Bug: #1736336"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9f6a8fd7_34b20e96","line":19,"range":{"start_line":16,"start_character":0,"end_line":19,"end_character":23},"updated":"2018-04-18 06:35:18.000000000","message":"Need to change commit message as per new changes.","commit_id":"5b2708b57b8f3f0283d4ffa45943a77c46860cce"}],"glance/api/v2/image_data.py":[{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"fa453013c3402746db5c223336c42ea6f824026f","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        \"\"\""},{"line_number":91,"context_line":"        try:"},{"line_number":92,"context_line":"            if image_repo and image:"},{"line_number":93,"context_line":"                image.status \u003d \u0027killed\u0027"},{"line_number":94,"context_line":"                image_repo.save(image)"},{"line_number":95,"context_line":"                image.delete()"},{"line_number":96,"context_line":"        except Exception as e:"},{"line_number":97,"context_line":"            msg \u003d (_LE(\"Unable to delete image %(image_id)s: %(e)s\") %"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f96bb07_f098336b","line":94,"range":{"start_line":93,"start_character":16,"end_line":94,"end_character":38},"updated":"2018-01-12 11:23:20.000000000","message":"There should be no need to set the status killed if we do delete() on the image.\n\nUnfortunately what will happen is that the image status will be \"deleted\" not killed after this change, which will break the backwards compatibility of the API.","commit_id":"1e2e263fdf83c886004e1acf18455b69d0a326b4"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"ff36c9caf8d5227c34015bacc7675b103f22d23b","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        \"\"\""},{"line_number":91,"context_line":"        try:"},{"line_number":92,"context_line":"            if image_repo and image:"},{"line_number":93,"context_line":"                image.status \u003d \u0027killed\u0027"},{"line_number":94,"context_line":"                image_repo.save(image)"},{"line_number":95,"context_line":"                image.delete()"},{"line_number":96,"context_line":"        except Exception as e:"},{"line_number":97,"context_line":"            msg \u003d (_LE(\"Unable to delete image %(image_id)s: %(e)s\") %"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f96bb07_9a75facd","line":94,"range":{"start_line":93,"start_character":16,"end_line":94,"end_character":38},"in_reply_to":"7f96bb07_3a0f38e2","updated":"2018-01-16 11:30:24.000000000","message":"Interesting, any idea what delete function it actually ends up calling? I thought it will come all the way up to glance/domain/__init__.py L241 which is the base Image delete which seems to be setting the image status to \"deleted\" or \"pending_delete\" that will at the end turn to \"deleted\". I happily stand corrected if that\u0027s not the case but would like to understand what code we\u0027re actually executing here.","commit_id":"1e2e263fdf83c886004e1acf18455b69d0a326b4"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"083d1f5d4023f7266e275427ce874afb9e235fc9","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        \"\"\""},{"line_number":91,"context_line":"        try:"},{"line_number":92,"context_line":"            if image_repo and image:"},{"line_number":93,"context_line":"                image.status \u003d \u0027killed\u0027"},{"line_number":94,"context_line":"                image_repo.save(image)"},{"line_number":95,"context_line":"                image.delete()"},{"line_number":96,"context_line":"        except Exception as e:"},{"line_number":97,"context_line":"            msg \u003d (_LE(\"Unable to delete image %(image_id)s: %(e)s\") %"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f96bb07_35c7f098","line":94,"range":{"start_line":93,"start_character":16,"end_line":94,"end_character":38},"in_reply_to":"7f96bb07_9a75facd","updated":"2018-01-17 11:36:53.000000000","message":"Erno, flow is;\nyou are right ti will come to glance/domain/__init__.py L241 but after changing status to deleted we are not saving that image so the final status remains killed in the database.","commit_id":"1e2e263fdf83c886004e1acf18455b69d0a326b4"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"6f7ca58dbd95e67b26f7d58b3fe1efeadbf441da","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        \"\"\""},{"line_number":91,"context_line":"        try:"},{"line_number":92,"context_line":"            if image_repo and image:"},{"line_number":93,"context_line":"                image.status \u003d \u0027killed\u0027"},{"line_number":94,"context_line":"                image_repo.save(image)"},{"line_number":95,"context_line":"                image.delete()"},{"line_number":96,"context_line":"        except Exception as e:"},{"line_number":97,"context_line":"            msg \u003d (_LE(\"Unable to delete image %(image_id)s: %(e)s\") %"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f96bb07_3a0f38e2","line":94,"range":{"start_line":93,"start_character":16,"end_line":94,"end_character":38},"in_reply_to":"7f96bb07_f098336b","updated":"2018-01-15 03:21:09.000000000","message":"Hi Erno,\n\nEven if we call delete here image status remains as killed in the database, it does not changes to deleted. If it is not expected then it sounds like another bug. Kindly let your opinion about the same.","commit_id":"1e2e263fdf83c886004e1acf18455b69d0a326b4"}],"glance/location.py":[{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"02408416043d1cdf1931203644db44d4207811b7","unresolved":false,"context_lines":[{"line_number":444,"context_line":"                verifier.verify()"},{"line_number":445,"context_line":"                LOG.info(_LI(\"Successfully verified signature for image %s\"),"},{"line_number":446,"context_line":"                         self.image.image_id)"},{"line_number":447,"context_line":"            except crypto_exception.InvalidSignature:"},{"line_number":448,"context_line":"                raise cursive_exception.SignatureVerificationError("},{"line_number":449,"context_line":"                    _(\u0027Signature verification failed\u0027)"},{"line_number":450,"context_line":"                )"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_70e6e2b2","side":"PARENT","line":447,"updated":"2018-04-12 13:59:22.000000000","message":"This is actually where we need to put the logic in to remove the data from the back end before we raise the exception.","commit_id":"05e9bdb656d9c120ed3cd6ffc8ae7dbf5614b5e4"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"9c11ccf73c87ae68a4ec216fdee4537fcf140f09","unresolved":false,"context_lines":[{"line_number":444,"context_line":"                verifier.verify()"},{"line_number":445,"context_line":"                LOG.info(_LI(\"Successfully verified signature for image %s\"),"},{"line_number":446,"context_line":"                         self.image.image_id)"},{"line_number":447,"context_line":"            except crypto_exception.InvalidSignature:"},{"line_number":448,"context_line":"                raise cursive_exception.SignatureVerificationError("},{"line_number":449,"context_line":"                    _(\u0027Signature verification failed\u0027)"},{"line_number":450,"context_line":"                )"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f6a8fd7_90d781c0","side":"PARENT","line":447,"in_reply_to":"bf659307_70e6e2b2","updated":"2018-04-17 10:20:08.000000000","message":"Done","commit_id":"05e9bdb656d9c120ed3cd6ffc8ae7dbf5614b5e4"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"d9d667021124dd5ed4b00ab15b34fb7668d0fbce","unresolved":false,"context_lines":[{"line_number":438,"context_line":"            context\u003dself.context,"},{"line_number":439,"context_line":"            verifier\u003dverifier)"},{"line_number":440,"context_line":""},{"line_number":441,"context_line":"        self.image.locations \u003d [{\u0027url\u0027: location, \u0027metadata\u0027: loc_meta,"},{"line_number":442,"context_line":"                                 \u0027status\u0027: \u0027active\u0027}]"},{"line_number":443,"context_line":""},{"line_number":444,"context_line":"        # NOTE(bpoulos): if verification fails, exception will be raised"},{"line_number":445,"context_line":"        if verifier:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f6a8fd7_81c2d584","line":442,"range":{"start_line":441,"start_character":0,"end_line":442,"end_character":53},"updated":"2018-04-17 11:12:43.000000000","message":"No need to move this. We do not need to set the location to the image as it\u0027s deleted anyways.","commit_id":"6f44400991bc9bf83015fa133814412b7d9c3bfa"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"d9d667021124dd5ed4b00ab15b34fb7668d0fbce","unresolved":false,"context_lines":[{"line_number":448,"context_line":"                LOG.info(_LI(\"Successfully verified signature for image %s\"),"},{"line_number":449,"context_line":"                         self.image.image_id)"},{"line_number":450,"context_line":"            except crypto_exception.InvalidSignature:"},{"line_number":451,"context_line":"                self.delete()"},{"line_number":452,"context_line":"                raise cursive_exception.SignatureVerificationError("},{"line_number":453,"context_line":"                    _(\u0027Signature verification failed\u0027)"},{"line_number":454,"context_line":"                )"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f6a8fd7_41183d1c","line":451,"updated":"2018-04-17 11:12:43.000000000","message":"We can just call the self.store_api.delete_from_backend(location, context\u003dself.context) and be done with it as the location entry does not exists in the DB yet in this point.","commit_id":"6f44400991bc9bf83015fa133814412b7d9c3bfa"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"cebe99a1dbb37e84384b09c9f176ae3877e3dd91","unresolved":false,"context_lines":[{"line_number":448,"context_line":"                LOG.info(_LI(\"Successfully verified signature for image %s\"),"},{"line_number":449,"context_line":"                         self.image.image_id)"},{"line_number":450,"context_line":"            except crypto_exception.InvalidSignature:"},{"line_number":451,"context_line":"                self.delete()"},{"line_number":452,"context_line":"                raise cursive_exception.SignatureVerificationError("},{"line_number":453,"context_line":"                    _(\u0027Signature verification failed\u0027)"},{"line_number":454,"context_line":"                )"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f6a8fd7_6e89a973","line":451,"in_reply_to":"9f6a8fd7_41183d1c","updated":"2018-04-17 13:40:28.000000000","message":"it should be self.store_api.delete_from_backend(location[\u0027uri\u0027], context\u003dself.context)","commit_id":"6f44400991bc9bf83015fa133814412b7d9c3bfa"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"e0305b6a0e83e8a768bf48c1fd5d6342bfe45eb5","unresolved":false,"context_lines":[{"line_number":448,"context_line":"                LOG.info(_LI(\"Successfully verified signature for image %s\"),"},{"line_number":449,"context_line":"                         self.image.image_id)"},{"line_number":450,"context_line":"            except crypto_exception.InvalidSignature:"},{"line_number":451,"context_line":"                self.delete()"},{"line_number":452,"context_line":"                raise cursive_exception.SignatureVerificationError("},{"line_number":453,"context_line":"                    _(\u0027Signature verification failed\u0027)"},{"line_number":454,"context_line":"                )"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f6a8fd7_f95901fe","line":451,"in_reply_to":"9f6a8fd7_6e89a973","updated":"2018-04-17 14:13:44.000000000","message":"No, the location in this scope is the actual uri. It\u0027s coming from the store_api.add_to_backend call https://github.com/openstack/glance_store/blob/master/glance_store/backend.py#L417 on the Line 432","commit_id":"6f44400991bc9bf83015fa133814412b7d9c3bfa"}]}
