)]}'
{"cinder/volume/drivers/remotefs.py":[{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"fb77995f13012b0e041e9d142880b8a5a6874925","unresolved":false,"context_lines":[{"line_number":1562,"context_line":""},{"line_number":1563,"context_line":"            del(snap_info[snapshot.id])"},{"line_number":1564,"context_line":""},{"line_number":1565,"context_line":"            # Update the volumes provider_location if this was the last snaps."},{"line_number":1566,"context_line":"            if len(snap_info) \u003d\u003d 1:"},{"line_number":1567,"context_line":"                loc_update \u003d {\"provider_location\": info[\"snapshot_file\"]}"},{"line_number":1568,"context_line":"                snapshot.volume.update(loc_update)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9fb8cfa7_6b787e2a","line":1565,"range":{"start_line":1565,"start_character":12,"end_line":1565,"end_character":78},"updated":"2019-06-24 15:36:42.000000000","message":"I don\u0027t think we should be adding additional logic here that checks the length of snap_info.\n\nIsn\u0027t this a different way to determine the same thing that\u0027s determined above at line 1550?","commit_id":"0a97d102d7e23abdca1562e2d907d172d3eda440"},{"author":{"_account_id":13915,"name":"Silvan Kaiser","email":"silvan@quobyte.com","username":"kaisers"},"change_message_id":"33372b6032c234d4f72a1e28c9d6899ec0876add","unresolved":false,"context_lines":[{"line_number":1562,"context_line":""},{"line_number":1563,"context_line":"            del(snap_info[snapshot.id])"},{"line_number":1564,"context_line":""},{"line_number":1565,"context_line":"            # Update the volumes provider_location if this was the last snaps."},{"line_number":1566,"context_line":"            if len(snap_info) \u003d\u003d 1:"},{"line_number":1567,"context_line":"                loc_update \u003d {\"provider_location\": info[\"snapshot_file\"]}"},{"line_number":1568,"context_line":"                snapshot.volume.update(loc_update)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_06374be5","line":1565,"range":{"start_line":1565,"start_character":12,"end_line":1565,"end_character":78},"in_reply_to":"9fb8cfa7_6b787e2a","updated":"2019-09-03 09:36:50.000000000","message":"Similar, yes. I moved it up.","commit_id":"0a97d102d7e23abdca1562e2d907d172d3eda440"},{"author":{"_account_id":20813,"name":"Sofia Enriquez","email":"lsofia.enriquez@gmail.com","username":"enriquetaso"},"change_message_id":"777ab233fee3b0b8a566af3b10d53ab2c299d923","unresolved":false,"context_lines":[{"line_number":1013,"context_line":"        img_info \u003d self._qemu_img_info(forward_path)"},{"line_number":1014,"context_line":"        return img_info.backing_file"},{"line_number":1015,"context_line":""},{"line_number":1016,"context_line":"    def _snapshots_exist(self, volume):"},{"line_number":1017,"context_line":"        # Do basic checks if snapshots may exist at all before path comparison"},{"line_number":1018,"context_line":"        if not volume.provider_location:"},{"line_number":1019,"context_line":"            return False"},{"line_number":1020,"context_line":"        info_file \u003d self._local_path_volume_info(volume)"},{"line_number":1021,"context_line":"        snap_info \u003d self._read_info_file(info_file, empty_if_missing\u003dTrue)"},{"line_number":1022,"context_line":"        if not snap_info:"},{"line_number":1023,"context_line":"            return False"},{"line_number":1024,"context_line":"        if len(snap_info) \u003d\u003d 1:"},{"line_number":1025,"context_line":"            return False"},{"line_number":1026,"context_line":""},{"line_number":1027,"context_line":"        active_fpath \u003d self._local_path_active_image(volume)"},{"line_number":1028,"context_line":"        base_vol_path \u003d self.local_path(volume)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5faad753_bc2dc247","line":1025,"range":{"start_line":1016,"start_character":0,"end_line":1025,"end_character":24},"updated":"2019-09-06 21:08:34.000000000","message":"AFAIK \u0027_snapshots_exist\u0027 hasn\u0027t a relationship with the creation/deletion of snapshots.\n\n I\u0027m following the steps in the launchpad (#1813138) and this method is never called. This method is only used in L1054 when cloning volumes...\n\nI\u0027m using \u0027openstack volume snapshot delete\u0027 to delete the snapshots. I wonder how can I delete snapshots with Nova as you reported?","commit_id":"ca55529161540fc53b44898170b4b37b4c99736c"},{"author":{"_account_id":20813,"name":"Sofia Enriquez","email":"lsofia.enriquez@gmail.com","username":"enriquetaso"},"change_message_id":"5356fa5448877cdb99d5af22d18d69f4b46328b7","unresolved":false,"context_lines":[{"line_number":1013,"context_line":"        img_info \u003d self._qemu_img_info(forward_path)"},{"line_number":1014,"context_line":"        return img_info.backing_file"},{"line_number":1015,"context_line":""},{"line_number":1016,"context_line":"    def _snapshots_exist(self, volume):"},{"line_number":1017,"context_line":"        # Do basic checks if snapshots may exist at all before path comparison"},{"line_number":1018,"context_line":"        if not volume.provider_location:"},{"line_number":1019,"context_line":"            return False"},{"line_number":1020,"context_line":"        info_file \u003d self._local_path_volume_info(volume)"},{"line_number":1021,"context_line":"        snap_info \u003d self._read_info_file(info_file, empty_if_missing\u003dTrue)"},{"line_number":1022,"context_line":"        if not snap_info:"},{"line_number":1023,"context_line":"            return False"},{"line_number":1024,"context_line":"        if len(snap_info) \u003d\u003d 1:"},{"line_number":1025,"context_line":"            return False"},{"line_number":1026,"context_line":""},{"line_number":1027,"context_line":"        active_fpath \u003d self._local_path_active_image(volume)"},{"line_number":1028,"context_line":"        base_vol_path \u003d self.local_path(volume)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_cc09eadd","line":1025,"range":{"start_line":1016,"start_character":0,"end_line":1025,"end_character":24},"in_reply_to":"5faad753_7d679fb8","updated":"2019-09-17 21:13:35.000000000","message":"Thank you for the clarification.","commit_id":"ca55529161540fc53b44898170b4b37b4c99736c"},{"author":{"_account_id":13915,"name":"Silvan Kaiser","email":"silvan@quobyte.com","username":"kaisers"},"change_message_id":"afd27b0e03992369a10258bad7bba35be7cc73e8","unresolved":false,"context_lines":[{"line_number":1013,"context_line":"        img_info \u003d self._qemu_img_info(forward_path)"},{"line_number":1014,"context_line":"        return img_info.backing_file"},{"line_number":1015,"context_line":""},{"line_number":1016,"context_line":"    def _snapshots_exist(self, volume):"},{"line_number":1017,"context_line":"        # Do basic checks if snapshots may exist at all before path comparison"},{"line_number":1018,"context_line":"        if not volume.provider_location:"},{"line_number":1019,"context_line":"            return False"},{"line_number":1020,"context_line":"        info_file \u003d self._local_path_volume_info(volume)"},{"line_number":1021,"context_line":"        snap_info \u003d self._read_info_file(info_file, empty_if_missing\u003dTrue)"},{"line_number":1022,"context_line":"        if not snap_info:"},{"line_number":1023,"context_line":"            return False"},{"line_number":1024,"context_line":"        if len(snap_info) \u003d\u003d 1:"},{"line_number":1025,"context_line":"            return False"},{"line_number":1026,"context_line":""},{"line_number":1027,"context_line":"        active_fpath \u003d self._local_path_active_image(volume)"},{"line_number":1028,"context_line":"        base_vol_path \u003d self.local_path(volume)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5faad753_7d679fb8","line":1025,"range":{"start_line":1016,"start_character":0,"end_line":1025,"end_character":24},"in_reply_to":"5faad753_bc2dc247","updated":"2019-09-16 09:59:13.000000000","message":"You\u0027re correct. The issue comes up not during snapshot deletion but afterwards. If _create_cloned_volume is called after hitting the issue described in #1813138 it will compare active_fpath and base_vol_path. However as described in the bug the provider_location will point to a wrong (no longer existing) path which will (in this scenario) cause a wrong result for the _snapshots_exist method. This is described in the last paragraph of the bug ticket. The method will report existing snapshots while there are none.\n\nSo, yes, this is not related to the snapshot deletion but a bug during snapshot deletion can cause an incorrect path to be used in here.\n\nI added the checks in the _snapshots_exist method in order to detect a no-snapshots-exist state quicker and more reliably.\n\nDoes this answer your question?","commit_id":"ca55529161540fc53b44898170b4b37b4c99736c"}]}
