)]}'
{"glance/scrubber.py":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"e6ecb0d69b815eb9467cecd83adfb9b007f3fd5d","unresolved":false,"context_lines":[{"line_number":270,"context_line":"        except Exception:"},{"line_number":271,"context_line":"            LOG.warn(_LW(\"One or more image locations couldn\u0027t be scrubbed \""},{"line_number":272,"context_line":"                         \"from backend. Leaving image \u0027%s\u0027 in \u0027pending_delete\u0027\""},{"line_number":273,"context_line":"                         \" status\") % image_id)"},{"line_number":274,"context_line":"        else:"},{"line_number":275,"context_line":"            image \u003d self.registry.get_image(image_id)"},{"line_number":276,"context_line":"            if image[\u0027status\u0027] \u003d\u003d \u0027pending_delete\u0027:"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_0575e3f7","line":273,"updated":"2015-08-27 14:39:35.000000000","message":"If location[0] is bad, then you won\u0027t examine any of the other locations even though they\u0027re scrubbable.\n\nI think we\u0027d be better off pulling the for loop outside the try so that we can scrub as many locations as possible during a run.  It would change the code here to something like this:\n\nsuccess \u003d True\nfor img_id, loc_id, uri in delete_jobs:\n    try:\n        self._delete_image_location_from_backend(img_id, loc_id, uri)\n    except Exception:\n        success \u003d False\n        \nif succcess:\n    # do current \u0027else\u0027 stuff\nelse:\n    # log \"leaving image in pending_delete\" message","commit_id":"571f329bb829bc008a770310fc54f16997de09f8"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"b14122918ba017bf21feeeed43ed7905675db556","unresolved":false,"context_lines":[{"line_number":270,"context_line":"        except Exception:"},{"line_number":271,"context_line":"            LOG.warn(_LW(\"One or more image locations couldn\u0027t be scrubbed \""},{"line_number":272,"context_line":"                         \"from backend. Leaving image \u0027%s\u0027 in \u0027pending_delete\u0027\""},{"line_number":273,"context_line":"                         \" status\") % image_id)"},{"line_number":274,"context_line":"        else:"},{"line_number":275,"context_line":"            image \u003d self.registry.get_image(image_id)"},{"line_number":276,"context_line":"            if image[\u0027status\u0027] \u003d\u003d \u0027pending_delete\u0027:"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_9b4dd474","line":273,"in_reply_to":"da20952f_0575e3f7","updated":"2015-08-27 15:04:40.000000000","message":"Makes sense.","commit_id":"571f329bb829bc008a770310fc54f16997de09f8"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"e6ecb0d69b815eb9467cecd83adfb9b007f3fd5d","unresolved":false,"context_lines":[{"line_number":298,"context_line":"            LOG.warn(_LW(\"Unable to scrub image %(id)s from a location. \""},{"line_number":299,"context_line":"                         \"Reason: %(exc)s \") %"},{"line_number":300,"context_line":"                     {\u0027id\u0027: image_id,"},{"line_number":301,"context_line":"                      \u0027exc\u0027: encodeutils.exception_to_unicode(e)})"},{"line_number":302,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_f803bbb6","line":301,"updated":"2015-08-27 14:39:35.000000000","message":"I realize that you didn\u0027t select the log level for this, but I wonder whether this should be an error instead of a warning? The expected behavior is that the data at all locations will be deleted and that hasn\u0027t happened. If the operator doesn\u0027t do something, the image is going to stay in pending_delete for a while.\n\nI think this situation could fit into either warning or error given the logging standards: https://wiki.openstack.org/wiki/LoggingStandards#Log_level_definitions , but we should probably think about it.","commit_id":"571f329bb829bc008a770310fc54f16997de09f8"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"b14122918ba017bf21feeeed43ed7905675db556","unresolved":false,"context_lines":[{"line_number":298,"context_line":"            LOG.warn(_LW(\"Unable to scrub image %(id)s from a location. \""},{"line_number":299,"context_line":"                         \"Reason: %(exc)s \") %"},{"line_number":300,"context_line":"                     {\u0027id\u0027: image_id,"},{"line_number":301,"context_line":"                      \u0027exc\u0027: encodeutils.exception_to_unicode(e)})"},{"line_number":302,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_9b05d4c3","line":301,"in_reply_to":"da20952f_f803bbb6","updated":"2015-08-27 15:04:40.000000000","message":"+1\nBoth WARN and ERROR messages should attract the attention of operator. \nBut, I agree that in this case (because we leave dark data behind) we may want to bump it up to ERROR as a stronger signal than WARN.","commit_id":"571f329bb829bc008a770310fc54f16997de09f8"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"4b37600369e4c137b630586c5727a50274d60e6a","unresolved":false,"context_lines":[{"line_number":298,"context_line":"            LOG.warn(_LW(\"Unable to scrub image %(id)s from a location. \""},{"line_number":299,"context_line":"                         \"Reason: %(exc)s \") %"},{"line_number":300,"context_line":"                     {\u0027id\u0027: image_id,"},{"line_number":301,"context_line":"                      \u0027exc\u0027: encodeutils.exception_to_unicode(e)})"},{"line_number":302,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_b6046f15","line":301,"in_reply_to":"da20952f_f803bbb6","updated":"2015-08-27 15:16:27.000000000","message":"I do agree with Brian here, thanks for good catch.\n\nPerhaps it was not as clear before, but imho this change proves the scope being rather error than warning.","commit_id":"571f329bb829bc008a770310fc54f16997de09f8"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"f75be9ce30c8573d1277eb88d99f901a8d319c90","unresolved":false,"context_lines":[{"line_number":289,"context_line":"            try:"},{"line_number":290,"context_line":"                self.store_api.delete_from_backend(uri, self.admin_context)"},{"line_number":291,"context_line":"            except store_exceptions.NotFound:"},{"line_number":292,"context_line":"                LOG.info(_LI(\"Image \u0027%s\u0027 not found in backend; Marking \""},{"line_number":293,"context_line":"                             \"image location deleted in db.\") % image_id)"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"            if loc_id !\u003d \u0027-\u0027:"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_7146e124","line":292,"updated":"2015-08-27 15:45:49.000000000","message":"nit: probably need word location here to avoid confusion during debugging; \"Image location \u0027%s\u0027 not found in backend ...\"","commit_id":"5ccdd85cf62ade1eacb19e94a5aa4f0a8b2d1071"}]}
