)]}'
{"cinder/volume/drivers/dell_emc/powermax/common.py":[{"author":{"_account_id":23601,"name":"michael","display_name":"michael-mcaleer","email":"Michael.Mcaleer@dell.com","username":"michael-mcaleer"},"change_message_id":"fa1b1f039e0abde0c7a0e7c35ce59599e55c8a9d","unresolved":false,"context_lines":[{"line_number":3907,"context_line":"    def _cleanup_on_migrate_failure("},{"line_number":3908,"context_line":"            self, rdf_pair_broken, rdf_pair_created, vol_retyped,"},{"line_number":3909,"context_line":"            remote_retyped, extra_specs, target_extra_specs, volume,"},{"line_number":3910,"context_line":"            volume_name, device_id, source_sg):"},{"line_number":3911,"context_line":"        array \u003d extra_specs[utils.ARRAY]"},{"line_number":3912,"context_line":"        srp \u003d extra_specs[utils.SRP]"},{"line_number":3913,"context_line":"        slo \u003d extra_specs[utils.SLO]"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_1ccd305d","line":3910,"updated":"2020-07-28 08:57:54.000000000","message":"Function needs docstring","commit_id":"ae9c0831c1eb24bb930a026f8462f4a9b9252c07"},{"author":{"_account_id":23601,"name":"michael","display_name":"michael-mcaleer","email":"Michael.Mcaleer@dell.com","username":"michael-mcaleer"},"change_message_id":"fa1b1f039e0abde0c7a0e7c35ce59599e55c8a9d","unresolved":false,"context_lines":[{"line_number":4096,"context_line":"            self, created_child_sg, add_sg_to_parent, got_default_sg,"},{"line_number":4097,"context_line":"            moved_between_sgs, array, source_sg, parent_sg, target_sg_name,"},{"line_number":4098,"context_line":"            extra_specs, device_id, volume, volume_name):"},{"line_number":4099,"context_line":"        if moved_between_sgs:"},{"line_number":4100,"context_line":"            LOG.debug(\u0027Volume retype cleanup - Attempt to revert move between \u0027"},{"line_number":4101,"context_line":"                      \u0027storage groups.\u0027)"},{"line_number":4102,"context_line":"            storage_groups \u003d self.rest.get_storage_group_list(array)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_9c0ae087","line":4099,"updated":"2020-07-28 08:57:54.000000000","message":"Function needs docstring","commit_id":"ae9c0831c1eb24bb930a026f8462f4a9b9252c07"},{"author":{"_account_id":23601,"name":"michael","display_name":"michael-mcaleer","email":"Michael.Mcaleer@dell.com","username":"michael-mcaleer"},"change_message_id":"fa1b1f039e0abde0c7a0e7c35ce59599e55c8a9d","unresolved":false,"context_lines":[{"line_number":4462,"context_line":"            add_to_mgmt_sg, r1_device_id, r2_device_id,"},{"line_number":4463,"context_line":"            mgmt_sg_name, array, remote_array, rdf_group_no, extra_specs,"},{"line_number":4464,"context_line":"            rep_extra_specs, volume, tgt_sg_name):"},{"line_number":4465,"context_line":"        if resume_rdf and not rdf_pair_created:"},{"line_number":4466,"context_line":"            LOG.debug(\u0027Configure volume replication cleanup - Attempt to \u0027"},{"line_number":4467,"context_line":"                      \u0027resume replication.\u0027)"},{"line_number":4468,"context_line":"            self.rest.srdf_resume_replication("}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_dc04587e","line":4465,"updated":"2020-07-28 08:57:54.000000000","message":"Function needs docstring","commit_id":"ae9c0831c1eb24bb930a026f8462f4a9b9252c07"},{"author":{"_account_id":23601,"name":"michael","display_name":"michael-mcaleer","email":"Michael.Mcaleer@dell.com","username":"michael-mcaleer"},"change_message_id":"fa1b1f039e0abde0c7a0e7c35ce59599e55c8a9d","unresolved":false,"context_lines":[{"line_number":4657,"context_line":"            self, rdfg_suspended, pair_deleted, r2_sg_remove, array,"},{"line_number":4658,"context_line":"            management_sg, rdf_group_no, extra_specs, r2_sg_names, device_id,"},{"line_number":4659,"context_line":"            remote_array, remote_device_id, volume, volume_name,"},{"line_number":4660,"context_line":"            rep_extra_specs):"},{"line_number":4661,"context_line":"        if rdfg_suspended and not pair_deleted:"},{"line_number":4662,"context_line":"            LOG.debug(\u0027Break RDF pair cleanup - Attempt to resume RDFG.\u0027)"},{"line_number":4663,"context_line":"            self.rest.srdf_resume_replication("}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_5cf04891","line":4660,"updated":"2020-07-28 08:57:54.000000000","message":"Function needs docstring","commit_id":"ae9c0831c1eb24bb930a026f8462f4a9b9252c07"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"b9e943a718838f1cc655b6ed2bdf7738367967b5","unresolved":false,"context_lines":[{"line_number":3981,"context_line":""},{"line_number":3982,"context_line":"            LOG.debug(\u0027Volume migrate cleanup - Reverted volume to previous \u0027"},{"line_number":3983,"context_line":"                      \u0027state post retype exception.\u0027)"},{"line_number":3984,"context_line":"        finally:"},{"line_number":3985,"context_line":"            LOG.debug(\u0027Volume migrate cleanup - Could not revert volume to \u0027"},{"line_number":3986,"context_line":"                      \u0027previous state post retype exception\u0027)"},{"line_number":3987,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_dbab871a","line":3984,"updated":"2020-08-18 19:48:08.000000000","message":"This is going to lead to some misleading logging.  When everything goes well, you\u0027ll log the message at line 3982 and then also log the message at line 3985.","commit_id":"4ee343044f305b198297bbdf1f0eefb6151e86b0"},{"author":{"_account_id":30165,"name":"Simon O\u0027Donovan","email":"simon.odonovan@dell.com","username":"odonos12"},"change_message_id":"74ebbb78f05fa337f359c46402224cea907aedb0","unresolved":false,"context_lines":[{"line_number":3981,"context_line":""},{"line_number":3982,"context_line":"            LOG.debug(\u0027Volume migrate cleanup - Reverted volume to previous \u0027"},{"line_number":3983,"context_line":"                      \u0027state post retype exception.\u0027)"},{"line_number":3984,"context_line":"        finally:"},{"line_number":3985,"context_line":"            LOG.debug(\u0027Volume migrate cleanup - Could not revert volume to \u0027"},{"line_number":3986,"context_line":"                      \u0027previous state post retype exception\u0027)"},{"line_number":3987,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_6eca6e6e","line":3984,"in_reply_to":"9f560f44_dbab871a","updated":"2020-08-19 13:20:56.000000000","message":"True, will remove this finally clause and move this debug message to the outer where _cleanup_on_migrate_failure is initially called.","commit_id":"4ee343044f305b198297bbdf1f0eefb6151e86b0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"b9e943a718838f1cc655b6ed2bdf7738367967b5","unresolved":false,"context_lines":[{"line_number":4478,"context_line":"            return (rep_status, pair_info, rep_info_dict, rep_extra_specs,"},{"line_number":4479,"context_line":"                    resume_rdf)"},{"line_number":4480,"context_line":"        except Exception as e:"},{"line_number":4481,"context_line":"            self._cleanup_on_configure_volume_replication_failure("},{"line_number":4482,"context_line":"                resume_rdf, rdf_pair_created, remote_sg_get, add_to_mgmt_sg,"},{"line_number":4483,"context_line":"                device_id, r2_device_id, mgmt_sg_name, array, remote_array,"},{"line_number":4484,"context_line":"                rdf_group_no, extra_specs, rep_extra_specs, volume,"},{"line_number":4485,"context_line":"                tgt_sg_name)"},{"line_number":4486,"context_line":"            raise e"},{"line_number":4487,"context_line":""},{"line_number":4488,"context_line":"    def _cleanup_on_configure_volume_replication_failure("},{"line_number":4489,"context_line":"            self, resume_rdf, rdf_pair_created, remote_sg_get,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_bef84149","line":4486,"range":{"start_line":4481,"start_character":0,"end_line":4486,"end_character":19},"updated":"2020-08-18 19:48:08.000000000","message":"this doesn\u0027t use the\n\n  except Exception as e:\n       try:\n           _call_cleanup_function()\n       finally:\n           raise e\n\npattern you\u0027ve been using elsewhere.  Was there a reason for that?\n\nThat being said, I\u0027m not sure either pattern does what you really want.  I take it the idea is that we want to raise the exception that occurred in the normal flow, not any other exception that arose during the cleanup (those methods are logging as they go).  The problem with both patterns is that if an exception happens in the cleanup function, it doesn\u0027t have a handler despite being inside a try block (there\u0027s no \u0027except\u0027 block).  So you\u0027re going to have one of those \"During handling of the above exception, another exception occurred\" situations.  I wonder if you want something more like this:\n\n  except Exception as e:\n      try:\n           _call_cleanup_function()\n      except Exception:\n           # just catch it, we don\u0027t care, we logged it already\n           pass\n      finally:\n           # reraise the original exception, keeping its original context\n           raise","commit_id":"4ee343044f305b198297bbdf1f0eefb6151e86b0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"cc7628625f41f83be0ec9b54e3e3ed3829ee5ee2","unresolved":false,"context_lines":[{"line_number":4478,"context_line":"            return (rep_status, pair_info, rep_info_dict, rep_extra_specs,"},{"line_number":4479,"context_line":"                    resume_rdf)"},{"line_number":4480,"context_line":"        except Exception as e:"},{"line_number":4481,"context_line":"            self._cleanup_on_configure_volume_replication_failure("},{"line_number":4482,"context_line":"                resume_rdf, rdf_pair_created, remote_sg_get, add_to_mgmt_sg,"},{"line_number":4483,"context_line":"                device_id, r2_device_id, mgmt_sg_name, array, remote_array,"},{"line_number":4484,"context_line":"                rdf_group_no, extra_specs, rep_extra_specs, volume,"},{"line_number":4485,"context_line":"                tgt_sg_name)"},{"line_number":4486,"context_line":"            raise e"},{"line_number":4487,"context_line":""},{"line_number":4488,"context_line":"    def _cleanup_on_configure_volume_replication_failure("},{"line_number":4489,"context_line":"            self, resume_rdf, rdf_pair_created, remote_sg_get,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_13eaf6aa","line":4486,"range":{"start_line":4481,"start_character":0,"end_line":4486,"end_character":19},"in_reply_to":"9f560f44_4ee7aae5","updated":"2020-08-19 15:48:18.000000000","message":"That works for me. Think about what makes the most sense and you can handle it in a followup patch.","commit_id":"4ee343044f305b198297bbdf1f0eefb6151e86b0"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"7567d8b3d754c0cae766018221fdebc235e2430f","unresolved":false,"context_lines":[{"line_number":4478,"context_line":"            return (rep_status, pair_info, rep_info_dict, rep_extra_specs,"},{"line_number":4479,"context_line":"                    resume_rdf)"},{"line_number":4480,"context_line":"        except Exception as e:"},{"line_number":4481,"context_line":"            self._cleanup_on_configure_volume_replication_failure("},{"line_number":4482,"context_line":"                resume_rdf, rdf_pair_created, remote_sg_get, add_to_mgmt_sg,"},{"line_number":4483,"context_line":"                device_id, r2_device_id, mgmt_sg_name, array, remote_array,"},{"line_number":4484,"context_line":"                rdf_group_no, extra_specs, rep_extra_specs, volume,"},{"line_number":4485,"context_line":"                tgt_sg_name)"},{"line_number":4486,"context_line":"            raise e"},{"line_number":4487,"context_line":""},{"line_number":4488,"context_line":"    def _cleanup_on_configure_volume_replication_failure("},{"line_number":4489,"context_line":"            self, resume_rdf, rdf_pair_created, remote_sg_get,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_6128ce33","line":4486,"range":{"start_line":4481,"start_character":0,"end_line":4486,"end_character":19},"in_reply_to":"9f560f44_bef84149","updated":"2020-08-18 19:57:05.000000000","message":"+1","commit_id":"4ee343044f305b198297bbdf1f0eefb6151e86b0"},{"author":{"_account_id":30165,"name":"Simon O\u0027Donovan","email":"simon.odonovan@dell.com","username":"odonos12"},"change_message_id":"74ebbb78f05fa337f359c46402224cea907aedb0","unresolved":false,"context_lines":[{"line_number":4478,"context_line":"            return (rep_status, pair_info, rep_info_dict, rep_extra_specs,"},{"line_number":4479,"context_line":"                    resume_rdf)"},{"line_number":4480,"context_line":"        except Exception as e:"},{"line_number":4481,"context_line":"            self._cleanup_on_configure_volume_replication_failure("},{"line_number":4482,"context_line":"                resume_rdf, rdf_pair_created, remote_sg_get, add_to_mgmt_sg,"},{"line_number":4483,"context_line":"                device_id, r2_device_id, mgmt_sg_name, array, remote_array,"},{"line_number":4484,"context_line":"                rdf_group_no, extra_specs, rep_extra_specs, volume,"},{"line_number":4485,"context_line":"                tgt_sg_name)"},{"line_number":4486,"context_line":"            raise e"},{"line_number":4487,"context_line":""},{"line_number":4488,"context_line":"    def _cleanup_on_configure_volume_replication_failure("},{"line_number":4489,"context_line":"            self, resume_rdf, rdf_pair_created, remote_sg_get,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_4ee7aae5","line":4486,"range":{"start_line":4481,"start_character":0,"end_line":4486,"end_character":19},"in_reply_to":"9f560f44_bef84149","updated":"2020-08-19 13:20:56.000000000","message":"I think the original idea was to display both exceptions in that way but in a real world scenario this would most likely just be redundant. I can update all of these similar calls to use the try except finally and write out any debug messages necessary if an exception occurs during _call_cleanup_function().","commit_id":"4ee343044f305b198297bbdf1f0eefb6151e86b0"}],"cinder/volume/drivers/dell_emc/powermax/rest.py":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"b9e943a718838f1cc655b6ed2bdf7738367967b5","unresolved":false,"context_lines":[{"line_number":297,"context_line":"            LOG.error(msg, {\u0027method\u0027: method, \u0027url\u0027: url,"},{"line_number":298,"context_line":"                            \u0027e\u0027: six.text_type(e)})"},{"line_number":299,"context_line":"            raise exception.VolumeBackendAPIException("},{"line_number":300,"context_line":"                message\u003d(msg, {\u0027method\u0027: method, \u0027url\u0027: url,"},{"line_number":301,"context_line":"                               \u0027e\u0027: six.text_type(e)}))"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"        return status_code, message"},{"line_number":304,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_5e280533","line":301,"range":{"start_line":300,"start_character":0,"end_line":301,"end_character":55},"updated":"2020-08-18 19:48:08.000000000","message":"this looks like the same problem you noticed at line 287 -- seems to occur a lot in this file.","commit_id":"4ee343044f305b198297bbdf1f0eefb6151e86b0"},{"author":{"_account_id":30165,"name":"Simon O\u0027Donovan","email":"simon.odonovan@dell.com","username":"odonos12"},"change_message_id":"74ebbb78f05fa337f359c46402224cea907aedb0","unresolved":false,"context_lines":[{"line_number":297,"context_line":"            LOG.error(msg, {\u0027method\u0027: method, \u0027url\u0027: url,"},{"line_number":298,"context_line":"                            \u0027e\u0027: six.text_type(e)})"},{"line_number":299,"context_line":"            raise exception.VolumeBackendAPIException("},{"line_number":300,"context_line":"                message\u003d(msg, {\u0027method\u0027: method, \u0027url\u0027: url,"},{"line_number":301,"context_line":"                               \u0027e\u0027: six.text_type(e)}))"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"        return status_code, message"},{"line_number":304,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_6e454e15","line":301,"range":{"start_line":300,"start_character":0,"end_line":301,"end_character":55},"in_reply_to":"9f560f44_5e280533","updated":"2020-08-19 13:20:56.000000000","message":"True, it would be better to fix this while the issue has been highlighted. I can see L301, L297 \u0026 L265 need to be updated.","commit_id":"4ee343044f305b198297bbdf1f0eefb6151e86b0"}]}
