)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"0f1710d7921af79104875d763375b025b9b2a265","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch implements update_migrated_volume for LVM and Storwize"},{"line_number":10,"context_line":"driver. It makes sure that after a successful volume migration,"},{"line_number":11,"context_line":"the cinder volume name(id) is the same to the backend volume name(id)."},{"line_number":12,"context_line":"Other back-end drivers can take this patch as a reference"},{"line_number":13,"context_line":"to implement update_migrated_volume."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":53,"id":"fa32b979_2ea1d7a9","line":11,"updated":"2015-06-22 11:40:57.000000000","message":"s/to/as","commit_id":"40686dd5931d7913b88e3d97ce80d8473eb5005d"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"89ca0256ff32096c2ea51193b12a077200e08254","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch implements update_migrated_volume for LVM and Storwize"},{"line_number":10,"context_line":"driver. It makes sure that after a successful volume migration,"},{"line_number":11,"context_line":"the cinder volume name(id) is the same to the backend volume name(id)."},{"line_number":12,"context_line":"Other back-end drivers can take this patch as a reference"},{"line_number":13,"context_line":"to implement update_migrated_volume."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":53,"id":"fa32b979_746250da","line":11,"in_reply_to":"fa32b979_2ea1d7a9","updated":"2015-06-22 12:16:51.000000000","message":"Done","commit_id":"40686dd5931d7913b88e3d97ce80d8473eb5005d"},{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"c26273de4b7611fa4cebc5b1fdef545924441c7d","unresolved":false,"context_lines":[{"line_number":16,"context_line":"to wait until the multi-attach lands in Nova."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: I69707340ddf2b55286ff0d84319529b2f502cefa"},{"line_number":19,"context_line":"Partially-closes-bug: #1450649"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":61,"id":"fa32b979_626f5dc4","line":19,"updated":"2015-06-26 05:39:24.000000000","message":"Is this Closes-Bug: # or Partial-Bug: #?\n\nPartially-closes-bug is not defined in the wiki.\n\nhttps://wiki.openstack.org/wiki/GitCommitMessages","commit_id":"e983218baddf2441a3c04c3984db6da4cb633d3b"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"a794fe725073b4a5c54c0049adc8eabf25993110","unresolved":false,"context_lines":[{"line_number":16,"context_line":"to wait until the multi-attach lands in Nova."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: I69707340ddf2b55286ff0d84319529b2f502cefa"},{"line_number":19,"context_line":"Partially-closes-bug: #1450649"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":61,"id":"fa32b979_646ad083","line":19,"in_reply_to":"fa32b979_626f5dc4","updated":"2015-06-26 06:17:41.000000000","message":"Because the attached volume case is not included. prefer this way.","commit_id":"e983218baddf2441a3c04c3984db6da4cb633d3b"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"795ef5de2fcd411ef9d5a1b88f47e4b81008e0d9","unresolved":false,"context_lines":[{"line_number":16,"context_line":"to wait until the multi-attach lands in Nova."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: I69707340ddf2b55286ff0d84319529b2f502cefa"},{"line_number":19,"context_line":"Partially-closes-bug: #1450649"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":61,"id":"fa32b979_d2d91024","line":19,"in_reply_to":"fa32b979_646ad083","updated":"2015-06-26 13:08:34.000000000","message":"Should be Partial-Bug.  It means this patch partially fixes the bug.","commit_id":"e983218baddf2441a3c04c3984db6da4cb633d3b"},{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"eb0be9978bc14c364f68ce04870af9a74a4358b3","unresolved":false,"context_lines":[{"line_number":13,"context_line":"to implement update_migrated_volume."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"PS: Not applicable to attached or multi-attached volumes, since we need"},{"line_number":16,"context_line":"to wait until the multi-attach lands in Nova."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: I69707340ddf2b55286ff0d84319529b2f502cefa"},{"line_number":19,"context_line":"Partial-Bug: #1450649"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":64,"id":"fa32b979_bd8be61d","line":16,"updated":"2015-06-26 23:52:33.000000000","message":"This should be updated since we changed the policy of renaming.","commit_id":"5219f35b33ea647054097b169cdb877bf211f430"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"d19a21f475f3d9a35ae1dfd2b11cb3384c43426f","unresolved":false,"context_lines":[{"line_number":13,"context_line":"to implement update_migrated_volume."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"PS: Not applicable to attached or multi-attached volumes, since we need"},{"line_number":16,"context_line":"to wait until the multi-attach lands in Nova."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: I69707340ddf2b55286ff0d84319529b2f502cefa"},{"line_number":19,"context_line":"Partial-Bug: #1450649"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":64,"id":"fa32b979_5833c862","line":16,"in_reply_to":"fa32b979_bd8be61d","updated":"2015-06-27 00:12:06.000000000","message":"Y","commit_id":"5219f35b33ea647054097b169cdb877bf211f430"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"e4d4a1824c90d6aa65eb4ddf15525509775c6f2e","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implement the update_migrated_volume for the drivers"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch implements update_migrated_volume for LVM and Storwize"},{"line_number":10,"context_line":"driver. It makes sure that after a successful volume migration,"},{"line_number":11,"context_line":"the cinder volume name(id) is the same as the backend volume name(id)."},{"line_number":12,"context_line":"Other back-end drivers can take this patch as a reference"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":68,"id":"ba3cc151_23c6de67","line":9,"updated":"2015-06-30 04:25:36.000000000","message":"You have now also implemented it for other drivers such as Dell. All changed drivers should be listed here.","commit_id":"de94a955cc175379e0defa6e839e65aba6bfbc94"},{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"523a9fc75a6bded6468c5fb377b25a43bf4fbbc1","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Implement the update_migrated_volume for the drivers"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch implements update_migrated_volume for LVM, Dell, StorPool,"},{"line_number":10,"context_line":"Infortrend and Storwize drivers. It makes sure that after a"},{"line_number":11,"context_line":"successful volume migration, the cinder volume name(id) is the same"},{"line_number":12,"context_line":"as the backend volume name(id). Other back-end drivers can take this"},{"line_number":13,"context_line":"patch as a reference to implement update_migrated_volume."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":69,"id":"ba3cc151_fe92af4a","line":10,"updated":"2015-06-30 16:04:16.000000000","message":"nit: this explanation is not exact.\n\nThis commit implements update_migrated_volume for LVM, Storwize and updates Dell, StorPool, Infortrend drivers.","commit_id":"e2bf0207643115304f060f52bb945ada04431d89"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"a2ca8c89ca388fba3541a534004bf3ecc9ca8424","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Implement the update_migrated_volume for the drivers"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch implements update_migrated_volume for LVM, Dell, StorPool,"},{"line_number":10,"context_line":"Infortrend and Storwize drivers. It makes sure that after a"},{"line_number":11,"context_line":"successful volume migration, the cinder volume name(id) is the same"},{"line_number":12,"context_line":"as the backend volume name(id). Other back-end drivers can take this"},{"line_number":13,"context_line":"patch as a reference to implement update_migrated_volume."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":69,"id":"ba3cc151_46de5840","line":10,"in_reply_to":"ba3cc151_fe92af4a","updated":"2015-07-01 03:21:13.000000000","message":":)","commit_id":"e2bf0207643115304f060f52bb945ada04431d89"}],"cinder/db/api.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"fecc44a4e5b0bf847a51c80668abd8c334994d53","unresolved":false,"context_lines":[{"line_number":183,"context_line":""},{"line_number":184,"context_line":"def finish_attached_volume_migration(context, src_vol_id, dest_vol_id):"},{"line_number":185,"context_line":"    \"\"\"Perform database updates upon completion of volume migration.\"\"\""},{"line_number":186,"context_line":"    return IMPL.finish_volume_migration(context, src_vol_id, dest_vol_id)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"def finish_available_volume_migration(context, src_vol_id, dest_vol_id):"}],"source_content_type":"text/x-python","patch_set":57,"id":"fa32b979_5d3ac1ce","line":186,"updated":"2015-06-22 17:42:16.000000000","message":"This should call a new method IMPL.finish_attached_volume_migration and there that one should call finish_volume_migration like available does (well, with keep_src_volume_id set to False or just not passing it).\n\nIt would be best to keep method names from db.api to db.sqlalchemy.api","commit_id":"8fbdf2cb988186861b56c6a244d62e79c2ea5b3d"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"6c305f3c1cc117123e6ce5c3da38535536e4aac3","unresolved":false,"context_lines":[{"line_number":183,"context_line":""},{"line_number":184,"context_line":"def finish_attached_volume_migration(context, src_vol_id, dest_vol_id):"},{"line_number":185,"context_line":"    \"\"\"Perform database updates upon completion of volume migration.\"\"\""},{"line_number":186,"context_line":"    return IMPL.finish_volume_migration(context, src_vol_id, dest_vol_id)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"def finish_available_volume_migration(context, src_vol_id, dest_vol_id):"}],"source_content_type":"text/x-python","patch_set":57,"id":"fa32b979_20553f4f","line":186,"in_reply_to":"fa32b979_5d3ac1ce","updated":"2015-06-23 01:40:53.000000000","message":"Done","commit_id":"8fbdf2cb988186861b56c6a244d62e79c2ea5b3d"}],"cinder/db/sqlalchemy/api.py":[{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"43c745edcb92893e9fd0bd52e733c9278072809d","unresolved":false,"context_lines":[{"line_number":1160,"context_line":"                if keep_src_volume_id:"},{"line_number":1161,"context_line":"                    continue"},{"line_number":1162,"context_line":"                else:"},{"line_number":1163,"context_line":"                    value \u003d \\"},{"line_number":1164,"context_line":"                        dest_volume_ref[\u0027_name_id\u0027] or dest_volume_ref[\u0027id\u0027]"},{"line_number":1165,"context_line":""},{"line_number":1166,"context_line":"            setattr(src_volume_ref, key, value)"}],"source_content_type":"text/x-python","patch_set":41,"id":"5afe65bd_49fc0172","line":1163,"updated":"2015-06-04 09:36:14.000000000","message":"Here we can use () instead of \\.","commit_id":"4d5848edfd5ae00d484fc52c8b58fc722fa3fed7"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f24fd8db68bd684c6350933b86cd09884b69d6c3","unresolved":false,"context_lines":[{"line_number":1162,"context_line":"                else:"},{"line_number":1163,"context_line":"                    value \u003d (dest_volume_ref[\u0027_name_id\u0027]"},{"line_number":1164,"context_line":"                             or dest_volume_ref[\u0027id\u0027])"},{"line_number":1165,"context_line":"            elif key \u003d\u003d \u0027provider_location\u0027 and available:"},{"line_number":1166,"context_line":"                value \u003d None"},{"line_number":1167,"context_line":""},{"line_number":1168,"context_line":"            setattr(src_volume_ref, key, value)"}],"source_content_type":"text/x-python","patch_set":60,"id":"fa32b979_c11567e5","line":1165,"updated":"2015-06-23 10:31:30.000000000","message":"I\u0027m not sure this is necessarily a good idea. What are your reasons behind this?","commit_id":"c869934cd4409d670b627102cf12e56264a7f856"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"1ad4c1db9055012f899b2a2848511bfdd5804dc2","unresolved":false,"context_lines":[{"line_number":1162,"context_line":"                else:"},{"line_number":1163,"context_line":"                    value \u003d (dest_volume_ref[\u0027_name_id\u0027]"},{"line_number":1164,"context_line":"                             or dest_volume_ref[\u0027id\u0027])"},{"line_number":1165,"context_line":"            elif key \u003d\u003d \u0027provider_location\u0027 and available:"},{"line_number":1166,"context_line":"                value \u003d None"},{"line_number":1167,"context_line":""},{"line_number":1168,"context_line":"            setattr(src_volume_ref, key, value)"}],"source_content_type":"text/x-python","patch_set":60,"id":"fa32b979_64bca96c","line":1165,"in_reply_to":"fa32b979_c11567e5","updated":"2015-06-23 11:01:42.000000000","message":"This is something I have just discovered today. It is VERY useful.\nI will put the comments in the next patch.","commit_id":"c869934cd4409d670b627102cf12e56264a7f856"},{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"eb0be9978bc14c364f68ce04870af9a74a4358b3","unresolved":false,"context_lines":[{"line_number":1154,"context_line":"            # The implementation of update_migrated_volume will decide the"},{"line_number":1155,"context_line":"            # values for _name_id and provider_location."},{"line_number":1156,"context_line":"            if (key \u003d\u003d \u0027id\u0027 or key \u003d\u003d \u0027_name_id\u0027"},{"line_number":1157,"context_line":"                    or key \u003d\u003d \u0027provider_location\u0027"},{"line_number":1158,"context_line":"                    or not is_column(dest_volume_ref, key)):"},{"line_number":1159,"context_line":"                continue"},{"line_number":1160,"context_line":"            elif key \u003d\u003d \u0027migration_status\u0027:"}],"source_content_type":"text/x-python","patch_set":64,"id":"fa32b979_1871c077","line":1157,"updated":"2015-06-26 23:52:33.000000000","message":"If you skip the copy of _name_id or provider_location here, I guess each driver have to return model update information instead of returning None for rename failure case same as storwize or LVM. no?\n\nOtherwise, _name_id filed will be empty when they fail volume rename.\n\nso, I suppose we need to update existing drivers and update comment about the policy of return value at update_migrated_volume().\n\nPlease let me know your opinion.","commit_id":"5219f35b33ea647054097b169cdb877bf211f430"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"d19a21f475f3d9a35ae1dfd2b11cb3384c43426f","unresolved":false,"context_lines":[{"line_number":1154,"context_line":"            # The implementation of update_migrated_volume will decide the"},{"line_number":1155,"context_line":"            # values for _name_id and provider_location."},{"line_number":1156,"context_line":"            if (key \u003d\u003d \u0027id\u0027 or key \u003d\u003d \u0027_name_id\u0027"},{"line_number":1157,"context_line":"                    or key \u003d\u003d \u0027provider_location\u0027"},{"line_number":1158,"context_line":"                    or not is_column(dest_volume_ref, key)):"},{"line_number":1159,"context_line":"                continue"},{"line_number":1160,"context_line":"            elif key \u003d\u003d \u0027migration_status\u0027:"}],"source_content_type":"text/x-python","patch_set":64,"id":"fa32b979_588188c2","line":1157,"in_reply_to":"fa32b979_1871c077","updated":"2015-06-27 00:12:06.000000000","message":"That is true.\r\nI will give an exception notimplemented to the update_migrated_volume method. The implementation should be resposible for the changes of _name_id and provider_location.\r\nIf I catch this excepion, _name_id,  provider_location will be set the manager, because they are not implemented.\r\nIt is possible that update_migrated_volume return none for the implementation, which means no need to update the db.","commit_id":"5219f35b33ea647054097b169cdb877bf211f430"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"8d259c392d689a150c761e66ab26407b5b3e4d2a","unresolved":false,"context_lines":[{"line_number":1153,"context_line":"        for key, value in dest_volume_ref.iteritems():"},{"line_number":1154,"context_line":"            # The implementation of update_migrated_volume will decide the"},{"line_number":1155,"context_line":"            # values for _name_id and provider_location."},{"line_number":1156,"context_line":"            if (key \u003d\u003d \u0027id\u0027 or key \u003d\u003d \u0027_name_id\u0027"},{"line_number":1157,"context_line":"                    or key \u003d\u003d \u0027provider_location\u0027"},{"line_number":1158,"context_line":"                    or not is_column(dest_volume_ref, key)):"},{"line_number":1159,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":69,"id":"ba3cc151_8469d427","line":1156,"updated":"2015-06-30 17:10:48.000000000","message":"key in (\u0027id\u0027, \u0027_name_id\u0027, \u0027provider_location\u0027) or ...","commit_id":"e2bf0207643115304f060f52bb945ada04431d89"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"a2ca8c89ca388fba3541a534004bf3ecc9ca8424","unresolved":false,"context_lines":[{"line_number":1153,"context_line":"        for key, value in dest_volume_ref.iteritems():"},{"line_number":1154,"context_line":"            # The implementation of update_migrated_volume will decide the"},{"line_number":1155,"context_line":"            # values for _name_id and provider_location."},{"line_number":1156,"context_line":"            if (key \u003d\u003d \u0027id\u0027 or key \u003d\u003d \u0027_name_id\u0027"},{"line_number":1157,"context_line":"                    or key \u003d\u003d \u0027provider_location\u0027"},{"line_number":1158,"context_line":"                    or not is_column(dest_volume_ref, key)):"},{"line_number":1159,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":69,"id":"ba3cc151_c0cb2f1d","line":1156,"in_reply_to":"ba3cc151_8469d427","updated":"2015-07-01 03:21:13.000000000","message":"Done","commit_id":"e2bf0207643115304f060f52bb945ada04431d89"}],"cinder/tests/unit/db/test_finish_migration.py":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"ca932c247602b3be41d7ed9918bd1aec2e2eb1b2","unresolved":false,"context_lines":[{"line_number":38,"context_line":"                                             dest_volume[\u0027id\u0027])"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        src_volume \u003d db.volume_get(ctxt, src_volume[\u0027id\u0027])"},{"line_number":41,"context_line":"        self.assertEqual(src_volume[\u0027host\u0027], \u0027dest\u0027)"},{"line_number":42,"context_line":"        self.assertEqual(src_volume[\u0027status\u0027], \u0027available\u0027)"},{"line_number":43,"context_line":"        self.assertIsNone(src_volume[\u0027migration_status\u0027])"},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":40,"id":"5afe65bd_e8e85912","line":41,"updated":"2015-06-03 21:30:49.000000000","message":"Please switch assertEquals calls to be (EXPECTED, ACTUAL)","commit_id":"9a8b8091a8d052097b6eb9a1caba78727dbb3ddf"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"8ac0c18cad90166d43cb6af919a4828472912b9b","unresolved":false,"context_lines":[{"line_number":38,"context_line":"                                             dest_volume[\u0027id\u0027])"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        src_volume \u003d db.volume_get(ctxt, src_volume[\u0027id\u0027])"},{"line_number":41,"context_line":"        self.assertEqual(src_volume[\u0027host\u0027], \u0027dest\u0027)"},{"line_number":42,"context_line":"        self.assertEqual(src_volume[\u0027status\u0027], \u0027available\u0027)"},{"line_number":43,"context_line":"        self.assertIsNone(src_volume[\u0027migration_status\u0027])"},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":40,"id":"5afe65bd_d2c0a37e","line":41,"in_reply_to":"5afe65bd_e8e85912","updated":"2015-06-04 06:08:47.000000000","message":"Y. Absolutely.","commit_id":"9a8b8091a8d052097b6eb9a1caba78727dbb3ddf"}],"cinder/tests/unit/test_dellsc.py":[{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"eb0be9978bc14c364f68ce04870af9a74a4358b3","unresolved":false,"context_lines":[{"line_number":1056,"context_line":"                                                mock_open_connection,"},{"line_number":1057,"context_line":"                                                mock_init):"},{"line_number":1058,"context_line":"        volume \u003d {\u0027id\u0027: 111}"},{"line_number":1059,"context_line":"        backend_volume \u003d {\u0027id\u0027: 112}"},{"line_number":1060,"context_line":"        rt \u003d self.driver.update_migrated_volume(None, volume, backend_volume)"},{"line_number":1061,"context_line":"        mock_rename_volume.assert_called_once_with(self.VOLUME,"},{"line_number":1062,"context_line":"                                                   volume[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":64,"id":"fa32b979_dd910af3","line":1059,"updated":"2015-06-26 23:52:33.000000000","message":"Need the \u0027available\u0027 here.","commit_id":"5219f35b33ea647054097b169cdb877bf211f430"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"8d259c392d689a150c761e66ab26407b5b3e4d2a","unresolved":false,"context_lines":[{"line_number":1062,"context_line":"        mock_rename_volume.assert_called_once_with(self.VOLUME,"},{"line_number":1063,"context_line":"                                                   volume[\u0027id\u0027])"},{"line_number":1064,"context_line":"        self.assertEqual({\u0027_name_id\u0027: backend_volume[\u0027_name_id\u0027]"},{"line_number":1065,"context_line":"                          or backend_volume[\u0027id\u0027]}, rt)"},{"line_number":1066,"context_line":""},{"line_number":1067,"context_line":"    def test_update_migrated_volume_no_volume_id(self,"},{"line_number":1068,"context_line":"                                                 mock_close_connection,"}],"source_content_type":"text/x-python","patch_set":69,"id":"ba3cc151_bf38a13e","line":1065,"updated":"2015-06-30 17:10:48.000000000","message":"This is a test, we do not need an \"or\" here, we should know whether we expect one or the other","commit_id":"e2bf0207643115304f060f52bb945ada04431d89"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"a2ca8c89ca388fba3541a534004bf3ecc9ca8424","unresolved":false,"context_lines":[{"line_number":1062,"context_line":"        mock_rename_volume.assert_called_once_with(self.VOLUME,"},{"line_number":1063,"context_line":"                                                   volume[\u0027id\u0027])"},{"line_number":1064,"context_line":"        self.assertEqual({\u0027_name_id\u0027: backend_volume[\u0027_name_id\u0027]"},{"line_number":1065,"context_line":"                          or backend_volume[\u0027id\u0027]}, rt)"},{"line_number":1066,"context_line":""},{"line_number":1067,"context_line":"    def test_update_migrated_volume_no_volume_id(self,"},{"line_number":1068,"context_line":"                                                 mock_close_connection,"}],"source_content_type":"text/x-python","patch_set":69,"id":"ba3cc151_e0e673b3","line":1065,"in_reply_to":"ba3cc151_bf38a13e","updated":"2015-07-01 03:21:13.000000000","message":"OK.","commit_id":"e2bf0207643115304f060f52bb945ada04431d89"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"8d259c392d689a150c761e66ab26407b5b3e4d2a","unresolved":false,"context_lines":[{"line_number":1072,"context_line":"        backend_volume \u003d {\u0027id\u0027: 112, \u0027_name_id\u0027: 113}"},{"line_number":1073,"context_line":"        rt \u003d self.driver.update_migrated_volume(None, volume, backend_volume,"},{"line_number":1074,"context_line":"                                                \u0027available\u0027)"},{"line_number":1075,"context_line":"        self.assertEqual({\u0027_name_id\u0027: backend_volume[\u0027_name_id\u0027]"},{"line_number":1076,"context_line":"                          or backend_volume[\u0027id\u0027]}, rt)"},{"line_number":1077,"context_line":""},{"line_number":1078,"context_line":"    @mock.patch.object(dell_storagecenter_api.StorageCenterApi,"}],"source_content_type":"text/x-python","patch_set":69,"id":"ba3cc151_51914998","line":1075,"updated":"2015-06-30 17:10:48.000000000","message":"Same here.","commit_id":"e2bf0207643115304f060f52bb945ada04431d89"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"a2ca8c89ca388fba3541a534004bf3ecc9ca8424","unresolved":false,"context_lines":[{"line_number":1072,"context_line":"        backend_volume \u003d {\u0027id\u0027: 112, \u0027_name_id\u0027: 113}"},{"line_number":1073,"context_line":"        rt \u003d self.driver.update_migrated_volume(None, volume, backend_volume,"},{"line_number":1074,"context_line":"                                                \u0027available\u0027)"},{"line_number":1075,"context_line":"        self.assertEqual({\u0027_name_id\u0027: backend_volume[\u0027_name_id\u0027]"},{"line_number":1076,"context_line":"                          or backend_volume[\u0027id\u0027]}, rt)"},{"line_number":1077,"context_line":""},{"line_number":1078,"context_line":"    @mock.patch.object(dell_storagecenter_api.StorageCenterApi,"}],"source_content_type":"text/x-python","patch_set":69,"id":"ba3cc151_a0ef0b86","line":1075,"in_reply_to":"ba3cc151_51914998","updated":"2015-07-01 03:21:13.000000000","message":"OK.","commit_id":"e2bf0207643115304f060f52bb945ada04431d89"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"8d259c392d689a150c761e66ab26407b5b3e4d2a","unresolved":false,"context_lines":[{"line_number":1094,"context_line":"        mock_find_sc.assert_called_once_with()"},{"line_number":1095,"context_line":"        mock_find_volume.assert_called_once_with(None)"},{"line_number":1096,"context_line":"        self.assertEqual({\u0027_name_id\u0027: backend_volume[\u0027_name_id\u0027]"},{"line_number":1097,"context_line":"                          or backend_volume[\u0027id\u0027]}, rt)"}],"source_content_type":"text/x-python","patch_set":69,"id":"ba3cc151_11eae10f","line":1097,"updated":"2015-06-30 17:10:48.000000000","message":"Same here.","commit_id":"e2bf0207643115304f060f52bb945ada04431d89"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"a2ca8c89ca388fba3541a534004bf3ecc9ca8424","unresolved":false,"context_lines":[{"line_number":1094,"context_line":"        mock_find_sc.assert_called_once_with()"},{"line_number":1095,"context_line":"        mock_find_volume.assert_called_once_with(None)"},{"line_number":1096,"context_line":"        self.assertEqual({\u0027_name_id\u0027: backend_volume[\u0027_name_id\u0027]"},{"line_number":1097,"context_line":"                          or backend_volume[\u0027id\u0027]}, rt)"}],"source_content_type":"text/x-python","patch_set":69,"id":"ba3cc151_80ec4790","line":1097,"in_reply_to":"ba3cc151_11eae10f","updated":"2015-07-01 03:21:13.000000000","message":"OK.","commit_id":"e2bf0207643115304f060f52bb945ada04431d89"}],"cinder/tests/unit/test_infortrend_common.py":[{"author":{"_account_id":15653,"name":"Jessy Lee","email":"jessy1092@gmail.com","username":"JessyLee"},"change_message_id":"a88901fbc709b06e324c0b2c95fd0a6223505a24","unresolved":false,"context_lines":[{"line_number":1950,"context_line":"            int(self.cli_data.fake_system_id[0], 16), test_dst_part_id)"},{"line_number":1951,"context_line":"        test_model_update \u003d {"},{"line_number":1952,"context_line":"            \u0027_name_id\u0027: None,"},{"line_number":1953,"context_line":"            \u0027provider_location\u0027: dst_volume[\u0027provider_location\u0027]"},{"line_number":1954,"context_line":"        }"},{"line_number":1955,"context_line":""},{"line_number":1956,"context_line":"        mock_commands \u003d {"}],"source_content_type":"text/x-python","patch_set":68,"id":"ba3cc151_7f9eb257","line":1953,"updated":"2015-06-30 08:38:44.000000000","message":"Extra comma needed at the end - http://docs.openstack.org/developer/hacking/#dictionaries-lists","commit_id":"de94a955cc175379e0defa6e839e65aba6bfbc94"},{"author":{"_account_id":15653,"name":"Jessy Lee","email":"jessy1092@gmail.com","username":"JessyLee"},"change_message_id":"a88901fbc709b06e324c0b2c95fd0a6223505a24","unresolved":false,"context_lines":[{"line_number":1983,"context_line":"        model_update \u003d self.driver.update_migrated_volume("},{"line_number":1984,"context_line":"            None, src_volume, dst_volume, \u0027available\u0027)"},{"line_number":1985,"context_line":"        self.assertEqual({\u0027_name_id\u0027: dst_volume[\u0027_name_id\u0027]"},{"line_number":1986,"context_line":"                          or dst_volume[\u0027id\u0027]}, model_update)"}],"source_content_type":"text/x-python","patch_set":68,"id":"ba3cc151_9f605637","line":1986,"updated":"2015-06-30 08:38:44.000000000","message":"IMO, using self.assertDictMatch is better then self.assertEqual here.","commit_id":"de94a955cc175379e0defa6e839e65aba6bfbc94"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"8d259c392d689a150c761e66ab26407b5b3e4d2a","unresolved":false,"context_lines":[{"line_number":1983,"context_line":"        model_update \u003d self.driver.update_migrated_volume("},{"line_number":1984,"context_line":"            None, src_volume, dst_volume, \u0027available\u0027)"},{"line_number":1985,"context_line":"        self.assertEqual({\u0027_name_id\u0027: dst_volume[\u0027_name_id\u0027]"},{"line_number":1986,"context_line":"                          or dst_volume[\u0027id\u0027]}, model_update)"}],"source_content_type":"text/x-python","patch_set":69,"id":"ba3cc151_11a2e1ae","line":1986,"updated":"2015-06-30 17:10:48.000000000","message":"Please no or in expected results.","commit_id":"e2bf0207643115304f060f52bb945ada04431d89"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"a2ca8c89ca388fba3541a534004bf3ecc9ca8424","unresolved":false,"context_lines":[{"line_number":1983,"context_line":"        model_update \u003d self.driver.update_migrated_volume("},{"line_number":1984,"context_line":"            None, src_volume, dst_volume, \u0027available\u0027)"},{"line_number":1985,"context_line":"        self.assertEqual({\u0027_name_id\u0027: dst_volume[\u0027_name_id\u0027]"},{"line_number":1986,"context_line":"                          or dst_volume[\u0027id\u0027]}, model_update)"}],"source_content_type":"text/x-python","patch_set":69,"id":"ba3cc151_e0fd133b","line":1986,"in_reply_to":"ba3cc151_11a2e1ae","updated":"2015-07-01 03:21:13.000000000","message":"OK.","commit_id":"e2bf0207643115304f060f52bb945ada04431d89"}],"cinder/tests/unit/test_storwize_svc.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"75daa802c1d30c03a2dc2a7e590fb00b8fee1d0f","unresolved":false,"context_lines":[{"line_number":3016,"context_line":"        rename_vdisk.side_effect \u003d Exception"},{"line_number":3017,"context_line":"        model_update \u003d self.driver.update_migrated_volume(ctxt, volume,"},{"line_number":3018,"context_line":"                                                          backend_volume)"},{"line_number":3019,"context_line":"        self.assertEqual(None, model_update)"},{"line_number":3020,"context_line":""},{"line_number":3021,"context_line":"    def test_storwize_vdisk_copy_ops(self):"},{"line_number":3022,"context_line":"        ctxt \u003d testutils.get_test_admin_context()"}],"source_content_type":"text/x-python","patch_set":44,"id":"fa32b979_717f50ab","line":3019,"updated":"2015-06-17 20:46:55.000000000","message":"assertIsNone","commit_id":"b80028c8480c899a15782b21b709ba23a4c66a5d"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"1554ed43caa793c0616d0767983ada3cc8dc1095","unresolved":false,"context_lines":[{"line_number":3016,"context_line":"        rename_vdisk.side_effect \u003d Exception"},{"line_number":3017,"context_line":"        model_update \u003d self.driver.update_migrated_volume(ctxt, volume,"},{"line_number":3018,"context_line":"                                                          backend_volume)"},{"line_number":3019,"context_line":"        self.assertEqual(None, model_update)"},{"line_number":3020,"context_line":""},{"line_number":3021,"context_line":"    def test_storwize_vdisk_copy_ops(self):"},{"line_number":3022,"context_line":"        ctxt \u003d testutils.get_test_admin_context()"}],"source_content_type":"text/x-python","patch_set":44,"id":"fa32b979_ed29399c","line":3019,"in_reply_to":"fa32b979_717f50ab","updated":"2015-06-18 01:45:11.000000000","message":"Done","commit_id":"b80028c8480c899a15782b21b709ba23a4c66a5d"}],"cinder/tests/unit/test_volume.py":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"d19975538c7a8922adc40f225a166743f29e368a","unresolved":false,"context_lines":[{"line_number":3953,"context_line":"                                                host_obj, None)"},{"line_number":3954,"context_line":"            mock_copy_volume.assert_called_with(self.context, volume,"},{"line_number":3955,"context_line":"                                                fake_new_volume,"},{"line_number":3956,"context_line":"                                                remote\u003d\u0027dest\u0027)"},{"line_number":3957,"context_line":"            migrate_volume_completion.assert_called_with(self.context,"},{"line_number":3958,"context_line":"                                                         volume[\u0027id\u0027],"},{"line_number":3959,"context_line":"                                                         fake_new_volume[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":23,"id":"7a016987_ee3a01e7","line":3956,"updated":"2015-05-14 13:42:36.000000000","message":"Will need to update this for the new connector parameter.","commit_id":"635ef96237f3f5fca1bd10d39e26b5d61faf0cae"}],"cinder/volume/driver.py":[{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"4adf74664f02d4dd43e3699b5746889b0f97a5c1","unresolved":false,"context_lines":[{"line_number":1343,"context_line":"        \"\"\""},{"line_number":1344,"context_line":"        return None"},{"line_number":1345,"context_line":""},{"line_number":1346,"context_line":"    def update_migrated_volume(self, ctxt, volume, backend_volume):"},{"line_number":1347,"context_line":"        \"\"\"Return model update for migrated volume."},{"line_number":1348,"context_line":""},{"line_number":1349,"context_line":"        :param volume: The original volume that was migrated to this backend"}],"source_content_type":"text/x-python","patch_set":30,"id":"7a016987_3b560407","line":1346,"updated":"2015-05-26 21:31:48.000000000","message":"The name \u0027backend_volume\u0027 is confusing.  Leave it as-is is better IMO.","commit_id":"9e2f5e4c92e54217e4f0e4bab2fe11d722169bc1"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"8976c882a5d624864d99bdb66ee7f1942c5e7835","unresolved":false,"context_lines":[{"line_number":1343,"context_line":"        \"\"\""},{"line_number":1344,"context_line":"        return None"},{"line_number":1345,"context_line":""},{"line_number":1346,"context_line":"    def update_migrated_volume(self, ctxt, volume, backend_volume):"},{"line_number":1347,"context_line":"        \"\"\"Return model update for migrated volume."},{"line_number":1348,"context_line":""},{"line_number":1349,"context_line":"        :param volume: The original volume that was migrated to this backend"}],"source_content_type":"text/x-python","patch_set":30,"id":"7a016987_126202d9","line":1346,"in_reply_to":"7a016987_3b560407","updated":"2015-05-27 03:42:25.000000000","message":"Done","commit_id":"9e2f5e4c92e54217e4f0e4bab2fe11d722169bc1"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"e4d4a1824c90d6aa65eb4ddf15525509775c6f2e","unresolved":false,"context_lines":[{"line_number":1362,"context_line":"                               original_volume_status):"},{"line_number":1363,"context_line":"        \"\"\"Return model update for migrated volume."},{"line_number":1364,"context_line":""},{"line_number":1365,"context_line":"        Each driver implementing this method needs to be resposible for the"},{"line_number":1366,"context_line":"        values of _name_id and provider_location. If None is returned or either"},{"line_number":1367,"context_line":"        key is not set, it means the volume table does not need to change the"},{"line_number":1368,"context_line":"        value(s) for the key(s)."}],"source_content_type":"text/x-python","patch_set":68,"id":"ba3cc151_4221a04c","line":1365,"updated":"2015-06-30 04:25:36.000000000","message":"typo: responsible","commit_id":"de94a955cc175379e0defa6e839e65aba6bfbc94"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"8d259c392d689a150c761e66ab26407b5b3e4d2a","unresolved":false,"context_lines":[{"line_number":1366,"context_line":"        values of _name_id and provider_location. If None is returned or either"},{"line_number":1367,"context_line":"        key is not set, it means the volume table does not need to change the"},{"line_number":1368,"context_line":"        value(s) for the key(s)."},{"line_number":1369,"context_line":"        The return format is {\"_name_id\": value, \"provider_location\": value}."},{"line_number":1370,"context_line":""},{"line_number":1371,"context_line":"        :param volume: The original volume that was migrated to this backend"},{"line_number":1372,"context_line":"        :param new_volume: The migration volume object that was created on"}],"source_content_type":"text/x-python","patch_set":69,"id":"ba3cc151_df2c854c","line":1369,"updated":"2015-06-30 17:10:48.000000000","message":"Actually, the way this is implemented in the manager they could update any field they wanted to.","commit_id":"e2bf0207643115304f060f52bb945ada04431d89"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"a2ca8c89ca388fba3541a534004bf3ecc9ca8424","unresolved":false,"context_lines":[{"line_number":1366,"context_line":"        values of _name_id and provider_location. If None is returned or either"},{"line_number":1367,"context_line":"        key is not set, it means the volume table does not need to change the"},{"line_number":1368,"context_line":"        value(s) for the key(s)."},{"line_number":1369,"context_line":"        The return format is {\"_name_id\": value, \"provider_location\": value}."},{"line_number":1370,"context_line":""},{"line_number":1371,"context_line":"        :param volume: The original volume that was migrated to this backend"},{"line_number":1372,"context_line":"        :param new_volume: The migration volume object that was created on"}],"source_content_type":"text/x-python","patch_set":69,"id":"ba3cc151_a630849f","line":1369,"in_reply_to":"ba3cc151_df2c854c","updated":"2015-07-01 03:21:13.000000000","message":"Technically, yes, we should allow folks to change any field here. So far, only two of these are taken into account.","commit_id":"e2bf0207643115304f060f52bb945ada04431d89"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"1ab739b9b195b923ba6bb9904923e81a283a96ea","unresolved":false,"context_lines":[{"line_number":1374,"context_line":"        :param original_volume_status: The status of the original volume"},{"line_number":1375,"context_line":"        :return model_update to update DB with any needed changes"},{"line_number":1376,"context_line":"        \"\"\""},{"line_number":1377,"context_line":"        msg \u003d _(\"The method update_migrated_volume not implemented.\")"},{"line_number":1378,"context_line":"        raise NotImplementedError(msg)"},{"line_number":1379,"context_line":""},{"line_number":1380,"context_line":"    def migrate_volume(self, context, volume, host):"}],"source_content_type":"text/x-python","patch_set":74,"id":"ba3cc151_b2d3855f","line":1377,"updated":"2015-07-02 15:08:46.000000000","message":"/not implemented/is not implemented/","commit_id":"474f70e9edaccc87ecefafd5618d542497055212"}],"cinder/volume/drivers/dell/dell_storagecenter_common.py":[{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"ecc103c2d61406d943b43c922797ce4fc0ac08aa","unresolved":false,"context_lines":[{"line_number":355,"context_line":"                        return model_update"},{"line_number":356,"context_line":"        # The world was horrible to us so we should error and leave."},{"line_number":357,"context_line":"        LOG.error(_LE(\u0027Unable to rename the logical volume for volume: %s\u0027),"},{"line_number":358,"context_line":"                  original_volume_name)"},{"line_number":359,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":66,"id":"fa32b979_30228da4","line":358,"updated":"2015-06-28 01:31:48.000000000","message":"Since you will change the logic of finish_volume_migration(), when the DELL driver fails to rename the volume, \u0027_name_id\u0027 and \u0027provider_location\u0027 entries of new volume are not copied to original volume. The behavior was changed.\n\nI guess we need to return following to keep original behavior for DELL driver and also other drivers.\n\n   return {\u0027_name_id\u0027: new_volume[\u0027_name_id\u0027] or new_volume[\u0027id\u0027]}\n\nOtherwise, some drivers might be broken.","commit_id":"2129b1c54427970aabc75763e0b2114ffd74b281"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"cb9ea89031f65e537faa68fbf30cc37bab25ae62","unresolved":false,"context_lines":[{"line_number":355,"context_line":"                        return model_update"},{"line_number":356,"context_line":"        # The world was horrible to us so we should error and leave."},{"line_number":357,"context_line":"        LOG.error(_LE(\u0027Unable to rename the logical volume for volume: %s\u0027),"},{"line_number":358,"context_line":"                  original_volume_name)"},{"line_number":359,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":66,"id":"ba3cc151_29811590","line":358,"in_reply_to":"fa32b979_30228da4","updated":"2015-06-29 03:02:55.000000000","message":"This is good remark.\nIn fact, it may happen to other drivers like storpool and infortrend, since they have implemented update_migrated_volume as well.\nI need to ask folks working for these drivers if it is necessary to change accrodingly.","commit_id":"2129b1c54427970aabc75763e0b2114ffd74b281"}],"cinder/volume/drivers/ibm/storwize_svc/__init__.py":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"333af1cbdfe48112df3fa5bcc41befcb9fc41dcd","unresolved":false,"context_lines":[{"line_number":952,"context_line":""},{"line_number":953,"context_line":"    def update_migrated_volume(self, ctxt, volume, backend_volume):"},{"line_number":954,"context_line":"        \"\"\"Return model update for migrated volume."},{"line_number":955,"context_line":""},{"line_number":956,"context_line":"        :param volume: The original volume that was migrated to this backend"},{"line_number":957,"context_line":"        :param backend_volume: The migration volume object that was created on"},{"line_number":958,"context_line":"                               this backend as part of the migration process"}],"source_content_type":"text/x-python","patch_set":15,"id":"1aca2d91_5deaa610","line":955,"updated":"2015-05-07 14:03:48.000000000","message":"Should add ctxt doc string.","commit_id":"329ac3bf0e11c22844efb08ae4843348bed856de"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"333af1cbdfe48112df3fa5bcc41befcb9fc41dcd","unresolved":false,"context_lines":[{"line_number":964,"context_line":"            self._helpers.rename_vdisk(current_name, original_volume_name)"},{"line_number":965,"context_line":"        except Exception:"},{"line_number":966,"context_line":"            LOG.error(_LE(\u0027Unabled to rename the logical volume \u0027"},{"line_number":967,"context_line":"                          \u0027for volume: %s\u0027) % volume[\u0027id\u0027])"},{"line_number":968,"context_line":"            return None"},{"line_number":969,"context_line":"        model_update \u003d {\u0027_name_id\u0027: None}"},{"line_number":970,"context_line":"        return model_update"}],"source_content_type":"text/x-python","patch_set":15,"id":"1aca2d91_fdf612f8","line":967,"updated":"2015-05-07 14:03:48.000000000","message":"Change % to ,.","commit_id":"329ac3bf0e11c22844efb08ae4843348bed856de"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"43c745edcb92893e9fd0bd52e733c9278072809d","unresolved":false,"context_lines":[{"line_number":961,"context_line":"        except Exception:"},{"line_number":962,"context_line":"            LOG.error(_LE(\u0027Unabled to rename the logical volume \u0027"},{"line_number":963,"context_line":"                          \u0027for volume: %s\u0027), volume[\u0027id\u0027])"},{"line_number":964,"context_line":"            return None"},{"line_number":965,"context_line":"        model_update \u003d {\u0027_name_id\u0027: None}"},{"line_number":966,"context_line":"        return model_update"},{"line_number":967,"context_line":""}],"source_content_type":"text/x-python","patch_set":41,"id":"5afe65bd_892d5900","line":964,"updated":"2015-06-04 09:36:14.000000000","message":"No need return None, just return is ok.","commit_id":"4d5848edfd5ae00d484fc52c8b58fc722fa3fed7"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"1ed081174f5588f2eec6e180fe78a229c4967a31","unresolved":false,"context_lines":[{"line_number":958,"context_line":"        original_volume_name \u003d CONF.volume_name_template % volume[\u0027id\u0027]"},{"line_number":959,"context_line":"        try:"},{"line_number":960,"context_line":"            self._helpers.rename_vdisk(current_name, original_volume_name)"},{"line_number":961,"context_line":"        except Exception:"},{"line_number":962,"context_line":"            LOG.error(_LE(\u0027Unabled to rename the logical volume \u0027"},{"line_number":963,"context_line":"                          \u0027for volume: %s\u0027), volume[\u0027id\u0027])"},{"line_number":964,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":45,"id":"fa32b979_9aae732c","line":961,"updated":"2015-06-18 21:54:31.000000000","message":"Could we catch less general exception here?","commit_id":"5384d3a87ed9e23d33c32f582af1c76acdfae744"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"a934325c2271ea959467d7a8837f2039ccec27d4","unresolved":false,"context_lines":[{"line_number":958,"context_line":"        original_volume_name \u003d CONF.volume_name_template % volume[\u0027id\u0027]"},{"line_number":959,"context_line":"        try:"},{"line_number":960,"context_line":"            self._helpers.rename_vdisk(current_name, original_volume_name)"},{"line_number":961,"context_line":"        except Exception:"},{"line_number":962,"context_line":"            LOG.error(_LE(\u0027Unabled to rename the logical volume \u0027"},{"line_number":963,"context_line":"                          \u0027for volume: %s\u0027), volume[\u0027id\u0027])"},{"line_number":964,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":45,"id":"fa32b979_65fe3907","line":961,"in_reply_to":"fa32b979_5bb30a98","updated":"2015-06-20 02:31:11.000000000","message":"Someone suggests me VolumeBackendAPIException","commit_id":"5384d3a87ed9e23d33c32f582af1c76acdfae744"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"9ac71001dda1157147dbfd2edceed254fc3a6909","unresolved":false,"context_lines":[{"line_number":958,"context_line":"        original_volume_name \u003d CONF.volume_name_template % volume[\u0027id\u0027]"},{"line_number":959,"context_line":"        try:"},{"line_number":960,"context_line":"            self._helpers.rename_vdisk(current_name, original_volume_name)"},{"line_number":961,"context_line":"        except Exception:"},{"line_number":962,"context_line":"            LOG.error(_LE(\u0027Unabled to rename the logical volume \u0027"},{"line_number":963,"context_line":"                          \u0027for volume: %s\u0027), volume[\u0027id\u0027])"},{"line_number":964,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":45,"id":"fa32b979_5bb30a98","line":961,"in_reply_to":"fa32b979_9aae732c","updated":"2015-06-19 01:44:31.000000000","message":"TBH, I was looking for a specific exception as well. However, it is really hard for me find one, so I just left the general one.","commit_id":"5384d3a87ed9e23d33c32f582af1c76acdfae744"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"0f1710d7921af79104875d763375b025b9b2a265","unresolved":false,"context_lines":[{"line_number":946,"context_line":"        return True, model_update"},{"line_number":947,"context_line":""},{"line_number":948,"context_line":"    def update_migrated_volume(self, ctxt, volume, new_volume):"},{"line_number":949,"context_line":"        \"\"\"Return model update for migrated volume."},{"line_number":950,"context_line":""},{"line_number":951,"context_line":"        :param ctxt: The context used to run the method update_migrated_volume"},{"line_number":952,"context_line":"        :param volume: The original volume that was migrated to this backend"}],"source_content_type":"text/x-python","patch_set":53,"id":"fa32b979_6e203ff8","line":949,"updated":"2015-06-22 11:40:57.000000000","message":"No mention on the volume being renamed?","commit_id":"40686dd5931d7913b88e3d97ce80d8473eb5005d"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"89ca0256ff32096c2ea51193b12a077200e08254","unresolved":false,"context_lines":[{"line_number":946,"context_line":"        return True, model_update"},{"line_number":947,"context_line":""},{"line_number":948,"context_line":"    def update_migrated_volume(self, ctxt, volume, new_volume):"},{"line_number":949,"context_line":"        \"\"\"Return model update for migrated volume."},{"line_number":950,"context_line":""},{"line_number":951,"context_line":"        :param ctxt: The context used to run the method update_migrated_volume"},{"line_number":952,"context_line":"        :param volume: The original volume that was migrated to this backend"}],"source_content_type":"text/x-python","patch_set":53,"id":"fa32b979_3474c89a","line":949,"in_reply_to":"fa32b979_6e203ff8","updated":"2015-06-22 12:16:51.000000000","message":"Yes, more comments will come in the next patch.","commit_id":"40686dd5931d7913b88e3d97ce80d8473eb5005d"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"0f1710d7921af79104875d763375b025b9b2a265","unresolved":false,"context_lines":[{"line_number":959,"context_line":"        try:"},{"line_number":960,"context_line":"            self._helpers.rename_vdisk(current_name, original_volume_name)"},{"line_number":961,"context_line":"        except exception.VolumeBackendAPIException:"},{"line_number":962,"context_line":"            LOG.error(_LE(\u0027Unabled to rename the logical volume \u0027"},{"line_number":963,"context_line":"                          \u0027for volume: %s\u0027), volume[\u0027id\u0027])"},{"line_number":964,"context_line":"            return"},{"line_number":965,"context_line":"        model_update \u003d {\u0027_name_id\u0027: None}"}],"source_content_type":"text/x-python","patch_set":53,"id":"fa32b979_8e9a636d","line":962,"updated":"2015-06-22 11:40:57.000000000","message":"s/Unabled/Unable","commit_id":"40686dd5931d7913b88e3d97ce80d8473eb5005d"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"89ca0256ff32096c2ea51193b12a077200e08254","unresolved":false,"context_lines":[{"line_number":959,"context_line":"        try:"},{"line_number":960,"context_line":"            self._helpers.rename_vdisk(current_name, original_volume_name)"},{"line_number":961,"context_line":"        except exception.VolumeBackendAPIException:"},{"line_number":962,"context_line":"            LOG.error(_LE(\u0027Unabled to rename the logical volume \u0027"},{"line_number":963,"context_line":"                          \u0027for volume: %s\u0027), volume[\u0027id\u0027])"},{"line_number":964,"context_line":"            return"},{"line_number":965,"context_line":"        model_update \u003d {\u0027_name_id\u0027: None}"}],"source_content_type":"text/x-python","patch_set":53,"id":"fa32b979_54770c9f","line":962,"in_reply_to":"fa32b979_8e9a636d","updated":"2015-06-22 12:16:51.000000000","message":"Done","commit_id":"40686dd5931d7913b88e3d97ce80d8473eb5005d"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"0f1710d7921af79104875d763375b025b9b2a265","unresolved":false,"context_lines":[{"line_number":961,"context_line":"        except exception.VolumeBackendAPIException:"},{"line_number":962,"context_line":"            LOG.error(_LE(\u0027Unabled to rename the logical volume \u0027"},{"line_number":963,"context_line":"                          \u0027for volume: %s\u0027), volume[\u0027id\u0027])"},{"line_number":964,"context_line":"            return"},{"line_number":965,"context_line":"        model_update \u003d {\u0027_name_id\u0027: None}"},{"line_number":966,"context_line":"        return model_update"},{"line_number":967,"context_line":""}],"source_content_type":"text/x-python","patch_set":53,"id":"fa32b979_4e8bfb1e","line":964,"updated":"2015-06-22 11:40:57.000000000","message":"It is better to return None explicitly","commit_id":"40686dd5931d7913b88e3d97ce80d8473eb5005d"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"0f1710d7921af79104875d763375b025b9b2a265","unresolved":false,"context_lines":[{"line_number":962,"context_line":"            LOG.error(_LE(\u0027Unabled to rename the logical volume \u0027"},{"line_number":963,"context_line":"                          \u0027for volume: %s\u0027), volume[\u0027id\u0027])"},{"line_number":964,"context_line":"            return"},{"line_number":965,"context_line":"        model_update \u003d {\u0027_name_id\u0027: None}"},{"line_number":966,"context_line":"        return model_update"},{"line_number":967,"context_line":""},{"line_number":968,"context_line":"    def manage_existing(self, volume, ref):"}],"source_content_type":"text/x-python","patch_set":53,"id":"fa32b979_ae7c0721","line":965,"updated":"2015-06-22 11:40:57.000000000","message":"This could benefit from a comment on why we set it to None.","commit_id":"40686dd5931d7913b88e3d97ce80d8473eb5005d"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"89ca0256ff32096c2ea51193b12a077200e08254","unresolved":false,"context_lines":[{"line_number":962,"context_line":"            LOG.error(_LE(\u0027Unabled to rename the logical volume \u0027"},{"line_number":963,"context_line":"                          \u0027for volume: %s\u0027), volume[\u0027id\u0027])"},{"line_number":964,"context_line":"            return"},{"line_number":965,"context_line":"        model_update \u003d {\u0027_name_id\u0027: None}"},{"line_number":966,"context_line":"        return model_update"},{"line_number":967,"context_line":""},{"line_number":968,"context_line":"    def manage_existing(self, volume, ref):"}],"source_content_type":"text/x-python","patch_set":53,"id":"fa32b979_f46d00cd","line":965,"in_reply_to":"fa32b979_ae7c0721","updated":"2015-06-22 12:16:51.000000000","message":"Yes, more comments will come in the next patch.","commit_id":"40686dd5931d7913b88e3d97ce80d8473eb5005d"},{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"eb0be9978bc14c364f68ce04870af9a74a4358b3","unresolved":false,"context_lines":[{"line_number":968,"context_line":"                          \u0027for volume: %s\u0027), volume[\u0027id\u0027])"},{"line_number":969,"context_line":"            return {\u0027_name_id\u0027: new_volume[\u0027_name_id\u0027] or new_volume[\u0027id\u0027]}"},{"line_number":970,"context_line":"        # If the back-end name(id) for the volume has been renamed,"},{"line_number":971,"context_line":"        # it is OK for the volume the keep the original name(id) and there is"},{"line_number":972,"context_line":"        # no need to use the column \"_name_id\" to establish the mapping"},{"line_number":973,"context_line":"        # relationship between the volume id and the back-end volume"},{"line_number":974,"context_line":"        # name(id)."}],"source_content_type":"text/x-python","patch_set":64,"id":"fa32b979_82479d76","line":971,"updated":"2015-06-26 23:52:33.000000000","message":"nit:  the keep -\u003e to keep","commit_id":"5219f35b33ea647054097b169cdb877bf211f430"}],"cinder/volume/drivers/infortrend/eonstor_ds_cli/common_cli.py":[{"author":{"_account_id":15653,"name":"Jessy Lee","email":"jessy1092@gmail.com","username":"JessyLee"},"change_message_id":"a88901fbc709b06e324c0b2c95fd0a6223505a24","unresolved":false,"context_lines":[{"line_number":1901,"context_line":"        try:"},{"line_number":1902,"context_line":"            self._execute(\u0027SetPartition\u0027, part_id, \u0027name\u003d%s\u0027 % src_volume_id)"},{"line_number":1903,"context_line":"        except exception.InfortrendCliException:"},{"line_number":1904,"context_line":"            LOG.error(_LE(\u0027Fail to rename %(new_volume)s into %(volume)s.\u0027), {"},{"line_number":1905,"context_line":"                \u0027new_volume\u0027: new_volume[\u0027id\u0027],"},{"line_number":1906,"context_line":"                \u0027volume\u0027: volume[\u0027id\u0027]})"},{"line_number":1907,"context_line":"            return {\u0027_name_id\u0027: new_volume[\u0027_name_id\u0027] or new_volume[\u0027id\u0027]}"}],"source_content_type":"text/x-python","patch_set":68,"id":"ba3cc151_1fcf6680","line":1904,"updated":"2015-06-30 08:38:44.000000000","message":"Fail -\u003e Failed\n\nand use LOG.exception to handle information when catch exception. LOG.exception will take care of logging the exception details.","commit_id":"de94a955cc175379e0defa6e839e65aba6bfbc94"},{"author":{"_account_id":15653,"name":"Jessy Lee","email":"jessy1092@gmail.com","username":"JessyLee"},"change_message_id":"a88901fbc709b06e324c0b2c95fd0a6223505a24","unresolved":false,"context_lines":[{"line_number":1911,"context_line":""},{"line_number":1912,"context_line":"        model_update \u003d {"},{"line_number":1913,"context_line":"            \u0027_name_id\u0027: None,"},{"line_number":1914,"context_line":"            \u0027provider_location\u0027: new_volume[\u0027provider_location\u0027]"},{"line_number":1915,"context_line":"        }"},{"line_number":1916,"context_line":"        return model_update"}],"source_content_type":"text/x-python","patch_set":68,"id":"ba3cc151_dff1fece","line":1914,"updated":"2015-06-30 08:38:44.000000000","message":"Extra comma needed at the end - http://docs.openstack.org/developer/hacking/#dictionaries-lists","commit_id":"de94a955cc175379e0defa6e839e65aba6bfbc94"}],"cinder/volume/drivers/lvm.py":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"333af1cbdfe48112df3fa5bcc41befcb9fc41dcd","unresolved":false,"context_lines":[{"line_number":308,"context_line":"    def update_migrated_volume(self, ctxt, volume, backend_volume):"},{"line_number":309,"context_line":"        \"\"\"Return model update for migrated volume."},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"        :param volume: The original volume that was migrated to this backend"},{"line_number":312,"context_line":"        :param backend_volume: The migration volume object that was created on"},{"line_number":313,"context_line":"                               this backend as part of the migration process"},{"line_number":314,"context_line":"        :return model_update to update DB with any needed changes"}],"source_content_type":"text/x-python","patch_set":15,"id":"1aca2d91_fdb732f3","line":311,"updated":"2015-05-07 14:03:48.000000000","message":":param ctxt:","commit_id":"329ac3bf0e11c22844efb08ae4843348bed856de"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"333af1cbdfe48112df3fa5bcc41befcb9fc41dcd","unresolved":false,"context_lines":[{"line_number":319,"context_line":"            self.vg.rename_volume(current_name, original_volume_name)"},{"line_number":320,"context_line":"        except processutils.ProcessExecutionError:"},{"line_number":321,"context_line":"            LOG.error(_LE(\u0027Unabled to rename the logical volume \u0027"},{"line_number":322,"context_line":"                          \u0027for volume: %s\u0027) % volume[\u0027name\u0027])"},{"line_number":323,"context_line":"            return None"},{"line_number":324,"context_line":"        model_update \u003d {\u0027_name_id\u0027: None}"},{"line_number":325,"context_line":"        return model_update"}],"source_content_type":"text/x-python","patch_set":15,"id":"1aca2d91_bdcada6c","line":322,"updated":"2015-05-07 14:03:48.000000000","message":"% \u003d\u003e ,","commit_id":"329ac3bf0e11c22844efb08ae4843348bed856de"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"43c745edcb92893e9fd0bd52e733c9278072809d","unresolved":false,"context_lines":[{"line_number":321,"context_line":"        except processutils.ProcessExecutionError:"},{"line_number":322,"context_line":"            LOG.error(_LE(\u0027Unabled to rename the logical volume \u0027"},{"line_number":323,"context_line":"                          \u0027for volume: %s\u0027), volume[\u0027name\u0027])"},{"line_number":324,"context_line":"            return None"},{"line_number":325,"context_line":"        model_update \u003d {\u0027_name_id\u0027: None}"},{"line_number":326,"context_line":"        return model_update"},{"line_number":327,"context_line":""}],"source_content_type":"text/x-python","patch_set":41,"id":"5afe65bd_e9af2d28","line":324,"updated":"2015-06-04 09:36:14.000000000","message":"No need to return None. Just return is ok.","commit_id":"4d5848edfd5ae00d484fc52c8b58fc722fa3fed7"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"0f1710d7921af79104875d763375b025b9b2a265","unresolved":false,"context_lines":[{"line_number":307,"context_line":"                            mirror_count)"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"    def update_migrated_volume(self, ctxt, volume, new_volume):"},{"line_number":310,"context_line":"        \"\"\"Return model update for migrated volume."},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"        :param ctxt: The context used to run the method update_migrated_volume"},{"line_number":313,"context_line":"        :param volume: The original volume that was migrated to this backend"}],"source_content_type":"text/x-python","patch_set":53,"id":"fa32b979_0e0f3389","line":310,"updated":"2015-06-22 11:40:57.000000000","message":"No mention on the volume being renamed?","commit_id":"40686dd5931d7913b88e3d97ce80d8473eb5005d"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"89ca0256ff32096c2ea51193b12a077200e08254","unresolved":false,"context_lines":[{"line_number":307,"context_line":"                            mirror_count)"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"    def update_migrated_volume(self, ctxt, volume, new_volume):"},{"line_number":310,"context_line":"        \"\"\"Return model update for migrated volume."},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"        :param ctxt: The context used to run the method update_migrated_volume"},{"line_number":313,"context_line":"        :param volume: The original volume that was migrated to this backend"}],"source_content_type":"text/x-python","patch_set":53,"id":"fa32b979_54506c0a","line":310,"in_reply_to":"fa32b979_0e0f3389","updated":"2015-06-22 12:16:51.000000000","message":"Yes, more comments will come in the next patch.","commit_id":"40686dd5931d7913b88e3d97ce80d8473eb5005d"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"0f1710d7921af79104875d763375b025b9b2a265","unresolved":false,"context_lines":[{"line_number":320,"context_line":"        try:"},{"line_number":321,"context_line":"            self.vg.rename_volume(current_name, original_volume_name)"},{"line_number":322,"context_line":"        except processutils.ProcessExecutionError:"},{"line_number":323,"context_line":"            LOG.error(_LE(\u0027Unabled to rename the logical volume \u0027"},{"line_number":324,"context_line":"                          \u0027for volume: %s\u0027), volume[\u0027name\u0027])"},{"line_number":325,"context_line":"            return"},{"line_number":326,"context_line":"        model_update \u003d {\u0027_name_id\u0027: None}"}],"source_content_type":"text/x-python","patch_set":53,"id":"fa32b979_ce9e2b54","line":323,"updated":"2015-06-22 11:40:57.000000000","message":"s/Unabled/Unable","commit_id":"40686dd5931d7913b88e3d97ce80d8473eb5005d"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"89ca0256ff32096c2ea51193b12a077200e08254","unresolved":false,"context_lines":[{"line_number":320,"context_line":"        try:"},{"line_number":321,"context_line":"            self.vg.rename_volume(current_name, original_volume_name)"},{"line_number":322,"context_line":"        except processutils.ProcessExecutionError:"},{"line_number":323,"context_line":"            LOG.error(_LE(\u0027Unabled to rename the logical volume \u0027"},{"line_number":324,"context_line":"                          \u0027for volume: %s\u0027), volume[\u0027name\u0027])"},{"line_number":325,"context_line":"            return"},{"line_number":326,"context_line":"        model_update \u003d {\u0027_name_id\u0027: None}"}],"source_content_type":"text/x-python","patch_set":53,"id":"fa32b979_344da872","line":323,"in_reply_to":"fa32b979_ce9e2b54","updated":"2015-06-22 12:16:51.000000000","message":"Thx.","commit_id":"40686dd5931d7913b88e3d97ce80d8473eb5005d"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"0f1710d7921af79104875d763375b025b9b2a265","unresolved":false,"context_lines":[{"line_number":322,"context_line":"        except processutils.ProcessExecutionError:"},{"line_number":323,"context_line":"            LOG.error(_LE(\u0027Unabled to rename the logical volume \u0027"},{"line_number":324,"context_line":"                          \u0027for volume: %s\u0027), volume[\u0027name\u0027])"},{"line_number":325,"context_line":"            return"},{"line_number":326,"context_line":"        model_update \u003d {\u0027_name_id\u0027: None}"},{"line_number":327,"context_line":"        return model_update"},{"line_number":328,"context_line":""}],"source_content_type":"text/x-python","patch_set":53,"id":"fa32b979_0e9c135c","line":325,"updated":"2015-06-22 11:40:57.000000000","message":"It is better to return None explicitly","commit_id":"40686dd5931d7913b88e3d97ce80d8473eb5005d"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"89ca0256ff32096c2ea51193b12a077200e08254","unresolved":false,"context_lines":[{"line_number":322,"context_line":"        except processutils.ProcessExecutionError:"},{"line_number":323,"context_line":"            LOG.error(_LE(\u0027Unabled to rename the logical volume \u0027"},{"line_number":324,"context_line":"                          \u0027for volume: %s\u0027), volume[\u0027name\u0027])"},{"line_number":325,"context_line":"            return"},{"line_number":326,"context_line":"        model_update \u003d {\u0027_name_id\u0027: None}"},{"line_number":327,"context_line":"        return model_update"},{"line_number":328,"context_line":""}],"source_content_type":"text/x-python","patch_set":53,"id":"fa32b979_744b305a","line":325,"in_reply_to":"fa32b979_0e9c135c","updated":"2015-06-22 12:16:51.000000000","message":"Someone suggested me remove it before.","commit_id":"40686dd5931d7913b88e3d97ce80d8473eb5005d"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"0f1710d7921af79104875d763375b025b9b2a265","unresolved":false,"context_lines":[{"line_number":323,"context_line":"            LOG.error(_LE(\u0027Unabled to rename the logical volume \u0027"},{"line_number":324,"context_line":"                          \u0027for volume: %s\u0027), volume[\u0027name\u0027])"},{"line_number":325,"context_line":"            return"},{"line_number":326,"context_line":"        model_update \u003d {\u0027_name_id\u0027: None}"},{"line_number":327,"context_line":"        return model_update"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    def create_volume_from_snapshot(self, volume, snapshot):"}],"source_content_type":"text/x-python","patch_set":53,"id":"fa32b979_8e710347","line":326,"updated":"2015-06-22 11:40:57.000000000","message":"This could benefit from a comment on why we set it to None.","commit_id":"40686dd5931d7913b88e3d97ce80d8473eb5005d"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"89ca0256ff32096c2ea51193b12a077200e08254","unresolved":false,"context_lines":[{"line_number":323,"context_line":"            LOG.error(_LE(\u0027Unabled to rename the logical volume \u0027"},{"line_number":324,"context_line":"                          \u0027for volume: %s\u0027), volume[\u0027name\u0027])"},{"line_number":325,"context_line":"            return"},{"line_number":326,"context_line":"        model_update \u003d {\u0027_name_id\u0027: None}"},{"line_number":327,"context_line":"        return model_update"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    def create_volume_from_snapshot(self, volume, snapshot):"}],"source_content_type":"text/x-python","patch_set":53,"id":"fa32b979_145ae42a","line":326,"in_reply_to":"fa32b979_8e710347","updated":"2015-06-22 12:16:51.000000000","message":"Yes, more comments will come in the next patch.","commit_id":"40686dd5931d7913b88e3d97ce80d8473eb5005d"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"fecc44a4e5b0bf847a51c80668abd8c334994d53","unresolved":false,"context_lines":[{"line_number":328,"context_line":"        except processutils.ProcessExecutionError:"},{"line_number":329,"context_line":"            LOG.error(_LE(\u0027Unable to rename the logical volume \u0027"},{"line_number":330,"context_line":"                          \u0027for volume: %s\u0027), volume[\u0027name\u0027])"},{"line_number":331,"context_line":"            return None"},{"line_number":332,"context_line":"        # If the back-end name(id) for the volume has been renamed,"},{"line_number":333,"context_line":"        # it is OK for the volume the keep the original name(id) and there is"},{"line_number":334,"context_line":"        # no need to use the column \"_name_id\" to establish the mapping"}],"source_content_type":"text/x-python","patch_set":57,"id":"fa32b979_aff4f0ce","line":331,"updated":"2015-06-22 17:42:16.000000000","message":"Thank you for making this explicit.","commit_id":"8fbdf2cb988186861b56c6a244d62e79c2ea5b3d"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"6c305f3c1cc117123e6ce5c3da38535536e4aac3","unresolved":false,"context_lines":[{"line_number":328,"context_line":"        except processutils.ProcessExecutionError:"},{"line_number":329,"context_line":"            LOG.error(_LE(\u0027Unable to rename the logical volume \u0027"},{"line_number":330,"context_line":"                          \u0027for volume: %s\u0027), volume[\u0027name\u0027])"},{"line_number":331,"context_line":"            return None"},{"line_number":332,"context_line":"        # If the back-end name(id) for the volume has been renamed,"},{"line_number":333,"context_line":"        # it is OK for the volume the keep the original name(id) and there is"},{"line_number":334,"context_line":"        # no need to use the column \"_name_id\" to establish the mapping"}],"source_content_type":"text/x-python","patch_set":57,"id":"fa32b979_4050835e","line":331,"in_reply_to":"fa32b979_aff4f0ce","updated":"2015-06-23 01:40:53.000000000","message":"You are welcome.","commit_id":"8fbdf2cb988186861b56c6a244d62e79c2ea5b3d"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"e3a47a11d5b0d42758b5aeaf87eba719891a19b4","unresolved":false,"context_lines":[{"line_number":322,"context_line":"        \"\"\""},{"line_number":323,"context_line":"        name_id \u003d None"},{"line_number":324,"context_line":"        provider_location \u003d None"},{"line_number":325,"context_line":"        if original_volume_status \u003d\u003d \u0027available\u0027:"},{"line_number":326,"context_line":"            current_name \u003d CONF.volume_name_template % new_volume[\u0027id\u0027]"},{"line_number":327,"context_line":"            original_volume_name \u003d CONF.volume_name_template % volume[\u0027id\u0027]"},{"line_number":328,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":66,"id":"fa32b979_20b566cf","line":325,"updated":"2015-06-27 03:45:31.000000000","message":"Maybe I missed something, but I wanna know should we consider \u0027in-use\u0027 status also in here?","commit_id":"2129b1c54427970aabc75763e0b2114ffd74b281"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"674a6613050ac9a5c83d569696b0809a9007606b","unresolved":false,"context_lines":[{"line_number":322,"context_line":"        \"\"\""},{"line_number":323,"context_line":"        name_id \u003d None"},{"line_number":324,"context_line":"        provider_location \u003d None"},{"line_number":325,"context_line":"        if original_volume_status \u003d\u003d \u0027available\u0027:"},{"line_number":326,"context_line":"            current_name \u003d CONF.volume_name_template % new_volume[\u0027id\u0027]"},{"line_number":327,"context_line":"            original_volume_name \u003d CONF.volume_name_template % volume[\u0027id\u0027]"},{"line_number":328,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":66,"id":"fa32b979_6fc35939","line":325,"in_reply_to":"fa32b979_20b566cf","updated":"2015-06-27 13:57:28.000000000","message":"For the in-use volumes, it is ok to rename to the back-end, but the export is an issue, because I have no idea how to rename the export live.","commit_id":"2129b1c54427970aabc75763e0b2114ffd74b281"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"66f958076c3235a25eaaf2a45975aafb4d5b6805","unresolved":false,"context_lines":[{"line_number":322,"context_line":"        \"\"\""},{"line_number":323,"context_line":"        name_id \u003d None"},{"line_number":324,"context_line":"        provider_location \u003d None"},{"line_number":325,"context_line":"        if original_volume_status \u003d\u003d \u0027available\u0027:"},{"line_number":326,"context_line":"            current_name \u003d CONF.volume_name_template % new_volume[\u0027id\u0027]"},{"line_number":327,"context_line":"            original_volume_name \u003d CONF.volume_name_template % volume[\u0027id\u0027]"},{"line_number":328,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":66,"id":"ba3cc151_9fddb616","line":325,"in_reply_to":"fa32b979_6fc35939","updated":"2015-06-30 08:16:36.000000000","message":"Got it.It\u0027s really a little hard to change live IMO, because compute host has connected volume and also has the iqn info in device path.","commit_id":"2129b1c54427970aabc75763e0b2114ffd74b281"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"8d259c392d689a150c761e66ab26407b5b3e4d2a","unresolved":false,"context_lines":[{"line_number":335,"context_line":"                # one from the new volume as well."},{"line_number":336,"context_line":"                name_id \u003d new_volume[\u0027_name_id\u0027] or new_volume[\u0027id\u0027]"},{"line_number":337,"context_line":"                provider_location \u003d new_volume[\u0027provider_location\u0027]"},{"line_number":338,"context_line":"                return {\u0027_name_id\u0027: name_id,"},{"line_number":339,"context_line":"                        \u0027provider_location\u0027: provider_location}"},{"line_number":340,"context_line":"        else:"},{"line_number":341,"context_line":"            # The back-end will not be renamed."}],"source_content_type":"text/x-python","patch_set":69,"id":"ba3cc151_df824552","line":338,"updated":"2015-06-30 17:10:48.000000000","message":"We can remove this return here, since it will go to default return which is exactly the same.","commit_id":"e2bf0207643115304f060f52bb945ada04431d89"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"a2ca8c89ca388fba3541a534004bf3ecc9ca8424","unresolved":false,"context_lines":[{"line_number":335,"context_line":"                # one from the new volume as well."},{"line_number":336,"context_line":"                name_id \u003d new_volume[\u0027_name_id\u0027] or new_volume[\u0027id\u0027]"},{"line_number":337,"context_line":"                provider_location \u003d new_volume[\u0027provider_location\u0027]"},{"line_number":338,"context_line":"                return {\u0027_name_id\u0027: name_id,"},{"line_number":339,"context_line":"                        \u0027provider_location\u0027: provider_location}"},{"line_number":340,"context_line":"        else:"},{"line_number":341,"context_line":"            # The back-end will not be renamed."}],"source_content_type":"text/x-python","patch_set":69,"id":"ba3cc151_c067af23","line":338,"in_reply_to":"ba3cc151_df824552","updated":"2015-07-01 03:21:13.000000000","message":"Done","commit_id":"e2bf0207643115304f060f52bb945ada04431d89"}],"cinder/volume/drivers/storpool.py":[{"author":{"_account_id":12988,"name":"Peter Penchev","email":"openstack-dev@storpool.com","username":"ppenchev"},"change_message_id":"b8299248344c38f1ccbadb881279ae3c46e8cddf","unresolved":false,"context_lines":[{"line_number":446,"context_line":"                          \u0027that the StorPool volume \"%(tid)\" was not \u0027"},{"line_number":447,"context_line":"                          \u0027created as part of the migration from \u0027"},{"line_number":448,"context_line":"                          \u0027\"%(oid)\"\u0027), {\u0027tid\u0027: temp_id, \u0027oid\u0027: orig_id})"},{"line_number":449,"context_line":"            return {\u0027_name_id\u0027: new_volume[\u0027_name_id\u0027] or new_volume[\u0027id\u0027]}"},{"line_number":450,"context_line":"        elif orig_name in vols:"},{"line_number":451,"context_line":"            LOG.error(_LE(\u0027StorPool update_migrated_volume(): both \u0027"},{"line_number":452,"context_line":"                          \u0027the original volume \"%(oid)\" and the migrated \u0027"}],"source_content_type":"text/x-python","patch_set":69,"id":"ba3cc151_e571b7a9","line":449,"updated":"2015-06-30 18:25:33.000000000","message":"Unfortunately, this is precisely the wrong thing to return in this case :)  This is a \"should never happen\" case when Cinder is pretty sure that it has created and filled a StorPool volume with the migrated data, but suddenly the StorPool cluster reports that the underlying volume is simply not there.  Returning the new volume ID as an indication that the operation has succeeded would be... well, suboptimal.\n\nI\u0027ve been thinking about explicitly raising an exception in this case; could you change the newly-added return statement to:\n\n  raise exception.VolumeBackendException(\"StorPool volume not found\")\n\nIf you wish, I could submit a new patchset with this and the following change.","commit_id":"e2bf0207643115304f060f52bb945ada04431d89"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"a2ca8c89ca388fba3541a534004bf3ecc9ca8424","unresolved":false,"context_lines":[{"line_number":446,"context_line":"                          \u0027that the StorPool volume \"%(tid)\" was not \u0027"},{"line_number":447,"context_line":"                          \u0027created as part of the migration from \u0027"},{"line_number":448,"context_line":"                          \u0027\"%(oid)\"\u0027), {\u0027tid\u0027: temp_id, \u0027oid\u0027: orig_id})"},{"line_number":449,"context_line":"            return {\u0027_name_id\u0027: new_volume[\u0027_name_id\u0027] or new_volume[\u0027id\u0027]}"},{"line_number":450,"context_line":"        elif orig_name in vols:"},{"line_number":451,"context_line":"            LOG.error(_LE(\u0027StorPool update_migrated_volume(): both \u0027"},{"line_number":452,"context_line":"                          \u0027the original volume \"%(oid)\" and the migrated \u0027"}],"source_content_type":"text/x-python","patch_set":69,"id":"ba3cc151_c66d8899","line":449,"in_reply_to":"ba3cc151_e571b7a9","updated":"2015-07-01 03:21:13.000000000","message":"Peter Penchev, please check my comments at the bottom.","commit_id":"e2bf0207643115304f060f52bb945ada04431d89"},{"author":{"_account_id":12988,"name":"Peter Penchev","email":"openstack-dev@storpool.com","username":"ppenchev"},"change_message_id":"b8299248344c38f1ccbadb881279ae3c46e8cddf","unresolved":false,"context_lines":[{"line_number":453,"context_line":"                          \u0027StorPool volume \"%(tid)\" seem to exist on \u0027"},{"line_number":454,"context_line":"                          \u0027the StorPool cluster\u0027),"},{"line_number":455,"context_line":"                      {\u0027oid\u0027: orig_id, \u0027tid\u0027: temp_id})"},{"line_number":456,"context_line":"            return {\u0027_name_id\u0027: new_volume[\u0027_name_id\u0027] or new_volume[\u0027id\u0027]}"},{"line_number":457,"context_line":"        else:"},{"line_number":458,"context_line":"            self._attach.api().volumeUpdate(temp_name, {\u0027rename\u0027: orig_name})"},{"line_number":459,"context_line":"            return {\u0027_name_id\u0027: None}"}],"source_content_type":"text/x-python","patch_set":69,"id":"ba3cc151_85deab6b","line":456,"updated":"2015-06-30 18:25:33.000000000","message":"Well, just as above, this is a \"should not happen\" case when something has created a StorPool volume with the same name as the \"real\" Cinder volume should have; since the names have an OpenStack-specific prefix, there\u0027s no way such a volume should exist now.  Thus, could you change the return to the following?\n\n  raise exception.VolumeBackendException(\"Duplicate StorPool volume name\")","commit_id":"e2bf0207643115304f060f52bb945ada04431d89"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"8d259c392d689a150c761e66ab26407b5b3e4d2a","unresolved":false,"context_lines":[{"line_number":455,"context_line":"                      {\u0027oid\u0027: orig_id, \u0027tid\u0027: temp_id})"},{"line_number":456,"context_line":"            return {\u0027_name_id\u0027: new_volume[\u0027_name_id\u0027] or new_volume[\u0027id\u0027]}"},{"line_number":457,"context_line":"        else:"},{"line_number":458,"context_line":"            self._attach.api().volumeUpdate(temp_name, {\u0027rename\u0027: orig_name})"},{"line_number":459,"context_line":"            return {\u0027_name_id\u0027: None}"}],"source_content_type":"text/x-python","patch_set":69,"id":"ba3cc151_1fbf4dfc","line":458,"updated":"2015-06-30 17:10:48.000000000","message":"Is there no way for this method to fail?","commit_id":"e2bf0207643115304f060f52bb945ada04431d89"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"546c0be0f0ac01f1d86cfeb1220b704a618f7157","unresolved":false,"context_lines":[{"line_number":455,"context_line":"                      {\u0027oid\u0027: orig_id, \u0027tid\u0027: temp_id})"},{"line_number":456,"context_line":"            return {\u0027_name_id\u0027: new_volume[\u0027_name_id\u0027] or new_volume[\u0027id\u0027]}"},{"line_number":457,"context_line":"        else:"},{"line_number":458,"context_line":"            self._attach.api().volumeUpdate(temp_name, {\u0027rename\u0027: orig_name})"},{"line_number":459,"context_line":"            return {\u0027_name_id\u0027: None}"}],"source_content_type":"text/x-python","patch_set":69,"id":"ba3cc151_a635d9da","line":458,"in_reply_to":"ba3cc151_06b13047","updated":"2015-07-01 09:04:40.000000000","message":"Vincent, do you mean that if the rename throws an exception it is not a problem?  Because seeing how all other drivers catch that exception and update fields, I\u0027d think we should do the same here.  (I may be missing something)","commit_id":"e2bf0207643115304f060f52bb945ada04431d89"},{"author":{"_account_id":12988,"name":"Peter Penchev","email":"openstack-dev@storpool.com","username":"ppenchev"},"change_message_id":"b8299248344c38f1ccbadb881279ae3c46e8cddf","unresolved":false,"context_lines":[{"line_number":455,"context_line":"                      {\u0027oid\u0027: orig_id, \u0027tid\u0027: temp_id})"},{"line_number":456,"context_line":"            return {\u0027_name_id\u0027: new_volume[\u0027_name_id\u0027] or new_volume[\u0027id\u0027]}"},{"line_number":457,"context_line":"        else:"},{"line_number":458,"context_line":"            self._attach.api().volumeUpdate(temp_name, {\u0027rename\u0027: orig_name})"},{"line_number":459,"context_line":"            return {\u0027_name_id\u0027: None}"}],"source_content_type":"text/x-python","patch_set":69,"id":"ba3cc151_ea70a6de","line":458,"in_reply_to":"ba3cc151_1fbf4dfc","updated":"2015-06-30 18:25:33.000000000","message":"Actually this operation will raise an exception on failure; this is the major \"legitimate\" way for this to fail.  The cases above are in the \"should never happen\" category; an exception raised here would reflect an actual error during an attempted volume rename.","commit_id":"e2bf0207643115304f060f52bb945ada04431d89"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"a2ca8c89ca388fba3541a534004bf3ecc9ca8424","unresolved":false,"context_lines":[{"line_number":455,"context_line":"                      {\u0027oid\u0027: orig_id, \u0027tid\u0027: temp_id})"},{"line_number":456,"context_line":"            return {\u0027_name_id\u0027: new_volume[\u0027_name_id\u0027] or new_volume[\u0027id\u0027]}"},{"line_number":457,"context_line":"        else:"},{"line_number":458,"context_line":"            self._attach.api().volumeUpdate(temp_name, {\u0027rename\u0027: orig_name})"},{"line_number":459,"context_line":"            return {\u0027_name_id\u0027: None}"}],"source_content_type":"text/x-python","patch_set":69,"id":"ba3cc151_06b13047","line":458,"in_reply_to":"ba3cc151_7139db40","updated":"2015-07-01 03:21:13.000000000","message":"This method update_migrated_volume is called after the volume migration copying all the data to the destination already. The rename here helps to make sure we are still using the original names(ids) for consistency concerns.\nIt will be perfect if the rename is successful.\nHowever, if it does not, well, we can still SURVIVE, because we use the field _name_id to map the old id and the new back-end name(id). It is OK for cinder to go on. Even if this method update_migrated_volume is not called, no rename, it is still all right for the migration and cinder to work.\nAbout the exception, it is PERFECT to have. IMO, it is not that HUGE issue.","commit_id":"e2bf0207643115304f060f52bb945ada04431d89"},{"author":{"_account_id":12988,"name":"Peter Penchev","email":"openstack-dev@storpool.com","username":"ppenchev"},"change_message_id":"e9bea1423109c9c88bacffd78e68e5f64f1d642a","unresolved":false,"context_lines":[{"line_number":455,"context_line":"                      {\u0027oid\u0027: orig_id, \u0027tid\u0027: temp_id})"},{"line_number":456,"context_line":"            return {\u0027_name_id\u0027: new_volume[\u0027_name_id\u0027] or new_volume[\u0027id\u0027]}"},{"line_number":457,"context_line":"        else:"},{"line_number":458,"context_line":"            self._attach.api().volumeUpdate(temp_name, {\u0027rename\u0027: orig_name})"},{"line_number":459,"context_line":"            return {\u0027_name_id\u0027: None}"}],"source_content_type":"text/x-python","patch_set":69,"id":"ba3cc151_7139db40","line":458,"in_reply_to":"ba3cc151_80277911","updated":"2015-06-30 23:27:56.000000000","message":"Hmm, it seems that I may have misunderstood the point of returning new_volume[...].  OK, so it seems to me that you\u0027re saying that the driver should never throw an exception but return a \"please keep the new volume\u0027s ID as it is, do not rename it to the old volume\u0027s ID\" dictionary?  Hmm, but does someone ever check if this is so?  Shouldn\u0027t the migration be flagged as unsuccessful if this happens?  Or, well, okay, so it has been *partly* successful, but to an outside observer there would be no link between the old volume and the new one - unless I\u0027m greatly misunderstanding something.  Or is this what people mean when they say \"don\u0027t get too attached to your volume IDs, follow the data instead\"?\n\nAnyway, okay, if you guys feel that the right thing to do here would be to catch an ApiError (as done elsewhere in the StorPool driver) and return a \"please don\u0027t change anything\" dictionary, okay, I could go along with it. However, I still wonder if it wouldn\u0027t be a good idea to throw an exception in the two cases above - the two cases where there really has been something wrong.  OK, so the second case - can\u0027t rename the StorPool volume to match the old volume\u0027s name - is fine, returning new_volume[...] would reflect reality in the same way as a partly-successful migration here.  But the first case (line 449) is still a candidate for a real exception IMHO.","commit_id":"e2bf0207643115304f060f52bb945ada04431d89"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"06c97f5801c7a65c6fffbb2595e9aa0fdcc55e30","unresolved":false,"context_lines":[{"line_number":455,"context_line":"                      {\u0027oid\u0027: orig_id, \u0027tid\u0027: temp_id})"},{"line_number":456,"context_line":"            return {\u0027_name_id\u0027: new_volume[\u0027_name_id\u0027] or new_volume[\u0027id\u0027]}"},{"line_number":457,"context_line":"        else:"},{"line_number":458,"context_line":"            self._attach.api().volumeUpdate(temp_name, {\u0027rename\u0027: orig_name})"},{"line_number":459,"context_line":"            return {\u0027_name_id\u0027: None}"}],"source_content_type":"text/x-python","patch_set":69,"id":"ba3cc151_1cde543f","line":458,"in_reply_to":"ba3cc151_a635d9da","updated":"2015-07-01 09:45:29.000000000","message":"I can think about one extreme case(Perhaps the possibility is very low):\n\nWhen we do the migrate from one back-end to another, we actually create a dummy volume in the dest and them blockcopy the data, in short version explanation.\n\nThe source vol is \"vol-111\" for example, the dest vol is at first named \"vol-222\".\nWhen migration is OK, then we go to this update_migrated_volume, and rename \"vol-222\" to \"vol-111\" (Still with me?). What if by chance, like 0.000001 percent, there is already a \"vol-111\" existing on the dest back-end??? \n\nSo in this case, if the rename fails, we can still keep the dest named \"vol-222\" and use _name_id to map the cinder volume id. It is still fine.","commit_id":"e2bf0207643115304f060f52bb945ada04431d89"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"150acc7ddc1f83fc0fd3b82f49b362dd3be822bb","unresolved":false,"context_lines":[{"line_number":455,"context_line":"                      {\u0027oid\u0027: orig_id, \u0027tid\u0027: temp_id})"},{"line_number":456,"context_line":"            return {\u0027_name_id\u0027: new_volume[\u0027_name_id\u0027] or new_volume[\u0027id\u0027]}"},{"line_number":457,"context_line":"        else:"},{"line_number":458,"context_line":"            self._attach.api().volumeUpdate(temp_name, {\u0027rename\u0027: orig_name})"},{"line_number":459,"context_line":"            return {\u0027_name_id\u0027: None}"}],"source_content_type":"text/x-python","patch_set":69,"id":"ba3cc151_80277911","line":458,"in_reply_to":"ba3cc151_ea70a6de","updated":"2015-06-30 18:51:12.000000000","message":"So in that case we should catch it and `return {\u0027_name_id\u0027: new_volume[\u0027_name_id\u0027] or new_volume[\u0027id\u0027]}`","commit_id":"e2bf0207643115304f060f52bb945ada04431d89"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"63b2d536f244c6dbdebf85665aaff38c0878bc03","unresolved":false,"context_lines":[{"line_number":461,"context_line":"                return {\u0027_name_id\u0027: None}"},{"line_number":462,"context_line":"            except spapi.ApiError as e:"},{"line_number":463,"context_line":"                LOG.error(_LE(\u0027StorPool update_migrated_volume(): \u0027"},{"line_number":464,"context_line":"                              \u0027could not rename %(tname) to %(oname): \u0027"},{"line_number":465,"context_line":"                              \u0027%(err)\u0027),"},{"line_number":466,"context_line":"                          {\u0027tname\u0027: temp_name, \u0027oname\u0027: orig_name, \u0027err\u0027: e})"},{"line_number":467,"context_line":"                return {\u0027_name_id\u0027: new_volume[\u0027_name_id\u0027] or new_volume[\u0027id\u0027]}"}],"source_content_type":"text/x-python","patch_set":73,"id":"ba3cc151_8ffbc8c0","line":464,"updated":"2015-07-02 12:03:41.000000000","message":"Missing formatting option \"s\":\n\n s/tname)/tname)s\n s/oname)/oname)s\n s/err)/err)s","commit_id":"69be8475738242ad546dab4ecc5f17db39d59c2a"}],"cinder/volume/manager.py":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"d19975538c7a8922adc40f225a166743f29e368a","unresolved":false,"context_lines":[{"line_number":1159,"context_line":"        try:"},{"line_number":1160,"context_line":"            self.driver.remove_export(context.elevated(), volume_ref)"},{"line_number":1161,"context_line":"        except exception.CinderException:"},{"line_number":1162,"context_line":"            err_msg \u003d (_LE(\"Remove export for volume failed.\"))"},{"line_number":1163,"context_line":"            LOG.error(err_msg, resource\u003dvolume_ref)"},{"line_number":1164,"context_line":"            raise exception.VolumeBackendAPIException(data\u003derr_msg)"},{"line_number":1165,"context_line":"        LOG.info(_LI(\"Terminate volume connection completed successfully.\"),"}],"source_content_type":"text/x-python","patch_set":23,"id":"7a016987_09043713","line":1162,"updated":"2015-05-14 13:42:36.000000000","message":"Since err_msg is also passed in to the exception this will need to use _() instead of _LE().","commit_id":"635ef96237f3f5fca1bd10d39e26b5d61faf0cae"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"4adf74664f02d4dd43e3699b5746889b0f97a5c1","unresolved":false,"context_lines":[{"line_number":1364,"context_line":"            LOG.error(_LE(\"Delete migration source volume failed:  %(err)s\"),"},{"line_number":1365,"context_line":"                      {\u0027err\u0027: ex}, resource\u003dvolume)"},{"line_number":1366,"context_line":""},{"line_number":1367,"context_line":"        self.db.finish_volume_migration(ctxt, volume_id, new_volume_id)"},{"line_number":1368,"context_line":"        # Give driver (new_volume) a chance to update things as needed"},{"line_number":1369,"context_line":"        # after a successful migration."},{"line_number":1370,"context_line":"        # Note this needs to go through rpc to the host of the new volume"}],"source_content_type":"text/x-python","patch_set":30,"id":"7a016987_5b51c00d","line":1367,"updated":"2015-05-26 21:31:48.000000000","message":"Volume driver doing update_migrated_volume() can take relatively long time to finish.  Updating DB ( finish_volume_migration() ) before driver finishes its job will put volume in a inconsistent state.","commit_id":"9e2f5e4c92e54217e4f0e4bab2fe11d722169bc1"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"8976c882a5d624864d99bdb66ee7f1942c5e7835","unresolved":false,"context_lines":[{"line_number":1364,"context_line":"            LOG.error(_LE(\"Delete migration source volume failed:  %(err)s\"),"},{"line_number":1365,"context_line":"                      {\u0027err\u0027: ex}, resource\u003dvolume)"},{"line_number":1366,"context_line":""},{"line_number":1367,"context_line":"        self.db.finish_volume_migration(ctxt, volume_id, new_volume_id)"},{"line_number":1368,"context_line":"        # Give driver (new_volume) a chance to update things as needed"},{"line_number":1369,"context_line":"        # after a successful migration."},{"line_number":1370,"context_line":"        # Note this needs to go through rpc to the host of the new volume"}],"source_content_type":"text/x-python","patch_set":30,"id":"7a016987_72801647","line":1367,"in_reply_to":"7a016987_5b51c00d","updated":"2015-05-27 03:42:25.000000000","message":"Zhiteng, this part is a bit tricky. The reason why I swap this line of finish_volume_migration and update_migrated_volume is that I do the back-end rename in the implementation of update_migrated_volume and change the column _name_id in the database. It is easy to keep the db right if their order is changed and I did not find any error on that. However, if we still keep the original order, fine as well. Just need to add more code to make sure the db record is correct.","commit_id":"9e2f5e4c92e54217e4f0e4bab2fe11d722169bc1"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"867f59c6ba475de770024f17d9d0daf7f5729db3","unresolved":false,"context_lines":[{"line_number":1368,"context_line":"        # after a successful migration."},{"line_number":1369,"context_line":"        # Note this needs to go through rpc to the host of the new volume"},{"line_number":1370,"context_line":"        # the current host and driver object is for the \"existing\" volume"},{"line_number":1371,"context_line":"        if orig_volume_status \u003d\u003d \u0027available\u0027:"},{"line_number":1372,"context_line":"            rpcapi.update_migrated_volume(ctxt,"},{"line_number":1373,"context_line":"                                          volume,"},{"line_number":1374,"context_line":"                                          new_volume)"}],"source_content_type":"text/x-python","patch_set":31,"id":"7a016987_c78eea26","line":1371,"updated":"2015-05-27 02:57:18.000000000","message":"why skip update_migrated_volume() for those volumes are not \u0027available\u0027?  Please add comment to explain here.","commit_id":"a925e2c31a25938d08e211c54f20a6ba7362750b"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"004200984f13b413286d27aa4debe1a25beda518","unresolved":false,"context_lines":[{"line_number":1368,"context_line":"        # after a successful migration."},{"line_number":1369,"context_line":"        # Note this needs to go through rpc to the host of the new volume"},{"line_number":1370,"context_line":"        # the current host and driver object is for the \"existing\" volume"},{"line_number":1371,"context_line":"        if orig_volume_status \u003d\u003d \u0027available\u0027:"},{"line_number":1372,"context_line":"            rpcapi.update_migrated_volume(ctxt,"},{"line_number":1373,"context_line":"                                          volume,"},{"line_number":1374,"context_line":"                                          new_volume)"}],"source_content_type":"text/x-python","patch_set":31,"id":"fa32b979_3371c276","line":1371,"in_reply_to":"7a016987_c78eea26","updated":"2015-06-18 03:23:38.000000000","message":"Sorry.. Missed this one.","commit_id":"a925e2c31a25938d08e211c54f20a6ba7362750b"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"75daa802c1d30c03a2dc2a7e590fb00b8fee1d0f","unresolved":false,"context_lines":[{"line_number":1381,"context_line":"                                          new_volume)"},{"line_number":1382,"context_line":"            self.db.finish_available_volume_migration(ctxt, volume_id,"},{"line_number":1383,"context_line":"                                                      new_volume_id)"},{"line_number":1384,"context_line":"        else:"},{"line_number":1385,"context_line":"            self.db.finish_attached_volume_migration(ctxt, volume_id,"},{"line_number":1386,"context_line":"                                                     new_volume_id)"},{"line_number":1387,"context_line":"        self.db.volume_destroy(ctxt, new_volume_id)"}],"source_content_type":"text/x-python","patch_set":44,"id":"fa32b979_c371af77","line":1384,"updated":"2015-06-17 20:46:55.000000000","message":"So you removed line 1377-1379 on the left hand side (the original code) for attached volume. Now attached migrated volume is not being updated at all.","commit_id":"b80028c8480c899a15782b21b709ba23a4c66a5d"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"1554ed43caa793c0616d0767983ada3cc8dc1095","unresolved":false,"context_lines":[{"line_number":1381,"context_line":"                                          new_volume)"},{"line_number":1382,"context_line":"            self.db.finish_available_volume_migration(ctxt, volume_id,"},{"line_number":1383,"context_line":"                                                      new_volume_id)"},{"line_number":1384,"context_line":"        else:"},{"line_number":1385,"context_line":"            self.db.finish_attached_volume_migration(ctxt, volume_id,"},{"line_number":1386,"context_line":"                                                     new_volume_id)"},{"line_number":1387,"context_line":"        self.db.volume_destroy(ctxt, new_volume_id)"}],"source_content_type":"text/x-python","patch_set":44,"id":"fa32b979_ad37b1fd","line":1384,"in_reply_to":"fa32b979_c371af77","updated":"2015-06-18 01:45:11.000000000","message":"Sorry, unfortunately missed the previous comment.","commit_id":"b80028c8480c899a15782b21b709ba23a4c66a5d"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"75daa802c1d30c03a2dc2a7e590fb00b8fee1d0f","unresolved":false,"context_lines":[{"line_number":2583,"context_line":"            _name_id \u003d new_volume[\u0027_name_id\u0027] or new_volume[\u0027id\u0027]"},{"line_number":2584,"context_line":"            self.db.volume_update(ctxt.elevated(),"},{"line_number":2585,"context_line":"                                  volume[\u0027id\u0027],"},{"line_number":2586,"context_line":"                                  {\u0027_name_id\u0027: _name_id})"}],"source_content_type":"text/x-python","patch_set":44,"id":"fa32b979_63ef83e9","line":2586,"updated":"2015-06-17 20:46:55.000000000","message":"The if and else block can just populate the model_update so you can call db.volume_update once at the end.  Changes lines 2573-2586 to the following:\n\n        if not model_update:\n            model_update \u003d {\u0027_name_id\u0027: new_volume[\u0027_name_id\u0027] or new_volume[\u0027id\u0027]}\n\n        self.db.volume_update(ctxt.elevated(),\n                              volume[\u0027id\u0027],\n                              model_update)","commit_id":"b80028c8480c899a15782b21b709ba23a4c66a5d"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"1554ed43caa793c0616d0767983ada3cc8dc1095","unresolved":false,"context_lines":[{"line_number":2583,"context_line":"            _name_id \u003d new_volume[\u0027_name_id\u0027] or new_volume[\u0027id\u0027]"},{"line_number":2584,"context_line":"            self.db.volume_update(ctxt.elevated(),"},{"line_number":2585,"context_line":"                                  volume[\u0027id\u0027],"},{"line_number":2586,"context_line":"                                  {\u0027_name_id\u0027: _name_id})"}],"source_content_type":"text/x-python","patch_set":44,"id":"fa32b979_0d29fd9d","line":2586,"in_reply_to":"fa32b979_63ef83e9","updated":"2015-06-18 01:45:11.000000000","message":"Done","commit_id":"b80028c8480c899a15782b21b709ba23a4c66a5d"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"8eb41bcbdcfa02b12fe5a46bd228d529c4cff4f5","unresolved":false,"context_lines":[{"line_number":2592,"context_line":"        # name(id)."},{"line_number":2593,"context_line":"        if not model_update:"},{"line_number":2594,"context_line":"            model_update \u003d {\u0027_name_id\u0027: new_volume[\u0027_name_id\u0027] or"},{"line_number":2595,"context_line":"                            new_volume[\u0027id\u0027]}"},{"line_number":2596,"context_line":""},{"line_number":2597,"context_line":"        self.db.volume_update(ctxt.elevated(),"},{"line_number":2598,"context_line":"                              volume[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":45,"id":"fa32b979_398e3528","line":2595,"updated":"2015-06-19 15:14:24.000000000","message":"This change affects both attached and non-attached volume, but this patch is not handling attached volume yet. So I think you should keep the original behavior for attached volume and only change it for the unattached volume.","commit_id":"5384d3a87ed9e23d33c32f582af1c76acdfae744"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"a934325c2271ea959467d7a8837f2039ccec27d4","unresolved":false,"context_lines":[{"line_number":2592,"context_line":"        # name(id)."},{"line_number":2593,"context_line":"        if not model_update:"},{"line_number":2594,"context_line":"            model_update \u003d {\u0027_name_id\u0027: new_volume[\u0027_name_id\u0027] or"},{"line_number":2595,"context_line":"                            new_volume[\u0027id\u0027]}"},{"line_number":2596,"context_line":""},{"line_number":2597,"context_line":"        self.db.volume_update(ctxt.elevated(),"},{"line_number":2598,"context_line":"                              volume[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":45,"id":"fa32b979_e5124958","line":2595,"in_reply_to":"fa32b979_398e3528","updated":"2015-06-20 02:31:11.000000000","message":"I will add a param original_volume_status.","commit_id":"5384d3a87ed9e23d33c32f582af1c76acdfae744"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"c98f7c2864500b4310d956b8532a0e22bf4d8b45","unresolved":false,"context_lines":[{"line_number":2588,"context_line":"                                                          volume,"},{"line_number":2589,"context_line":"                                                          new_volume)"},{"line_number":2590,"context_line":"        # If model_update is None, it means update_migrated_volume"},{"line_number":2591,"context_line":"        # is not implemented or there are excetions raised. In this"},{"line_number":2592,"context_line":"        # case, the dest volume id is not the same as the original"},{"line_number":2593,"context_line":"        # one and _name_id should be changed to the backend volume"},{"line_number":2594,"context_line":"        # name(id)."}],"source_content_type":"text/x-python","patch_set":47,"id":"fa32b979_1eb3fe0b","line":2591,"updated":"2015-06-20 13:39:16.000000000","message":"typo here -\u003e  excetions -\u003e exceptions","commit_id":"8cd6722cd123bd545ce30e5a0b4b7f77d1eb0c17"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"5ed4b616d5f777b812d2aa804be7f9bfb01a4f92","unresolved":false,"context_lines":[{"line_number":2595,"context_line":"        if not model_update and orig_volume_status \u003d\u003d \u0027available\u0027:"},{"line_number":2596,"context_line":"            model_update \u003d {\u0027_name_id\u0027: new_volume[\u0027_name_id\u0027] or"},{"line_number":2597,"context_line":"                            new_volume[\u0027id\u0027]}"},{"line_number":2598,"context_line":""},{"line_number":2599,"context_line":"        self.db.volume_update(ctxt.elevated(),"},{"line_number":2600,"context_line":"                              volume[\u0027id\u0027],"},{"line_number":2601,"context_line":"                              model_update)"}],"source_content_type":"text/x-python","patch_set":48,"id":"fa32b979_99d40848","line":2598,"updated":"2015-06-20 14:55:23.000000000","message":"It still needs a \"if model_update:\" check here before calling db.volume_update, like in the original code. If model_update is None, volume_update shouldn\u0027t be called.","commit_id":"ad8239b6d921d7eec15daed9c08c3dd81c78bc5f"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"0f1710d7921af79104875d763375b025b9b2a265","unresolved":false,"context_lines":[{"line_number":1376,"context_line":"        # Normally the method update_migrated_volume in the manager calls"},{"line_number":1377,"context_line":"        # the method update_migrated_volume implemented by each driver,"},{"line_number":1378,"context_line":"        # and each driver needs to rename the volume name(id) back to the"},{"line_number":1379,"context_line":"        # original source volume name(id) if applicable. Currently the"},{"line_number":1380,"context_line":"        # implementation works for both the available and single-attached"},{"line_number":1381,"context_line":"        # volumes, and it does not guarantee to work for multiple-attached"},{"line_number":1382,"context_line":"        # volumes."}],"source_content_type":"text/x-python","patch_set":53,"id":"fa32b979_0eead3ac","line":1379,"updated":"2015-06-22 11:40:57.000000000","message":"Shouldn\u0027t this be also mentioned in update_migrated_volume (the renaming)?","commit_id":"40686dd5931d7913b88e3d97ce80d8473eb5005d"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"89ca0256ff32096c2ea51193b12a077200e08254","unresolved":false,"context_lines":[{"line_number":1376,"context_line":"        # Normally the method update_migrated_volume in the manager calls"},{"line_number":1377,"context_line":"        # the method update_migrated_volume implemented by each driver,"},{"line_number":1378,"context_line":"        # and each driver needs to rename the volume name(id) back to the"},{"line_number":1379,"context_line":"        # original source volume name(id) if applicable. Currently the"},{"line_number":1380,"context_line":"        # implementation works for both the available and single-attached"},{"line_number":1381,"context_line":"        # volumes, and it does not guarantee to work for multiple-attached"},{"line_number":1382,"context_line":"        # volumes."}],"source_content_type":"text/x-python","patch_set":53,"id":"fa32b979_f41f4059","line":1379,"in_reply_to":"fa32b979_0eead3ac","updated":"2015-06-22 12:16:51.000000000","message":"Yes, more comments will come in the next patch.","commit_id":"40686dd5931d7913b88e3d97ce80d8473eb5005d"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"0f1710d7921af79104875d763375b025b9b2a265","unresolved":false,"context_lines":[{"line_number":2596,"context_line":"        # name(id). The key \"_name_id\" can be finally determined"},{"line_number":2597,"context_line":"        # in this method, so there is no need to set it in"},{"line_number":2598,"context_line":"        # the method db.finish_volume_migration."},{"line_number":2599,"context_line":"        if not model_update:"},{"line_number":2600,"context_line":"            model_update \u003d {\u0027_name_id\u0027: new_volume[\u0027_name_id\u0027] or"},{"line_number":2601,"context_line":"                            new_volume[\u0027id\u0027]}"},{"line_number":2602,"context_line":""}],"source_content_type":"text/x-python","patch_set":53,"id":"fa32b979_8eed83b9","line":2599,"updated":"2015-06-22 11:40:57.000000000","message":"According to the comment it should be\n\n  if model_update is None:\n\nOtherwise you are checking for more than just being None. You would also change it when returned value is {}","commit_id":"40686dd5931d7913b88e3d97ce80d8473eb5005d"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"0f1710d7921af79104875d763375b025b9b2a265","unresolved":false,"context_lines":[{"line_number":2600,"context_line":"            model_update \u003d {\u0027_name_id\u0027: new_volume[\u0027_name_id\u0027] or"},{"line_number":2601,"context_line":"                            new_volume[\u0027id\u0027]}"},{"line_number":2602,"context_line":""},{"line_number":2603,"context_line":"        if model_update:"},{"line_number":2604,"context_line":"            self.db.volume_update(ctxt.elevated(),"},{"line_number":2605,"context_line":"                                  volume[\u0027id\u0027],"},{"line_number":2606,"context_line":"                                  model_update)"}],"source_content_type":"text/x-python","patch_set":53,"id":"fa32b979_2e2b17ed","line":2603,"updated":"2015-06-22 11:40:57.000000000","message":"If above if statement is left as it is this if should be removed because it will *always* evaluate to True.","commit_id":"40686dd5931d7913b88e3d97ce80d8473eb5005d"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"fecc44a4e5b0bf847a51c80668abd8c334994d53","unresolved":false,"context_lines":[{"line_number":1377,"context_line":"        # the method update_migrated_volume implemented by each driver,"},{"line_number":1378,"context_line":"        # and each driver needs to rename the volume name(id) back to the"},{"line_number":1379,"context_line":"        # original source volume name(id) if applicable."},{"line_number":1380,"context_line":"        # Before the patch 180873, none of the drivers has ever"},{"line_number":1381,"context_line":"        # implemented update_migrated_volume, so even if there is no"},{"line_number":1382,"context_line":"        # call of this update_migrated_volume method, the migration function"},{"line_number":1383,"context_line":"        # works the same way as when it calls this update_migrated_volume."}],"source_content_type":"text/x-python","patch_set":57,"id":"fa32b979_3d8eddd0","line":1380,"updated":"2015-06-22 17:42:16.000000000","message":"I would simplify this explanation about the patch just mentioning that for drivers not implementing update_migrated_volume it will behave as before.","commit_id":"8fbdf2cb988186861b56c6a244d62e79c2ea5b3d"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"6c305f3c1cc117123e6ce5c3da38535536e4aac3","unresolved":false,"context_lines":[{"line_number":1377,"context_line":"        # the method update_migrated_volume implemented by each driver,"},{"line_number":1378,"context_line":"        # and each driver needs to rename the volume name(id) back to the"},{"line_number":1379,"context_line":"        # original source volume name(id) if applicable."},{"line_number":1380,"context_line":"        # Before the patch 180873, none of the drivers has ever"},{"line_number":1381,"context_line":"        # implemented update_migrated_volume, so even if there is no"},{"line_number":1382,"context_line":"        # call of this update_migrated_volume method, the migration function"},{"line_number":1383,"context_line":"        # works the same way as when it calls this update_migrated_volume."}],"source_content_type":"text/x-python","patch_set":57,"id":"fa32b979_c0ca531a","line":1380,"in_reply_to":"fa32b979_3d8eddd0","updated":"2015-06-23 01:40:53.000000000","message":"Done","commit_id":"8fbdf2cb988186861b56c6a244d62e79c2ea5b3d"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"fecc44a4e5b0bf847a51c80668abd8c334994d53","unresolved":false,"context_lines":[{"line_number":1382,"context_line":"        # call of this update_migrated_volume method, the migration function"},{"line_number":1383,"context_line":"        # works the same way as when it calls this update_migrated_volume."},{"line_number":1384,"context_line":"        # Currently the implementation works for the available volumes, but"},{"line_number":1385,"context_line":"        # it does not guarantee to work for attached volumes, so for the"},{"line_number":1386,"context_line":"        # volumes in the attached status, we decide not to call it tentatively."},{"line_number":1387,"context_line":"        # There is a todo marked in the method update_migrated_volume"},{"line_number":1388,"context_line":"        # for the attached volumes support in future."}],"source_content_type":"text/x-python","patch_set":57,"id":"fa32b979_6f5d8814","line":1385,"updated":"2015-06-22 17:42:16.000000000","message":"Are we choosing to *never* work for attached volumes instead of working only some times?","commit_id":"8fbdf2cb988186861b56c6a244d62e79c2ea5b3d"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"6c305f3c1cc117123e6ce5c3da38535536e4aac3","unresolved":false,"context_lines":[{"line_number":1382,"context_line":"        # call of this update_migrated_volume method, the migration function"},{"line_number":1383,"context_line":"        # works the same way as when it calls this update_migrated_volume."},{"line_number":1384,"context_line":"        # Currently the implementation works for the available volumes, but"},{"line_number":1385,"context_line":"        # it does not guarantee to work for attached volumes, so for the"},{"line_number":1386,"context_line":"        # volumes in the attached status, we decide not to call it tentatively."},{"line_number":1387,"context_line":"        # There is a todo marked in the method update_migrated_volume"},{"line_number":1388,"context_line":"        # for the attached volumes support in future."}],"source_content_type":"text/x-python","patch_set":57,"id":"fa32b979_60d107cd","line":1385,"in_reply_to":"fa32b979_6f5d8814","updated":"2015-06-23 01:40:53.000000000","message":"Done","commit_id":"8fbdf2cb988186861b56c6a244d62e79c2ea5b3d"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"fecc44a4e5b0bf847a51c80668abd8c334994d53","unresolved":false,"context_lines":[{"line_number":1385,"context_line":"        # it does not guarantee to work for attached volumes, so for the"},{"line_number":1386,"context_line":"        # volumes in the attached status, we decide not to call it tentatively."},{"line_number":1387,"context_line":"        # There is a todo marked in the method update_migrated_volume"},{"line_number":1388,"context_line":"        # for the attached volumes support in future."},{"line_number":1389,"context_line":"        if orig_volume_status \u003d\u003d \u0027available\u0027:"},{"line_number":1390,"context_line":"            rpcapi.update_migrated_volume(ctxt, volume, new_volume)"},{"line_number":1391,"context_line":"            self.db.finish_available_volume_migration(ctxt, volume_id,"}],"source_content_type":"text/x-python","patch_set":57,"id":"fa32b979_bdeaed72","line":1388,"updated":"2015-06-22 17:42:16.000000000","message":"An LP bug should be open for that TODO.","commit_id":"8fbdf2cb988186861b56c6a244d62e79c2ea5b3d"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"6c305f3c1cc117123e6ce5c3da38535536e4aac3","unresolved":false,"context_lines":[{"line_number":1385,"context_line":"        # it does not guarantee to work for attached volumes, so for the"},{"line_number":1386,"context_line":"        # volumes in the attached status, we decide not to call it tentatively."},{"line_number":1387,"context_line":"        # There is a todo marked in the method update_migrated_volume"},{"line_number":1388,"context_line":"        # for the attached volumes support in future."},{"line_number":1389,"context_line":"        if orig_volume_status \u003d\u003d \u0027available\u0027:"},{"line_number":1390,"context_line":"            rpcapi.update_migrated_volume(ctxt, volume, new_volume)"},{"line_number":1391,"context_line":"            self.db.finish_available_volume_migration(ctxt, volume_id,"}],"source_content_type":"text/x-python","patch_set":57,"id":"fa32b979_40d723bf","line":1388,"in_reply_to":"fa32b979_bdeaed72","updated":"2015-06-23 01:40:53.000000000","message":"I log a bug and add it in update_migrated_volume","commit_id":"8fbdf2cb988186861b56c6a244d62e79c2ea5b3d"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"fecc44a4e5b0bf847a51c80668abd8c334994d53","unresolved":false,"context_lines":[{"line_number":2607,"context_line":"        # case, the dest volume id is not the same as the original"},{"line_number":2608,"context_line":"        # one and _name_id should be changed to the backend volume"},{"line_number":2609,"context_line":"        # name(id)."},{"line_number":2610,"context_line":"        if not model_update:"},{"line_number":2611,"context_line":"            model_update \u003d {\u0027_name_id\u0027: new_volume[\u0027_name_id\u0027] or"},{"line_number":2612,"context_line":"                            new_volume[\u0027id\u0027]}"},{"line_number":2613,"context_line":""}],"source_content_type":"text/x-python","patch_set":57,"id":"fa32b979_bdf50dee","line":2610,"updated":"2015-06-22 17:42:16.000000000","message":"According to the comment it should be\n\n  if model_update is None:\n\nOtherwise you are checking for more than just being None. You would also change it when returned value is {}","commit_id":"8fbdf2cb988186861b56c6a244d62e79c2ea5b3d"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"6c305f3c1cc117123e6ce5c3da38535536e4aac3","unresolved":false,"context_lines":[{"line_number":2607,"context_line":"        # case, the dest volume id is not the same as the original"},{"line_number":2608,"context_line":"        # one and _name_id should be changed to the backend volume"},{"line_number":2609,"context_line":"        # name(id)."},{"line_number":2610,"context_line":"        if not model_update:"},{"line_number":2611,"context_line":"            model_update \u003d {\u0027_name_id\u0027: new_volume[\u0027_name_id\u0027] or"},{"line_number":2612,"context_line":"                            new_volume[\u0027id\u0027]}"},{"line_number":2613,"context_line":""}],"source_content_type":"text/x-python","patch_set":57,"id":"fa32b979_e04e77c0","line":2610,"in_reply_to":"fa32b979_bdf50dee","updated":"2015-06-23 01:40:53.000000000","message":"Done","commit_id":"8fbdf2cb988186861b56c6a244d62e79c2ea5b3d"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"fecc44a4e5b0bf847a51c80668abd8c334994d53","unresolved":false,"context_lines":[{"line_number":2611,"context_line":"            model_update \u003d {\u0027_name_id\u0027: new_volume[\u0027_name_id\u0027] or"},{"line_number":2612,"context_line":"                            new_volume[\u0027id\u0027]}"},{"line_number":2613,"context_line":""},{"line_number":2614,"context_line":"        if model_update:"},{"line_number":2615,"context_line":"            self.db.volume_update(ctxt.elevated(),"},{"line_number":2616,"context_line":"                                  volume[\u0027id\u0027],"},{"line_number":2617,"context_line":"                                  model_update)"}],"source_content_type":"text/x-python","patch_set":57,"id":"fa32b979_ddcfb1b1","line":2614,"updated":"2015-06-22 17:42:16.000000000","message":"If above if statement is left as it is this if should be removed because it will *always* evaluate to True.","commit_id":"8fbdf2cb988186861b56c6a244d62e79c2ea5b3d"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"6c305f3c1cc117123e6ce5c3da38535536e4aac3","unresolved":false,"context_lines":[{"line_number":2611,"context_line":"            model_update \u003d {\u0027_name_id\u0027: new_volume[\u0027_name_id\u0027] or"},{"line_number":2612,"context_line":"                            new_volume[\u0027id\u0027]}"},{"line_number":2613,"context_line":""},{"line_number":2614,"context_line":"        if model_update:"},{"line_number":2615,"context_line":"            self.db.volume_update(ctxt.elevated(),"},{"line_number":2616,"context_line":"                                  volume[\u0027id\u0027],"},{"line_number":2617,"context_line":"                                  model_update)"}],"source_content_type":"text/x-python","patch_set":57,"id":"fa32b979_004a7bac","line":2614,"in_reply_to":"fa32b979_ddcfb1b1","updated":"2015-06-23 01:40:53.000000000","message":"Done","commit_id":"8fbdf2cb988186861b56c6a244d62e79c2ea5b3d"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f24fd8db68bd684c6350933b86cd09884b69d6c3","unresolved":false,"context_lines":[{"line_number":2607,"context_line":"        # case, the dest volume id is not the same as the original"},{"line_number":2608,"context_line":"        # one and _name_id should be changed to the backend volume"},{"line_number":2609,"context_line":"        # name(id)."},{"line_number":2610,"context_line":"        # {} is not taken into account."},{"line_number":2611,"context_line":"        if model_update is None:"},{"line_number":2612,"context_line":"            model_update \u003d {\u0027_name_id\u0027: new_volume[\u0027_name_id\u0027] or"},{"line_number":2613,"context_line":"                            new_volume[\u0027id\u0027]}"}],"source_content_type":"text/x-python","patch_set":60,"id":"fa32b979_a162a3d6","line":2610,"updated":"2015-06-23 10:31:30.000000000","message":"It has been taken into accound, but it is a valid response meaning that no updates are necessary.","commit_id":"c869934cd4409d670b627102cf12e56264a7f856"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"ee88244fa209904de97cd161797fe8c763affa23","unresolved":false,"context_lines":[{"line_number":2607,"context_line":"        # case, the dest volume id is not the same as the original"},{"line_number":2608,"context_line":"        # one and _name_id should be changed to the backend volume"},{"line_number":2609,"context_line":"        # name(id)."},{"line_number":2610,"context_line":"        # {} is not taken into account."},{"line_number":2611,"context_line":"        if model_update is None:"},{"line_number":2612,"context_line":"            model_update \u003d {\u0027_name_id\u0027: new_volume[\u0027_name_id\u0027] or"},{"line_number":2613,"context_line":"                            new_volume[\u0027id\u0027]}"}],"source_content_type":"text/x-python","patch_set":60,"id":"fa32b979_9a34a8de","line":2610,"in_reply_to":"fa32b979_5ffff200","updated":"2015-06-23 11:26:02.000000000","message":"It\u0027s fantastic.","commit_id":"c869934cd4409d670b627102cf12e56264a7f856"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"39742943aed869aefb5a9098a0346bf49b3f7e1d","unresolved":false,"context_lines":[{"line_number":2607,"context_line":"        # case, the dest volume id is not the same as the original"},{"line_number":2608,"context_line":"        # one and _name_id should be changed to the backend volume"},{"line_number":2609,"context_line":"        # name(id)."},{"line_number":2610,"context_line":"        # {} is not taken into account."},{"line_number":2611,"context_line":"        if model_update is None:"},{"line_number":2612,"context_line":"            model_update \u003d {\u0027_name_id\u0027: new_volume[\u0027_name_id\u0027] or"},{"line_number":2613,"context_line":"                            new_volume[\u0027id\u0027]}"}],"source_content_type":"text/x-python","patch_set":60,"id":"fa32b979_5ffff200","line":2610,"in_reply_to":"fa32b979_a162a3d6","updated":"2015-06-23 11:05:07.000000000","message":"I simply say if {} is returned, there is no need to do the update.\nIs it ok?","commit_id":"c869934cd4409d670b627102cf12e56264a7f856"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f24fd8db68bd684c6350933b86cd09884b69d6c3","unresolved":false,"context_lines":[{"line_number":2611,"context_line":"        if model_update is None:"},{"line_number":2612,"context_line":"            model_update \u003d {\u0027_name_id\u0027: new_volume[\u0027_name_id\u0027] or"},{"line_number":2613,"context_line":"                            new_volume[\u0027id\u0027]}"},{"line_number":2614,"context_line":"        self.db.volume_update(ctxt.elevated(), volume[\u0027id\u0027],"},{"line_number":2615,"context_line":"                              model_update)"}],"source_content_type":"text/x-python","patch_set":60,"id":"fa32b979_c146c74e","line":2614,"updated":"2015-06-23 10:31:30.000000000","message":"Since you have changed previous check the check here should have been left as it was and not get removed, so if we get {} from update_migrated_volume we don\u0027t call volume_update.","commit_id":"c869934cd4409d670b627102cf12e56264a7f856"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"39742943aed869aefb5a9098a0346bf49b3f7e1d","unresolved":false,"context_lines":[{"line_number":2611,"context_line":"        if model_update is None:"},{"line_number":2612,"context_line":"            model_update \u003d {\u0027_name_id\u0027: new_volume[\u0027_name_id\u0027] or"},{"line_number":2613,"context_line":"                            new_volume[\u0027id\u0027]}"},{"line_number":2614,"context_line":"        self.db.volume_update(ctxt.elevated(), volume[\u0027id\u0027],"},{"line_number":2615,"context_line":"                              model_update)"}],"source_content_type":"text/x-python","patch_set":60,"id":"fa32b979_e42519c2","line":2614,"in_reply_to":"fa32b979_c146c74e","updated":"2015-06-23 11:05:07.000000000","message":"I put the if back.","commit_id":"c869934cd4409d670b627102cf12e56264a7f856"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"ee88244fa209904de97cd161797fe8c763affa23","unresolved":false,"context_lines":[{"line_number":2611,"context_line":"        if model_update is None:"},{"line_number":2612,"context_line":"            model_update \u003d {\u0027_name_id\u0027: new_volume[\u0027_name_id\u0027] or"},{"line_number":2613,"context_line":"                            new_volume[\u0027id\u0027]}"},{"line_number":2614,"context_line":"        self.db.volume_update(ctxt.elevated(), volume[\u0027id\u0027],"},{"line_number":2615,"context_line":"                              model_update)"}],"source_content_type":"text/x-python","patch_set":60,"id":"fa32b979_7a50c40a","line":2614,"in_reply_to":"fa32b979_e42519c2","updated":"2015-06-23 11:26:02.000000000","message":"Thanks","commit_id":"c869934cd4409d670b627102cf12e56264a7f856"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"a3575530dc609c3f8f06430b8ea66e872dad5745","unresolved":false,"context_lines":[{"line_number":1384,"context_line":"        # it does not work for the attached volumes, so for the"},{"line_number":1385,"context_line":"        # volumes in the attached status, we decide not to call it tentatively."},{"line_number":1386,"context_line":"        # There is a todo marked in the method update_migrated_volume"},{"line_number":1387,"context_line":"        # for the attached volumes support in future."},{"line_number":1388,"context_line":"        if orig_volume_status \u003d\u003d \u0027available\u0027:"},{"line_number":1389,"context_line":"            rpcapi.update_migrated_volume(ctxt, volume, new_volume)"},{"line_number":1390,"context_line":"            self.db.finish_available_volume_migration(ctxt, volume_id,"}],"source_content_type":"text/x-python","patch_set":61,"id":"fa32b979_15d9edf2","line":1387,"updated":"2015-06-25 03:47:51.000000000","message":"How does this change affect other drivers (not LVM and Storwize) that have already implemented update_migrated_volume?  I did a search and found a few.  update_migrated_volume was called for attached volumes before, but it is not called any more after this change.","commit_id":"e983218baddf2441a3c04c3984db6da4cb633d3b"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"5d0d53d8300c5b588c85c835e6a9459491ffa09a","unresolved":false,"context_lines":[{"line_number":1384,"context_line":"        # it does not work for the attached volumes, so for the"},{"line_number":1385,"context_line":"        # volumes in the attached status, we decide not to call it tentatively."},{"line_number":1386,"context_line":"        # There is a todo marked in the method update_migrated_volume"},{"line_number":1387,"context_line":"        # for the attached volumes support in future."},{"line_number":1388,"context_line":"        if orig_volume_status \u003d\u003d \u0027available\u0027:"},{"line_number":1389,"context_line":"            rpcapi.update_migrated_volume(ctxt, volume, new_volume)"},{"line_number":1390,"context_line":"            self.db.finish_available_volume_migration(ctxt, volume_id,"}],"source_content_type":"text/x-python","patch_set":61,"id":"fa32b979_b949cc62","line":1387,"in_reply_to":"fa32b979_0d53d96d","updated":"2015-06-26 15:30:48.000000000","message":"+1. Good Catch!","commit_id":"e983218baddf2441a3c04c3984db6da4cb633d3b"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"0953812539dc9133d4314aebaeb562e1142023bd","unresolved":false,"context_lines":[{"line_number":1384,"context_line":"        # it does not work for the attached volumes, so for the"},{"line_number":1385,"context_line":"        # volumes in the attached status, we decide not to call it tentatively."},{"line_number":1386,"context_line":"        # There is a todo marked in the method update_migrated_volume"},{"line_number":1387,"context_line":"        # for the attached volumes support in future."},{"line_number":1388,"context_line":"        if orig_volume_status \u003d\u003d \u0027available\u0027:"},{"line_number":1389,"context_line":"            rpcapi.update_migrated_volume(ctxt, volume, new_volume)"},{"line_number":1390,"context_line":"            self.db.finish_available_volume_migration(ctxt, volume_id,"}],"source_content_type":"text/x-python","patch_set":61,"id":"fa32b979_d0aa7ed2","line":1387,"in_reply_to":"fa32b979_15d9edf2","updated":"2015-06-26 03:05:15.000000000","message":"Xing, let me be a bit long.\nAnswer: It works fine for all the other drivers.\n\nThe story is like this: update_migrated_volume is called for both the available and attached volumes before, but they were just EMPTY implementations for all the drivers, which means \"even if we remove this line, the function still works the same.\" \n\nWhen we found the issue about the name consistency, I decided to implement this update_migrated_volume for changing the name back to the origin. That is why I provide this patch.\n\nIt it true that you can see some implementation for update_migrated_volume already, for example, dell driver. Well, that was what I told them to do and that happened AFTER I introduced them this patch and how they can implement this update_migrated_volume.\n\nSo far, I can make sure that it works fine for available volumes. For attached volumes, the volume back-end rename is fine, but the export name is not OK(it could be another tricky issue), so I decided to call update_migrated_volume for the available volumes, and not the attached volumes.\n\nThere is another bug https://bugs.launchpad.net/cinder/+bug/1467703 logged for the attached volume rename, which I am going to fix, when multiple attachment is completely done.","commit_id":"e983218baddf2441a3c04c3984db6da4cb633d3b"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"cad22d2ecd8fcc07d02f902d5a63e5cc71e51e37","unresolved":false,"context_lines":[{"line_number":1384,"context_line":"        # it does not work for the attached volumes, so for the"},{"line_number":1385,"context_line":"        # volumes in the attached status, we decide not to call it tentatively."},{"line_number":1386,"context_line":"        # There is a todo marked in the method update_migrated_volume"},{"line_number":1387,"context_line":"        # for the attached volumes support in future."},{"line_number":1388,"context_line":"        if orig_volume_status \u003d\u003d \u0027available\u0027:"},{"line_number":1389,"context_line":"            rpcapi.update_migrated_volume(ctxt, volume, new_volume)"},{"line_number":1390,"context_line":"            self.db.finish_available_volume_migration(ctxt, volume_id,"}],"source_content_type":"text/x-python","patch_set":61,"id":"fa32b979_0d53d96d","line":1387,"in_reply_to":"fa32b979_2d3d7dbb","updated":"2015-06-26 13:23:48.000000000","message":"Thanks Xing, this was definitely overlooked on my part. Glad you\u0027re on it. :)\n\nYes, that would have been an issue for us. We need to rename the migrated volume regardless of its status since we key on the volume ID. Without update_migrated_volume, we have a new volume with a new ID that does not match the ID in the database.\n\nI think there were at least one or two other drivers that had the same restriction.","commit_id":"e983218baddf2441a3c04c3984db6da4cb633d3b"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"80801e2384996f955685aef21fa730d09a529a76","unresolved":false,"context_lines":[{"line_number":1384,"context_line":"        # it does not work for the attached volumes, so for the"},{"line_number":1385,"context_line":"        # volumes in the attached status, we decide not to call it tentatively."},{"line_number":1386,"context_line":"        # There is a todo marked in the method update_migrated_volume"},{"line_number":1387,"context_line":"        # for the attached volumes support in future."},{"line_number":1388,"context_line":"        if orig_volume_status \u003d\u003d \u0027available\u0027:"},{"line_number":1389,"context_line":"            rpcapi.update_migrated_volume(ctxt, volume, new_volume)"},{"line_number":1390,"context_line":"            self.db.finish_available_volume_migration(ctxt, volume_id,"}],"source_content_type":"text/x-python","patch_set":61,"id":"fa32b979_651baa74","line":1387,"in_reply_to":"fa32b979_50e0aecc","updated":"2015-06-26 07:54:18.000000000","message":"Hi folks, I guess I can take the advice from Mitsuhiro.\n\nI will add the original_status as new parameter for update_migrated_volume. In LVM driver, I will do differently: for available, I rename the back-end; for attached, I cannot do anything, because we cannot change the export name with live attach.\n\nFor other drivers implementing update_migrated_volume, if the original_status will play a role, use it. If not, just leave it.\n\nDo you find OK with approach?","commit_id":"e983218baddf2441a3c04c3984db6da4cb633d3b"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"795ef5de2fcd411ef9d5a1b88f47e4b81008e0d9","unresolved":false,"context_lines":[{"line_number":1384,"context_line":"        # it does not work for the attached volumes, so for the"},{"line_number":1385,"context_line":"        # volumes in the attached status, we decide not to call it tentatively."},{"line_number":1386,"context_line":"        # There is a todo marked in the method update_migrated_volume"},{"line_number":1387,"context_line":"        # for the attached volumes support in future."},{"line_number":1388,"context_line":"        if orig_volume_status \u003d\u003d \u0027available\u0027:"},{"line_number":1389,"context_line":"            rpcapi.update_migrated_volume(ctxt, volume, new_volume)"},{"line_number":1390,"context_line":"            self.db.finish_available_volume_migration(ctxt, volume_id,"}],"source_content_type":"text/x-python","patch_set":61,"id":"fa32b979_2d3d7dbb","line":1387,"in_reply_to":"fa32b979_651baa74","updated":"2015-06-26 13:08:34.000000000","message":"I\u0027m okay with this approach. It lets driver decide whether to rename or not.","commit_id":"e983218baddf2441a3c04c3984db6da4cb633d3b"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"3664ee2995d19a919154ec8108aa22b6613fbf86","unresolved":false,"context_lines":[{"line_number":1384,"context_line":"        # it does not work for the attached volumes, so for the"},{"line_number":1385,"context_line":"        # volumes in the attached status, we decide not to call it tentatively."},{"line_number":1386,"context_line":"        # There is a todo marked in the method update_migrated_volume"},{"line_number":1387,"context_line":"        # for the attached volumes support in future."},{"line_number":1388,"context_line":"        if orig_volume_status \u003d\u003d \u0027available\u0027:"},{"line_number":1389,"context_line":"            rpcapi.update_migrated_volume(ctxt, volume, new_volume)"},{"line_number":1390,"context_line":"            self.db.finish_available_volume_migration(ctxt, volume_id,"}],"source_content_type":"text/x-python","patch_set":61,"id":"fa32b979_50e0aecc","line":1387,"in_reply_to":"fa32b979_d0aa7ed2","updated":"2015-06-26 03:29:05.000000000","message":"Sean,\n\nCan you weigh in on this since Dell has implemented update_migrated_volume?  I just want to make sure that removing the call to update_migrated_volume for attached volume will not have negative impact on your driver\u0027s volume migration functionality.  Thanks.","commit_id":"e983218baddf2441a3c04c3984db6da4cb633d3b"},{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"c26273de4b7611fa4cebc5b1fdef545924441c7d","unresolved":false,"context_lines":[{"line_number":1388,"context_line":"        if orig_volume_status \u003d\u003d \u0027available\u0027:"},{"line_number":1389,"context_line":"            rpcapi.update_migrated_volume(ctxt, volume, new_volume)"},{"line_number":1390,"context_line":"            self.db.finish_available_volume_migration(ctxt, volume_id,"},{"line_number":1391,"context_line":"                                                      new_volume_id)"},{"line_number":1392,"context_line":"        else:"},{"line_number":1393,"context_line":"            self.db.finish_attached_volume_migration(ctxt, volume_id,"},{"line_number":1394,"context_line":"                                                     new_volume_id)"}],"source_content_type":"text/x-python","patch_set":61,"id":"fa32b979_9946614e","line":1391,"updated":"2015-06-26 05:39:24.000000000","message":"In my opinion, we should not check the volume status here. It depends on the function of backend storage whether they can rename volume and export when the volume is attached. LVM can\u0027t rename export if the volume is attached but some storage backend might be able to do.\n\nSo how about doing like this without checking volume status?\n\n   renamed \u003d rpcapi.update_migrated_volume(ctxt, volume, new_volume)\n   self.db.finish_volume_migration(ctxt, volume_id, new_volume_id, renamed)","commit_id":"e983218baddf2441a3c04c3984db6da4cb633d3b"},{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"3ff9f9d2e1895c9c6f3bf5910206e2640ec63b9c","unresolved":false,"context_lines":[{"line_number":1388,"context_line":"        if orig_volume_status \u003d\u003d \u0027available\u0027:"},{"line_number":1389,"context_line":"            rpcapi.update_migrated_volume(ctxt, volume, new_volume)"},{"line_number":1390,"context_line":"            self.db.finish_available_volume_migration(ctxt, volume_id,"},{"line_number":1391,"context_line":"                                                      new_volume_id)"},{"line_number":1392,"context_line":"        else:"},{"line_number":1393,"context_line":"            self.db.finish_attached_volume_migration(ctxt, volume_id,"},{"line_number":1394,"context_line":"                                                     new_volume_id)"}],"source_content_type":"text/x-python","patch_set":61,"id":"fa32b979_a4cf7856","line":1391,"in_reply_to":"fa32b979_04442419","updated":"2015-06-26 06:31:07.000000000","message":"So my suggestion is adding attached volume check logic in the update_migrated_volume of LVM driver instead of checking here.","commit_id":"e983218baddf2441a3c04c3984db6da4cb633d3b"},{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"7692ee354ea4d7d892f23e77f197ab356e32a49e","unresolved":false,"context_lines":[{"line_number":1388,"context_line":"        if orig_volume_status \u003d\u003d \u0027available\u0027:"},{"line_number":1389,"context_line":"            rpcapi.update_migrated_volume(ctxt, volume, new_volume)"},{"line_number":1390,"context_line":"            self.db.finish_available_volume_migration(ctxt, volume_id,"},{"line_number":1391,"context_line":"                                                      new_volume_id)"},{"line_number":1392,"context_line":"        else:"},{"line_number":1393,"context_line":"            self.db.finish_attached_volume_migration(ctxt, volume_id,"},{"line_number":1394,"context_line":"                                                     new_volume_id)"}],"source_content_type":"text/x-python","patch_set":61,"id":"fa32b979_c46aae81","line":1391,"in_reply_to":"fa32b979_2a2fb1a8","updated":"2015-06-26 12:03:29.000000000","message":"sure. Thank you for your consideration. Waiting additional discussion about this.","commit_id":"e983218baddf2441a3c04c3984db6da4cb633d3b"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"a794fe725073b4a5c54c0049adc8eabf25993110","unresolved":false,"context_lines":[{"line_number":1388,"context_line":"        if orig_volume_status \u003d\u003d \u0027available\u0027:"},{"line_number":1389,"context_line":"            rpcapi.update_migrated_volume(ctxt, volume, new_volume)"},{"line_number":1390,"context_line":"            self.db.finish_available_volume_migration(ctxt, volume_id,"},{"line_number":1391,"context_line":"                                                      new_volume_id)"},{"line_number":1392,"context_line":"        else:"},{"line_number":1393,"context_line":"            self.db.finish_attached_volume_migration(ctxt, volume_id,"},{"line_number":1394,"context_line":"                                                     new_volume_id)"}],"source_content_type":"text/x-python","patch_set":61,"id":"fa32b979_04442419","line":1391,"in_reply_to":"fa32b979_9946614e","updated":"2015-06-26 06:17:41.000000000","message":"Dude, I still remember our discussion about this issue for attached volumes for LVM.\nAccording to what I know, it is very risky for LVM due to the export.  When VM connecting the volume, volume gets renamed, but the old export is still alive, no disconnection. Definitely not work for LVM.\nFor storwize, I think it is all right for the attached volumes, because the is no export for storwize driver.\nI am not sure of the real cases for other drivers. What I know is for available volumes, it works for all drivers. For the attached volumes, LVM will have issue, not sure about the others.\nI tried to find the max denominator for the all drivers. It is safest to leave the code this way. I will figure out a better way for https://bugs.launchpad.net/cinder/+bug/1467703 targeting to attached volumes.","commit_id":"e983218baddf2441a3c04c3984db6da4cb633d3b"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"80801e2384996f955685aef21fa730d09a529a76","unresolved":false,"context_lines":[{"line_number":1388,"context_line":"        if orig_volume_status \u003d\u003d \u0027available\u0027:"},{"line_number":1389,"context_line":"            rpcapi.update_migrated_volume(ctxt, volume, new_volume)"},{"line_number":1390,"context_line":"            self.db.finish_available_volume_migration(ctxt, volume_id,"},{"line_number":1391,"context_line":"                                                      new_volume_id)"},{"line_number":1392,"context_line":"        else:"},{"line_number":1393,"context_line":"            self.db.finish_attached_volume_migration(ctxt, volume_id,"},{"line_number":1394,"context_line":"                                                     new_volume_id)"}],"source_content_type":"text/x-python","patch_set":61,"id":"fa32b979_2a2fb1a8","line":1391,"in_reply_to":"fa32b979_a4cf7856","updated":"2015-06-26 07:54:18.000000000","message":"I am OK with this approach. Need to hear if others are fine with it, since is has been changed back and force for a while.","commit_id":"e983218baddf2441a3c04c3984db6da4cb633d3b"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"8d259c392d689a150c761e66ab26407b5b3e4d2a","unresolved":false,"context_lines":[{"line_number":2594,"context_line":"                            \u0027provider_location\u0027:"},{"line_number":2595,"context_line":"                            new_volume[\u0027provider_location\u0027]}"},{"line_number":2596,"context_line":"        if model_update:"},{"line_number":2597,"context_line":"            self.db.volume_update(ctxt.elevated(), volume[\u0027id\u0027],"},{"line_number":2598,"context_line":"                                  model_update)"}],"source_content_type":"text/x-python","patch_set":69,"id":"ba3cc151_ff0869db","line":2597,"updated":"2015-06-30 17:10:48.000000000","message":"This actually allows update_migrated_volume to update anything in the volume, not only _name_id and provider_location.  Is this really what we want or should be filter out any other fields?","commit_id":"e2bf0207643115304f060f52bb945ada04431d89"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"546c0be0f0ac01f1d86cfeb1220b704a618f7157","unresolved":false,"context_lines":[{"line_number":2594,"context_line":"                            \u0027provider_location\u0027:"},{"line_number":2595,"context_line":"                            new_volume[\u0027provider_location\u0027]}"},{"line_number":2596,"context_line":"        if model_update:"},{"line_number":2597,"context_line":"            self.db.volume_update(ctxt.elevated(), volume[\u0027id\u0027],"},{"line_number":2598,"context_line":"                                  model_update)"}],"source_content_type":"text/x-python","patch_set":69,"id":"ba3cc151_035b5755","line":2597,"in_reply_to":"ba3cc151_467df86c","updated":"2015-07-01 09:04:40.000000000","message":"Ok, I just wanted to bring attention to this potential issue.  :-)","commit_id":"e2bf0207643115304f060f52bb945ada04431d89"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"a2ca8c89ca388fba3541a534004bf3ecc9ca8424","unresolved":false,"context_lines":[{"line_number":2594,"context_line":"                            \u0027provider_location\u0027:"},{"line_number":2595,"context_line":"                            new_volume[\u0027provider_location\u0027]}"},{"line_number":2596,"context_line":"        if model_update:"},{"line_number":2597,"context_line":"            self.db.volume_update(ctxt.elevated(), volume[\u0027id\u0027],"},{"line_number":2598,"context_line":"                                  model_update)"}],"source_content_type":"text/x-python","patch_set":69,"id":"ba3cc151_467df86c","line":2597,"in_reply_to":"ba3cc151_ff0869db","updated":"2015-07-01 03:21:13.000000000","message":"So far, only _name_id and provider_location is applied, but in fact, it should allow other fields to be changed.\n\nAfter this method is called, there is a  self.db.finish_volume_migration. In future, if there are more fields covered by update_migrated_volume, self.db.finish_volume_migration needs to change accordingly.\n\nCurrently I think we can leave it like this.","commit_id":"e2bf0207643115304f060f52bb945ada04431d89"}]}
