)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b2f672bc252817a257bea949255a8e382214c829","unresolved":true,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"However, they prevent images from being deleted."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Instead, move RBD images to the trash in this"},{"line_number":15,"context_line":"situation.  This trash must be purged by a scheduled"},{"line_number":16,"context_line":"rbd trash purge operation outside of Glance."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"This passes new cinder\u003c-\u003eimage dependency tests in"},{"line_number":19,"context_line":"I5fee2395195 when using ceph require-min-compat-client"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"e9d26bba_53841527","line":16,"range":{"start_line":14,"start_character":0,"end_line":16,"end_character":44},"updated":"2023-06-01 13:44:18.000000000","message":"Can we have this mechanism in glance-manage utility similar to db_purge?","commit_id":"0e969ebc3ef911eb0dd4843096784a0bd3c52b3e"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7fe002fed6e023569c99ad4e8ecd6f00e9660bf0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"e6ee5b57_5ed03d1d","updated":"2023-06-15 14:37:45.000000000","message":"I applied this, created an image, server from image, snapshot from server. I see both in rbd:\n```\ndan@jammy:~$ o image list\n+--------------------------------------+------------+--------+\n| ID                                   | Name       | Status |\n+--------------------------------------+------------+--------+\n| 8449315c-70e4-43cb-abb6-95fa6959d1d2 | cirros-raw | active |\n| f42a82b1-c85f-4fa0-862d-ffc304612d87 | test       | active |\n+--------------------------------------+------------+--------+\ndan@jammy:~$ S rbd ls -p images -l\nNAME                                       SIZE     PARENT  FMT  PROT  LOCK\n8449315c-70e4-43cb-abb6-95fa6959d1d2       112 MiB            2\n8449315c-70e4-43cb-abb6-95fa6959d1d2@snap  112 MiB            2  yes\nf42a82b1-c85f-4fa0-862d-ffc304612d87         5 GiB            2\nf42a82b1-c85f-4fa0-862d-ffc304612d87@snap    5 GiB            2  yes\n```\nThen I delete the base image:\n```\ndan@jammy:~$ o --os-cloud\u003ddevstack-admin image delete cirros-raw\n```\nWhich succeeds. After RBD shows the base image as gone, only the snapshot remaining:\n```\ndan@jammy:~$ S rbd ls -p images -l\nNAME                                       SIZE   PARENT  FMT  PROT  LOCK\nf42a82b1-c85f-4fa0-862d-ffc304612d87       5 GiB            2\nf42a82b1-c85f-4fa0-862d-ffc304612d87@snap  5 GiB            2  yes\n```\nI\u0027m not sure how ceph reflects the original image, but I assume it\u0027s marked for deletion and thus does not show up in the listing, but clearly the snapshot is still there and happy. The log shows the expected bits:\n```\nJun 15 14:27:35 jammy devstack@g-api.service[210789]: WARNING glance_store._drivers.rbd [None req-5c23d1a6-c6e1-4d5f-9057-7ac09e737893 admin admin] Remove image 8449315c-70e4-43cb-abb6-95fa6959d1d2 failed. It has snapshot(s) left.: rbd.ImageHasSnapshots: [errno 39] RBD image has snapshots (error removing image)\nJun 15 14:27:35 jammy devstack@g-api.service[210789]: DEBUG glance_store._drivers.rbd [None req-5c23d1a6-c6e1-4d5f-9057-7ac09e737893 admin admin] Moved 8449315c-70e4-43cb-abb6-95fa6959d1d2 to trash {{(pid\u003d210789) _delete_image /opt/stack/glance_store/glance_store/_drivers/rbd.py:500}}\n```\nEven with the base image deleted, I can still boot instances from the snapshot I made. If I delete all servers and images, rbd properly shows everything cleaned up:\n```\ndan@jammy:~$ o server delete test-from-snap\ndan@jammy:~$ o server delete test\ndan@jammy:~$ o image delete test\ndan@jammy:~$ o image list\n\ndan@jammy:~$ S rbd ls -p images -l\ndan@jammy:~$\n```\n\nSo yeah, I think this does what it says on the tin. I think adjusting the warning message would be good, and probably a reno is warranted because of the change in behavior.","commit_id":"0e969ebc3ef911eb0dd4843096784a0bd3c52b3e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"45ffb0746ceef3773a50dc2374b85f6818947034","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"4b368d27_3652e482","updated":"2023-06-15 15:03:42.000000000","message":"Doing a multistore-ceph run here: \n\nhttps://review.opendev.org/c/openstack/glance_store/+/884524\n\nSo we should hang on until that passes, but based on my testing, I don\u0027t expect any problems.","commit_id":"5427e0ca484e94f00747377be3f1c919201cda62"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"91c32efc74ef05558b814427b883be338a031c81","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"803f0beb_7dd58513","updated":"2023-06-15 15:00:53.000000000","message":"Happy with the patch, thanks dan for reno and functional test.","commit_id":"5427e0ca484e94f00747377be3f1c919201cda62"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"adc87145271439fe2b4fa7dac0839a1f19d263d7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"9800c575_3f6ca90d","updated":"2023-06-15 15:02:10.000000000","message":"I just added a reno and changed the log message per feedback.","commit_id":"5427e0ca484e94f00747377be3f1c919201cda62"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"c29cc58d9b319655289cc591114ba1416683cd0a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"e1646eae_71cd27cd","updated":"2023-06-16 06:42:17.000000000","message":"Should we document this behavior in glance (as a note)?\nhttps://github.com/openstack/glance/blob/master/doc/source/configuration/configuring.rst#configuring-the-rbd-storage-backend\n\nOr just a reno here is enough?","commit_id":"5427e0ca484e94f00747377be3f1c919201cda62"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"3b999d823a9b26b12531c31192b65ce84d36a86d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"6c36d2ea_4d858f81","updated":"2023-06-16 06:32:32.000000000","message":"Since Dan has only changed log message and added reno, I am approving the patch.","commit_id":"5427e0ca484e94f00747377be3f1c919201cda62"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"7e7ab36ff6d106cd87d76b29a38ac837bc78b9b5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"18f5939f_acb5628e","updated":"2023-06-16 05:57:30.000000000","message":"Thanks Dan !!","commit_id":"5427e0ca484e94f00747377be3f1c919201cda62"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e3d9768898587fb5440d0587906965aa8ed70154","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"9c9b96ab_03133331","updated":"2023-06-15 21:05:24.000000000","message":"The nova-ceph-multistore job failed one test, but not for a glance-related reason. I see no new errors in the glance log that could be caused from this patch and otherwise everything seems happy.\n\nSo, good to go, IMHO. Best to get this kind of thing merged and released early to let it soak a while before 2023.2 is released","commit_id":"5427e0ca484e94f00747377be3f1c919201cda62"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"7e7ab36ff6d106cd87d76b29a38ac837bc78b9b5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"3175a13e_e418c3e5","in_reply_to":"9c9b96ab_03133331","updated":"2023-06-16 05:57:30.000000000","message":"Agreed..","commit_id":"5427e0ca484e94f00747377be3f1c919201cda62"}],"glance_store/_drivers/rbd.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b2f672bc252817a257bea949255a8e382214c829","unresolved":true,"context_lines":[{"line_number":490,"context_line":"                    # Then delete image."},{"line_number":491,"context_line":"                    rbd.RBD().remove(ioctx, image_name)"},{"line_number":492,"context_line":"                except rbd.ImageHasSnapshots:"},{"line_number":493,"context_line":"                    log_msg \u003d (_LW(\"Remove image %(img_name)s failed. \""},{"line_number":494,"context_line":"                                   \"It has snapshot(s) left.\") %"},{"line_number":495,"context_line":"                               {\u0027img_name\u0027: image_name})"},{"line_number":496,"context_line":"                    LOG.warning(log_msg)"},{"line_number":497,"context_line":"                    with rbd.Image(ioctx, image_name) as image:"}],"source_content_type":"text/x-python","patch_set":1,"id":"f587e84f_a859a53b","line":494,"range":{"start_line":493,"start_character":35,"end_line":494,"end_character":64},"updated":"2023-06-01 13:44:18.000000000","message":"I think we can modify this warning message to mention that moving it to trash.","commit_id":"0e969ebc3ef911eb0dd4843096784a0bd3c52b3e"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"91c32efc74ef05558b814427b883be338a031c81","unresolved":false,"context_lines":[{"line_number":490,"context_line":"                    # Then delete image."},{"line_number":491,"context_line":"                    rbd.RBD().remove(ioctx, image_name)"},{"line_number":492,"context_line":"                except rbd.ImageHasSnapshots:"},{"line_number":493,"context_line":"                    log_msg \u003d (_LW(\"Remove image %(img_name)s failed. \""},{"line_number":494,"context_line":"                                   \"It has snapshot(s) left.\") %"},{"line_number":495,"context_line":"                               {\u0027img_name\u0027: image_name})"},{"line_number":496,"context_line":"                    LOG.warning(log_msg)"},{"line_number":497,"context_line":"                    with rbd.Image(ioctx, image_name) as image:"}],"source_content_type":"text/x-python","patch_set":1,"id":"506aa960_77b2a81e","line":494,"range":{"start_line":493,"start_character":35,"end_line":494,"end_character":64},"in_reply_to":"7a581636_4bd49668","updated":"2023-06-15 15:00:53.000000000","message":"Ack","commit_id":"0e969ebc3ef911eb0dd4843096784a0bd3c52b3e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7fe002fed6e023569c99ad4e8ecd6f00e9660bf0","unresolved":true,"context_lines":[{"line_number":490,"context_line":"                    # Then delete image."},{"line_number":491,"context_line":"                    rbd.RBD().remove(ioctx, image_name)"},{"line_number":492,"context_line":"                except rbd.ImageHasSnapshots:"},{"line_number":493,"context_line":"                    log_msg \u003d (_LW(\"Remove image %(img_name)s failed. \""},{"line_number":494,"context_line":"                                   \"It has snapshot(s) left.\") %"},{"line_number":495,"context_line":"                               {\u0027img_name\u0027: image_name})"},{"line_number":496,"context_line":"                    LOG.warning(log_msg)"},{"line_number":497,"context_line":"                    with rbd.Image(ioctx, image_name) as image:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a581636_4bd49668","line":494,"range":{"start_line":493,"start_character":35,"end_line":494,"end_character":64},"in_reply_to":"f587e84f_a859a53b","updated":"2023-06-15 14:37:45.000000000","message":"Agree. I think warning is still a fine log level, but \"failed\" doesn\u0027t mean the same thing it did before.","commit_id":"0e969ebc3ef911eb0dd4843096784a0bd3c52b3e"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b2f672bc252817a257bea949255a8e382214c829","unresolved":true,"context_lines":[{"line_number":494,"context_line":"                                   \"It has snapshot(s) left.\") %"},{"line_number":495,"context_line":"                               {\u0027img_name\u0027: image_name})"},{"line_number":496,"context_line":"                    LOG.warning(log_msg)"},{"line_number":497,"context_line":"                    with rbd.Image(ioctx, image_name) as image:"},{"line_number":498,"context_line":"                        try:"},{"line_number":499,"context_line":"                            rbd.RBD().trash_move(ioctx, image_name)"},{"line_number":500,"context_line":"                            LOG.debug(\u0027Moved %s to trash\u0027, image_name)"},{"line_number":501,"context_line":"                        except rbd.ImageBusy:"},{"line_number":502,"context_line":"                            raise exceptions.InUseByStore()"},{"line_number":503,"context_line":"                        return"},{"line_number":504,"context_line":"                    raise exceptions.HasSnapshot()"},{"line_number":505,"context_line":"                except rbd.ImageBusy:"},{"line_number":506,"context_line":"                    log_msg \u003d (_LW(\"Remove image %(img_name)s failed. \""}],"source_content_type":"text/x-python","patch_set":1,"id":"9bf9c6c9_09bdd7d4","line":503,"range":{"start_line":497,"start_character":20,"end_line":503,"end_character":30},"updated":"2023-06-01 13:44:18.000000000","message":"Just confirm my understanding;\n\nImage will be marked as deleted in glance and no longer visible in glance image-list so that no one can use that image for any further operations.","commit_id":"0e969ebc3ef911eb0dd4843096784a0bd3c52b3e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7fe002fed6e023569c99ad4e8ecd6f00e9660bf0","unresolved":true,"context_lines":[{"line_number":494,"context_line":"                                   \"It has snapshot(s) left.\") %"},{"line_number":495,"context_line":"                               {\u0027img_name\u0027: image_name})"},{"line_number":496,"context_line":"                    LOG.warning(log_msg)"},{"line_number":497,"context_line":"                    with rbd.Image(ioctx, image_name) as image:"},{"line_number":498,"context_line":"                        try:"},{"line_number":499,"context_line":"                            rbd.RBD().trash_move(ioctx, image_name)"},{"line_number":500,"context_line":"                            LOG.debug(\u0027Moved %s to trash\u0027, image_name)"},{"line_number":501,"context_line":"                        except rbd.ImageBusy:"},{"line_number":502,"context_line":"                            raise exceptions.InUseByStore()"},{"line_number":503,"context_line":"                        return"},{"line_number":504,"context_line":"                    raise exceptions.HasSnapshot()"},{"line_number":505,"context_line":"                except rbd.ImageBusy:"},{"line_number":506,"context_line":"                    log_msg \u003d (_LW(\"Remove image %(img_name)s failed. \""}],"source_content_type":"text/x-python","patch_set":1,"id":"dc8f32c2_69559aff","line":503,"range":{"start_line":497,"start_character":20,"end_line":503,"end_character":30},"in_reply_to":"9bf9c6c9_09bdd7d4","updated":"2023-06-15 14:37:45.000000000","message":"Yes.","commit_id":"0e969ebc3ef911eb0dd4843096784a0bd3c52b3e"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"91c32efc74ef05558b814427b883be338a031c81","unresolved":false,"context_lines":[{"line_number":494,"context_line":"                                   \"It has snapshot(s) left.\") %"},{"line_number":495,"context_line":"                               {\u0027img_name\u0027: image_name})"},{"line_number":496,"context_line":"                    LOG.warning(log_msg)"},{"line_number":497,"context_line":"                    with rbd.Image(ioctx, image_name) as image:"},{"line_number":498,"context_line":"                        try:"},{"line_number":499,"context_line":"                            rbd.RBD().trash_move(ioctx, image_name)"},{"line_number":500,"context_line":"                            LOG.debug(\u0027Moved %s to trash\u0027, image_name)"},{"line_number":501,"context_line":"                        except rbd.ImageBusy:"},{"line_number":502,"context_line":"                            raise exceptions.InUseByStore()"},{"line_number":503,"context_line":"                        return"},{"line_number":504,"context_line":"                    raise exceptions.HasSnapshot()"},{"line_number":505,"context_line":"                except rbd.ImageBusy:"},{"line_number":506,"context_line":"                    log_msg \u003d (_LW(\"Remove image %(img_name)s failed. \""}],"source_content_type":"text/x-python","patch_set":1,"id":"106f7ce7_9f6c1947","line":503,"range":{"start_line":497,"start_character":20,"end_line":503,"end_character":30},"in_reply_to":"dc8f32c2_69559aff","updated":"2023-06-15 15:00:53.000000000","message":"Ack","commit_id":"0e969ebc3ef911eb0dd4843096784a0bd3c52b3e"}]}
