)]}'
{"cinder/tests/unit/attachments/test_attachments_manager.py":[{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"36022330656fd23e6402aaeeb8c5318b6ca3ca9d","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        @mock.patch.object(self.manager, \u0027_connection_terminate\u0027)"},{"line_number":157,"context_line":"        @mock.patch.object(self.manager.driver, \u0027remove_export\u0027)"},{"line_number":158,"context_line":"        @mock.patch.object(self.manager.driver, \u0027detach_volume\u0027)"},{"line_number":159,"context_line":"        def _test(mock_detach, mock_rm_export, mock_con_term,"},{"line_number":160,"context_line":"                  mock_elevated, mock_db_detached, mock_db_meta_delete):"},{"line_number":161,"context_line":"            mock_elevated.return_value \u003d self.context"},{"line_number":162,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f231b9d_4fe1719a","line":159,"updated":"2017-06-12 10:13:37.000000000","message":"Do we really need this nested method?","commit_id":"6cdf28dc7461d564b114355383188d31a79d3435"},{"author":{"_account_id":17386,"name":"Steve Noyes","email":"steve.noyes@oracle.com","username":"ssn1ssn"},"change_message_id":"0e4d6503a50d2405f7e1eca33d6ac63b2b9051dd","unresolved":false,"context_lines":[{"line_number":176,"context_line":"                                              attachment1.id)"},{"line_number":177,"context_line":"            mock_db_meta_delete.called_once_with(self.context, vref.id,"},{"line_number":178,"context_line":"                                                 \u0027attached_mode\u0027)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"            # test more than 1 attachment. This should skip"},{"line_number":181,"context_line":"            # detach and remove_export"},{"line_number":182,"context_line":"            vref.volume_attachment.objects.append(attachment2)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f1d235d_c5948439","line":179,"updated":"2017-07-06 20:45:00.000000000","message":"should add\n\nmock_rm_export.assert_called_one_with(...)","commit_id":"1a4181e07564bc6c31706be158aae07f80de759b"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"22818f01c7c2acd17f2c9556ff29dcee9f3b3fb9","unresolved":false,"context_lines":[{"line_number":176,"context_line":"                                              attachment1.id)"},{"line_number":177,"context_line":"            mock_db_meta_delete.called_once_with(self.context, vref.id,"},{"line_number":178,"context_line":"                                                 \u0027attached_mode\u0027)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"            # test more than 1 attachment. This should skip"},{"line_number":181,"context_line":"            # detach and remove_export"},{"line_number":182,"context_line":"            vref.volume_attachment.objects.append(attachment2)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f1d235d_fcc39236","line":179,"in_reply_to":"3f1d235d_c5948439","updated":"2017-07-07 01:32:27.000000000","message":"Done","commit_id":"1a4181e07564bc6c31706be158aae07f80de759b"}],"cinder/volume/manager.py":[{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"4e06619cf05453d2bde999104fa8c236c1827b79","unresolved":false,"context_lines":[{"line_number":4203,"context_line":"                                                           vref,"},{"line_number":4204,"context_line":"                                                           attachment)"},{"line_number":4205,"context_line":"        delete_from_db \u003d True"},{"line_number":4206,"context_line":"        if len(vref.volume_attachment) \u003e 1:"},{"line_number":4207,"context_line":"            LOG.debug(\u0027Skipping detach- Volume has multiple attachments\u0027,"},{"line_number":4208,"context_line":"                      resource\u003dvref)"},{"line_number":4209,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f201791_ec1842d4","line":4206,"range":{"start_line":4206,"start_character":11,"end_line":4206,"end_character":42},"updated":"2017-06-21 18:11:41.000000000","message":"Hmm, I thought this is driver specific whether counting the attachments is enough or not to decide. Like in case of LVM I think it\u0027s supposed to work, other drivers might behave differently.\n\nIf we add this check here I would think we\u0027re limiting the possibilities to create driver specific solutions to this issue.\n\nCan we figure this out for LVM and then let/force the other drivers follow the pattern on implementing when to remove the target, etc.?","commit_id":"e73f0b338d43f96cc43ba6c8afab1dbadd940078"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"d2938eeb48b87b932b2fdbc194403f09cdf993b3","unresolved":false,"context_lines":[{"line_number":4204,"context_line":"                                                           attachment)"},{"line_number":4205,"context_line":"        delete_from_db \u003d True"},{"line_number":4206,"context_line":"        if len(vref.volume_attachment) \u003e 1:"},{"line_number":4207,"context_line":"            LOG.debug(\u0027Skipping detach- Volume has multiple attachments\u0027,"},{"line_number":4208,"context_line":"                      resource\u003dvref)"},{"line_number":4209,"context_line":"        else:"},{"line_number":4210,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f201791_af3977f2","line":4207,"range":{"start_line":4207,"start_character":11,"end_line":4207,"end_character":21},"updated":"2017-06-27 20:35:48.000000000","message":"I think Ildiko\u0027s concern needs to be addressed.  I also think that this should be a LOG.warning, not debug.","commit_id":"e73f0b338d43f96cc43ba6c8afab1dbadd940078"}],"cinder/volume/targets/iscsi.py":[{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"36022330656fd23e6402aaeeb8c5318b6ca3ca9d","unresolved":false,"context_lines":[{"line_number":288,"context_line":"        }"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    def terminate_connection(self, volume, connector, **kwargs):"},{"line_number":291,"context_line":"        has_shared_connection \u003d len(volume[\u0027volume_attachment\u0027]) \u003e 1"},{"line_number":292,"context_line":"        return has_shared_connection"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    def validate_connector(self, connector):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f231b9d_0f9a5913","line":291,"updated":"2017-06-12 10:13:37.000000000","message":"IMO, it\u0027s not obviously why we return True/False for terminate connection now","commit_id":"6cdf28dc7461d564b114355383188d31a79d3435"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"812325012da6de40332557db99577f2e67b6bf8e","unresolved":false,"context_lines":[{"line_number":288,"context_line":"        }"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    def terminate_connection(self, volume, connector, **kwargs):"},{"line_number":291,"context_line":"        has_shared_connection \u003d len(volume[\u0027volume_attachment\u0027]) \u003e 1"},{"line_number":292,"context_line":"        return has_shared_connection"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    def validate_connector(self, connector):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f231b9d_f30ea08b","line":291,"in_reply_to":"7f231b9d_0f9a5913","updated":"2017-06-14 04:11:18.000000000","message":"@Ivan\nIt\u0027s an attempt at a default implementation of this:\n    https://github.com/openstack/cinder/blob/master/cinder/volume/manager.py#L4112\n\n\nSo this isn\u0027t quite the case I initially was trying to address.  The issue initially was that some backends share a tgt for multiple volumes; not even the replication/multi-attach (or a real multi-attach).\n\nI\u0027m not sure how this helps/solves anything in your testing... this method should be over-ridden by just about every driver out there.  Except a could that ignore it altogether no matter what and never terminate anyway, incase there\u0027s no risk for those of removing something that they shouldn\u0027t.  Not sure if that makes sense?\n\nLVM , Block, DRBD and SolidFire are the only ones that call this directly","commit_id":"6cdf28dc7461d564b114355383188d31a79d3435"}]}
