)]}'
{"cinder/tests/unit/test_volume.py":[{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"9f5a33d6c453c90333f768f7deb800e3f8c9dd3a","unresolved":false,"context_lines":[{"line_number":6440,"context_line":"                                                      False, None, \u0027default\u0027)"},{"line_number":6441,"context_line":"        fake_vg \u003d fake_lvm_vg()"},{"line_number":6442,"context_line":"        fake_dest_vg.return_value \u003d fake_vg"},{"line_number":6443,"context_line":"        with mock.patch.object(self.volume.driver, \u0027_create_volume\u0027):"},{"line_number":6444,"context_line":"            self.assertRaises(processutils.ProcessExecutionError,"},{"line_number":6445,"context_line":"                              self.volume.driver.migrate_volume, self.context,"},{"line_number":6446,"context_line":"                              vol, host)"}],"source_content_type":"text/x-python","patch_set":11,"id":"da20952f_49ef3187","line":6443,"updated":"2015-09-03 18:42:03.000000000","message":"I\u0027d recommend to use @mock.patch.object same as above.","commit_id":"9a9d3bb5367fc9c041578c89fdd9d45d5a6056b8"},{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"9f5a33d6c453c90333f768f7deb800e3f8c9dd3a","unresolved":false,"context_lines":[{"line_number":6444,"context_line":"            self.assertRaises(processutils.ProcessExecutionError,"},{"line_number":6445,"context_line":"                              self.volume.driver.migrate_volume, self.context,"},{"line_number":6446,"context_line":"                              vol, host)"},{"line_number":6447,"context_line":""},{"line_number":6448,"context_line":"    def test_lvm_volume_group_missing(self):"},{"line_number":6449,"context_line":"        hostname \u003d socket.gethostname()"},{"line_number":6450,"context_line":"        capabilities \u003d {\u0027location_info\u0027: \u0027LVMVolumeDriver:%s:\u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"da20952f_acb85b12","line":6447,"updated":"2015-09-03 18:42:03.000000000","message":"How about doing like this? We should check whether dest_vg_ref.delete(volume) is called properly.\n\n    @mock.patch.object(lvm.LVMVolumeDriver, \u0027_create_volume\u0027)\n    @mock.patch.object(brick_lvm.LVM, \u0027get_all_physical_volumes\u0027)\n    @mock.patch.object(brick_lvm.LVM, \u0027delete\u0027)\n    @mock.patch.object(volutils, \u0027copy_volume\u0027,\n                       side_effect\u003dprocessutils.ProcessExecutionError)\n    @mock.patch.object(volutils, \u0027get_all_volume_groups\u0027,\n                       return_value\u003d[{\u0027name\u0027: \u0027cinder-volumes\u0027}])\n    def test_lvm_migrate_volume_volume_copy_error(self, vgs, copy_volume,\n                                                  mock_delete, mock_pvs,\n                                                  mock_create):\n\n        hostname \u003d socket.gethostname()\n        capabilities \u003d {\u0027location_info\u0027: \u0027LVMVolumeDriver:%s:\u0027\n                        \u0027cinder-volumes:default:0\u0027 % hostname}\n        host \u003d {\u0027capabilities\u0027: capabilities}\n        vol \u003d {\u0027name\u0027: \u0027test\u0027, \u0027id\u0027: 1, \u0027size\u0027: 1, \u0027status\u0027: \u0027available\u0027}\n        self.volume.driver.vg \u003d fake_lvm.FakeBrickLVM(\u0027cinder-volumes-old\u0027,\n                                                      False, None, \u0027default\u0027)\n        self.assertRaises(processutils.ProcessExecutionError,\n                          self.volume.driver.migrate_volume, self.context,\n                          vol, host)\n        mock_delete.assert_called_once_with(vol)","commit_id":"9a9d3bb5367fc9c041578c89fdd9d45d5a6056b8"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"acb718ee64f1636f37df194b7a17dd5ed7740de5","unresolved":false,"context_lines":[{"line_number":6494,"context_line":"                          self.volume.driver.migrate_volume, self.context,"},{"line_number":6495,"context_line":"                          vol, host)"},{"line_number":6496,"context_line":""},{"line_number":6497,"context_line":"    @mock.patch.object(lvm.LVMVolumeDriver, \u0027_create_volume\u0027)"},{"line_number":6498,"context_line":"    @mock.patch.object(brick_lvm.LVM, \u0027get_all_physical_volumes\u0027)"},{"line_number":6499,"context_line":"    @mock.patch.object(brick_lvm.LVM, \u0027delete\u0027)"},{"line_number":6500,"context_line":"    @mock.patch.object(volutils, \u0027copy_volume\u0027,"}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_dd76bfa2","line":6497,"updated":"2015-09-10 07:38:06.000000000","message":"The driver is LVMISCSIDriver, so it is better to patch lvm.LVMISCSIDriver._create_volume instead of using its parent class.","commit_id":"224688ce914444531181af9dff1ce794d7108490"}],"cinder/volume/drivers/lvm.py":[{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"ff6cec4c1cf050be1c5774bf0444cfeee05aed5f","unresolved":false,"context_lines":[{"line_number":688,"context_line":"                    LOG.error(_LE(\"Migration of volume failed due to the \""},{"line_number":689,"context_line":"                                  \"reason: %(reason)s\"),"},{"line_number":690,"context_line":"                              {\u0027reason\u0027: six.text_type(e)}, resource\u003dvolume)"},{"line_number":691,"context_line":"                    self._delete_volume(volume, vg\u003ddest_vg_ref)"},{"line_number":692,"context_line":"            except Exception:"},{"line_number":693,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":694,"context_line":"                    LOG.error(_LE(\"Migration of volume failed due to unknown \""}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_cbad3a85","line":691,"updated":"2015-08-31 11:10:03.000000000","message":"self._delete_volume does not take \u0027vg\u0027 as a parameter","commit_id":"96860cf7610261dd94ff5a3d5075820233696899"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"5665eb9f69af4a46bb07234fbace40aacec2856e","unresolved":false,"context_lines":[{"line_number":688,"context_line":"                    LOG.error(_LE(\"Migration of volume failed due to the \""},{"line_number":689,"context_line":"                                  \"reason: %(reason)s\"),"},{"line_number":690,"context_line":"                              {\u0027reason\u0027: six.text_type(e)}, resource\u003dvolume)"},{"line_number":691,"context_line":"                    self._delete_volume(volume, vg\u003ddest_vg_ref)"},{"line_number":692,"context_line":"            except Exception:"},{"line_number":693,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":694,"context_line":"                    LOG.error(_LE(\"Migration of volume failed due to unknown \""}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_213e578c","line":691,"in_reply_to":"da20952f_cbad3a85","updated":"2015-08-31 11:47:07.000000000","message":"Thank you. I probably got a wrong rebase. :-(","commit_id":"96860cf7610261dd94ff5a3d5075820233696899"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"a4fbc183954b6d696ac2d3c67eddc0eba7d9dedc","unresolved":false,"context_lines":[{"line_number":687,"context_line":"            except processutils.ProcessExecutionError as e:"},{"line_number":688,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":689,"context_line":"                    LOG.error(_LE(\"Migration of volume failed due to the \""},{"line_number":690,"context_line":"                                  \"reason: %(reason)s\"),"},{"line_number":691,"context_line":"                              {\u0027reason\u0027: six.text_type(e)}, resource\u003dvolume)"},{"line_number":692,"context_line":"                    self._delete_volume(volume, vg\u003ddest_vg_ref)"},{"line_number":693,"context_line":"            except Exception:"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_06c32058","line":690,"updated":"2015-08-31 14:42:37.000000000","message":"\".\" at EOL","commit_id":"4f8714733cb47a1601f5db6e244ffc233ae261a3"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"bc1eeac9abcd6f95e2e7c179aa527cfaac9ac2bc","unresolved":false,"context_lines":[{"line_number":690,"context_line":"                                  \"reason: %(reason)s.\"),"},{"line_number":691,"context_line":"                              {\u0027reason\u0027: six.text_type(e)}, resource\u003dvolume)"},{"line_number":692,"context_line":"                    self._delete_volume(volume, vg\u003ddest_vg_ref)"},{"line_number":693,"context_line":"            except Exception:"},{"line_number":694,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":695,"context_line":"                    LOG.error(_LE(\"Migration of volume failed due to unknown \""},{"line_number":696,"context_line":"                                  \"reasons.\"), resource\u003dvolume)"}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_53b51c2f","line":693,"updated":"2015-09-01 15:29:35.000000000","message":"We can change the following log statement to:\n\n\"Migration of volume failed due to reason: %(reason)s\", {\u0027reason\u0027: six.text_type(e)}\n\nThen we can remove the previous except (ProcessExecutionError) block.","commit_id":"dbd2611f6b7065c3ab915e4a5fb5d5a6041a97e5"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"2b37d3b865c545c198641589ff6ba7565b15f717","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        name \u003d volume[\u0027name\u0027]"},{"line_number":116,"context_line":"        if is_snapshot:"},{"line_number":117,"context_line":"            name \u003d self._escape_snapshot(volume[\u0027name\u0027])"},{"line_number":118,"context_line":"        vg_ref \u003d vg or self.vg"},{"line_number":119,"context_line":"        vg_ref.delete(name)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def _clear_volume(self, volume, is_snapshot\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_a99f49b3","line":118,"updated":"2015-09-02 03:09:58.000000000","message":"I don\u0027t understand this, even if you passed in an external reference, why overload like this?  It would be better to keep the process of deleting another LV explicit don\u0027t you think?","commit_id":"c13d520a775ab9650198d36c88e5ece76652109f"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"c33ebe9f8be543099455fc1670f0524c583f2047","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        name \u003d volume[\u0027name\u0027]"},{"line_number":116,"context_line":"        if is_snapshot:"},{"line_number":117,"context_line":"            name \u003d self._escape_snapshot(volume[\u0027name\u0027])"},{"line_number":118,"context_line":"        vg_ref \u003d vg or self.vg"},{"line_number":119,"context_line":"        vg_ref.delete(name)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def _clear_volume(self, volume, is_snapshot\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_beed3cf1","line":118,"in_reply_to":"da20952f_a99f49b3","updated":"2015-09-02 05:50:13.000000000","message":"I agree. I will keep as simple as possible.","commit_id":"c13d520a775ab9650198d36c88e5ece76652109f"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"2b37d3b865c545c198641589ff6ba7565b15f717","unresolved":false,"context_lines":[{"line_number":689,"context_line":"                    LOG.error(_LE(\"Migration of volume failed due to the \""},{"line_number":690,"context_line":"                                  \"reason: %(reason)s.\"),"},{"line_number":691,"context_line":"                              {\u0027reason\u0027: six.text_type(e)}, resource\u003dvolume)"},{"line_number":692,"context_line":"                    self._delete_volume(volume, vg\u003ddest_vg_ref)"},{"line_number":693,"context_line":"            self._delete_volume(volume)"},{"line_number":694,"context_line":""},{"line_number":695,"context_line":"            return (True, None)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_c9615dd5","line":692,"updated":"2015-09-02 03:09:58.000000000","message":"Not sure what you\u0027re intending here, but this won\u0027t work; you\u0027re passing in dest_vg_ref as the arugment \"is_snapshot\u003dFalse\" ??","commit_id":"c13d520a775ab9650198d36c88e5ece76652109f"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"c33ebe9f8be543099455fc1670f0524c583f2047","unresolved":false,"context_lines":[{"line_number":689,"context_line":"                    LOG.error(_LE(\"Migration of volume failed due to the \""},{"line_number":690,"context_line":"                                  \"reason: %(reason)s.\"),"},{"line_number":691,"context_line":"                              {\u0027reason\u0027: six.text_type(e)}, resource\u003dvolume)"},{"line_number":692,"context_line":"                    self._delete_volume(volume, vg\u003ddest_vg_ref)"},{"line_number":693,"context_line":"            self._delete_volume(volume)"},{"line_number":694,"context_line":""},{"line_number":695,"context_line":"            return (True, None)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_3ee12cff","line":692,"in_reply_to":"da20952f_c9615dd5","updated":"2015-09-02 05:50:13.000000000","message":"I get myself too complicated for this. In fact, I just need to delete this volume from the dest_vg_ref. It is enough to simply delete it.","commit_id":"c13d520a775ab9650198d36c88e5ece76652109f"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"5c48bac427bee921ac96bc677d6c3bb5452d77df","unresolved":false,"context_lines":[{"line_number":686,"context_line":"            except Exception as e:"},{"line_number":687,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":688,"context_line":"                    LOG.error(_LE(\"Migration of volume failed due to the \""},{"line_number":689,"context_line":"                                  \"reason: %(reason)s.\"),"},{"line_number":690,"context_line":"                              {\u0027reason\u0027: six.text_type(e)}, resource\u003dvolume)"},{"line_number":691,"context_line":"                    dest_vg_ref.delete(volume)"},{"line_number":692,"context_line":"            self._delete_volume(volume)"}],"source_content_type":"text/x-python","patch_set":11,"id":"da20952f_5153cfe2","line":689,"updated":"2015-09-08 14:03:38.000000000","message":"Not crazy about the wording here, maybe you can fix it up in another patch?\n\n\"Volume migration failed due to exception: %(reason)s.\"","commit_id":"9a9d3bb5367fc9c041578c89fdd9d45d5a6056b8"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"b90d80523577c35a60db616b3f21c719568ea76a","unresolved":false,"context_lines":[{"line_number":686,"context_line":"            except Exception as e:"},{"line_number":687,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":688,"context_line":"                    LOG.error(_LE(\"Migration of volume failed due to the \""},{"line_number":689,"context_line":"                                  \"reason: %(reason)s.\"),"},{"line_number":690,"context_line":"                              {\u0027reason\u0027: six.text_type(e)}, resource\u003dvolume)"},{"line_number":691,"context_line":"                    dest_vg_ref.delete(volume)"},{"line_number":692,"context_line":"            self._delete_volume(volume)"}],"source_content_type":"text/x-python","patch_set":11,"id":"da20952f_91127957","line":689,"in_reply_to":"da20952f_5153cfe2","updated":"2015-09-10 03:15:28.000000000","message":"Done","commit_id":"9a9d3bb5367fc9c041578c89fdd9d45d5a6056b8"}]}
