)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"49a6d10ccdf6cb1126ed3820adaa7c6e2fcbead6","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Get updated volume status in begin_detaching"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Heat stack deletion followed by an unsuccessful attempt"},{"line_number":10,"context_line":"resulted in calling begin_detaching on a volume which"},{"line_number":11,"context_line":"was already in detaching state. It was observed that"},{"line_number":12,"context_line":"the API returned success instead of failing the operation."},{"line_number":13,"context_line":"There is a check which verifies the volume status, but"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"fa32b979_1b9b9e73","line":10,"updated":"2015-06-17 12:17:50.000000000","message":"Followed by an unsuccessful attempt to do what?","commit_id":"0265b25f0b2d333d7048acadaa35c899299a5628"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"f8dfbf1e15b1f05e0e0415ad32775b6d4bf00dc5","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2015-06-18 11:25:07 +0530"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Get updated volume status in begin_detaching"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Heat stack deletion followed by an unsuccessful heat stack delete"},{"line_number":10,"context_line":"attempt resulted in calling begin_detaching on a volume which was"},{"line_number":11,"context_line":"already in detaching state. It was observed that the API returned"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"fa32b979_476cb934","line":8,"updated":"2015-06-18 08:19:08.000000000","message":"How about a more generic description for this issue?  Basically this bug is about more than one \u0027begin_detaching\u0027 requests being processed in Cinder within a short period of time, which might causes inconsistency API behavior.  And the proposed fix here only shrinks the windows but cannot 100% eliminate the possibility unless the \u0027check \u0026 set\u0027 is atomic operation at DB level.","commit_id":"a3fafebd76073ada0dd57c7f2ccb7635fce30196"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"b1e2f92ee03af7e4235ded02ff8e3b953d01dd1e","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2015-06-18 11:25:07 +0530"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Get updated volume status in begin_detaching"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Heat stack deletion followed by an unsuccessful heat stack delete"},{"line_number":10,"context_line":"attempt resulted in calling begin_detaching on a volume which was"},{"line_number":11,"context_line":"already in detaching state. It was observed that the API returned"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"fa32b979_e505c510","line":8,"in_reply_to":"fa32b979_476cb934","updated":"2015-06-18 09:25:13.000000000","message":"Winston, In the case mentioned in the bug, it was not a short period of time. The time difference between two stack deletions was 9hrs. During the first stack delete, volume detach didn\u0027t complete due to a non-responsive nova-compute. Heat waited for the volume status to become available and it failed after a long time due to keystone token expiry. I guess the user started the second delete meantime.\n\nI will add a note regarding the limitation of this fix.","commit_id":"a3fafebd76073ada0dd57c7f2ccb7635fce30196"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"e0df8f5783352372f960f1c5310afb60c2ac943d","unresolved":false,"context_lines":[{"line_number":11,"context_line":"already in detaching state. It was observed that the API returned"},{"line_number":12,"context_line":"success instead of failing the operation. There is a check which"},{"line_number":13,"context_line":"verifies the volume status, but it is not using the updated volume"},{"line_number":14,"context_line":"status. This patch fix the problem by getting updated volume status"},{"line_number":15,"context_line":"from DB."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Closes-Bug: #1466060"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"fa32b979_716dffca","line":14,"updated":"2015-06-18 07:07:43.000000000","message":"fix \u003d\u003e fixes","commit_id":"a3fafebd76073ada0dd57c7f2ccb7635fce30196"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"b1e2f92ee03af7e4235ded02ff8e3b953d01dd1e","unresolved":false,"context_lines":[{"line_number":11,"context_line":"already in detaching state. It was observed that the API returned"},{"line_number":12,"context_line":"success instead of failing the operation. There is a check which"},{"line_number":13,"context_line":"verifies the volume status, but it is not using the updated volume"},{"line_number":14,"context_line":"status. This patch fix the problem by getting updated volume status"},{"line_number":15,"context_line":"from DB."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Closes-Bug: #1466060"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"fa32b979_005537c4","line":14,"in_reply_to":"fa32b979_716dffca","updated":"2015-06-18 09:25:13.000000000","message":"Done","commit_id":"a3fafebd76073ada0dd57c7f2ccb7635fce30196"}],"cinder/tests/unit/test_volume.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"54e3ecfb978e4ec005e6c27a549ceec860a03950","unresolved":false,"context_lines":[{"line_number":3570,"context_line":"    def test_begin_detaching_fails_available(self, volume_get):"},{"line_number":3571,"context_line":"        volume_api \u003d cinder.volume.api.API()"},{"line_number":3572,"context_line":"        volume \u003d tests_utils.create_volume(self.context, **self.volume_params)"},{"line_number":3573,"context_line":"        volume_get.return_value \u003d volume"},{"line_number":3574,"context_line":"        self.assertRaises(exception.InvalidVolume, volume_api.begin_detaching,"},{"line_number":3575,"context_line":"                          self.context, volume)"},{"line_number":3576,"context_line":"        volume[\u0027status\u0027] \u003d \"in-use\""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_41500532","line":3573,"updated":"2015-06-18 19:41:10.000000000","message":"You must check that volume_get gets called and with the right ID.","commit_id":"1e108df2dca7491353d6f4d8c26dd3561cd739cf"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"ebd7e29fa172f09173d881e7ca41a2944ca2038b","unresolved":false,"context_lines":[{"line_number":3570,"context_line":"    def test_begin_detaching_fails_available(self, volume_get):"},{"line_number":3571,"context_line":"        volume_api \u003d cinder.volume.api.API()"},{"line_number":3572,"context_line":"        volume \u003d tests_utils.create_volume(self.context, **self.volume_params)"},{"line_number":3573,"context_line":"        volume_get.return_value \u003d volume"},{"line_number":3574,"context_line":"        self.assertRaises(exception.InvalidVolume, volume_api.begin_detaching,"},{"line_number":3575,"context_line":"                          self.context, volume)"},{"line_number":3576,"context_line":"        volume[\u0027status\u0027] \u003d \"in-use\""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_163b0c9e","line":3573,"in_reply_to":"fa32b979_41500532","updated":"2015-06-19 09:41:03.000000000","message":"Done","commit_id":"1e108df2dca7491353d6f4d8c26dd3561cd739cf"}],"cinder/volume/api.py":[{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"f8dfbf1e15b1f05e0e0415ad32775b6d4bf00dc5","unresolved":false,"context_lines":[{"line_number":563,"context_line":""},{"line_number":564,"context_line":"    @wrap_check_policy"},{"line_number":565,"context_line":"    def begin_detaching(self, context, volume):"},{"line_number":566,"context_line":"        # NOTE(vbala): get updated volume status, see bug 1466060."},{"line_number":567,"context_line":"        volume \u003d self.db.volume_get(context, volume[\u0027id\u0027])"},{"line_number":568,"context_line":"        # If we are in the middle of a volume migration, we don\u0027t want the user"},{"line_number":569,"context_line":"        # to see that the volume is \u0027detaching\u0027. Having \u0027migration_status\u0027 set"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa32b979_e7762d05","line":566,"updated":"2015-06-18 08:19:08.000000000","message":"I\u0027d prefer more informative description here instead of a simple bug #.","commit_id":"a3fafebd76073ada0dd57c7f2ccb7635fce30196"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"b1e2f92ee03af7e4235ded02ff8e3b953d01dd1e","unresolved":false,"context_lines":[{"line_number":563,"context_line":""},{"line_number":564,"context_line":"    @wrap_check_policy"},{"line_number":565,"context_line":"    def begin_detaching(self, context, volume):"},{"line_number":566,"context_line":"        # NOTE(vbala): get updated volume status, see bug 1466060."},{"line_number":567,"context_line":"        volume \u003d self.db.volume_get(context, volume[\u0027id\u0027])"},{"line_number":568,"context_line":"        # If we are in the middle of a volume migration, we don\u0027t want the user"},{"line_number":569,"context_line":"        # to see that the volume is \u0027detaching\u0027. Having \u0027migration_status\u0027 set"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa32b979_60e68316","line":566,"in_reply_to":"fa32b979_e7762d05","updated":"2015-06-18 09:25:13.000000000","message":"Done","commit_id":"a3fafebd76073ada0dd57c7f2ccb7635fce30196"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"54e3ecfb978e4ec005e6c27a549ceec860a03950","unresolved":false,"context_lines":[{"line_number":565,"context_line":"    def begin_detaching(self, context, volume):"},{"line_number":566,"context_line":"        # NOTE(vbala): The volume status might be \u0027detaching\u0027 already due to"},{"line_number":567,"context_line":"        # a previous begin_detaching call. Get updated volume status so that"},{"line_number":568,"context_line":"        # we fail such cases (bug 1466060)."},{"line_number":569,"context_line":"        volume \u003d self.db.volume_get(context, volume[\u0027id\u0027])"},{"line_number":570,"context_line":"        # If we are in the middle of a volume migration, we don\u0027t want the user"},{"line_number":571,"context_line":"        # to see that the volume is \u0027detaching\u0027. Having \u0027migration_status\u0027 set"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_61e429ab","line":568,"updated":"2015-06-18 19:41:10.000000000","message":"I don\u0027t think there\u0027s a need to mention bug. We can get bug from commit message.","commit_id":"1e108df2dca7491353d6f4d8c26dd3561cd739cf"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"b742421259a01bfe6c2d1ee59e88043b0f167d62","unresolved":false,"context_lines":[{"line_number":565,"context_line":"    def begin_detaching(self, context, volume):"},{"line_number":566,"context_line":"        # NOTE(vbala): The volume status might be \u0027detaching\u0027 already due to"},{"line_number":567,"context_line":"        # a previous begin_detaching call. Get updated volume status so that"},{"line_number":568,"context_line":"        # we fail such cases (bug 1466060)."},{"line_number":569,"context_line":"        volume \u003d self.db.volume_get(context, volume[\u0027id\u0027])"},{"line_number":570,"context_line":"        # If we are in the middle of a volume migration, we don\u0027t want the user"},{"line_number":571,"context_line":"        # to see that the volume is \u0027detaching\u0027. Having \u0027migration_status\u0027 set"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_771aabc7","line":568,"in_reply_to":"fa32b979_61e429ab","updated":"2015-06-18 20:16:49.000000000","message":"Agreed, please don\u0027t put bug numbers in comments.","commit_id":"1e108df2dca7491353d6f4d8c26dd3561cd739cf"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"ebd7e29fa172f09173d881e7ca41a2944ca2038b","unresolved":false,"context_lines":[{"line_number":565,"context_line":"    def begin_detaching(self, context, volume):"},{"line_number":566,"context_line":"        # NOTE(vbala): The volume status might be \u0027detaching\u0027 already due to"},{"line_number":567,"context_line":"        # a previous begin_detaching call. Get updated volume status so that"},{"line_number":568,"context_line":"        # we fail such cases (bug 1466060)."},{"line_number":569,"context_line":"        volume \u003d self.db.volume_get(context, volume[\u0027id\u0027])"},{"line_number":570,"context_line":"        # If we are in the middle of a volume migration, we don\u0027t want the user"},{"line_number":571,"context_line":"        # to see that the volume is \u0027detaching\u0027. Having \u0027migration_status\u0027 set"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_3602d0b5","line":568,"in_reply_to":"fa32b979_61e429ab","updated":"2015-06-19 09:41:03.000000000","message":"Done","commit_id":"1e108df2dca7491353d6f4d8c26dd3561cd739cf"}]}
