)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"f87626ccc1e14a6aeb795c60c47e61faff76028c","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix 404 when deleteing volume group"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This fixes 404 group not found error that happens intermittently."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I5b52ebac2f325bfeda51773c90cb40e7f7e02c67"},{"line_number":12,"context_line":"Closes-Bug: #1882116"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"ff570b3c_9a221ea2","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":65},"updated":"2020-06-05 12:32:46.000000000","message":"please explain in more detail about the changes. something like below:\n\nFix 404 when deleting volume group\n\nIn delete_group() method we delete the group first and\nthen try to fetch the volume information which internally\ntry to find all the related groups. As group delete request\nwas placed earlier than volume list and the group might be\ndeleted before volume list try to find the group\ninformation, it returns 404.\n\nThis is race condition based on group is finish its deletion\nbefore list volume requests or not.\n\nBetter is to fetch the information of volumes first and then\nwe need to delete the group. And use that volume info later\nto cleanup the volume also if requested.","commit_id":"f8338dec72deae9cd86a5c0a0b907a74215aa470"},{"author":{"_account_id":24780,"name":"Sangeet Gupta","email":"sg774j@att.com","username":"sgupta"},"change_message_id":"30cd6854096455f0c18be86fac00e4f97f977083","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix 404 when deleteing volume group"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This fixes 404 group not found error that happens intermittently."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I5b52ebac2f325bfeda51773c90cb40e7f7e02c67"},{"line_number":12,"context_line":"Closes-Bug: #1882116"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"ff570b3c_9a5a1eef","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":65},"in_reply_to":"ff570b3c_9a221ea2","updated":"2020-06-05 12:42:10.000000000","message":"Done","commit_id":"f8338dec72deae9cd86a5c0a0b907a74215aa470"},{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"6ba404196821e8f3990b85d1cfe06617f864298a","unresolved":false,"context_lines":[{"line_number":11,"context_line":"trys to find all the related groups. As group delete request"},{"line_number":12,"context_line":"was placed earlier than volume list and the group might be"},{"line_number":13,"context_line":"deleted before volume list try to find the group"},{"line_number":14,"context_line":"information, it returns 404."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This is race condition based on group is finish its deletion"},{"line_number":17,"context_line":"before list volume requests or not."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ff570b3c_ce94c38f","line":14,"range":{"start_line":14,"start_character":12,"end_line":14,"end_character":15},"updated":"2020-06-08 09:09:00.000000000","message":"just curious, which interface calling does this \"it\" refer to?","commit_id":"423ae450dbc9ea21acf951553809808d53bf3584"},{"author":{"_account_id":24780,"name":"Sangeet Gupta","email":"sg774j@att.com","username":"sgupta"},"change_message_id":"6a66c80b82d1d78e26e7bdf5f78285d62335cf51","unresolved":false,"context_lines":[{"line_number":11,"context_line":"trys to find all the related groups. As group delete request"},{"line_number":12,"context_line":"was placed earlier than volume list and the group might be"},{"line_number":13,"context_line":"deleted before volume list try to find the group"},{"line_number":14,"context_line":"information, it returns 404."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This is race condition based on group is finish its deletion"},{"line_number":17,"context_line":"before list volume requests or not."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ff570b3c_4afebf38","line":14,"range":{"start_line":14,"start_character":12,"end_line":14,"end_character":15},"in_reply_to":"ff570b3c_22baa009","updated":"2020-06-09 14:52:21.000000000","message":"When tempest requests volumes details, the cinder wsgi dispatch calls [1] which leads to calling [2] and which leads to calling [3].\n\n[1] https://github.com/openstack/cinder/blob/master/cinder/api/v2/volumes.py#L92\n[2] https://github.com/openstack/cinder/blob/master/cinder/api/v3/views/volumes.py#L78\n[3] https://github.com/openstack/cinder/blob/master/cinder/api/v2/views/volumes.py#L107","commit_id":"423ae450dbc9ea21acf951553809808d53bf3584"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"4533398c560fad671970521adc6554742f578f50","unresolved":false,"context_lines":[{"line_number":11,"context_line":"trys to find all the related groups. As group delete request"},{"line_number":12,"context_line":"was placed earlier than volume list and the group might be"},{"line_number":13,"context_line":"deleted before volume list try to find the group"},{"line_number":14,"context_line":"information, it returns 404."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This is race condition based on group is finish its deletion"},{"line_number":17,"context_line":"before list volume requests or not."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ff570b3c_a52cecac","line":14,"range":{"start_line":14,"start_character":12,"end_line":14,"end_character":15},"in_reply_to":"ff570b3c_2a6b8bf1","updated":"2020-06-09 15:43:59.000000000","message":"yeah, \u0027it\u0027 refer to tempest delete_group() method L9 which internally make all these requests.","commit_id":"423ae450dbc9ea21acf951553809808d53bf3584"},{"author":{"_account_id":24780,"name":"Sangeet Gupta","email":"sg774j@att.com","username":"sgupta"},"change_message_id":"3ad393e69713b2131eaf890a0c1406dc9fa0afe1","unresolved":false,"context_lines":[{"line_number":11,"context_line":"trys to find all the related groups. As group delete request"},{"line_number":12,"context_line":"was placed earlier than volume list and the group might be"},{"line_number":13,"context_line":"deleted before volume list try to find the group"},{"line_number":14,"context_line":"information, it returns 404."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This is race condition based on group is finish its deletion"},{"line_number":17,"context_line":"before list volume requests or not."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ff570b3c_2a6b8bf1","line":14,"range":{"start_line":14,"start_character":12,"end_line":14,"end_character":15},"in_reply_to":"ff570b3c_4afebf38","updated":"2020-06-09 14:56:24.000000000","message":"[3] above call get group which leads to calling [4] which throws Not Found Exception\n\n[4] https://github.com/openstack/cinder/blob/master/cinder/db/sqlalchemy/api.py#L5985","commit_id":"423ae450dbc9ea21acf951553809808d53bf3584"},{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"676b73dd4e54fe81985e29000390e8622f2cb1e0","unresolved":false,"context_lines":[{"line_number":11,"context_line":"trys to find all the related groups. As group delete request"},{"line_number":12,"context_line":"was placed earlier than volume list and the group might be"},{"line_number":13,"context_line":"deleted before volume list try to find the group"},{"line_number":14,"context_line":"information, it returns 404."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This is race condition based on group is finish its deletion"},{"line_number":17,"context_line":"before list volume requests or not."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ff570b3c_22baa009","line":14,"range":{"start_line":14,"start_character":12,"end_line":14,"end_character":15},"in_reply_to":"ff570b3c_4fda6d1d","updated":"2020-06-09 01:23:44.000000000","message":"do you mean  self.volumes_client.list_volumes?","commit_id":"423ae450dbc9ea21acf951553809808d53bf3584"},{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"feb6c7a2470fa64156b96b34a7d163bb9336ee55","unresolved":false,"context_lines":[{"line_number":11,"context_line":"trys to find all the related groups. As group delete request"},{"line_number":12,"context_line":"was placed earlier than volume list and the group might be"},{"line_number":13,"context_line":"deleted before volume list try to find the group"},{"line_number":14,"context_line":"information, it returns 404."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This is race condition based on group is finish its deletion"},{"line_number":17,"context_line":"before list volume requests or not."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ff570b3c_b1cd32b9","line":14,"range":{"start_line":14,"start_character":12,"end_line":14,"end_character":15},"in_reply_to":"ff570b3c_a52cecac","updated":"2020-06-11 01:33:47.000000000","message":"oh, shouldn\u0027t cinder deal with that 404?\nFor an end user who doesn\u0027t know the internal details, listing volumes got a 404 error for group is not found seems weird.","commit_id":"423ae450dbc9ea21acf951553809808d53bf3584"},{"author":{"_account_id":24780,"name":"Sangeet Gupta","email":"sg774j@att.com","username":"sgupta"},"change_message_id":"99ecfcd86a6e41488825a7c3e25d35074a31c5a0","unresolved":false,"context_lines":[{"line_number":11,"context_line":"trys to find all the related groups. As group delete request"},{"line_number":12,"context_line":"was placed earlier than volume list and the group might be"},{"line_number":13,"context_line":"deleted before volume list try to find the group"},{"line_number":14,"context_line":"information, it returns 404."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This is race condition based on group is finish its deletion"},{"line_number":17,"context_line":"before list volume requests or not."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ff570b3c_1d66ac56","line":14,"range":{"start_line":14,"start_character":12,"end_line":14,"end_character":15},"in_reply_to":"ff570b3c_b1cd32b9","updated":"2020-06-11 12:37:07.000000000","message":"This is a race condition, does not happen every time. I think we are querying the volumes too soon and not giving enough time to clean up. The proposed fix is still doing the same thing and is giving enough time for volumes and groups to clean up.","commit_id":"423ae450dbc9ea21acf951553809808d53bf3584"},{"author":{"_account_id":24780,"name":"Sangeet Gupta","email":"sg774j@att.com","username":"sgupta"},"change_message_id":"25751a0d7057fcea5bb43a30c4ec23296a241c75","unresolved":false,"context_lines":[{"line_number":11,"context_line":"trys to find all the related groups. As group delete request"},{"line_number":12,"context_line":"was placed earlier than volume list and the group might be"},{"line_number":13,"context_line":"deleted before volume list try to find the group"},{"line_number":14,"context_line":"information, it returns 404."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This is race condition based on group is finish its deletion"},{"line_number":17,"context_line":"before list volume requests or not."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ff570b3c_4fda6d1d","line":14,"range":{"start_line":14,"start_character":12,"end_line":14,"end_character":15},"in_reply_to":"ff570b3c_ce94c38f","updated":"2020-06-08 12:58:58.000000000","message":"Cinder.","commit_id":"423ae450dbc9ea21acf951553809808d53bf3584"}],"tempest/api/volume/base.py":[{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"a466450c4f7c81565f2b2547a4ee466f5fdd720d","unresolved":false,"context_lines":[{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    def delete_group(self, group_id, delete_volumes\u003dTrue):"},{"line_number":236,"context_line":"        self.groups_client.delete_group(group_id, delete_volumes)"},{"line_number":237,"context_line":"        if delete_volumes:"},{"line_number":238,"context_line":"            vols \u003d self.volumes_client.list_volumes(detail\u003dTrue)[\u0027volumes\u0027]"},{"line_number":239,"context_line":"            for vol in vols:"},{"line_number":240,"context_line":"                if vol[\u0027group_id\u0027] \u003d\u003d group_id:"},{"line_number":241,"context_line":"                    self.volumes_client.wait_for_resource_deletion(vol[\u0027id\u0027])"},{"line_number":242,"context_line":"        self.groups_client.wait_for_resource_deletion(group_id)"},{"line_number":243,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_ccc87223","side":"PARENT","line":240,"range":{"start_line":237,"start_character":0,"end_line":240,"end_character":47},"updated":"2020-06-04 17:37:45.000000000","message":"i think we really need to store the associated vols info before delete group  is requested, like below:\n\n\n        group_vols_id \u003d []\n        if delete_volumes:\n            vols \u003d self.volumes_client.list_volumes(detail\u003dTrue)[\u0027volumes\u0027]\n            for vol in vols:\n                if vol[\u0027group_id\u0027] \u003d\u003d group_id:\n                    group_vols_id.append(vol[\u0027id\u0027])\n        self.groups_client.delete_group(group_id, \n\n        for vol in group_vols_id:\n            self.volumes_client.wait_for_resource_deletion(vol[\u0027id\u0027])","commit_id":"257f3b009f7978723a8748f9f5b413aa8eb38e3a"},{"author":{"_account_id":24780,"name":"Sangeet Gupta","email":"sg774j@att.com","username":"sgupta"},"change_message_id":"e0519240d9c1d27f5b361e9c1ebb79f9d5a2449e","unresolved":false,"context_lines":[{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    def delete_group(self, group_id, delete_volumes\u003dTrue):"},{"line_number":236,"context_line":"        self.groups_client.delete_group(group_id, delete_volumes)"},{"line_number":237,"context_line":"        if delete_volumes:"},{"line_number":238,"context_line":"            vols \u003d self.volumes_client.list_volumes(detail\u003dTrue)[\u0027volumes\u0027]"},{"line_number":239,"context_line":"            for vol in vols:"},{"line_number":240,"context_line":"                if vol[\u0027group_id\u0027] \u003d\u003d group_id:"},{"line_number":241,"context_line":"                    self.volumes_client.wait_for_resource_deletion(vol[\u0027id\u0027])"},{"line_number":242,"context_line":"        self.groups_client.wait_for_resource_deletion(group_id)"},{"line_number":243,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_14dc30e2","side":"PARENT","line":240,"range":{"start_line":237,"start_character":0,"end_line":240,"end_character":47},"in_reply_to":"ff570b3c_ccc87223","updated":"2020-06-04 20:07:21.000000000","message":"Yes this is another option and I agree with it.","commit_id":"257f3b009f7978723a8748f9f5b413aa8eb38e3a"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"a466450c4f7c81565f2b2547a4ee466f5fdd720d","unresolved":false,"context_lines":[{"line_number":232,"context_line":"            self.groups_client, group[\u0027id\u0027], \u0027available\u0027)"},{"line_number":233,"context_line":"        return group"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    def delete_group(self, group_id, delete_volumes\u003dTrue):"},{"line_number":236,"context_line":"        self.groups_client.delete_group(group_id, delete_volumes)"},{"line_number":237,"context_line":"        self.groups_client.wait_for_resource_deletion(group_id)"},{"line_number":238,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_2ccdae5c","line":235,"range":{"start_line":235,"start_character":0,"end_line":235,"end_character":58},"updated":"2020-06-04 17:37:45.000000000","message":"delete_group from mentioned tests in bug is being added as ignore-not-found decorator\n- https://github.com/openstack/tempest/blob/257f3b009f7978723a8748f9f5b413aa8eb38e3a/tempest/api/volume/base.py#L229\n\nIf group or volume is not found in that cleanup then Tempest would not fail and pass the cleanup.\nWhat version of Tempest you are using? and test are being run in parallel?","commit_id":"72d7d21e9348bedac9b5c6e365c70f03ef6dce0b"},{"author":{"_account_id":24780,"name":"Sangeet Gupta","email":"sg774j@att.com","username":"sgupta"},"change_message_id":"e0519240d9c1d27f5b361e9c1ebb79f9d5a2449e","unresolved":false,"context_lines":[{"line_number":232,"context_line":"            self.groups_client, group[\u0027id\u0027], \u0027available\u0027)"},{"line_number":233,"context_line":"        return group"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    def delete_group(self, group_id, delete_volumes\u003dTrue):"},{"line_number":236,"context_line":"        self.groups_client.delete_group(group_id, delete_volumes)"},{"line_number":237,"context_line":"        self.groups_client.wait_for_resource_deletion(group_id)"},{"line_number":238,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_f451bc63","line":235,"range":{"start_line":235,"start_character":0,"end_line":235,"end_character":58},"in_reply_to":"ff570b3c_2ccdae5c","updated":"2020-06-04 20:07:21.000000000","message":"I am using master and yes running tests in parallel.\n\nhttps://github.com/openstack/tempest/blob/257f3b009f7978723a8748f9f5b413aa8eb38e3a/tempest/api/volume/admin/test_group_snapshots.py#L149 uses https://github.com/openstack/tempest/blob/master/tempest/lib/services/volume/v3/groups_client.py#L86-L97 to create the group. So ignoring NotFound exception is not present in the path.\nhttps://github.com/openstack/tempest/blob/master/tempest/api/volume/admin/test_group_snapshots.py#L151 causes this delete_group method to be called.","commit_id":"72d7d21e9348bedac9b5c6e365c70f03ef6dce0b"}]}
