)]}'
{"cinder/tests/unit/test_volume.py":[{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"8476fc3da23fd76ec1d40c710471593f862e558b","unresolved":false,"context_lines":[{"line_number":2190,"context_line":"        self.volume.detach_volume(self.context, volume_id, attachment[\u0027id\u0027])"},{"line_number":2191,"context_line":"        vol \u003d db.volume_get(self.context, volume_id)"},{"line_number":2192,"context_line":"        self.assertEqual(\u0027in-use\u0027, vol[\u0027status\u0027])"},{"line_number":2193,"context_line":"        self.assertEqual(0, len(mck_rm_export.mock_calls))"},{"line_number":2194,"context_line":""},{"line_number":2195,"context_line":"        self.assertRaises(exception.VolumeAttached,"},{"line_number":2196,"context_line":"                          self.volume.delete_volume,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba3cc151_eeba25c0","line":2193,"updated":"2015-07-06 15:33:46.000000000","message":"Better to use self.assertFalse(mck_rm_export.called), since it should never be called in this part of the test case.","commit_id":"5f624b628d4c89d5901e7afd347ecb220d0480f2"},{"author":{"_account_id":13909,"name":"Chris Gacsal","email":"chris.gacsal@gmail.com","username":"chrisg"},"change_message_id":"c9e07dabbaafd08d3f51866814a9d5a76c6c3ca1","unresolved":false,"context_lines":[{"line_number":2190,"context_line":"        self.volume.detach_volume(self.context, volume_id, attachment[\u0027id\u0027])"},{"line_number":2191,"context_line":"        vol \u003d db.volume_get(self.context, volume_id)"},{"line_number":2192,"context_line":"        self.assertEqual(\u0027in-use\u0027, vol[\u0027status\u0027])"},{"line_number":2193,"context_line":"        self.assertEqual(0, len(mck_rm_export.mock_calls))"},{"line_number":2194,"context_line":""},{"line_number":2195,"context_line":"        self.assertRaises(exception.VolumeAttached,"},{"line_number":2196,"context_line":"                          self.volume.delete_volume,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba3cc151_74a8fb77","line":2193,"in_reply_to":"ba3cc151_eeba25c0","updated":"2015-07-07 10:26:02.000000000","message":"Done","commit_id":"5f624b628d4c89d5901e7afd347ecb220d0480f2"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"8476fc3da23fd76ec1d40c710471593f862e558b","unresolved":false,"context_lines":[{"line_number":2413,"context_line":"        self.volume.detach_volume(self.context, volume_id, attachment[\u0027id\u0027])"},{"line_number":2414,"context_line":"        vol \u003d db.volume_get(self.context, volume_id)"},{"line_number":2415,"context_line":"        self.assertEqual(\"in-use\", vol[\u0027status\u0027])"},{"line_number":2416,"context_line":"        self.assertEqual(0, len(mck_rm_export.mock_calls))"},{"line_number":2417,"context_line":""},{"line_number":2418,"context_line":"        self.volume.detach_volume(self.context, volume_id, attachment2[\u0027id\u0027])"},{"line_number":2419,"context_line":"        vol \u003d db.volume_get(self.context, volume_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba3cc151_ce7881fb","line":2416,"updated":"2015-07-06 15:33:46.000000000","message":"Ditto","commit_id":"5f624b628d4c89d5901e7afd347ecb220d0480f2"},{"author":{"_account_id":13909,"name":"Chris Gacsal","email":"chris.gacsal@gmail.com","username":"chrisg"},"change_message_id":"c9e07dabbaafd08d3f51866814a9d5a76c6c3ca1","unresolved":false,"context_lines":[{"line_number":2413,"context_line":"        self.volume.detach_volume(self.context, volume_id, attachment[\u0027id\u0027])"},{"line_number":2414,"context_line":"        vol \u003d db.volume_get(self.context, volume_id)"},{"line_number":2415,"context_line":"        self.assertEqual(\"in-use\", vol[\u0027status\u0027])"},{"line_number":2416,"context_line":"        self.assertEqual(0, len(mck_rm_export.mock_calls))"},{"line_number":2417,"context_line":""},{"line_number":2418,"context_line":"        self.volume.detach_volume(self.context, volume_id, attachment2[\u0027id\u0027])"},{"line_number":2419,"context_line":"        vol \u003d db.volume_get(self.context, volume_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba3cc151_14b64fdc","line":2416,"in_reply_to":"ba3cc151_ce7881fb","updated":"2015-07-07 10:26:02.000000000","message":"Done","commit_id":"5f624b628d4c89d5901e7afd347ecb220d0480f2"}],"cinder/volume/manager.py":[{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"8476fc3da23fd76ec1d40c710471593f862e558b","unresolved":false,"context_lines":[{"line_number":917,"context_line":"            # attachments"},{"line_number":918,"context_line":"            msg \u003d _(\"Skipping removing target as the volume is being\""},{"line_number":919,"context_line":"                    \" attached.\")"},{"line_number":920,"context_line":"            LOG.info(msg, resource\u003dvolume)"},{"line_number":921,"context_line":"        else:"},{"line_number":922,"context_line":"            try:"},{"line_number":923,"context_line":"                utils.require_driver_initialized(self.driver)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba3cc151_6ef615d9","line":920,"updated":"2015-07-06 15:33:46.000000000","message":"A LOG.debug might be better, since you could get multiple identical messages.","commit_id":"5f624b628d4c89d5901e7afd347ecb220d0480f2"},{"author":{"_account_id":13909,"name":"Chris Gacsal","email":"chris.gacsal@gmail.com","username":"chrisg"},"change_message_id":"c9e07dabbaafd08d3f51866814a9d5a76c6c3ca1","unresolved":false,"context_lines":[{"line_number":917,"context_line":"            # attachments"},{"line_number":918,"context_line":"            msg \u003d _(\"Skipping removing target as the volume is being\""},{"line_number":919,"context_line":"                    \" attached.\")"},{"line_number":920,"context_line":"            LOG.info(msg, resource\u003dvolume)"},{"line_number":921,"context_line":"        else:"},{"line_number":922,"context_line":"            try:"},{"line_number":923,"context_line":"                utils.require_driver_initialized(self.driver)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba3cc151_7471db43","line":920,"in_reply_to":"ba3cc151_6ef615d9","updated":"2015-07-07 10:26:02.000000000","message":"Done","commit_id":"5f624b628d4c89d5901e7afd347ecb220d0480f2"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"ebece126a28d4d142ef62ade0f175fe5d57ae095","unresolved":false,"context_lines":[{"line_number":915,"context_line":"        if len(attachments):"},{"line_number":916,"context_line":"            # Removing target should be skipped if there are remaining"},{"line_number":917,"context_line":"            # attachments"},{"line_number":918,"context_line":"            msg \u003d _(\"Skipping removing target as the volume is being\""},{"line_number":919,"context_line":"                    \" attached.\")"},{"line_number":920,"context_line":"            LOG.debug(msg, resource\u003dvolume)"},{"line_number":921,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba3cc151_9ea10eac","line":918,"updated":"2015-07-07 15:10:47.000000000","message":"Debug messages do not need to be translated, so just remove the \"_\".","commit_id":"3ccf7da32237a7ad557ed5af791744bd82195f3a"},{"author":{"_account_id":13909,"name":"Chris Gacsal","email":"chris.gacsal@gmail.com","username":"chrisg"},"change_message_id":"33daf8a23fb9b0da1df8d8594f1eb136426b8d7b","unresolved":false,"context_lines":[{"line_number":915,"context_line":"        if len(attachments):"},{"line_number":916,"context_line":"            # Removing target should be skipped if there are remaining"},{"line_number":917,"context_line":"            # attachments"},{"line_number":918,"context_line":"            msg \u003d _(\"Skipping removing target as the volume is being\""},{"line_number":919,"context_line":"                    \" attached.\")"},{"line_number":920,"context_line":"            LOG.debug(msg, resource\u003dvolume)"},{"line_number":921,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba3cc151_91601f37","line":918,"in_reply_to":"ba3cc151_9ea10eac","updated":"2015-07-07 15:29:43.000000000","message":"Ahh. I\u0027ve missed that. Thanks to point it out!","commit_id":"3ccf7da32237a7ad557ed5af791744bd82195f3a"},{"author":{"_account_id":14806,"name":"Chhavi Agarwal","email":"chhagarw@in.ibm.com","username":"chhagarw"},"change_message_id":"e712ad1b5ea94828c8914f5dce2d385913874ac7","unresolved":false,"context_lines":[{"line_number":909,"context_line":"        # We\u0027re going to remove the export here"},{"line_number":910,"context_line":"        # (delete the iscsi target)"},{"line_number":911,"context_line":"        volume \u003d self.db.volume_get(context, volume_id)"},{"line_number":912,"context_line":"        attachments \u003d self.db.volume_attachment_get_used_by_volume_id("},{"line_number":913,"context_line":"            context, volume_id)"},{"line_number":914,"context_line":""},{"line_number":915,"context_line":"        if len(attachments):"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_b2338513","line":912,"updated":"2015-07-09 05:32:11.000000000","message":"If the volume is already in use, the control will never comes here since we already check this in Line 867.\nI don\u0027t see any value of re-adding the check here again.","commit_id":"c1d741ca382f280709b2478f7649483db16761f6"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"abd8b26955a55ce4e6697e4dbf48f339d24b7579","unresolved":false,"context_lines":[{"line_number":919,"context_line":"                      \" attached.\", resource\u003dvolume)"},{"line_number":920,"context_line":"        else:"},{"line_number":921,"context_line":"            try:"},{"line_number":922,"context_line":"                utils.require_driver_initialized(self.driver)"},{"line_number":923,"context_line":"                self.driver.remove_export(context.elevated(), volume)"},{"line_number":924,"context_line":""},{"line_number":925,"context_line":"            except exception.DriverNotInitialized:"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_269bde19","line":922,"updated":"2015-07-08 15:45:25.000000000","message":"This call was already executed on line 890.\n\nIt\u0027s not entirely clear the purpose of remove_export.  Some drivers do nothing during remove_export and the target removal is done during terminate_connection time, which was called prior to detach_volume.  I think this also exposes the problem of the Cinder driver API\u0027s.   Not all drivers do the same type of thing during terminate_connection vs. remove_export.\nSame with initialize_connection and ensure_export.","commit_id":"c1d741ca382f280709b2478f7649483db16761f6"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"17630bd18c61b76c46aa479e19be9d1fa45d0cb2","unresolved":false,"context_lines":[{"line_number":929,"context_line":"                                  resource\u003dvolume)"},{"line_number":930,"context_line":"            except Exception as ex:"},{"line_number":931,"context_line":"                LOG.exception(_LE(\"Detach volume failed, due to \""},{"line_number":932,"context_line":"                                  \"remove-export failure.\"),"},{"line_number":933,"context_line":"                              resource\u003dvolume)"},{"line_number":934,"context_line":"                raise exception.RemoveExportException(volume\u003dvolume_id,"},{"line_number":935,"context_line":"                                                      reason\u003dsix.text_type(ex))"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_53f829c3","line":932,"updated":"2015-07-08 14:28:21.000000000","message":"s/remove-export/remove_export","commit_id":"c1d741ca382f280709b2478f7649483db16761f6"},{"author":{"_account_id":13909,"name":"Chris Gacsal","email":"chris.gacsal@gmail.com","username":"chrisg"},"change_message_id":"6729a19635b243abea3561b9129d3152310629a4","unresolved":false,"context_lines":[{"line_number":929,"context_line":"                                  resource\u003dvolume)"},{"line_number":930,"context_line":"            except Exception as ex:"},{"line_number":931,"context_line":"                LOG.exception(_LE(\"Detach volume failed, due to \""},{"line_number":932,"context_line":"                                  \"remove-export failure.\"),"},{"line_number":933,"context_line":"                              resource\u003dvolume)"},{"line_number":934,"context_line":"                raise exception.RemoveExportException(volume\u003dvolume_id,"},{"line_number":935,"context_line":"                                                      reason\u003dsix.text_type(ex))"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_b5cdd631","line":932,"in_reply_to":"ba3cc151_53f829c3","updated":"2015-07-08 15:15:35.000000000","message":"I have not done any changes here.\nIt\u0027s a bit misleading as the diff tool misinterpret what was changed here.\nI\u0027d like to make changes that are only related to the bug.","commit_id":"c1d741ca382f280709b2478f7649483db16761f6"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"17630bd18c61b76c46aa479e19be9d1fa45d0cb2","unresolved":false,"context_lines":[{"line_number":932,"context_line":"                                  \"remove-export failure.\"),"},{"line_number":933,"context_line":"                              resource\u003dvolume)"},{"line_number":934,"context_line":"                raise exception.RemoveExportException(volume\u003dvolume_id,"},{"line_number":935,"context_line":"                                                      reason\u003dsix.text_type(ex))"},{"line_number":936,"context_line":""},{"line_number":937,"context_line":"        self._notify_about_volume_usage(context, volume, \"detach.end\")"},{"line_number":938,"context_line":"        LOG.info(_LI(\"Detach volume completed successfully.\"), resource\u003dvolume)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_b3b735d7","line":935,"updated":"2015-07-08 14:28:21.000000000","message":"You don\u0027t need the six.text_type part, you should pass ex directly.","commit_id":"c1d741ca382f280709b2478f7649483db16761f6"},{"author":{"_account_id":13909,"name":"Chris Gacsal","email":"chris.gacsal@gmail.com","username":"chrisg"},"change_message_id":"6729a19635b243abea3561b9129d3152310629a4","unresolved":false,"context_lines":[{"line_number":932,"context_line":"                                  \"remove-export failure.\"),"},{"line_number":933,"context_line":"                              resource\u003dvolume)"},{"line_number":934,"context_line":"                raise exception.RemoveExportException(volume\u003dvolume_id,"},{"line_number":935,"context_line":"                                                      reason\u003dsix.text_type(ex))"},{"line_number":936,"context_line":""},{"line_number":937,"context_line":"        self._notify_about_volume_usage(context, volume, \"detach.end\")"},{"line_number":938,"context_line":"        LOG.info(_LI(\"Detach volume completed successfully.\"), resource\u003dvolume)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_75dc2ee4","line":935,"in_reply_to":"ba3cc151_b3b735d7","updated":"2015-07-08 15:15:35.000000000","message":"Ditto.","commit_id":"c1d741ca382f280709b2478f7649483db16761f6"},{"author":{"_account_id":14806,"name":"Chhavi Agarwal","email":"chhagarw@in.ibm.com","username":"chhagarw"},"change_message_id":"e712ad1b5ea94828c8914f5dce2d385913874ac7","unresolved":false,"context_lines":[{"line_number":1167,"context_line":"        # before going forward. The exception will be caught"},{"line_number":1168,"context_line":"        # and the volume status updated."},{"line_number":1169,"context_line":"        utils.require_driver_initialized(self.driver)"},{"line_number":1170,"context_line":""},{"line_number":1171,"context_line":"        volume_ref \u003d self.db.volume_get(context, volume_id)"},{"line_number":1172,"context_line":"        try:"},{"line_number":1173,"context_line":"            self.driver.terminate_connection(volume_ref, connector,"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_a5010107","line":1170,"updated":"2015-07-09 05:32:11.000000000","message":"I think this would be appropritate place to have a check if the volume is in use, before going down to the drivers for terminate connection.\n\nBut I still see there are could be use-cases like \na. If the volume is in use by the same host for which the terminate connection is called needs to be additionally taken care.","commit_id":"c1d741ca382f280709b2478f7649483db16761f6"}]}
