)]}'
{"cinder/volume/drivers/rbd.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bebee6ff2c1c7d58899b7995c2743ebb91f2f3dd","unresolved":false,"context_lines":[{"line_number":295,"context_line":"                    try:"},{"line_number":296,"context_line":"                        with RBDVolumeProxy(self, t, read_only\u003dTrue) as v:"},{"line_number":297,"context_line":"                            v.diff_iterate(0, v.size(), None, self._iterate_cb)"},{"line_number":298,"context_line":"                    except self.rbd.ImageNotFound:"},{"line_number":299,"context_line":"                        # We may have lost a race with volume deletion, and"},{"line_number":300,"context_line":"                        # that\u0027s just fine."},{"line_number":301,"context_line":"                        continue"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"    def _update_volume_stats(self):"},{"line_number":304,"context_line":"        stats \u003d {"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_934ee594","line":301,"range":{"start_line":298,"start_character":20,"end_line":301,"end_character":32},"updated":"2016-11-30 15:36:38.000000000","message":"Hmm, from the bug report and stacktrace there, we\u0027re starting in the volume manager\u0027s delete_volume() method, we don\u0027t really want to catch an rbd-specific exception there, but if we handle this here and raised up a cinder-specific NotFound type of exception, we could catch that in the delete_volume() method, log a debug message and continue. The thing that worries me about this change is it assumes that we failed while deleting a volume, which might not be the case.","commit_id":"d42016a1e98941c8eec8c033a2b850683843c3e6"},{"author":{"_account_id":9236,"name":"Jon Bernard","email":"jobernar@redhat.com","username":"jbernard"},"change_message_id":"2705afe0536f0c79ef75f7033a284ec239011116","unresolved":false,"context_lines":[{"line_number":298,"context_line":"                    except self.rbd.ImageNotFound:"},{"line_number":299,"context_line":"                        # We may have lost a race with volume deletion, and"},{"line_number":300,"context_line":"                        # that\u0027s just fine."},{"line_number":301,"context_line":"                        continue"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"    def _update_volume_stats(self):"},{"line_number":304,"context_line":"        stats \u003d {"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_e6cd9587","line":301,"in_reply_to":"5a74a57a_934ee594","updated":"2016-11-30 15:42:57.000000000","message":"I don\u0027t quite follow you.  The assumption is not that we failed while deleting a volume, but rather while iterating through the volumes for update_stats(), we gather a list and then examine each one - and if a volume is successfully deleted before we examine it (which occurs asynchonously) - there is nothing to examine and catching ImageNotFound is the correct thing to do.\n\nI dont see that there is a problem in delete_volume, it appears to be functioning correctly to me.","commit_id":"d42016a1e98941c8eec8c033a2b850683843c3e6"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"30e4962a36484d3a83314d9af9e309f442b12c41","unresolved":false,"context_lines":[{"line_number":298,"context_line":"                    except self.rbd.ImageNotFound:"},{"line_number":299,"context_line":"                        # We may have lost a race with volume deletion, and"},{"line_number":300,"context_line":"                        # that\u0027s just fine."},{"line_number":301,"context_line":"                        continue"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"    def _update_volume_stats(self):"},{"line_number":304,"context_line":"        stats \u003d {"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_fd2d1ffe","line":301,"in_reply_to":"5a74a57a_e6cd9587","updated":"2016-11-30 17:07:33.000000000","message":"I agree with Jon, this is not a Cinder generic problem, looking at the stack trace we see that the error is comming from the `delete_method` in the volume manager, but it\u0027s happening when it\u0027s doing the `publish_service_capabilities` [1], which ends up calling the driver\u0027s `get_volume_stats` [2].\n\nSo the method to get volume stats should not be returning a not found exception in any case, it should just return the stats.\n\nThis approach seems reasonable to me, since you don\u0027t want to add the length to the `_total_usage` for volumes that are no longer there because they were removed while we were in the loop.\n\n[1]: https://github.com/openstack/cinder/blob/master/cinder/volume/manager.py#L786\n[2]: https://github.com/openstack/cinder/blob/master/cinder/volume/manager.py#L1978","commit_id":"d42016a1e98941c8eec8c033a2b850683843c3e6"}]}
