)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"45a5b6947c4d3b88d155115505f5c7de8407f452","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Volume status management during migration"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The initial migration_status is None, meaning no migration has been"},{"line_number":10,"context_line":"done. Migration_status \u0027error\u0027 means the previous migration fails."},{"line_number":11,"context_line":"Migration_status \u0027success\u0027 means the previous migration succeeds."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"The volume status should be set to \u0027maintenance\u0027 during migration and"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"ba3cc151_c6a57d47","line":10,"updated":"2015-07-07 21:48:39.000000000","message":"fails -\u003e failed","commit_id":"9bbf36ecbd208317a4e6b038c513e0fd9afdce24"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"d27154489534c9323971b853aba6019dc29258dd","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Volume status management during migration"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The initial migration_status is None, meaning no migration has been"},{"line_number":10,"context_line":"done. Migration_status \u0027error\u0027 means the previous migration fails."},{"line_number":11,"context_line":"Migration_status \u0027success\u0027 means the previous migration succeeds."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"The volume status should be set to \u0027maintenance\u0027 during migration and"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"ba3cc151_95070e1d","line":10,"in_reply_to":"ba3cc151_c6a57d47","updated":"2015-07-10 04:44:53.000000000","message":"Done","commit_id":"9bbf36ecbd208317a4e6b038c513e0fd9afdce24"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"45a5b6947c4d3b88d155115505f5c7de8407f452","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The initial migration_status is None, meaning no migration has been"},{"line_number":10,"context_line":"done. Migration_status \u0027error\u0027 means the previous migration fails."},{"line_number":11,"context_line":"Migration_status \u0027success\u0027 means the previous migration succeeds."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"The volume status should be set to \u0027maintenance\u0027 during migration and"},{"line_number":14,"context_line":"goes back to its original status after migration, if the admin issues"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"ba3cc151_86669527","line":11,"updated":"2015-07-07 21:48:39.000000000","message":"succeeds -\u003e succeeded","commit_id":"9bbf36ecbd208317a4e6b038c513e0fd9afdce24"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"d27154489534c9323971b853aba6019dc29258dd","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The initial migration_status is None, meaning no migration has been"},{"line_number":10,"context_line":"done. Migration_status \u0027error\u0027 means the previous migration fails."},{"line_number":11,"context_line":"Migration_status \u0027success\u0027 means the previous migration succeeds."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"The volume status should be set to \u0027maintenance\u0027 during migration and"},{"line_number":14,"context_line":"goes back to its original status after migration, if the admin issues"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"ba3cc151_d514b64e","line":11,"in_reply_to":"ba3cc151_86669527","updated":"2015-07-10 04:44:53.000000000","message":"Done","commit_id":"9bbf36ecbd208317a4e6b038c513e0fd9afdce24"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"45a5b6947c4d3b88d155115505f5c7de8407f452","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"The volume status should be set to \u0027maintenance\u0027 during migration and"},{"line_number":14,"context_line":"goes back to its original status after migration, if the admin issues"},{"line_number":15,"context_line":"the migrate command with the flag --force."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"All the actions, including attach, detach, etc, are not allowed"},{"line_number":18,"context_line":"when the volume is in \u0027maintenance\u0027 mode."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"ba3cc151_2109b32c","line":15,"updated":"2015-07-07 21:48:39.000000000","message":"This is confusing.  Do you mean that \u0027maintenance\u0027 status is only used if the admin uses the --force option?  If so I would reword this:\n\nIf the --force flag is used he volume status should be set to \u0027maintenance\u0027 during migration and goes back to its original status after migration.  Otherwise \u003cinsert what happens here\u003e.","commit_id":"9bbf36ecbd208317a4e6b038c513e0fd9afdce24"},{"author":{"_account_id":10058,"name":"Erlon R. Cruz","email":"erlon.rodrigues.cruz@canonical.com","username":"sombrafam"},"change_message_id":"b0ed86ef728b0aaee35ee90a0d26fc53398a6b6f","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"The volume status should be set to \u0027maintenance\u0027 during migration and"},{"line_number":14,"context_line":"goes back to its original status after migration, if the admin issues"},{"line_number":15,"context_line":"the migrate command with the flag --force."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"All the actions, including attach, detach, etc, are not allowed"},{"line_number":18,"context_line":"when the volume is in \u0027maintenance\u0027 mode."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"ba3cc151_e493a459","line":15,"in_reply_to":"ba3cc151_2109b32c","updated":"2015-07-08 20:34:27.000000000","message":"+1, spent a while to get the meaning of this","commit_id":"9bbf36ecbd208317a4e6b038c513e0fd9afdce24"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"d27154489534c9323971b853aba6019dc29258dd","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"The volume status should be set to \u0027maintenance\u0027 during migration and"},{"line_number":14,"context_line":"goes back to its original status after migration, if the admin issues"},{"line_number":15,"context_line":"the migrate command with the flag --force."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"All the actions, including attach, detach, etc, are not allowed"},{"line_number":18,"context_line":"when the volume is in \u0027maintenance\u0027 mode."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"ba3cc151_35040217","line":15,"in_reply_to":"ba3cc151_2109b32c","updated":"2015-07-10 04:44:53.000000000","message":"Done","commit_id":"9bbf36ecbd208317a4e6b038c513e0fd9afdce24"},{"author":{"_account_id":10058,"name":"Erlon R. Cruz","email":"erlon.rodrigues.cruz@canonical.com","username":"sombrafam"},"change_message_id":"b0ed86ef728b0aaee35ee90a0d26fc53398a6b6f","unresolved":false,"context_lines":[{"line_number":15,"context_line":"the migrate command with the flag --force."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"All the actions, including attach, detach, etc, are not allowed"},{"line_number":18,"context_line":"when the volume is in \u0027maintenance\u0027 mode."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"DocImpact"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"ba3cc151_442cd001","line":18,"updated":"2015-07-08 20:34:27.000000000","message":"If not in maintenance mode, i.e. --force\u003dFalse, the migration will be interrupted, right? I thing it worth to add this info here.","commit_id":"9bbf36ecbd208317a4e6b038c513e0fd9afdce24"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"d27154489534c9323971b853aba6019dc29258dd","unresolved":false,"context_lines":[{"line_number":15,"context_line":"the migrate command with the flag --force."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"All the actions, including attach, detach, etc, are not allowed"},{"line_number":18,"context_line":"when the volume is in \u0027maintenance\u0027 mode."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"DocImpact"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"ba3cc151_55018605","line":18,"in_reply_to":"ba3cc151_442cd001","updated":"2015-07-10 04:44:53.000000000","message":"Done","commit_id":"9bbf36ecbd208317a4e6b038c513e0fd9afdce24"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"342532e37f438f933370d36785e3cf64ee321fa5","unresolved":false,"context_lines":[{"line_number":17,"context_line":"All the actions, including attach, detach, etc, are not allowed"},{"line_number":18,"context_line":"when the volume is in \u0027maintenance\u0027 mode."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"DocImpact"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Change-Id: Ia86421f2d6fce61dcfeb073f8e7b9c9dde517373"},{"line_number":23,"context_line":"Partially-implements-blueprint: migration-improvement"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"ba3cc151_c4dfaed4","line":20,"updated":"2015-07-08 02:23:30.000000000","message":"APIImpact need here if we propose to add --force flag.","commit_id":"9bbf36ecbd208317a4e6b038c513e0fd9afdce24"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"d27154489534c9323971b853aba6019dc29258dd","unresolved":false,"context_lines":[{"line_number":17,"context_line":"All the actions, including attach, detach, etc, are not allowed"},{"line_number":18,"context_line":"when the volume is in \u0027maintenance\u0027 mode."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"DocImpact"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Change-Id: Ia86421f2d6fce61dcfeb073f8e7b9c9dde517373"},{"line_number":23,"context_line":"Partially-implements-blueprint: migration-improvement"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"ba3cc151_07fd1508","line":20,"in_reply_to":"ba3cc151_c4dfaed4","updated":"2015-07-10 04:44:53.000000000","message":"Done","commit_id":"9bbf36ecbd208317a4e6b038c513e0fd9afdce24"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"9ee2feb7c3b3bb64b5e8bd6241acdf215a9c7393","unresolved":false,"context_lines":[{"line_number":13,"context_line":"If the --force flag is used, the volume status should be set to"},{"line_number":14,"context_line":"\u0027maintenance\u0027 during migration and goes back to its original status"},{"line_number":15,"context_line":"after migration. Otherwise, if the --force flag is not used or set"},{"line_number":16,"context_line":"to True, the volume status will remain the same as its original"},{"line_number":17,"context_line":"status."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"All the actions, including attach, detach, etc, are not allowed"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":47,"id":"3a50d1a3_492eeb8c","line":16,"updated":"2015-07-23 16:04:14.000000000","message":"Isn\u0027t force flag set to True the same as --force flag being used?  So this is confusing.\nAnd \u0027--force\u0027 is not a RESTful API change, it\u0027s just a CLI change.","commit_id":"7e3816d11809136aac6cdab26612ee2f070b969a"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"175e3ed39bd04d5d66710cf4736f6ef754cb8009","unresolved":false,"context_lines":[{"line_number":13,"context_line":"If the --force flag is used, the volume status should be set to"},{"line_number":14,"context_line":"\u0027maintenance\u0027 during migration and goes back to its original status"},{"line_number":15,"context_line":"after migration. Otherwise, if the --force flag is not used or set"},{"line_number":16,"context_line":"to True, the volume status will remain the same as its original"},{"line_number":17,"context_line":"status."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"All the actions, including attach, detach, etc, are not allowed"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":47,"id":"3a50d1a3_c40add1f","line":16,"in_reply_to":"3a50d1a3_492eeb8c","updated":"2015-07-23 17:23:45.000000000","message":"Yes. I will make it more clear.","commit_id":"7e3816d11809136aac6cdab26612ee2f070b969a"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"9ee2feb7c3b3bb64b5e8bd6241acdf215a9c7393","unresolved":false,"context_lines":[{"line_number":19,"context_line":"All the actions, including attach, detach, etc, are not allowed"},{"line_number":20,"context_line":"when the volume is in \u0027maintenance\u0027 mode. If it is not in maintenance"},{"line_number":21,"context_line":"mode, the migration can be interrupted if other requests"},{"line_number":22,"context_line":"are issued, e.g. attach."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"DocImpact"},{"line_number":25,"context_line":"APIImpact The --force flag has been added into the API, telling the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":47,"id":"3a50d1a3_e94fb768","line":22,"updated":"2015-07-23 16:04:14.000000000","message":"Which I believe in most cases, none of those actions can be completed correctly.  E.g. when a volume\nis being migrated (using generic or shortcut way), there is not way current Cinder can stop the migration, right?\nSo how about we set volume to \u0027mantenance\u0027 status by default?","commit_id":"7e3816d11809136aac6cdab26612ee2f070b969a"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"221a8059427836b45bac741a493e4e83d010a437","unresolved":false,"context_lines":[{"line_number":19,"context_line":"All the actions, including attach, detach, etc, are not allowed"},{"line_number":20,"context_line":"when the volume is in \u0027maintenance\u0027 mode. If it is not in maintenance"},{"line_number":21,"context_line":"mode, the migration can be interrupted if other requests"},{"line_number":22,"context_line":"are issued, e.g. attach."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"DocImpact"},{"line_number":25,"context_line":"APIImpact The --force flag has been added into the API, telling the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":47,"id":"3a50d1a3_57443d48","line":22,"updated":"2015-07-23 17:33:25.000000000","message":"Yes, termination and cleaning up is needed, otherwise, things will break and it\u0027ll be very ugly for admin to manually clean them up.","commit_id":"7e3816d11809136aac6cdab26612ee2f070b969a"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"175e3ed39bd04d5d66710cf4736f6ef754cb8009","unresolved":false,"context_lines":[{"line_number":19,"context_line":"All the actions, including attach, detach, etc, are not allowed"},{"line_number":20,"context_line":"when the volume is in \u0027maintenance\u0027 mode. If it is not in maintenance"},{"line_number":21,"context_line":"mode, the migration can be interrupted if other requests"},{"line_number":22,"context_line":"are issued, e.g. attach."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"DocImpact"},{"line_number":25,"context_line":"APIImpact The --force flag has been added into the API, telling the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":47,"id":"3a50d1a3_a4331161","line":22,"in_reply_to":"3a50d1a3_e94fb768","updated":"2015-07-23 17:23:45.000000000","message":"It is a long story, but I will put it here.\n1) This is the how the decision was made about this approach.\nYour concern is exactly what I proposed for this blueprint at first. However, there is another voice from the community, saying that the following case should be considered. The owner A creates the volume vol1 and the cinder migrate command is only accessible to the admin. The admin issues the migration command to this volume vol1. If the volume status is changed to \u0027maintenance\u0027, then the volume service is unavailable to the owner A any longer, which will brings the owner A much confusions. After a discussion during one IRC meeting about one month ago, we decide to go with this approach, which is to add a --force flag to decide if the volume service should be available, if an admin issues the migration command to the volume created by owner A.\n\nIf the admin use --force, this will put the volume in \u0027maintenance\u0027, meaning the volume service is out. No other actions is able to do. If no --force is used, then it is POSSIBLE that other actions, attach/detach, may interrupt the the migration.\n\nMy spec was being revised for many time, the final one has the way of the implementations: https://review.openstack.org/186327.\n\nThe IRC meeting we discussed this concern is over here: http://eavesdrop.openstack.org/meetings/cinder/2015/cinder.2015-06-03-16.00.log.html#16:11:51. I think you can search the \u002716:11:51\u0027 as the key word to locate the point.\n\n2) About stopping the in-progress migration:\nTo be honest, I think most of the work items from the migration spec have been under control, except this one. So far, my spec only takes available volumes into account. Let\u0027s just consider available volumes.\nFor migrations, we can migrate via blockcopy(dd), via the file I/O as implemented by another patch, and via the driver specific commands or API calls. The last one really depends on if the back-end supports migration termination. If not, we will not be able to do it.\nFor blockcopy via dd and file I/O, I think we can stop it by killing the process.\nThat is all in my mind about the migration termination. \nDuring volume migration, if the migration status is set to \u0027completing\u0027, meaning that the volume copy is finished and only the db needs to change. In this situation, if attach comes, we can wait until it finishes the migration and continue the attach.\nIf the migration status is not \u0027completing\u0027, we can check if the process for \u0027dd\u0027 or the \u0027file I/O exists during attach, and kill them to stop the volume copy.\n\nThat is all in my mind. Personally I think the migration termination is not applicable to all cases, but it can be done for certain cases as I described above. Do you think this is something we can go for?","commit_id":"7e3816d11809136aac6cdab26612ee2f070b969a"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"9ee2feb7c3b3bb64b5e8bd6241acdf215a9c7393","unresolved":false,"context_lines":[{"line_number":22,"context_line":"are issued, e.g. attach."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"DocImpact"},{"line_number":25,"context_line":"APIImpact The --force flag has been added into the API, telling the"},{"line_number":26,"context_line":"volume to change the status to \u0027maintenance\u0027 or not."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Change-Id: Ia86421f2d6fce61dcfeb073f8e7b9c9dde517373"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":47,"id":"3a50d1a3_09530318","line":25,"updated":"2015-07-23 16:04:14.000000000","message":"\u0027--force\u0027 is an API change, \u0027force\u0027 is.","commit_id":"7e3816d11809136aac6cdab26612ee2f070b969a"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"175e3ed39bd04d5d66710cf4736f6ef754cb8009","unresolved":false,"context_lines":[{"line_number":22,"context_line":"are issued, e.g. attach."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"DocImpact"},{"line_number":25,"context_line":"APIImpact The --force flag has been added into the API, telling the"},{"line_number":26,"context_line":"volume to change the status to \u0027maintenance\u0027 or not."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Change-Id: Ia86421f2d6fce61dcfeb073f8e7b9c9dde517373"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":47,"id":"3a50d1a3_810a8724","line":25,"in_reply_to":"3a50d1a3_09530318","updated":"2015-07-23 17:23:45.000000000","message":"Sorry for the confusion.\nI will change it.","commit_id":"7e3816d11809136aac6cdab26612ee2f070b969a"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"3483e79dd8fa2ce4d5d78c7a11c995ca6193380a","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"Change-Id: Ia86421f2d6fce61dcfeb073f8e7b9c9dde517373"},{"line_number":30,"context_line":"Partial-implements: blueprint migration-improvement"},{"line_number":31,"context_line":"Depends-On: I915c279b526e7268d68ab18ce01200ae22deabdd"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":48,"id":"3a50d1a3_972101ff","line":31,"updated":"2015-07-27 08:17:40.000000000","message":"Dependency is merged, this line can be removed.","commit_id":"5fd65381cb5a79c41b2c68228d61d076d3cd5eae"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"1aea553ba6035dcda5c34527334080ba89bcc1ae","unresolved":false,"context_lines":[{"line_number":13,"context_line":"If the key \u0027lock_volume\u0027 is set to True from the request, the volume"},{"line_number":14,"context_line":"status should be set to \u0027maintenance\u0027 during migration and goes"},{"line_number":15,"context_line":"back to its original status after migration. Otherwise, if the"},{"line_number":16,"context_line":"key \u0027force\u0027 is set to False, the volume status will remain the"},{"line_number":17,"context_line":"same as its original status."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"From the REST\u0027s perspetives, all the create, update and delete"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":53,"id":"3a50d1a3_889ca65e","line":16,"updated":"2015-07-31 06:07:08.000000000","message":"s/force/lock_volume/","commit_id":"340365c9a6d92113b16a89ea33f0e96f469e554f"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"b14e9f7d182bb95c76b87c1831b4bb51ebec7f92","unresolved":false,"context_lines":[{"line_number":13,"context_line":"If the key \u0027lock_volume\u0027 is set to True from the request, the volume"},{"line_number":14,"context_line":"status should be set to \u0027maintenance\u0027 during migration and goes"},{"line_number":15,"context_line":"back to its original status after migration. Otherwise, if the"},{"line_number":16,"context_line":"key \u0027force\u0027 is set to False, the volume status will remain the"},{"line_number":17,"context_line":"same as its original status."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"From the REST\u0027s perspetives, all the create, update and delete"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":53,"id":"3a50d1a3_5e4f2a6a","line":16,"in_reply_to":"3a50d1a3_889ca65e","updated":"2015-07-31 09:36:30.000000000","message":"Done","commit_id":"340365c9a6d92113b16a89ea33f0e96f469e554f"},{"author":{"_account_id":17444,"name":"Jay.Shen","email":"shenhong09@huawei.com","username":"Jay.Shen"},"change_message_id":"35790b199767a40f5f70ac238d2440aa502f5fa8","unresolved":false,"context_lines":[{"line_number":16,"context_line":"key \u0027lock_volume\u0027 is set to False, the volume status will remain the"},{"line_number":17,"context_line":"same as its original status."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"From the REST\u0027s perspetives, all the create, update and delete"},{"line_number":20,"context_line":"actions are not allowed if the volume is in \u0027maintenance\u0027, because"},{"line_number":21,"context_line":"it means the volume out of service. If it is not in maintenance"},{"line_number":22,"context_line":"mode, the migration can be interrupted if other requests are"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":59,"id":"1a4dcd0f_47b858c8","line":19,"updated":"2015-08-06 10:53:43.000000000","message":"S/perspetives/perspectives","commit_id":"2f00c93de9021577000a9e2da169f0deddc873c9"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Volume status management during migration"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The initial migration_status is None, meaning no migration has been"},{"line_number":10,"context_line":"done. Migration_status \u0027error\u0027 means the previous migration failed."},{"line_number":11,"context_line":"Migration_status \u0027success\u0027 means the previous migration succeeded."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":84,"id":"fa1b9901_02ca756e","line":9,"updated":"2015-08-25 19:01:43.000000000","message":"nit: You have to mention that this is the new behavior this patch implements, otherwise it sounds like you are explaining what we have right now.","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":10,"context_line":"done. Migration_status \u0027error\u0027 means the previous migration failed."},{"line_number":11,"context_line":"Migration_status \u0027success\u0027 means the previous migration succeeded."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"If the key \u0027lock_volume\u0027 is set to True from the request, the volume"},{"line_number":14,"context_line":"status should be set to \u0027maintenance\u0027 during migration and goes"},{"line_number":15,"context_line":"back to its original status after migration. Otherwise, if the"},{"line_number":16,"context_line":"key \u0027lock_volume\u0027 is set to False, the volume status will remain the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":84,"id":"fa1b9901_5d2612bb","line":13,"updated":"2015-08-25 19:01:43.000000000","message":"-1: No indication in commit message on what\u0027s the default value of \u0027lock_volume\u0027.","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"From the REST\u0027s perspectives, all the create, update and delete"},{"line_number":20,"context_line":"actions are not allowed if the volume is in \u0027maintenance\u0027, because"},{"line_number":21,"context_line":"it means the volume out of service. If it is not in maintenance"},{"line_number":22,"context_line":"mode, the migration can be interrupted if other requests are"},{"line_number":23,"context_line":"issued, e.g. attach. For the termination of migration, another"},{"line_number":24,"context_line":"patch will target to resolve it."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":84,"id":"fa1b9901_dd41c23a","line":21,"updated":"2015-08-25 19:01:43.000000000","message":"nit: s/volume out/volume is out/","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"DocImpact"},{"line_number":27,"context_line":"APIImpact The key \u0027lock_volume\u0027 has been added into the API,"},{"line_number":28,"context_line":"telling the volume to change the status to \u0027maintenance\u0027 or not."},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Change-Id: Ia86421f2d6fce61dcfeb073f8e7b9c9dde517373"},{"line_number":31,"context_line":"Partial-implements: blueprint migration-improvement"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":84,"id":"fa1b9901_bb3725fe","line":28,"updated":"2015-08-25 19:01:43.000000000","message":"-1: You are also returning migration_status in volume details","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6a9512a613612b7a3ae99317bae2d7072d195d9a","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Volume status management during migration"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch proposes an new implementation for the status and"},{"line_number":10,"context_line":"the migration_status for volumes."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"* The initial migration_status is None, meaning no migration has been"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":88,"id":"da20952f_f3031075","line":9,"range":{"start_line":9,"start_character":11,"end_line":9,"end_character":19},"updated":"2015-08-26 18:56:18.000000000","message":"nit: s/an/a","commit_id":"2dd84009569e30b56abdb8c015fe132206005ce8"}],"cinder/api/contrib/admin_actions.py":[{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"0bd1598befb6b18ea98bada71b5f8c5832f142ac","unresolved":false,"context_lines":[{"line_number":207,"context_line":"                raise"},{"line_number":208,"context_line":"        return webob.Response(status_int\u003d202)"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"    def _check_get_param(self, param_string, params):"},{"line_number":211,"context_line":"        param \u003d params.get(param_string, False)"},{"line_number":212,"context_line":"        if isinstance(param, basestring):"},{"line_number":213,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba3cc151_f8423567","line":210,"updated":"2015-07-03 04:19:16.000000000","message":"I feel _get_bool_param or _check_bool_param is better.","commit_id":"19520d2b92dd6b8aef2923cfc1bb9dfd4646ff4a"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        except exception.VolumeNotFound as e:"},{"line_number":115,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.msg)"},{"line_number":116,"context_line":"        except exception.InvalidVolume as error:"},{"line_number":117,"context_line":"            raise exc.HTTPServiceUnavailable(explanation\u003derror.msg)"},{"line_number":118,"context_line":"        return webob.Response(status_int\u003d202)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":""}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_1d12da62","line":117,"updated":"2015-08-25 19:01:43.000000000","message":"-1: This isn\u0027t the right code to return","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"b2f474f6f9f31107b04aa323f1ed2f119e30a657","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        except exception.VolumeNotFound as e:"},{"line_number":115,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.msg)"},{"line_number":116,"context_line":"        except exception.InvalidVolume as error:"},{"line_number":117,"context_line":"            raise exc.HTTPServiceUnavailable(explanation\u003derror.msg)"},{"line_number":118,"context_line":"        return webob.Response(status_int\u003d202)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":""}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_adb592ed","line":117,"in_reply_to":"fa1b9901_1d12da62","updated":"2015-08-26 07:56:33.000000000","message":"Done","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":130,"context_line":"    # Perhaps we don\u0027t even want any definitions in the abstract"},{"line_number":131,"context_line":"    # parent class?"},{"line_number":132,"context_line":"    valid_status \u003d AdminController.valid_status.union("},{"line_number":133,"context_line":"        set([\u0027attaching\u0027, \u0027in-use\u0027, \u0027detaching\u0027, \u0027maintenance\u0027]))"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    valid_attach_status \u003d set([\u0027detached\u0027, \u0027attached\u0027, ])"},{"line_number":136,"context_line":"    valid_migration_status \u003d set([\u0027migrating\u0027, \u0027error\u0027,"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_7d2f563e","line":133,"updated":"2015-08-25 19:01:43.000000000","message":"opt: Since you are already changing this, it would be good to fix this mess of creating a list, then creating a set from it just to do the union.  WE should use a tuple directly:\n\nvalid_status \u003d AdminController.valid_status.union(\n        (\u0027attaching\u0027, \u0027in-use\u0027, \u0027detaching\u0027, \u0027maintenance\u0027))","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"b2f474f6f9f31107b04aa323f1ed2f119e30a657","unresolved":false,"context_lines":[{"line_number":130,"context_line":"    # Perhaps we don\u0027t even want any definitions in the abstract"},{"line_number":131,"context_line":"    # parent class?"},{"line_number":132,"context_line":"    valid_status \u003d AdminController.valid_status.union("},{"line_number":133,"context_line":"        set([\u0027attaching\u0027, \u0027in-use\u0027, \u0027detaching\u0027, \u0027maintenance\u0027]))"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    valid_attach_status \u003d set([\u0027detached\u0027, \u0027attached\u0027, ])"},{"line_number":136,"context_line":"    valid_migration_status \u003d set([\u0027migrating\u0027, \u0027error\u0027,"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_edbf0ace","line":133,"in_reply_to":"fa1b9901_7d2f563e","updated":"2015-08-26 07:56:33.000000000","message":"Done","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        set([\u0027attaching\u0027, \u0027in-use\u0027, \u0027detaching\u0027, \u0027maintenance\u0027]))"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    valid_attach_status \u003d set([\u0027detached\u0027, \u0027attached\u0027, ])"},{"line_number":136,"context_line":"    valid_migration_status \u003d set([\u0027migrating\u0027, \u0027error\u0027,"},{"line_number":137,"context_line":"                                  \u0027success\u0027,"},{"line_number":138,"context_line":"                                  \u0027completing\u0027, \u0027none\u0027,"},{"line_number":139,"context_line":"                                  \u0027starting\u0027, ])"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_9d76ea3c","line":136,"updated":"2015-08-25 19:01:43.000000000","message":"opt: Similar here:\n\n valid_migration_status \u003d {\u0027migrating\u0027, \u0027error\u0027,\n                           \u0027success\u0027,\n                           \u0027completing\u0027, \u0027none\u0027,\n                           \u0027starting\u0027}","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"b2f474f6f9f31107b04aa323f1ed2f119e30a657","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        set([\u0027attaching\u0027, \u0027in-use\u0027, \u0027detaching\u0027, \u0027maintenance\u0027]))"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    valid_attach_status \u003d set([\u0027detached\u0027, \u0027attached\u0027, ])"},{"line_number":136,"context_line":"    valid_migration_status \u003d set([\u0027migrating\u0027, \u0027error\u0027,"},{"line_number":137,"context_line":"                                  \u0027success\u0027,"},{"line_number":138,"context_line":"                                  \u0027completing\u0027, \u0027none\u0027,"},{"line_number":139,"context_line":"                                  \u0027starting\u0027, ])"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_8db0cefe","line":136,"in_reply_to":"fa1b9901_9d76ea3c","updated":"2015-08-26 07:56:33.000000000","message":"Done","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        try:"},{"line_number":198,"context_line":"            self.volume_api.detach(context, volume, attachment_id)"},{"line_number":199,"context_line":"        except exception.InvalidVolume as error:"},{"line_number":200,"context_line":"            raise webob.exc.HTTPServiceUnavailable(explanation\u003derror.msg)"},{"line_number":201,"context_line":"        except messaging.RemoteError as error:"},{"line_number":202,"context_line":"            if error.exc_type in [\u0027VolumeAttachmentNotFound\u0027,"},{"line_number":203,"context_line":"                                  \u0027InvalidVolume\u0027]:"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_f835b4da","line":200,"range":{"start_line":200,"start_character":28,"end_line":200,"end_character":50},"updated":"2015-08-25 19:01:43.000000000","message":"-1: This isn\u0027t the right code to return","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"b2f474f6f9f31107b04aa323f1ed2f119e30a657","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        try:"},{"line_number":198,"context_line":"            self.volume_api.detach(context, volume, attachment_id)"},{"line_number":199,"context_line":"        except exception.InvalidVolume as error:"},{"line_number":200,"context_line":"            raise webob.exc.HTTPServiceUnavailable(explanation\u003derror.msg)"},{"line_number":201,"context_line":"        except messaging.RemoteError as error:"},{"line_number":202,"context_line":"            if error.exc_type in [\u0027VolumeAttachmentNotFound\u0027,"},{"line_number":203,"context_line":"                                  \u0027InvalidVolume\u0027]:"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_6dcc5a89","line":200,"in_reply_to":"fa1b9901_f835b4da","updated":"2015-08-26 07:56:33.000000000","message":"Done","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def _get_bool_param(self, param_string, params):"},{"line_number":217,"context_line":"        param \u003d params.get(param_string, False)"},{"line_number":218,"context_line":"        if isinstance(param, basestring):"},{"line_number":219,"context_line":"            try:"},{"line_number":220,"context_line":"                param \u003d strutils.bool_from_string(param, strict\u003dTrue)"},{"line_number":221,"context_line":"            except ValueError:"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_4d13bdb8","line":218,"updated":"2015-08-25 19:01:43.000000000","message":"nit: This could be changed to use cinder.utils.is_valid_boolstr","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"b2f474f6f9f31107b04aa323f1ed2f119e30a657","unresolved":false,"context_lines":[{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def _get_bool_param(self, param_string, params):"},{"line_number":217,"context_line":"        param \u003d params.get(param_string, False)"},{"line_number":218,"context_line":"        if isinstance(param, basestring):"},{"line_number":219,"context_line":"            try:"},{"line_number":220,"context_line":"                param \u003d strutils.bool_from_string(param, strict\u003dTrue)"},{"line_number":221,"context_line":"            except ValueError:"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_edbb8ac2","line":218,"in_reply_to":"fa1b9901_4d13bdb8","updated":"2015-08-26 07:56:33.000000000","message":"Done","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":219,"context_line":"            try:"},{"line_number":220,"context_line":"                param \u003d strutils.bool_from_string(param, strict\u003dTrue)"},{"line_number":221,"context_line":"            except ValueError:"},{"line_number":222,"context_line":"                raise exc.HTTPBadRequest("},{"line_number":223,"context_line":"                    explanation\u003d_(\"Bad value for \u0027%s\u0027.\") % param_string)"},{"line_number":224,"context_line":"        elif not isinstance(param, bool):"},{"line_number":225,"context_line":"            raise exc.HTTPBadRequest("}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_f33f12b2","line":222,"updated":"2015-08-25 19:01:43.000000000","message":"nit: It should return exception.InvalidParameterValue (even if in the end it\u0027s the same status code)","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"b2f474f6f9f31107b04aa323f1ed2f119e30a657","unresolved":false,"context_lines":[{"line_number":219,"context_line":"            try:"},{"line_number":220,"context_line":"                param \u003d strutils.bool_from_string(param, strict\u003dTrue)"},{"line_number":221,"context_line":"            except ValueError:"},{"line_number":222,"context_line":"                raise exc.HTTPBadRequest("},{"line_number":223,"context_line":"                    explanation\u003d_(\"Bad value for \u0027%s\u0027.\") % param_string)"},{"line_number":224,"context_line":"        elif not isinstance(param, bool):"},{"line_number":225,"context_line":"            raise exc.HTTPBadRequest("}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_cdb6c6db","line":222,"in_reply_to":"fa1b9901_f33f12b2","updated":"2015-08-26 07:56:33.000000000","message":"Done","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":222,"context_line":"                raise exc.HTTPBadRequest("},{"line_number":223,"context_line":"                    explanation\u003d_(\"Bad value for \u0027%s\u0027.\") % param_string)"},{"line_number":224,"context_line":"        elif not isinstance(param, bool):"},{"line_number":225,"context_line":"            raise exc.HTTPBadRequest("},{"line_number":226,"context_line":"                explanation\u003d_(\"\u0027%s\u0027 is not a string or bool.\") % param_string)"},{"line_number":227,"context_line":"        return param"},{"line_number":228,"context_line":""}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_f36632ec","line":225,"updated":"2015-08-25 19:01:43.000000000","message":"nit: Same as above","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"b2f474f6f9f31107b04aa323f1ed2f119e30a657","unresolved":false,"context_lines":[{"line_number":222,"context_line":"                raise exc.HTTPBadRequest("},{"line_number":223,"context_line":"                    explanation\u003d_(\"Bad value for \u0027%s\u0027.\") % param_string)"},{"line_number":224,"context_line":"        elif not isinstance(param, bool):"},{"line_number":225,"context_line":"            raise exc.HTTPBadRequest("},{"line_number":226,"context_line":"                explanation\u003d_(\"\u0027%s\u0027 is not a string or bool.\") % param_string)"},{"line_number":227,"context_line":"        return param"},{"line_number":228,"context_line":""}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_8dac4e89","line":225,"in_reply_to":"fa1b9901_f36632ec","updated":"2015-08-26 07:56:33.000000000","message":"Done","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6a9512a613612b7a3ae99317bae2d7072d195d9a","unresolved":false,"context_lines":[{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def _get_bool_param(self, param_string, params):"},{"line_number":213,"context_line":"        param \u003d params.get(param_string, False)"},{"line_number":214,"context_line":"        if utils.is_valid_boolstr(param):"},{"line_number":215,"context_line":"            try:"},{"line_number":216,"context_line":"                param \u003d strutils.bool_from_string(param, strict\u003dTrue)"},{"line_number":217,"context_line":"            except ValueError:"}],"source_content_type":"text/x-python","patch_set":88,"id":"da20952f_0e31b7a2","line":214,"updated":"2015-08-26 18:56:18.000000000","message":"-1: Simpler is better:\n\n if not utils.is_valid_boolstr(param):\n     msg \u003d _(\u0027Value \u0027%s\u0027 for %s is not a boolean.\u0027) % (param, param_string)\n     raise exception.InvalidParameterValue(err\u003dmsg)\n\n return strutils.bool_from_string(param, strict\u003dTrue)\n\nAnd you could even move this method (removing leading _) to cinder.utils so we all can benefit from it.  ;-)","commit_id":"2dd84009569e30b56abdb8c015fe132206005ce8"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"61aa3acc7b1d79c0a1292a8a352a4627dd30338d","unresolved":false,"context_lines":[{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def _get_bool_param(self, param_string, params):"},{"line_number":213,"context_line":"        param \u003d params.get(param_string, False)"},{"line_number":214,"context_line":"        if utils.is_valid_boolstr(param):"},{"line_number":215,"context_line":"            try:"},{"line_number":216,"context_line":"                param \u003d strutils.bool_from_string(param, strict\u003dTrue)"},{"line_number":217,"context_line":"            except ValueError:"}],"source_content_type":"text/x-python","patch_set":88,"id":"da20952f_e9222ab9","line":214,"in_reply_to":"da20952f_0e31b7a2","updated":"2015-08-27 03:23:41.000000000","message":"I put it in the utils.","commit_id":"2dd84009569e30b56abdb8c015fe132206005ce8"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6a9512a613612b7a3ae99317bae2d7072d195d9a","unresolved":false,"context_lines":[{"line_number":241,"context_line":"        try:"},{"line_number":242,"context_line":"            self.volume_api.migrate_volume(context, volume, host,"},{"line_number":243,"context_line":"                                           force_host_copy, lock_volume)"},{"line_number":244,"context_line":"        except (exception.InvalidVolume, exception.InvalidHost) as error:"},{"line_number":245,"context_line":"            raise exc.HTTPBadRequest(explanation\u003derror.msg)"},{"line_number":246,"context_line":"        except Exception as error:"},{"line_number":247,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dsix.text_type(error))"}],"source_content_type":"text/x-python","patch_set":88,"id":"da20952f_22f36f75","line":244,"updated":"2015-08-26 18:56:18.000000000","message":"-1: No need to catch these 2 exceptions, they will be properly translated by the middleware.","commit_id":"2dd84009569e30b56abdb8c015fe132206005ce8"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"61aa3acc7b1d79c0a1292a8a352a4627dd30338d","unresolved":false,"context_lines":[{"line_number":241,"context_line":"        try:"},{"line_number":242,"context_line":"            self.volume_api.migrate_volume(context, volume, host,"},{"line_number":243,"context_line":"                                           force_host_copy, lock_volume)"},{"line_number":244,"context_line":"        except (exception.InvalidVolume, exception.InvalidHost) as error:"},{"line_number":245,"context_line":"            raise exc.HTTPBadRequest(explanation\u003derror.msg)"},{"line_number":246,"context_line":"        except Exception as error:"},{"line_number":247,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dsix.text_type(error))"}],"source_content_type":"text/x-python","patch_set":88,"id":"da20952f_2481294b","line":244,"in_reply_to":"da20952f_22f36f75","updated":"2015-08-27 03:23:41.000000000","message":"removed","commit_id":"2dd84009569e30b56abdb8c015fe132206005ce8"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6a9512a613612b7a3ae99317bae2d7072d195d9a","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        except (exception.InvalidVolume, exception.InvalidHost) as error:"},{"line_number":245,"context_line":"            raise exc.HTTPBadRequest(explanation\u003derror.msg)"},{"line_number":246,"context_line":"        except Exception as error:"},{"line_number":247,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dsix.text_type(error))"},{"line_number":248,"context_line":"        return webob.Response(status_int\u003d202)"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    @wsgi.action(\u0027os-migrate_volume_completion\u0027)"}],"source_content_type":"text/x-python","patch_set":88,"id":"da20952f_222b6f84","line":247,"updated":"2015-08-26 18:56:18.000000000","message":"-1: In this case it is not a Bad Request exception, it looks more like a server error.  I wouldn\u0027t catch it but you can if you want.","commit_id":"2dd84009569e30b56abdb8c015fe132206005ce8"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"61aa3acc7b1d79c0a1292a8a352a4627dd30338d","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        except (exception.InvalidVolume, exception.InvalidHost) as error:"},{"line_number":245,"context_line":"            raise exc.HTTPBadRequest(explanation\u003derror.msg)"},{"line_number":246,"context_line":"        except Exception as error:"},{"line_number":247,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dsix.text_type(error))"},{"line_number":248,"context_line":"        return webob.Response(status_int\u003d202)"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    @wsgi.action(\u0027os-migrate_volume_completion\u0027)"}],"source_content_type":"text/x-python","patch_set":88,"id":"da20952f_e4da5178","line":247,"in_reply_to":"da20952f_222b6f84","updated":"2015-08-27 03:23:41.000000000","message":"removed","commit_id":"2dd84009569e30b56abdb8c015fe132206005ce8"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"c9025a3d39fcaa3f3383b4adca42fdff48c33a71","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            resource \u003d self._get(context, id)"},{"line_number":112,"context_line":"        except exception.VolumeNotFound as e:"},{"line_number":113,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.msg)"},{"line_number":114,"context_line":"        self._delete(context, resource, force\u003dTrue)"},{"line_number":115,"context_line":"        return webob.Response(status_int\u003d202)"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":""}],"source_content_type":"text/x-python","patch_set":90,"id":"da20952f_5e4e3c70","line":114,"updated":"2015-08-27 19:57:22.000000000","message":"Do we not need to handle a the InvalidVolume exception?","commit_id":"dcca5f8e855f43257bbe0648df76a6e2ad0c5f76"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"f7811b43ab3d899c1fc8fe8c40fef43c5d754d9b","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            resource \u003d self._get(context, id)"},{"line_number":112,"context_line":"        except exception.VolumeNotFound as e:"},{"line_number":113,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.msg)"},{"line_number":114,"context_line":"        self._delete(context, resource, force\u003dTrue)"},{"line_number":115,"context_line":"        return webob.Response(status_int\u003d202)"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":""}],"source_content_type":"text/x-python","patch_set":90,"id":"da20952f_bb475c1c","line":114,"in_reply_to":"da20952f_5e4e3c70","updated":"2015-08-28 01:53:06.000000000","message":"No, because you will let force delete go even if it is in maintenance.","commit_id":"dcca5f8e855f43257bbe0648df76a6e2ad0c5f76"},{"author":{"_account_id":17718,"name":"Lallana","email":"gaozhiqiang2@huawei.com","username":"Lallana"},"change_message_id":"b4a2ddb08a953c82356789919ff75a0da5267d79","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                      notifier_info)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        try:"},{"line_number":96,"context_line":"            self._update(context, id, update)"},{"line_number":97,"context_line":"        except exception.VolumeNotFound as e:"},{"line_number":98,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.msg)"},{"line_number":99,"context_line":""}],"source_content_type":"text/x-python","patch_set":92,"id":"da20952f_8680ef47","line":96,"updated":"2015-08-28 09:09:10.000000000","message":"Maybe you should change \"e\" to \"err\"","commit_id":"21bc0537e04c666f99d7ee0d5eca6fcb5e589523"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"c15a355027a1a6d93f74a4f37a759354663cd7a4","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                      notifier_info)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        try:"},{"line_number":96,"context_line":"            self._update(context, id, update)"},{"line_number":97,"context_line":"        except exception.VolumeNotFound as e:"},{"line_number":98,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.msg)"},{"line_number":99,"context_line":""}],"source_content_type":"text/x-python","patch_set":92,"id":"da20952f_9ebc9907","line":96,"in_reply_to":"da20952f_431073a8","updated":"2015-08-28 19:27:29.000000000","message":"Yes, this is not introduced by this patch.","commit_id":"21bc0537e04c666f99d7ee0d5eca6fcb5e589523"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"637a796e7d4bfceebf3c3b93305e51b731dce2e2","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                      notifier_info)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        try:"},{"line_number":96,"context_line":"            self._update(context, id, update)"},{"line_number":97,"context_line":"        except exception.VolumeNotFound as e:"},{"line_number":98,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.msg)"},{"line_number":99,"context_line":""}],"source_content_type":"text/x-python","patch_set":92,"id":"da20952f_431073a8","line":96,"in_reply_to":"da20952f_8680ef47","updated":"2015-08-28 16:04:38.000000000","message":"This is not related to this change.","commit_id":"21bc0537e04c666f99d7ee0d5eca6fcb5e589523"}],"cinder/api/contrib/volume_actions.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            msg \u003d _(\"Invalid request to attach volume to an invalid target\")"},{"line_number":111,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        if mode not in (\u0027rw\u0027, \u0027ro\u0027):"},{"line_number":114,"context_line":"            msg \u003d _(\"Invalid request to attach volume with an invalid mode. \""},{"line_number":115,"context_line":"                    \"Attaching mode should be \u0027rw\u0027 or \u0027ro\u0027\")"},{"line_number":116,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_7e666952","line":113,"updated":"2015-08-25 19:01:43.000000000","message":"?: Shouldn\u0027t all these changes be in a different patch?","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"b2f474f6f9f31107b04aa323f1ed2f119e30a657","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            msg \u003d _(\"Invalid request to attach volume to an invalid target\")"},{"line_number":111,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        if mode not in (\u0027rw\u0027, \u0027ro\u0027):"},{"line_number":114,"context_line":"            msg \u003d _(\"Invalid request to attach volume with an invalid mode. \""},{"line_number":115,"context_line":"                    \"Attaching mode should be \u0027rw\u0027 or \u0027ro\u0027\")"},{"line_number":116,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_cd04867f","line":113,"in_reply_to":"fa1b9901_7e666952","updated":"2015-08-26 07:56:33.000000000","message":"I will go to you for the proper exceptions with a new patch.","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":118,"context_line":"            self.volume_api.attach(context, volume,"},{"line_number":119,"context_line":"                                   instance_uuid, host_name, mountpoint, mode)"},{"line_number":120,"context_line":"        except exception.InvalidVolume as error:"},{"line_number":121,"context_line":"            raise webob.exc.HTTPServiceUnavailable(explanation\u003derror.msg)"},{"line_number":122,"context_line":"        except messaging.RemoteError as error:"},{"line_number":123,"context_line":"            if error.exc_type in [\u0027InvalidVolume\u0027, \u0027InvalidUUID\u0027,"},{"line_number":124,"context_line":"                                  \u0027InvalidVolumeAttachMode\u0027]:"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_7e950931","line":121,"updated":"2015-08-25 19:01:43.000000000","message":"-1: Wrong exception to raise","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        try:"},{"line_number":150,"context_line":"            self.volume_api.detach(context, volume, attachment_id)"},{"line_number":151,"context_line":"        except exception.InvalidVolume as error:"},{"line_number":152,"context_line":"            raise webob.exc.HTTPServiceUnavailable(explanation\u003derror.msg)"},{"line_number":153,"context_line":"        except messaging.RemoteError as error:"},{"line_number":154,"context_line":"            if error.exc_type in [\u0027VolumeAttachmentNotFound\u0027, \u0027InvalidVolume\u0027]:"},{"line_number":155,"context_line":"                msg \u003d \"Error detaching volume - %(err_type)s: %(err_msg)s\" % \\"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_dea455a7","line":152,"updated":"2015-08-25 19:01:43.000000000","message":"-1: Wrong exception to raise","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        except exception.VolumeNotFound as error:"},{"line_number":186,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003derror.msg)"},{"line_number":187,"context_line":"        except exception.InvalidVolume as error:"},{"line_number":188,"context_line":"            raise webob.exc.HTTPServiceUnavailable(explanation\u003derror.msg)"},{"line_number":189,"context_line":"        return webob.Response(status_int\u003d202)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    @wsgi.action(\u0027os-begin_detaching\u0027)"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_bea721a6","line":188,"updated":"2015-08-25 19:01:43.000000000","message":"-1: Wrong exception to raise","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        except exception.VolumeNotFound as error:"},{"line_number":199,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003derror.msg)"},{"line_number":200,"context_line":"        except exception.InvalidVolume as error:"},{"line_number":201,"context_line":"            raise webob.exc.HTTPServiceUnavailable(explanation\u003derror.msg)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"        return webob.Response(status_int\u003d202)"},{"line_number":204,"context_line":""}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_1ee40dde","line":201,"updated":"2015-08-25 19:01:43.000000000","message":"-1: Wrong exception to raise","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        except exception.VolumeNotFound as error:"},{"line_number":213,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003derror.msg)"},{"line_number":214,"context_line":"        except exception.InvalidVolume as error:"},{"line_number":215,"context_line":"            raise webob.exc.HTTPServiceUnavailable(explanation\u003derror.msg)"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"        return webob.Response(status_int\u003d202)"},{"line_number":218,"context_line":""}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_fec83957","line":215,"updated":"2015-08-25 19:01:43.000000000","message":"-1: Wrong exception to raise","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":240,"context_line":"            msg \u003d _(\"Unable to fetch connection information from backend.\")"},{"line_number":241,"context_line":"            raise webob.exc.HTTPInternalServerError(explanation\u003dmsg)"},{"line_number":242,"context_line":"        except exception.InvalidVolume as error:"},{"line_number":243,"context_line":"            raise webob.exc.HTTPServiceUnavailable(explanation\u003derror.msg)"},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"        return {\u0027connection_info\u0027: info}"},{"line_number":246,"context_line":""}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_9ed81d20","line":243,"updated":"2015-08-25 19:01:43.000000000","message":"-1: Wrong exception to raise","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":396,"context_line":"        try:"},{"line_number":397,"context_line":"            self.volume_api.update(context, volume, update_dict)"},{"line_number":398,"context_line":"        except exception.InvalidVolume as error:"},{"line_number":399,"context_line":"            raise webob.exc.HTTPServiceUnavailable(explanation\u003derror.message)"},{"line_number":400,"context_line":""},{"line_number":401,"context_line":"        return webob.Response(status_int\u003d200)"},{"line_number":402,"context_line":""}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_fef6f98d","line":399,"updated":"2015-08-25 19:01:43.000000000","message":"-1: Wrong exception to raise","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"}],"cinder/api/contrib/volume_image_metadata.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":133,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003derror.msg)"},{"line_number":134,"context_line":"        except exception.InvalidVolumeMetadataSize as error:"},{"line_number":135,"context_line":"            raise webob.exc.HTTPRequestEntityTooLarge(explanation\u003derror.msg)"},{"line_number":136,"context_line":"        except exception.InvalidVolume as error:"},{"line_number":137,"context_line":"            raise webob.exc.HTTPServiceUnavailable(explanation\u003derror.msg)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    @wsgi.action(\"os-unset_image_metadata\")"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_de78d5c6","line":136,"updated":"2015-08-25 19:01:43.000000000","message":"?: Shouldn\u0027t these changes be in another patch?","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        except exception.InvalidVolumeMetadataSize as error:"},{"line_number":135,"context_line":"            raise webob.exc.HTTPRequestEntityTooLarge(explanation\u003derror.msg)"},{"line_number":136,"context_line":"        except exception.InvalidVolume as error:"},{"line_number":137,"context_line":"            raise webob.exc.HTTPServiceUnavailable(explanation\u003derror.msg)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    @wsgi.action(\"os-unset_image_metadata\")"},{"line_number":140,"context_line":"    def delete(self, req, id, body):"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_fe003936","line":137,"updated":"2015-08-25 19:01:43.000000000","message":"-1: This is the wrong exception to raise.","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                msg \u003d _(\u0027Volume does not exist.\u0027)"},{"line_number":165,"context_line":"                raise webob.exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":166,"context_line":"            except exception.InvalidVolume as error:"},{"line_number":167,"context_line":"                raise webob.exc.HTTPServiceUnavailable(explanation\u003derror.msg)"},{"line_number":168,"context_line":"            return webob.Response(status_int\u003d200)"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":""}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_feaef92c","line":167,"updated":"2015-08-25 19:01:43.000000000","message":"-1: This is the wrong exception to raise.","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"}],"cinder/api/contrib/volume_manage.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        new_volume \u003d dict(new_volume)"},{"line_number":147,"context_line":"        utils.add_visible_admin_metadata(new_volume)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        return self._view_builder.detail(context, req, new_volume)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"class Volume_manage(extensions.ExtensionDescriptor):"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_5975bf95","line":149,"updated":"2015-08-25 19:01:43.000000000","message":"-1: No need to pass `context` since it\u0027s already in `req`","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"}],"cinder/api/v2/snapshots.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":195,"context_line":"                    snapshot.get(\u0027description\u0027),"},{"line_number":196,"context_line":"                    **kwargs)"},{"line_number":197,"context_line":"        except exception.InvalidVolume as error:"},{"line_number":198,"context_line":"            raise webob.exc.HTTPServiceUnavailable(explanation\u003derror.msg)"},{"line_number":199,"context_line":"        req.cache_db_snapshot(new_snapshot)"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"        return self._view_builder.detail(req, new_snapshot)"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_397ecb6a","line":198,"updated":"2015-08-25 19:01:43.000000000","message":"-1: Wrong exception to raise","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"}],"cinder/api/v2/views/volumes.py":[{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"45a5b6947c4d3b88d155115505f5c7de8407f452","unresolved":false,"context_lines":[{"line_number":41,"context_line":"                               volume_count,"},{"line_number":42,"context_line":"                               coll_name\u003dself._collection_name + \u0027/detail\u0027)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def summary(self, request, volume, admin):"},{"line_number":45,"context_line":"        \"\"\"Generic, non-detailed view of an volume.\"\"\""},{"line_number":46,"context_line":"        return {"},{"line_number":47,"context_line":"            \u0027volume\u0027: {"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba3cc151_c15d6716","line":44,"updated":"2015-07-07 21:48:39.000000000","message":"Feel like I am missing something here.  Why is admin being added here when it doesn\u0027t look like it is used?","commit_id":"9bbf36ecbd208317a4e6b038c513e0fd9afdce24"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"45a5b6947c4d3b88d155115505f5c7de8407f452","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        else:"},{"line_number":123,"context_line":"            return volume[\u0027volume_type_id\u0027]"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    def _list_view(self, func, request, volumes, admin, volume_count,"},{"line_number":126,"context_line":"                   coll_name\u003d_collection_name):"},{"line_number":127,"context_line":"        \"\"\"Provide a view for a list of volumes."},{"line_number":128,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"ba3cc151_217c5371","line":125,"updated":"2015-07-07 21:48:39.000000000","message":"Is adding \u0027admin\u0027 to all these functions the best way to do this?  I thought in other places in the code they used the context to figure out if the user is admin.\n\nAh, I see in the next file that that is what you are passing in.  Wonder if it would be clearer and more useful for the future to just pass the context?","commit_id":"9bbf36ecbd208317a4e6b038c513e0fd9afdce24"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"81eee6f2034cef5fbbb6795723304525265c2281","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                \u0027encrypted\u0027: self._is_volume_encrypted(volume),"},{"line_number":75,"context_line":"                \u0027replication_status\u0027: volume.get(\u0027replication_status\u0027),"},{"line_number":76,"context_line":"                \u0027consistencygroup_id\u0027: volume.get(\u0027consistencygroup_id\u0027),"},{"line_number":77,"context_line":"                \u0027multiattach\u0027: volume.get(\u0027multiattach\u0027)"},{"line_number":78,"context_line":"            }"},{"line_number":79,"context_line":"        }"},{"line_number":80,"context_line":"        if context.is_admin:"}],"source_content_type":"text/x-python","patch_set":34,"id":"9a41bdd9_2831abec","line":77,"updated":"2015-07-14 02:44:03.000000000","message":"please add a trailing comma here.","commit_id":"84aa0bc6f3695ad3ed1656f554af356e59c1d565"},{"author":{"_account_id":16883,"name":"huyang","email":"huyang1@huawei.com","username":"huyang"},"change_message_id":"dff0cc07f9d6889fdc96972c2017f0707f35d2e9","unresolved":false,"context_lines":[{"line_number":78,"context_line":"            }"},{"line_number":79,"context_line":"        }"},{"line_number":80,"context_line":"        if context.is_admin:"},{"line_number":81,"context_line":"            volume_ref[\u0027volume\u0027][\u0027migration_status\u0027] \u003d\\"},{"line_number":82,"context_line":"                volume.get(\u0027migration_status\u0027)"},{"line_number":83,"context_line":"        return volume_ref"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":34,"id":"9a41bdd9_4a1e900d","line":81,"updated":"2015-07-13 11:22:54.000000000","message":"use () instead of \\","commit_id":"84aa0bc6f3695ad3ed1656f554af356e59c1d565"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"8a6f447d93a214622a76f285b96ab3bde0357000","unresolved":false,"context_lines":[{"line_number":52,"context_line":"            },"},{"line_number":53,"context_line":"        }"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def detail(self, request, volume, context):"},{"line_number":56,"context_line":"        \"\"\"Detailed view of a single volume.\"\"\""},{"line_number":57,"context_line":"        volume_ref \u003d {"},{"line_number":58,"context_line":"            \u0027volume\u0027: {"}],"source_content_type":"text/x-python","patch_set":40,"id":"3a50d1a3_8217ccec","line":55,"updated":"2015-07-20 06:50:20.000000000","message":"I feel it\u0027s better that context is at second argument. Keep consistent with other functions.","commit_id":"0021a88a92d7f29b041d0ac2f9591d424c536641"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"f1b0f7deff83c403e572b6f9f3e4814783fae5c9","unresolved":false,"context_lines":[{"line_number":52,"context_line":"            },"},{"line_number":53,"context_line":"        }"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def detail(self, request, volume, context):"},{"line_number":56,"context_line":"        \"\"\"Detailed view of a single volume.\"\"\""},{"line_number":57,"context_line":"        volume_ref \u003d {"},{"line_number":58,"context_line":"            \u0027volume\u0027: {"}],"source_content_type":"text/x-python","patch_set":40,"id":"3a50d1a3_7b59d859","line":55,"in_reply_to":"3a50d1a3_8217ccec","updated":"2015-07-21 02:46:08.000000000","message":"Done","commit_id":"0021a88a92d7f29b041d0ac2f9591d424c536641"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"9ee2feb7c3b3bb64b5e8bd6241acdf215a9c7393","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def summary_list(self, request, volumes, volume_count):"},{"line_number":34,"context_line":"        \"\"\"Show a list of volumes without many details.\"\"\""},{"line_number":35,"context_line":"        return self._list_summary_view(self.summary, request, volumes,"},{"line_number":36,"context_line":"                                       volume_count)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def detail_list(self, context, request, volumes, volume_count):"}],"source_content_type":"text/x-python","patch_set":47,"id":"3a50d1a3_c958bb33","line":35,"updated":"2015-07-23 16:04:14.000000000","message":"There is no need to add an extra layer just to differantiate summery and detail list.\nYou can add context to _list_view() and simply ignore that argument in \u0027func\u0027.","commit_id":"7e3816d11809136aac6cdab26612ee2f070b969a"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"175e3ed39bd04d5d66710cf4736f6ef754cb8009","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def summary_list(self, request, volumes, volume_count):"},{"line_number":34,"context_line":"        \"\"\"Show a list of volumes without many details.\"\"\""},{"line_number":35,"context_line":"        return self._list_summary_view(self.summary, request, volumes,"},{"line_number":36,"context_line":"                                       volume_count)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def detail_list(self, context, request, volumes, volume_count):"}],"source_content_type":"text/x-python","patch_set":47,"id":"3a50d1a3_617adbbe","line":35,"in_reply_to":"3a50d1a3_c958bb33","updated":"2015-07-23 17:23:45.000000000","message":"OK. Thx.","commit_id":"7e3816d11809136aac6cdab26612ee2f070b969a"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"9ee2feb7c3b3bb64b5e8bd6241acdf215a9c7393","unresolved":false,"context_lines":[{"line_number":41,"context_line":"                                      volume_count,"},{"line_number":42,"context_line":"                                      self._collection_name + \u0027/detail\u0027)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def summary(self, request, volume):"},{"line_number":45,"context_line":"        \"\"\"Generic, non-detailed view of an volume.\"\"\""},{"line_number":46,"context_line":"        return {"},{"line_number":47,"context_line":"            \u0027volume\u0027: {"}],"source_content_type":"text/x-python","patch_set":47,"id":"3a50d1a3_69440749","line":44,"updated":"2015-07-23 16:04:14.000000000","message":"change this to:\n    def summary(context, self, request, volume):","commit_id":"7e3816d11809136aac6cdab26612ee2f070b969a"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"175e3ed39bd04d5d66710cf4736f6ef754cb8009","unresolved":false,"context_lines":[{"line_number":41,"context_line":"                                      volume_count,"},{"line_number":42,"context_line":"                                      self._collection_name + \u0027/detail\u0027)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def summary(self, request, volume):"},{"line_number":45,"context_line":"        \"\"\"Generic, non-detailed view of an volume.\"\"\""},{"line_number":46,"context_line":"        return {"},{"line_number":47,"context_line":"            \u0027volume\u0027: {"}],"source_content_type":"text/x-python","patch_set":47,"id":"3a50d1a3_8175a7cb","line":44,"in_reply_to":"3a50d1a3_69440749","updated":"2015-07-23 17:23:45.000000000","message":"OK. Thx.","commit_id":"7e3816d11809136aac6cdab26612ee2f070b969a"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"9ee2feb7c3b3bb64b5e8bd6241acdf215a9c7393","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        :returns: Volume data in dictionary format"},{"line_number":153,"context_line":"        \"\"\""},{"line_number":154,"context_line":"        return self._list_view(context, func, request, volumes, volume_count,"},{"line_number":155,"context_line":"                               coll_name\u003dcoll_name)"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def _list_view(self, context, func, request, volumes, volume_count,"},{"line_number":158,"context_line":"                   coll_name\u003d_collection_name):"}],"source_content_type":"text/x-python","patch_set":47,"id":"3a50d1a3_893f13b3","line":155,"updated":"2015-07-23 16:04:14.000000000","message":"remove above two functions","commit_id":"7e3816d11809136aac6cdab26612ee2f070b969a"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"175e3ed39bd04d5d66710cf4736f6ef754cb8009","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        :returns: Volume data in dictionary format"},{"line_number":153,"context_line":"        \"\"\""},{"line_number":154,"context_line":"        return self._list_view(context, func, request, volumes, volume_count,"},{"line_number":155,"context_line":"                               coll_name\u003dcoll_name)"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def _list_view(self, context, func, request, volumes, volume_count,"},{"line_number":158,"context_line":"                   coll_name\u003d_collection_name):"}],"source_content_type":"text/x-python","patch_set":47,"id":"3a50d1a3_2180538a","line":155,"in_reply_to":"3a50d1a3_893f13b3","updated":"2015-07-23 17:23:45.000000000","message":"OK. Thx.","commit_id":"7e3816d11809136aac6cdab26612ee2f070b969a"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"9ee2feb7c3b3bb64b5e8bd6241acdf215a9c7393","unresolved":false,"context_lines":[{"line_number":172,"context_line":"                            for volume in volumes]"},{"line_number":173,"context_line":"        else:"},{"line_number":174,"context_line":"            volumes_list \u003d [func(request, volume)[\u0027volume\u0027]"},{"line_number":175,"context_line":"                            for volume in volumes]"},{"line_number":176,"context_line":"        volumes_links \u003d self._get_collection_links(request,"},{"line_number":177,"context_line":"                                                   volumes,"},{"line_number":178,"context_line":"                                                   coll_name,"}],"source_content_type":"text/x-python","patch_set":47,"id":"3a50d1a3_294a7f55","line":175,"updated":"2015-07-23 16:04:14.000000000","message":"above change can be simplified by:\n\n    volumes_list \u003d [func(context, request, volume)[\u0027volume\u0027]\n                    for volume in volumes]","commit_id":"7e3816d11809136aac6cdab26612ee2f070b969a"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"175e3ed39bd04d5d66710cf4736f6ef754cb8009","unresolved":false,"context_lines":[{"line_number":172,"context_line":"                            for volume in volumes]"},{"line_number":173,"context_line":"        else:"},{"line_number":174,"context_line":"            volumes_list \u003d [func(request, volume)[\u0027volume\u0027]"},{"line_number":175,"context_line":"                            for volume in volumes]"},{"line_number":176,"context_line":"        volumes_links \u003d self._get_collection_links(request,"},{"line_number":177,"context_line":"                                                   volumes,"},{"line_number":178,"context_line":"                                                   coll_name,"}],"source_content_type":"text/x-python","patch_set":47,"id":"3a50d1a3_417b1fbe","line":175,"in_reply_to":"3a50d1a3_294a7f55","updated":"2015-07-23 17:23:45.000000000","message":"OK. Thx.","commit_id":"7e3816d11809136aac6cdab26612ee2f070b969a"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":52,"context_line":"            },"},{"line_number":53,"context_line":"        }"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def detail(self, context, request, volume):"},{"line_number":56,"context_line":"        \"\"\"Detailed view of a single volume.\"\"\""},{"line_number":57,"context_line":"        volume_ref \u003d {"},{"line_number":58,"context_line":"            \u0027volume\u0027: {"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_64ea5611","line":55,"updated":"2015-08-25 19:01:43.000000000","message":"-1: No need to change signature, use request.environ[\u0027cinder.context\u0027]\n\nAnd no need to make any changes to any of the other methods in this file either.","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"b2f474f6f9f31107b04aa323f1ed2f119e30a657","unresolved":false,"context_lines":[{"line_number":52,"context_line":"            },"},{"line_number":53,"context_line":"        }"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def detail(self, context, request, volume):"},{"line_number":56,"context_line":"        \"\"\"Detailed view of a single volume.\"\"\""},{"line_number":57,"context_line":"        volume_ref \u003d {"},{"line_number":58,"context_line":"            \u0027volume\u0027: {"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_b0de493c","line":55,"in_reply_to":"fa1b9901_64ea5611","updated":"2015-08-26 07:56:33.000000000","message":"Done","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"}],"cinder/api/v2/volume_metadata.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        except exception.VolumeNotFound as error:"},{"line_number":37,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003derror.msg)"},{"line_number":38,"context_line":"        if with_volume:"},{"line_number":39,"context_line":"            return (volume, meta)"},{"line_number":40,"context_line":"        return meta"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def _get_volume_and_metadata(self, context, volume_id):"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_84f44a5b","line":39,"updated":"2015-08-25 19:01:43.000000000","message":"-1: A method should not have 2 different return types if it can be avoided.  In this case it can.\n\nYou move this code to _get_volume_and_metadata (which returns volume and metadata) and in this method you call it and only return the meta to the caller.","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"b2f474f6f9f31107b04aa323f1ed2f119e30a657","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        except exception.VolumeNotFound as error:"},{"line_number":37,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003derror.msg)"},{"line_number":38,"context_line":"        if with_volume:"},{"line_number":39,"context_line":"            return (volume, meta)"},{"line_number":40,"context_line":"        return meta"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def _get_volume_and_metadata(self, context, volume_id):"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_03efadb1","line":39,"in_reply_to":"fa1b9901_84f44a5b","updated":"2015-08-26 07:56:33.000000000","message":"Done","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            raise webob.exc.HTTPRequestEntityTooLarge(explanation\u003derror.msg)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        except exception.InvalidVolume as error:"},{"line_number":126,"context_line":"            raise webob.exc.HTTPServiceUnavailable(explanation\u003derror.msg)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    @wsgi.serializers(xml\u003dcommon.MetaItemTemplate)"},{"line_number":129,"context_line":"    def show(self, req, volume_id, id):"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_249c5e0d","line":126,"updated":"2015-08-25 19:01:43.000000000","message":"-1: Not the right exception","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        except exception.VolumeNotFound as error:"},{"line_number":157,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003derror.msg)"},{"line_number":158,"context_line":"        except exception.InvalidVolume as error:"},{"line_number":159,"context_line":"            raise webob.exc.HTTPServiceUnavailable(explanation\u003derror.msg)"},{"line_number":160,"context_line":"        return webob.Response(status_int\u003d200)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":""}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_e4b18690","line":159,"updated":"2015-08-25 19:01:43.000000000","message":"-1: Not the right exception","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6a9512a613612b7a3ae99317bae2d7072d195d9a","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            raise webob.exc.HTTPRequestEntityTooLarge(explanation\u003derror.msg)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        except exception.InvalidVolume as error:"},{"line_number":126,"context_line":"            raise webob.exc.HTTPServiceUnavailable(explanation\u003derror.msg)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    @wsgi.serializers(xml\u003dcommon.MetaItemTemplate)"},{"line_number":129,"context_line":"    def show(self, req, volume_id, id):"}],"source_content_type":"text/x-python","patch_set":88,"id":"da20952f_826d9b34","line":126,"updated":"2015-08-26 18:56:18.000000000","message":"-1: Not the right exception to raise, and you should not catch InvalidVolume, as it will be automatically translated by the middleware to the right exception.","commit_id":"2dd84009569e30b56abdb8c015fe132206005ce8"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"61aa3acc7b1d79c0a1292a8a352a4627dd30338d","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            raise webob.exc.HTTPRequestEntityTooLarge(explanation\u003derror.msg)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        except exception.InvalidVolume as error:"},{"line_number":126,"context_line":"            raise webob.exc.HTTPServiceUnavailable(explanation\u003derror.msg)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    @wsgi.serializers(xml\u003dcommon.MetaItemTemplate)"},{"line_number":129,"context_line":"    def show(self, req, volume_id, id):"}],"source_content_type":"text/x-python","patch_set":88,"id":"da20952f_bc1d5711","line":126,"in_reply_to":"da20952f_826d9b34","updated":"2015-08-27 03:23:41.000000000","message":"Missed this one.","commit_id":"2dd84009569e30b56abdb8c015fe132206005ce8"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6a9512a613612b7a3ae99317bae2d7072d195d9a","unresolved":false,"context_lines":[{"line_number":155,"context_line":"                meta_type\u003dcommon.METADATA_TYPES.user)"},{"line_number":156,"context_line":"        except exception.VolumeNotFound as error:"},{"line_number":157,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003derror.msg)"},{"line_number":158,"context_line":"        except exception.InvalidVolume as error:"},{"line_number":159,"context_line":"            raise webob.exc.HTTPServiceUnavailable(explanation\u003derror.msg)"},{"line_number":160,"context_line":"        return webob.Response(status_int\u003d200)"},{"line_number":161,"context_line":""}],"source_content_type":"text/x-python","patch_set":88,"id":"da20952f_22c12fe5","line":158,"updated":"2015-08-26 18:56:18.000000000","message":"-1: Same as above","commit_id":"2dd84009569e30b56abdb8c015fe132206005ce8"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"61aa3acc7b1d79c0a1292a8a352a4627dd30338d","unresolved":false,"context_lines":[{"line_number":155,"context_line":"                meta_type\u003dcommon.METADATA_TYPES.user)"},{"line_number":156,"context_line":"        except exception.VolumeNotFound as error:"},{"line_number":157,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003derror.msg)"},{"line_number":158,"context_line":"        except exception.InvalidVolume as error:"},{"line_number":159,"context_line":"            raise webob.exc.HTTPServiceUnavailable(explanation\u003derror.msg)"},{"line_number":160,"context_line":"        return webob.Response(status_int\u003d200)"},{"line_number":161,"context_line":""}],"source_content_type":"text/x-python","patch_set":88,"id":"da20952f_0420a59a","line":158,"in_reply_to":"da20952f_22c12fe5","updated":"2015-08-27 03:23:41.000000000","message":"y","commit_id":"2dd84009569e30b56abdb8c015fe132206005ce8"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"c9025a3d39fcaa3f3383b4adca42fdff48c33a71","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        except exception.InvalidVolumeMetadataSize as error:"},{"line_number":123,"context_line":"            raise webob.exc.HTTPRequestEntityTooLarge(explanation\u003derror.msg)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    @wsgi.serializers(xml\u003dcommon.MetaItemTemplate)"},{"line_number":126,"context_line":"    def show(self, req, volume_id, id):"},{"line_number":127,"context_line":"        \"\"\"Return a single metadata item.\"\"\""}],"source_content_type":"text/x-python","patch_set":90,"id":"da20952f_7ed46046","line":124,"updated":"2015-08-27 19:57:22.000000000","message":"Was Gorka\u0027s comment really to remove the exception here or that the HTTPServiceUnavailable  was the wrong exception to raise.  That is how I read his comment.","commit_id":"dcca5f8e855f43257bbe0648df76a6e2ad0c5f76"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"f7811b43ab3d899c1fc8fe8c40fef43c5d754d9b","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        except exception.InvalidVolumeMetadataSize as error:"},{"line_number":123,"context_line":"            raise webob.exc.HTTPRequestEntityTooLarge(explanation\u003derror.msg)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    @wsgi.serializers(xml\u003dcommon.MetaItemTemplate)"},{"line_number":126,"context_line":"    def show(self, req, volume_id, id):"},{"line_number":127,"context_line":"        \"\"\"Return a single metadata item.\"\"\""}],"source_content_type":"text/x-python","patch_set":90,"id":"da20952f_3b626cae","line":124,"in_reply_to":"da20952f_7ed46046","updated":"2015-08-28 01:53:06.000000000","message":"It is automatically transformed by middleware.\nThank you for reminding me. I will meet Gorka for sure for this issue.","commit_id":"dcca5f8e855f43257bbe0648df76a6e2ad0c5f76"}],"cinder/api/v2/volumes.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":210,"context_line":"            msg \u003d _(\"Volume cannot be deleted while in attached state\")"},{"line_number":211,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":212,"context_line":"        except exception.InvalidVolume as error:"},{"line_number":213,"context_line":"            raise exc.HTTPServiceUnavailable(explanation\u003derror.msg)"},{"line_number":214,"context_line":"        return webob.Response(status_int\u003d202)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    @wsgi.serializers(xml\u003dVolumesTemplate)"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_446f12fc","line":213,"updated":"2015-08-25 19:01:43.000000000","message":"-1: Not the right exception","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":486,"context_line":"        except exception.VolumeNotFound as error:"},{"line_number":487,"context_line":"            raise exc.HTTPNotFound(explanation\u003derror.msg)"},{"line_number":488,"context_line":"        except exception.InvalidVolume as error:"},{"line_number":489,"context_line":"            raise webob.exc.HTTPServiceUnavailable(explanation\u003derror.message)"},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"        volume.update(update_dict)"},{"line_number":492,"context_line":""}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_4446327c","line":489,"updated":"2015-08-25 19:01:43.000000000","message":"-1: Not the right exception","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"}],"cinder/scheduler/manager.py":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"b7513ebe33f8487275141430987c2bec8a479aac","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        volume_rpcapi.VolumeAPI().publish_service_capabilities(context)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def _get_original_status(self, volume_ref):"},{"line_number":154,"context_line":"        if (volume_ref[\u0027volume_attachment\u0027] is None or"},{"line_number":155,"context_line":"                len(volume_ref[\u0027volume_attachment\u0027]) \u003d\u003d 0):"},{"line_number":156,"context_line":"            return \u0027available\u0027"},{"line_number":157,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":40,"id":"3a50d1a3_8a6350b1","line":154,"updated":"2015-07-20 14:30:35.000000000","message":"Could be reduced to just:\n\nif volume_ref[\u0027volume_attachment\u0027]:\n    return \u0027in-use\u0027\nreturn \u0027available\u0027","commit_id":"0021a88a92d7f29b041d0ac2f9591d424c536641"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"f1b0f7deff83c403e572b6f9f3e4814783fae5c9","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        volume_rpcapi.VolumeAPI().publish_service_capabilities(context)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def _get_original_status(self, volume_ref):"},{"line_number":154,"context_line":"        if (volume_ref[\u0027volume_attachment\u0027] is None or"},{"line_number":155,"context_line":"                len(volume_ref[\u0027volume_attachment\u0027]) \u003d\u003d 0):"},{"line_number":156,"context_line":"            return \u0027available\u0027"},{"line_number":157,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":40,"id":"3a50d1a3_3b191089","line":154,"in_reply_to":"3a50d1a3_8a6350b1","updated":"2015-07-21 02:46:08.000000000","message":"Done","commit_id":"0021a88a92d7f29b041d0ac2f9591d424c536641"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"cb3ec0cd2888aaa966ac5b43e17343658cf11415","unresolved":false,"context_lines":[{"line_number":150,"context_line":"    def request_service_capabilities(self, context):"},{"line_number":151,"context_line":"        volume_rpcapi.VolumeAPI().publish_service_capabilities(context)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def _get_original_status(self, volume_ref):"},{"line_number":154,"context_line":"        if volume_ref[\u0027volume_attachment\u0027]:"},{"line_number":155,"context_line":"            return \u0027in-use\u0027"},{"line_number":156,"context_line":"        return \u0027available\u0027"}],"source_content_type":"text/x-python","patch_set":42,"id":"3a50d1a3_399a4d64","line":153,"updated":"2015-07-21 18:01:32.000000000","message":"I added a \"previous_status\" column in the volumes table because I need to know the original status of the volume before the backup starts.\n\nhttps://review.openstack.org/#/c/193937/24/cinder/db/sqlalchemy/models.py\n\nYou can use that if my patch gets merged first.  Otherwise, you can change this later to use that column.","commit_id":"c358fc295b770673be9b89c38ba2544b1b6e4077"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"f77677c5a18caabf7182ef720ed99cf1620bd4b7","unresolved":false,"context_lines":[{"line_number":150,"context_line":"    def request_service_capabilities(self, context):"},{"line_number":151,"context_line":"        volume_rpcapi.VolumeAPI().publish_service_capabilities(context)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def _get_original_status(self, volume_ref):"},{"line_number":154,"context_line":"        if volume_ref[\u0027volume_attachment\u0027]:"},{"line_number":155,"context_line":"            return \u0027in-use\u0027"},{"line_number":156,"context_line":"        return \u0027available\u0027"}],"source_content_type":"text/x-python","patch_set":42,"id":"3a50d1a3_a9911af3","line":153,"in_reply_to":"3a50d1a3_399a4d64","updated":"2015-07-22 05:04:44.000000000","message":"Nice. that patch is neat.","commit_id":"c358fc295b770673be9b89c38ba2544b1b6e4077"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"3233c88450aca45a2de27856ab6fac04426e3a1f","unresolved":false,"context_lines":[{"line_number":167,"context_line":"                    previous_status \u003d volume_ref[\u0027status\u0027]"},{"line_number":168,"context_line":"                volume_state \u003d {\u0027volume_state\u0027: {\u0027migration_status\u0027: \u0027error\u0027,"},{"line_number":169,"context_line":"                                                 \u0027status\u0027: previous_status,"},{"line_number":170,"context_line":"                                                 \u0027previous_status\u0027:"},{"line_number":171,"context_line":"                                                 \u0027error_maintenance\u0027}}"},{"line_number":172,"context_line":"            else:"},{"line_number":173,"context_line":"                volume_state \u003d {\u0027volume_state\u0027: {\u0027migration_status\u0027: \u0027error\u0027,"}],"source_content_type":"text/x-python","patch_set":48,"id":"3a50d1a3_4f01af05","line":170,"updated":"2015-07-26 23:07:23.000000000","message":"I don\u0027t remember this being discussed in the spec. I\u0027d rather leave the state of the volume as the state of the volume. I don\u0027t want retype or migration state bleeding over to the volume state. In other words, we should not be setting volume to error_maintenance, error_migrating or error_retyping. Keep in mind the spec just specifies changing the \"migration status\":\n\nhttps://github.com/openstack/cinder-specs/blob/master/specs/liberty/volume-migration-improvement.rst#proposed-change","commit_id":"5fd65381cb5a79c41b2c68228d61d076d3cd5eae"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"ecf1c53598befa42e94d4c183723c6d907bc3491","unresolved":false,"context_lines":[{"line_number":167,"context_line":"                    previous_status \u003d volume_ref[\u0027status\u0027]"},{"line_number":168,"context_line":"                volume_state \u003d {\u0027volume_state\u0027: {\u0027migration_status\u0027: \u0027error\u0027,"},{"line_number":169,"context_line":"                                                 \u0027status\u0027: previous_status,"},{"line_number":170,"context_line":"                                                 \u0027previous_status\u0027:"},{"line_number":171,"context_line":"                                                 \u0027error_maintenance\u0027}}"},{"line_number":172,"context_line":"            else:"},{"line_number":173,"context_line":"                volume_state \u003d {\u0027volume_state\u0027: {\u0027migration_status\u0027: \u0027error\u0027,"}],"source_content_type":"text/x-python","patch_set":48,"id":"3a50d1a3_bbb8b176","line":170,"in_reply_to":"3a50d1a3_4f01af05","updated":"2015-07-27 03:24:52.000000000","message":"Thank you for reminding me, Mike. It struggled me a bit about whether to get previous status involved into the error state.\nI will keep the previous status away from the error state.","commit_id":"5fd65381cb5a79c41b2c68228d61d076d3cd5eae"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"3483e79dd8fa2ce4d5d78c7a11c995ca6193380a","unresolved":false,"context_lines":[{"line_number":168,"context_line":"                volume_state \u003d {\u0027volume_state\u0027: {\u0027migration_status\u0027: \u0027error\u0027,"},{"line_number":169,"context_line":"                                                 \u0027status\u0027: previous_status,"},{"line_number":170,"context_line":"                                                 \u0027previous_status\u0027:"},{"line_number":171,"context_line":"                                                 \u0027error_maintenance\u0027}}"},{"line_number":172,"context_line":"            else:"},{"line_number":173,"context_line":"                volume_state \u003d {\u0027volume_state\u0027: {\u0027migration_status\u0027: \u0027error\u0027,"},{"line_number":174,"context_line":"                                                 \u0027previous_status\u0027:"}],"source_content_type":"text/x-python","patch_set":48,"id":"3a50d1a3_571b79ca","line":171,"updated":"2015-07-27 08:17:40.000000000","message":"What\u0027s \u0027error_maintenance\u0027?  Error trying to put a volume into \u0027maintenance\u0027 state?  It\u0027s badly named, previous status should be \u0027error_migrating\u0027 no matter the migration started with force or not.  And there is no need to pass \u0027force\u0027 flag to scheduler, you can simply check if volume[\u0027status\u0027] is \u0027maintenance\u0027 or not.","commit_id":"5fd65381cb5a79c41b2c68228d61d076d3cd5eae"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"3dba6e4e3e20ca4e9daaa75598d010f516371464","unresolved":false,"context_lines":[{"line_number":168,"context_line":"                volume_state \u003d {\u0027volume_state\u0027: {\u0027migration_status\u0027: \u0027error\u0027,"},{"line_number":169,"context_line":"                                                 \u0027status\u0027: previous_status,"},{"line_number":170,"context_line":"                                                 \u0027previous_status\u0027:"},{"line_number":171,"context_line":"                                                 \u0027error_maintenance\u0027}}"},{"line_number":172,"context_line":"            else:"},{"line_number":173,"context_line":"                volume_state \u003d {\u0027volume_state\u0027: {\u0027migration_status\u0027: \u0027error\u0027,"},{"line_number":174,"context_line":"                                                 \u0027previous_status\u0027:"}],"source_content_type":"text/x-python","patch_set":48,"id":"3a50d1a3_2ca8b88b","line":171,"in_reply_to":"3a50d1a3_571b79ca","updated":"2015-07-27 23:36:33.000000000","message":"I will not bother the previous volume status configuration for the error state following the comment from mike.","commit_id":"5fd65381cb5a79c41b2c68228d61d076d3cd5eae"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"1aea553ba6035dcda5c34527334080ba89bcc1ae","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        self._wait_for_scheduler()"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        def _migrate_volume_set_error(self, context, ex, request_spec,"},{"line_number":161,"context_line":"                                      volume_id):"},{"line_number":162,"context_line":"            volume_ref \u003d db.volume_get(context, volume_id)"},{"line_number":163,"context_line":"            volume_state \u003d None"},{"line_number":164,"context_line":"            if volume_ref[\u0027status\u0027] \u003d\u003d \u0027maintenance\u0027:"}],"source_content_type":"text/x-python","patch_set":53,"id":"3a50d1a3_8838263f","line":161,"updated":"2015-07-31 06:07:08.000000000","message":"volume_id can be extracted from request_spec, no need to add new argument to this method.","commit_id":"340365c9a6d92113b16a89ea33f0e96f469e554f"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"b14e9f7d182bb95c76b87c1831b4bb51ebec7f92","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        self._wait_for_scheduler()"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        def _migrate_volume_set_error(self, context, ex, request_spec,"},{"line_number":161,"context_line":"                                      volume_id):"},{"line_number":162,"context_line":"            volume_ref \u003d db.volume_get(context, volume_id)"},{"line_number":163,"context_line":"            volume_state \u003d None"},{"line_number":164,"context_line":"            if volume_ref[\u0027status\u0027] \u003d\u003d \u0027maintenance\u0027:"}],"source_content_type":"text/x-python","patch_set":53,"id":"3a50d1a3_3e4c9e75","line":161,"in_reply_to":"3a50d1a3_8838263f","updated":"2015-07-31 09:36:30.000000000","message":"Done","commit_id":"340365c9a6d92113b16a89ea33f0e96f469e554f"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"4e8e7d8a7bf0a3aba9cf33b48a0fd76f668a9323","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        def _migrate_volume_set_error(self, context, ex, request_spec):"},{"line_number":149,"context_line":"            volume_ref \u003d db.volume_get(context, request_spec[\u0027volume_id\u0027])"},{"line_number":150,"context_line":"            volume_state \u003d None"},{"line_number":151,"context_line":"            if volume_ref[\u0027status\u0027] \u003d\u003d \u0027maintenance\u0027:"},{"line_number":152,"context_line":"                previous_status \u003d volume_ref.get(\u0027previous_status\u0027, None)"},{"line_number":153,"context_line":"                if not previous_status:"}],"source_content_type":"text/x-python","patch_set":62,"id":"1a4dcd0f_4e8e91d1","line":150,"updated":"2015-08-10 21:05:24.000000000","message":"I don\u0027t think you need this line since volume_state gets set in both \u0027if\u0027 and \u0027else\u0027 branches below.","commit_id":"a71a55854c60050712a25316a850006c02040fd8"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"4e8e7d8a7bf0a3aba9cf33b48a0fd76f668a9323","unresolved":false,"context_lines":[{"line_number":151,"context_line":"            if volume_ref[\u0027status\u0027] \u003d\u003d \u0027maintenance\u0027:"},{"line_number":152,"context_line":"                previous_status \u003d volume_ref.get(\u0027previous_status\u0027, None)"},{"line_number":153,"context_line":"                if not previous_status:"},{"line_number":154,"context_line":"                    previous_status \u003d volume_ref[\u0027status\u0027]"},{"line_number":155,"context_line":"                volume_state \u003d {\u0027volume_state\u0027: {\u0027migration_status\u0027: \u0027error\u0027,"},{"line_number":156,"context_line":"                                                 \u0027status\u0027: previous_status}}"},{"line_number":157,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":62,"id":"1a4dcd0f_2e06a520","line":154,"updated":"2015-08-10 21:05:24.000000000","message":"Couldn\u0027t you just do:\n\n   if volume_ref[\u0027status\u0027] \u003d\u003d \u0027maintenance\u0027:\n      previous_status \u003d volume_ref.get(\u0027previous_status\u0027) or \u0027maintenance\u0027\n\nand skip lines 153 and 154?  I think the logic is equivalent.","commit_id":"a71a55854c60050712a25316a850006c02040fd8"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"4e8e7d8a7bf0a3aba9cf33b48a0fd76f668a9323","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                QUOTAS.rollback(context, reservations)"},{"line_number":195,"context_line":"            previous_status \u003d volume_ref.get(\u0027previous_status\u0027, None)"},{"line_number":196,"context_line":"            if not previous_status:"},{"line_number":197,"context_line":"                previous_status \u003d volume_ref[\u0027status\u0027]"},{"line_number":198,"context_line":"            volume_state \u003d {\u0027volume_state\u0027: {\u0027status\u0027: previous_status}}"},{"line_number":199,"context_line":"            self._set_volume_state_and_notify(\u0027retype\u0027, volume_state,"},{"line_number":200,"context_line":"                                              context, ex, request_spec, msg)"}],"source_content_type":"text/x-python","patch_set":62,"id":"1a4dcd0f_f94f2568","line":197,"updated":"2015-08-10 21:05:24.000000000","message":"And here I think you can simplifiy to:\n\n   previous_status \u003d volume_ref.get(\u0027previous_status\u0027) or volume_ref[\u0027status\u0027]","commit_id":"a71a55854c60050712a25316a850006c02040fd8"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        self._wait_for_scheduler()"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        def _migrate_volume_set_error(self, context, ex, request_spec):"},{"line_number":149,"context_line":"            volume_ref \u003d db.volume_get(context, request_spec[\u0027volume_id\u0027])"},{"line_number":150,"context_line":"            if volume_ref[\u0027status\u0027] \u003d\u003d \u0027maintenance\u0027:"},{"line_number":151,"context_line":"                previous_status \u003d ("},{"line_number":152,"context_line":"                    volume_ref.get(\u0027previous_status\u0027) or \u0027maintenance\u0027)"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_b1318fef","line":149,"updated":"2015-08-25 19:01:43.000000000","message":"nit: This is a volume ORM object, it should be called volume, not volume_ref.","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"b2f474f6f9f31107b04aa323f1ed2f119e30a657","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        self._wait_for_scheduler()"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        def _migrate_volume_set_error(self, context, ex, request_spec):"},{"line_number":149,"context_line":"            volume_ref \u003d db.volume_get(context, request_spec[\u0027volume_id\u0027])"},{"line_number":150,"context_line":"            if volume_ref[\u0027status\u0027] \u003d\u003d \u0027maintenance\u0027:"},{"line_number":151,"context_line":"                previous_status \u003d ("},{"line_number":152,"context_line":"                    volume_ref.get(\u0027previous_status\u0027) or \u0027maintenance\u0027)"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_5571e20a","line":149,"in_reply_to":"fa1b9901_b1318fef","updated":"2015-08-26 07:56:33.000000000","message":"OK.","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        def _migrate_volume_set_error(self, context, ex, request_spec):"},{"line_number":149,"context_line":"            volume_ref \u003d db.volume_get(context, request_spec[\u0027volume_id\u0027])"},{"line_number":150,"context_line":"            if volume_ref[\u0027status\u0027] \u003d\u003d \u0027maintenance\u0027:"},{"line_number":151,"context_line":"                previous_status \u003d ("},{"line_number":152,"context_line":"                    volume_ref.get(\u0027previous_status\u0027) or \u0027maintenance\u0027)"},{"line_number":153,"context_line":"                volume_state \u003d {\u0027volume_state\u0027: {\u0027migration_status\u0027: \u0027error\u0027,"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_d1452343","line":150,"updated":"2015-08-25 19:01:43.000000000","message":"nit: volume_ref.status","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"b2f474f6f9f31107b04aa323f1ed2f119e30a657","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        def _migrate_volume_set_error(self, context, ex, request_spec):"},{"line_number":149,"context_line":"            volume_ref \u003d db.volume_get(context, request_spec[\u0027volume_id\u0027])"},{"line_number":150,"context_line":"            if volume_ref[\u0027status\u0027] \u003d\u003d \u0027maintenance\u0027:"},{"line_number":151,"context_line":"                previous_status \u003d ("},{"line_number":152,"context_line":"                    volume_ref.get(\u0027previous_status\u0027) or \u0027maintenance\u0027)"},{"line_number":153,"context_line":"                volume_state \u003d {\u0027volume_state\u0027: {\u0027migration_status\u0027: \u0027error\u0027,"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_f5603637","line":150,"in_reply_to":"fa1b9901_d1452343","updated":"2015-08-26 07:56:33.000000000","message":"Done","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":149,"context_line":"            volume_ref \u003d db.volume_get(context, request_spec[\u0027volume_id\u0027])"},{"line_number":150,"context_line":"            if volume_ref[\u0027status\u0027] \u003d\u003d \u0027maintenance\u0027:"},{"line_number":151,"context_line":"                previous_status \u003d ("},{"line_number":152,"context_line":"                    volume_ref.get(\u0027previous_status\u0027) or \u0027maintenance\u0027)"},{"line_number":153,"context_line":"                volume_state \u003d {\u0027volume_state\u0027: {\u0027migration_status\u0027: \u0027error\u0027,"},{"line_number":154,"context_line":"                                                 \u0027status\u0027: previous_status}}"},{"line_number":155,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_91880b73","line":152,"updated":"2015-08-25 19:01:43.000000000","message":"nit: volume_ref.previous_status or \u0027maintenance\u0027","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"b2f474f6f9f31107b04aa323f1ed2f119e30a657","unresolved":false,"context_lines":[{"line_number":149,"context_line":"            volume_ref \u003d db.volume_get(context, request_spec[\u0027volume_id\u0027])"},{"line_number":150,"context_line":"            if volume_ref[\u0027status\u0027] \u003d\u003d \u0027maintenance\u0027:"},{"line_number":151,"context_line":"                previous_status \u003d ("},{"line_number":152,"context_line":"                    volume_ref.get(\u0027previous_status\u0027) or \u0027maintenance\u0027)"},{"line_number":153,"context_line":"                volume_state \u003d {\u0027volume_state\u0027: {\u0027migration_status\u0027: \u0027error\u0027,"},{"line_number":154,"context_line":"                                                 \u0027status\u0027: previous_status}}"},{"line_number":155,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_15660a51","line":152,"in_reply_to":"fa1b9901_91880b73","updated":"2015-08-26 07:56:33.000000000","message":"Done","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":191,"context_line":"            if reservations:"},{"line_number":192,"context_line":"                QUOTAS.rollback(context, reservations)"},{"line_number":193,"context_line":"            previous_status \u003d ("},{"line_number":194,"context_line":"                volume_ref.get(\u0027previous_status\u0027) or volume_ref[\u0027status\u0027])"},{"line_number":195,"context_line":"            volume_state \u003d {\u0027volume_state\u0027: {\u0027status\u0027: previous_status}}"},{"line_number":196,"context_line":"            self._set_volume_state_and_notify(\u0027retype\u0027, volume_state,"},{"line_number":197,"context_line":"                                              context, ex, request_spec, msg)"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_71d4571f","line":194,"updated":"2015-08-25 19:01:43.000000000","message":"nit: volume_ref.previous_status or volume_ref[\u0027status\u0027]","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"b2f474f6f9f31107b04aa323f1ed2f119e30a657","unresolved":false,"context_lines":[{"line_number":191,"context_line":"            if reservations:"},{"line_number":192,"context_line":"                QUOTAS.rollback(context, reservations)"},{"line_number":193,"context_line":"            previous_status \u003d ("},{"line_number":194,"context_line":"                volume_ref.get(\u0027previous_status\u0027) or volume_ref[\u0027status\u0027])"},{"line_number":195,"context_line":"            volume_state \u003d {\u0027volume_state\u0027: {\u0027status\u0027: previous_status}}"},{"line_number":196,"context_line":"            self._set_volume_state_and_notify(\u0027retype\u0027, volume_state,"},{"line_number":197,"context_line":"                                              context, ex, request_spec, msg)"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_b5563e5c","line":194,"in_reply_to":"fa1b9901_71d4571f","updated":"2015-08-26 07:56:33.000000000","message":"Done","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"}],"cinder/scheduler/rpcapi.py":[{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"3483e79dd8fa2ce4d5d78c7a11c995ca6193380a","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                          filter_properties\u003dfilter_properties)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def migrate_volume_to_host(self, ctxt, topic, volume_id, host,"},{"line_number":87,"context_line":"                               force_host_copy\u003dFalse, force\u003dFalse,"},{"line_number":88,"context_line":"                               request_spec\u003dNone,"},{"line_number":89,"context_line":"                               filter_properties\u003dNone):"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":48,"id":"3a50d1a3_1715f199","line":87,"updated":"2015-07-27 08:17:40.000000000","message":"this change is not needed.","commit_id":"5fd65381cb5a79c41b2c68228d61d076d3cd5eae"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"3dba6e4e3e20ca4e9daaa75598d010f516371464","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                          filter_properties\u003dfilter_properties)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def migrate_volume_to_host(self, ctxt, topic, volume_id, host,"},{"line_number":87,"context_line":"                               force_host_copy\u003dFalse, force\u003dFalse,"},{"line_number":88,"context_line":"                               request_spec\u003dNone,"},{"line_number":89,"context_line":"                               filter_properties\u003dNone):"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":48,"id":"3a50d1a3_2c23d859","line":87,"in_reply_to":"3a50d1a3_1715f199","updated":"2015-07-27 23:36:33.000000000","message":"Oh? Will double check.","commit_id":"5fd65381cb5a79c41b2c68228d61d076d3cd5eae"}],"cinder/tests/unit/api/v2/test_volumes.py":[{"author":{"_account_id":10058,"name":"Erlon R. Cruz","email":"erlon.rodrigues.cruz@canonical.com","username":"sombrafam"},"change_message_id":"b0ed86ef728b0aaee35ee90a0d26fc53398a6b6f","unresolved":false,"context_lines":[{"line_number":1376,"context_line":"        req.environ[\u0027cinder.context\u0027] \u003d admin_ctx"},{"line_number":1377,"context_line":"        res_dict \u003d self.controller.show(req, \u00271\u0027)"},{"line_number":1378,"context_line":"        expected \u003d {"},{"line_number":1379,"context_line":"            \u0027migration_status\u0027: None,"},{"line_number":1380,"context_line":"            \u0027volume\u0027: {"},{"line_number":1381,"context_line":"                \u0027status\u0027: \u0027in-use\u0027,"},{"line_number":1382,"context_line":"                \u0027description\u0027: \u0027displaydesc\u0027,"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba3cc151_f2084282","line":1379,"updated":"2015-07-08 20:34:27.000000000","message":"Why this is not under \u0027volume\u0027 key?","commit_id":"9bbf36ecbd208317a4e6b038c513e0fd9afdce24"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"d27154489534c9323971b853aba6019dc29258dd","unresolved":false,"context_lines":[{"line_number":1376,"context_line":"        req.environ[\u0027cinder.context\u0027] \u003d admin_ctx"},{"line_number":1377,"context_line":"        res_dict \u003d self.controller.show(req, \u00271\u0027)"},{"line_number":1378,"context_line":"        expected \u003d {"},{"line_number":1379,"context_line":"            \u0027migration_status\u0027: None,"},{"line_number":1380,"context_line":"            \u0027volume\u0027: {"},{"line_number":1381,"context_line":"                \u0027status\u0027: \u0027in-use\u0027,"},{"line_number":1382,"context_line":"                \u0027description\u0027: \u0027displaydesc\u0027,"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba3cc151_5a50d5d4","line":1379,"in_reply_to":"ba3cc151_f2084282","updated":"2015-07-10 04:44:53.000000000","message":"good, i got a wrong position.","commit_id":"9bbf36ecbd208317a4e6b038c513e0fd9afdce24"}],"cinder/tests/unit/scheduler/test_scheduler.py":[{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"4e8e7d8a7bf0a3aba9cf33b48a0fd76f668a9323","unresolved":false,"context_lines":[{"line_number":199,"context_line":"        _mock_host_passes.assert_called_once_with(self.context, \u0027host\u0027,"},{"line_number":200,"context_line":"                                                  request_spec, {})"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"        # Test the case if the volume status is maintenance."},{"line_number":203,"context_line":"        _mock_volume_update.reset_mock()"},{"line_number":204,"context_line":"        _mock_host_passes.reset_mock()"},{"line_number":205,"context_line":"        fake_updates \u003d {\u0027status\u0027: \u0027available\u0027,"}],"source_content_type":"text/x-python","patch_set":62,"id":"1a4dcd0f_1990d194","line":202,"updated":"2015-08-10 21:05:24.000000000","message":"This should be broken out as a separate test case.","commit_id":"a71a55854c60050712a25316a850006c02040fd8"}],"cinder/tests/unit/test_volume.py":[{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"4e8e7d8a7bf0a3aba9cf33b48a0fd76f668a9323","unresolved":false,"context_lines":[{"line_number":4165,"context_line":"    def test_migrate_volume_generic_copy_error(self):"},{"line_number":4166,"context_line":"        def fake_create_volume(ctxt, volume, host, req_spec, filters,"},{"line_number":4167,"context_line":"                               allow_reschedule\u003dTrue):"},{"line_number":4168,"context_line":"            db.volume_update(ctxt, volume[\u0027id\u0027],"},{"line_number":4169,"context_line":"                             {\u0027status\u0027: \u0027available\u0027})"},{"line_number":4170,"context_line":""},{"line_number":4171,"context_line":"        with mock.patch.object(self.volume.driver, \u0027migrate_volume\u0027),\\"}],"source_content_type":"text/x-python","patch_set":62,"id":"1a4dcd0f_19f1b1cd","line":4168,"updated":"2015-08-10 21:05:24.000000000","message":"Don\u0027t you need to return a value as you did at line 4147?","commit_id":"a71a55854c60050712a25316a850006c02040fd8"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"4e8e7d8a7bf0a3aba9cf33b48a0fd76f668a9323","unresolved":false,"context_lines":[{"line_number":4271,"context_line":""},{"line_number":4272,"context_line":"        def fake_create_volume(ctxt, volume, host, req_spec, filters,"},{"line_number":4273,"context_line":"                               allow_reschedule\u003dTrue):"},{"line_number":4274,"context_line":"            db.volume_update(ctxt, volume[\u0027id\u0027],"},{"line_number":4275,"context_line":"                             {\u0027status\u0027: \u0027creating\u0027})"},{"line_number":4276,"context_line":""},{"line_number":4277,"context_line":"        with mock.patch.object(self.volume.driver, \u0027migrate_volume\u0027), \\"}],"source_content_type":"text/x-python","patch_set":62,"id":"1a4dcd0f_b9b67df7","line":4274,"updated":"2015-08-10 21:05:24.000000000","message":"return a value?","commit_id":"a71a55854c60050712a25316a850006c02040fd8"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"4e8e7d8a7bf0a3aba9cf33b48a0fd76f668a9323","unresolved":false,"context_lines":[{"line_number":4300,"context_line":"    def test_migrate_volume_generic_create_export_error(self):"},{"line_number":4301,"context_line":"        def fake_create_volume(ctxt, volume, host, req_spec, filters,"},{"line_number":4302,"context_line":"                               allow_reschedule\u003dTrue):"},{"line_number":4303,"context_line":"            db.volume_update(ctxt, volume[\u0027id\u0027],"},{"line_number":4304,"context_line":"                             {\u0027status\u0027: \u0027available\u0027})"},{"line_number":4305,"context_line":""},{"line_number":4306,"context_line":"        with mock.patch.object(self.volume.driver, \u0027migrate_volume\u0027),\\"}],"source_content_type":"text/x-python","patch_set":62,"id":"1a4dcd0f_19c8d173","line":4303,"updated":"2015-08-10 21:05:24.000000000","message":"return a value?","commit_id":"a71a55854c60050712a25316a850006c02040fd8"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"4e8e7d8a7bf0a3aba9cf33b48a0fd76f668a9323","unresolved":false,"context_lines":[{"line_number":4334,"context_line":"        def fake_create_volume(ctxt, volume, host, req_spec, filters,"},{"line_number":4335,"context_line":"                               allow_reschedule\u003dTrue):"},{"line_number":4336,"context_line":"            db.volume_update(ctxt, volume[\u0027id\u0027],"},{"line_number":4337,"context_line":"                             {\u0027status\u0027: \u0027available\u0027})"},{"line_number":4338,"context_line":""},{"line_number":4339,"context_line":"        def fake_migrate_volume_completion(ctxt, volume_id, new_volume_id,"},{"line_number":4340,"context_line":"                                           error\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":62,"id":"1a4dcd0f_b9843d0b","line":4337,"updated":"2015-08-10 21:05:24.000000000","message":"Is this identical fake_create_volume function being copied all over the place?   Is there a way to get rid of the duplicate code?   Shouldn\u0027t it always return something?","commit_id":"a71a55854c60050712a25316a850006c02040fd8"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"4e8e7d8a7bf0a3aba9cf33b48a0fd76f668a9323","unresolved":false,"context_lines":[{"line_number":4384,"context_line":"                                               status\u003dinitial_status,"},{"line_number":4385,"context_line":"                                               migration_status\u003d\u0027migrating\u0027)"},{"line_number":4386,"context_line":"        attachment_id \u003d None"},{"line_number":4387,"context_line":"        vol \u003d None"},{"line_number":4388,"context_line":"        if status \u003d\u003d \u0027in-use\u0027:"},{"line_number":4389,"context_line":"            vol \u003d tests_utils.attach_volume(self.context, old_volume[\u0027id\u0027],"},{"line_number":4390,"context_line":"                                            instance_uuid, attached_host,"}],"source_content_type":"text/x-python","patch_set":62,"id":"1a4dcd0f_19ad3188","line":4387,"updated":"2015-08-10 21:05:24.000000000","message":"This line can go away since vol is set in both the \u0027if\u0027 and \u0027else\u0027 clauses that follow.","commit_id":"a71a55854c60050712a25316a850006c02040fd8"}],"cinder/volume/api.py":[{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"0bd1598befb6b18ea98bada71b5f8c5832f142ac","unresolved":false,"context_lines":[{"line_number":1294,"context_line":"        # is changed to \u0027maintenance\u0027, telling all the accessible Users"},{"line_number":1295,"context_line":"        # that this volume is in maintenance mode, and no action is allowed"},{"line_number":1296,"context_line":"        # on this volume, e.g. attach, detach, retype, migrate, etc."},{"line_number":1297,"context_line":"        if force:"},{"line_number":1298,"context_line":"            self.update(context, volume, {\u0027migration_status\u0027: \u0027starting\u0027,"},{"line_number":1299,"context_line":"                                          \u0027status\u0027: \u0027maintenance\u0027})"},{"line_number":1300,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba3cc151_532c6298","line":1297,"updated":"2015-07-03 04:19:16.000000000","message":"There is a little confuse to me with --force flag if I don\u0027t know the explain in here. How do you feel like --maintenance flag to show this function clearly?","commit_id":"19520d2b92dd6b8aef2923cfc1bb9dfd4646ff4a"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"09d54801c36fc57d5ea6137b648d33d423d0b9c3","unresolved":false,"context_lines":[{"line_number":1294,"context_line":"        # is changed to \u0027maintenance\u0027, telling all the accessible Users"},{"line_number":1295,"context_line":"        # that this volume is in maintenance mode, and no action is allowed"},{"line_number":1296,"context_line":"        # on this volume, e.g. attach, detach, retype, migrate, etc."},{"line_number":1297,"context_line":"        if force:"},{"line_number":1298,"context_line":"            self.update(context, volume, {\u0027migration_status\u0027: \u0027starting\u0027,"},{"line_number":1299,"context_line":"                                          \u0027status\u0027: \u0027maintenance\u0027})"},{"line_number":1300,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba3cc151_6f35c8f5","line":1297,"in_reply_to":"ba3cc151_532c6298","updated":"2015-07-06 07:28:42.000000000","message":"This is the conclusion from one IRC meeting.\nThe \u0027maintenance\u0027 is just status for the volume out of service due to any kind of reasons.\nThe flag --force here is just one possibility to make it \u0027maintenance\u0027.","commit_id":"19520d2b92dd6b8aef2923cfc1bb9dfd4646ff4a"},{"author":{"_account_id":10058,"name":"Erlon R. Cruz","email":"erlon.rodrigues.cruz@canonical.com","username":"sombrafam"},"change_message_id":"b0ed86ef728b0aaee35ee90a0d26fc53398a6b6f","unresolved":false,"context_lines":[{"line_number":1218,"context_line":"                       force):"},{"line_number":1219,"context_line":"        \"\"\"Migrate the volume to the specified host.\"\"\""},{"line_number":1220,"context_line":""},{"line_number":1221,"context_line":"        # We only handle \"available\" volumes for now"},{"line_number":1222,"context_line":"        if volume[\u0027status\u0027] not in [\u0027available\u0027, \u0027in-use\u0027]:"},{"line_number":1223,"context_line":"            msg \u003d _(\u0027Volume %(vol_id)s status must be available or in-use, \u0027"},{"line_number":1224,"context_line":"                    \u0027but current status is: \u0027"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba3cc151_673d568e","line":1221,"updated":"2015-07-08 20:34:27.000000000","message":"Not directly related to this change itself, but is cinder actually handling migration of  \u0027in-use\u0027 volumes? This comment is not consistent with the code.","commit_id":"9bbf36ecbd208317a4e6b038c513e0fd9afdce24"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"d27154489534c9323971b853aba6019dc29258dd","unresolved":false,"context_lines":[{"line_number":1218,"context_line":"                       force):"},{"line_number":1219,"context_line":"        \"\"\"Migrate the volume to the specified host.\"\"\""},{"line_number":1220,"context_line":""},{"line_number":1221,"context_line":"        # We only handle \"available\" volumes for now"},{"line_number":1222,"context_line":"        if volume[\u0027status\u0027] not in [\u0027available\u0027, \u0027in-use\u0027]:"},{"line_number":1223,"context_line":"            msg \u003d _(\u0027Volume %(vol_id)s status must be available or in-use, \u0027"},{"line_number":1224,"context_line":"                    \u0027but current status is: \u0027"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba3cc151_3ae5d137","line":1221,"in_reply_to":"ba3cc151_673d568e","updated":"2015-07-10 04:44:53.000000000","message":"Done","commit_id":"9bbf36ecbd208317a4e6b038c513e0fd9afdce24"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"45a5b6947c4d3b88d155115505f5c7de8407f452","unresolved":false,"context_lines":[{"line_number":1229,"context_line":""},{"line_number":1230,"context_line":"        # Make sure volume is not part of a migration"},{"line_number":1231,"context_line":"        # None means no migration has ever done before; error means the"},{"line_number":1232,"context_line":"        # previous migration fails; success means the previous migration"},{"line_number":1233,"context_line":"        # succeeds."},{"line_number":1234,"context_line":"        if (volume[\u0027migration_status\u0027] is not None"},{"line_number":1235,"context_line":"                and volume[\u0027migration_status\u0027] not in [\u0027error\u0027, \u0027success\u0027]):"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba3cc151_21269368","line":1232,"updated":"2015-07-07 21:48:39.000000000","message":"fails -\u003e failed","commit_id":"9bbf36ecbd208317a4e6b038c513e0fd9afdce24"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"d27154489534c9323971b853aba6019dc29258dd","unresolved":false,"context_lines":[{"line_number":1229,"context_line":""},{"line_number":1230,"context_line":"        # Make sure volume is not part of a migration"},{"line_number":1231,"context_line":"        # None means no migration has ever done before; error means the"},{"line_number":1232,"context_line":"        # previous migration fails; success means the previous migration"},{"line_number":1233,"context_line":"        # succeeds."},{"line_number":1234,"context_line":"        if (volume[\u0027migration_status\u0027] is not None"},{"line_number":1235,"context_line":"                and volume[\u0027migration_status\u0027] not in [\u0027error\u0027, \u0027success\u0027]):"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba3cc151_5ae21531","line":1232,"in_reply_to":"ba3cc151_21269368","updated":"2015-07-10 04:44:53.000000000","message":"Done","commit_id":"9bbf36ecbd208317a4e6b038c513e0fd9afdce24"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"45a5b6947c4d3b88d155115505f5c7de8407f452","unresolved":false,"context_lines":[{"line_number":1230,"context_line":"        # Make sure volume is not part of a migration"},{"line_number":1231,"context_line":"        # None means no migration has ever done before; error means the"},{"line_number":1232,"context_line":"        # previous migration fails; success means the previous migration"},{"line_number":1233,"context_line":"        # succeeds."},{"line_number":1234,"context_line":"        if (volume[\u0027migration_status\u0027] is not None"},{"line_number":1235,"context_line":"                and volume[\u0027migration_status\u0027] not in [\u0027error\u0027, \u0027success\u0027]):"},{"line_number":1236,"context_line":"            msg \u003d _(\"Volume %s is already part of an active \""}],"source_content_type":"text/x-python","patch_set":28,"id":"ba3cc151_61ba5be3","line":1233,"updated":"2015-07-07 21:48:39.000000000","message":"succeeds -\u003e  succeeded","commit_id":"9bbf36ecbd208317a4e6b038c513e0fd9afdce24"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"d27154489534c9323971b853aba6019dc29258dd","unresolved":false,"context_lines":[{"line_number":1230,"context_line":"        # Make sure volume is not part of a migration"},{"line_number":1231,"context_line":"        # None means no migration has ever done before; error means the"},{"line_number":1232,"context_line":"        # previous migration fails; success means the previous migration"},{"line_number":1233,"context_line":"        # succeeds."},{"line_number":1234,"context_line":"        if (volume[\u0027migration_status\u0027] is not None"},{"line_number":1235,"context_line":"                and volume[\u0027migration_status\u0027] not in [\u0027error\u0027, \u0027success\u0027]):"},{"line_number":1236,"context_line":"            msg \u003d _(\"Volume %s is already part of an active \""}],"source_content_type":"text/x-python","patch_set":28,"id":"ba3cc151_facd29bb","line":1233,"in_reply_to":"ba3cc151_61ba5be3","updated":"2015-07-10 04:44:53.000000000","message":"Done","commit_id":"9bbf36ecbd208317a4e6b038c513e0fd9afdce24"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"45a5b6947c4d3b88d155115505f5c7de8407f452","unresolved":false,"context_lines":[{"line_number":1288,"context_line":"        # that this volume is in maintenance mode, and no action is allowed"},{"line_number":1289,"context_line":"        # on this volume, e.g. attach, detach, retype, migrate, etc."},{"line_number":1290,"context_line":"        if force:"},{"line_number":1291,"context_line":"            self.update(context, volume, {\u0027migration_status\u0027: \u0027starting\u0027,"},{"line_number":1292,"context_line":"                                          \u0027status\u0027: \u0027maintenance\u0027})"},{"line_number":1293,"context_line":"        else:"},{"line_number":1294,"context_line":"            self.update(context, volume, {\u0027migration_status\u0027: \u0027starting\u0027})"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba3cc151_e1950b40","line":1291,"updated":"2015-07-07 21:48:39.000000000","message":"Do we ever have a status other than \u0027starting\u0027?  If not, could this be \u0027in-progress\u0027 instead?","commit_id":"9bbf36ecbd208317a4e6b038c513e0fd9afdce24"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"d27154489534c9323971b853aba6019dc29258dd","unresolved":false,"context_lines":[{"line_number":1288,"context_line":"        # that this volume is in maintenance mode, and no action is allowed"},{"line_number":1289,"context_line":"        # on this volume, e.g. attach, detach, retype, migrate, etc."},{"line_number":1290,"context_line":"        if force:"},{"line_number":1291,"context_line":"            self.update(context, volume, {\u0027migration_status\u0027: \u0027starting\u0027,"},{"line_number":1292,"context_line":"                                          \u0027status\u0027: \u0027maintenance\u0027})"},{"line_number":1293,"context_line":"        else:"},{"line_number":1294,"context_line":"            self.update(context, volume, {\u0027migration_status\u0027: \u0027starting\u0027})"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba3cc151_baa241fb","line":1291,"in_reply_to":"ba3cc151_446f1efc","updated":"2015-07-10 04:44:53.000000000","message":"There are three stages for a complete migration.\nFirst, set the migration_status to starting, to start some preparation work.\nThen, set the migration_status to migrating, to do the really volume copy or sync.\nThird, set migration_status to completing, to finish the database updates, etc.\n\nI would like to say that we can stick to starting so far. \nIn-progress in not very appropriate, because three of the above stages all belong to the in-progress.","commit_id":"9bbf36ecbd208317a4e6b038c513e0fd9afdce24"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"342532e37f438f933370d36785e3cf64ee321fa5","unresolved":false,"context_lines":[{"line_number":1288,"context_line":"        # that this volume is in maintenance mode, and no action is allowed"},{"line_number":1289,"context_line":"        # on this volume, e.g. attach, detach, retype, migrate, etc."},{"line_number":1290,"context_line":"        if force:"},{"line_number":1291,"context_line":"            self.update(context, volume, {\u0027migration_status\u0027: \u0027starting\u0027,"},{"line_number":1292,"context_line":"                                          \u0027status\u0027: \u0027maintenance\u0027})"},{"line_number":1293,"context_line":"        else:"},{"line_number":1294,"context_line":"            self.update(context, volume, {\u0027migration_status\u0027: \u0027starting\u0027})"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba3cc151_446f1efc","line":1291,"in_reply_to":"ba3cc151_e1950b40","updated":"2015-07-08 02:23:30.000000000","message":"Agree with Jay, feel \u0027in-progress\u0027 is better.","commit_id":"9bbf36ecbd208317a4e6b038c513e0fd9afdce24"},{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"d46c54f1427a797876af177d2c5e7b0874d25bb5","unresolved":false,"context_lines":[{"line_number":1286,"context_line":"        # is changed to \u0027maintenance\u0027, telling all the accessible Users"},{"line_number":1287,"context_line":"        # that this volume is in maintenance mode, and no action is allowed"},{"line_number":1288,"context_line":"        # on this volume, e.g. attach, detach, retype, migrate, etc."},{"line_number":1289,"context_line":"        if force:"},{"line_number":1290,"context_line":"            self.update(context, volume, {\u0027migration_status\u0027: \u0027starting\u0027,"},{"line_number":1291,"context_line":"                                          \u0027status\u0027: \u0027maintenance\u0027})"},{"line_number":1292,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":30,"id":"ba3cc151_8d50420c","line":1289,"updated":"2015-07-10 19:08:34.000000000","message":"why would an option named force have anything to do with the status message? Why not have the admin update the status to maintenance by doing an update to the volume resource? Seems like an interesting/confusing side-effect and not very restful.","commit_id":"35e6513b95f8335f67973369667d2bd8751b0109"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"afe83ed48a496aaf3b66a273e50ced7250fcd747","unresolved":false,"context_lines":[{"line_number":1286,"context_line":"        # is changed to \u0027maintenance\u0027, telling all the accessible Users"},{"line_number":1287,"context_line":"        # that this volume is in maintenance mode, and no action is allowed"},{"line_number":1288,"context_line":"        # on this volume, e.g. attach, detach, retype, migrate, etc."},{"line_number":1289,"context_line":"        if force:"},{"line_number":1290,"context_line":"            self.update(context, volume, {\u0027migration_status\u0027: \u0027starting\u0027,"},{"line_number":1291,"context_line":"                                          \u0027status\u0027: \u0027maintenance\u0027})"},{"line_number":1292,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":30,"id":"9a41bdd9_688957ca","line":1289,"in_reply_to":"ba3cc151_8d50420c","updated":"2015-07-11 01:41:57.000000000","message":"This is a conclusion from one of the cinder meetings. If the --force flag is used or set to true, the volume status is set to \u0027maintenance\u0027 to prevent further actions on this volume during migration.\n\nThe story is like this:\nUser 1 create a volume. If the admin decides to migrate his volume due to any kind of reasons. There are two options for the admin: one is to force the migration finish without any interruptions, which is why we bring this force flag; the other option is to keep the volume service still available, which is NOT forced or to set the force false. Under this condition, the volume status is still the same as the original, like available or in-use, which means User 1 can see issue commands onto this volume, like attach/detach.","commit_id":"35e6513b95f8335f67973369667d2bd8751b0109"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"b7513ebe33f8487275141430987c2bec8a479aac","unresolved":false,"context_lines":[{"line_number":1242,"context_line":"            raise exception.InvalidVolume(reason\u003dmsg)"},{"line_number":1243,"context_line":""},{"line_number":1244,"context_line":"        # Make sure volume is not part of a migration"},{"line_number":1245,"context_line":"        # None means no migration has ever done before; error means the"},{"line_number":1246,"context_line":"        # previous migration failed; success means the previous migration"},{"line_number":1247,"context_line":"        # succeeded."},{"line_number":1248,"context_line":"        if (volume[\u0027migration_status\u0027] is not None"}],"source_content_type":"text/x-python","patch_set":40,"id":"3a50d1a3_0a1e600c","line":1245,"updated":"2015-07-20 14:30:35.000000000","message":"/ever done/ever been done/","commit_id":"0021a88a92d7f29b041d0ac2f9591d424c536641"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"f1b0f7deff83c403e572b6f9f3e4814783fae5c9","unresolved":false,"context_lines":[{"line_number":1242,"context_line":"            raise exception.InvalidVolume(reason\u003dmsg)"},{"line_number":1243,"context_line":""},{"line_number":1244,"context_line":"        # Make sure volume is not part of a migration"},{"line_number":1245,"context_line":"        # None means no migration has ever done before; error means the"},{"line_number":1246,"context_line":"        # previous migration failed; success means the previous migration"},{"line_number":1247,"context_line":"        # succeeded."},{"line_number":1248,"context_line":"        if (volume[\u0027migration_status\u0027] is not None"}],"source_content_type":"text/x-python","patch_set":40,"id":"3a50d1a3_9b54e421","line":1245,"in_reply_to":"3a50d1a3_0a1e600c","updated":"2015-07-21 02:46:08.000000000","message":"Done","commit_id":"0021a88a92d7f29b041d0ac2f9591d424c536641"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"f1b0f7deff83c403e572b6f9f3e4814783fae5c9","unresolved":false,"context_lines":[{"line_number":1242,"context_line":"            raise exception.InvalidVolume(reason\u003dmsg)"},{"line_number":1243,"context_line":""},{"line_number":1244,"context_line":"        # Make sure volume is not part of a migration"},{"line_number":1245,"context_line":"        # None means no migration has ever done before; error means the"},{"line_number":1246,"context_line":"        # previous migration failed; success means the previous migration"},{"line_number":1247,"context_line":"        # succeeded."},{"line_number":1248,"context_line":"        if (volume[\u0027migration_status\u0027] is not None"}],"source_content_type":"text/x-python","patch_set":40,"id":"3a50d1a3_bb5f6040","line":1245,"in_reply_to":"3a50d1a3_0a1e600c","updated":"2015-07-21 02:46:08.000000000","message":"Done","commit_id":"0021a88a92d7f29b041d0ac2f9591d424c536641"},{"author":{"_account_id":17405,"name":"Jacob Gregor","email":"jgregor@us.ibm.com","username":"jgregor"},"change_message_id":"ffb6e83a06e781da8afdfea823d2d99ea52df6b7","unresolved":false,"context_lines":[{"line_number":1297,"context_line":"            LOG.error(msg)"},{"line_number":1298,"context_line":"            raise exception.InvalidHost(reason\u003dmsg)"},{"line_number":1299,"context_line":""},{"line_number":1300,"context_line":"        # When the migration starts, changing the status and migration_status."},{"line_number":1301,"context_line":"        # If the admin use the --force flag or set it to True, the volume"},{"line_number":1302,"context_line":"        # status is changed to \u0027maintenance\u0027, telling the other users"},{"line_number":1303,"context_line":"        # that this volume is in maintenance mode, and no action is allowed"}],"source_content_type":"text/x-python","patch_set":42,"id":"3a50d1a3_0d64fde1","line":1300,"updated":"2015-07-21 13:51:36.000000000","message":"This line is a little confusing. What status are we changing?","commit_id":"c358fc295b770673be9b89c38ba2544b1b6e4077"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"cb3ec0cd2888aaa966ac5b43e17343658cf11415","unresolved":false,"context_lines":[{"line_number":1297,"context_line":"            LOG.error(msg)"},{"line_number":1298,"context_line":"            raise exception.InvalidHost(reason\u003dmsg)"},{"line_number":1299,"context_line":""},{"line_number":1300,"context_line":"        # When the migration starts, changing the status and migration_status."},{"line_number":1301,"context_line":"        # If the admin use the --force flag or set it to True, the volume"},{"line_number":1302,"context_line":"        # status is changed to \u0027maintenance\u0027, telling the other users"},{"line_number":1303,"context_line":"        # that this volume is in maintenance mode, and no action is allowed"}],"source_content_type":"text/x-python","patch_set":42,"id":"3a50d1a3_991cc178","line":1300,"in_reply_to":"3a50d1a3_0d64fde1","updated":"2015-07-21 18:01:32.000000000","message":"Better to clarify this, e.g., changing the status and migration_status of the volume being migrated.","commit_id":"c358fc295b770673be9b89c38ba2544b1b6e4077"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"9ee2feb7c3b3bb64b5e8bd6241acdf215a9c7393","unresolved":false,"context_lines":[{"line_number":1306,"context_line":"        if force:"},{"line_number":1307,"context_line":"            self.update(context, volume, {\u0027migration_status\u0027: \u0027starting\u0027,"},{"line_number":1308,"context_line":"                                          \u0027status\u0027: \u0027maintenance\u0027,"},{"line_number":1309,"context_line":"                                          \u0027previous_status\u0027: volume[\u0027status\u0027]})"},{"line_number":1310,"context_line":"        else:"},{"line_number":1311,"context_line":"            self.update(context, volume, {\u0027migration_status\u0027: \u0027starting\u0027,"},{"line_number":1312,"context_line":"                                          \u0027previous_status\u0027: volume[\u0027status\u0027]})"}],"source_content_type":"text/x-python","patch_set":47,"id":"3a50d1a3_a9552ffa","line":1309,"updated":"2015-07-23 16:04:14.000000000","message":"Where does this \u0027previous_status\u0027 come from?  I don\u0027t see DB schema change, this info ends up being ignore at DB layer?","commit_id":"7e3816d11809136aac6cdab26612ee2f070b969a"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"e7dde0c2e51bb8fd2618544e3a510e08158fc136","unresolved":false,"context_lines":[{"line_number":1306,"context_line":"        if force:"},{"line_number":1307,"context_line":"            self.update(context, volume, {\u0027migration_status\u0027: \u0027starting\u0027,"},{"line_number":1308,"context_line":"                                          \u0027status\u0027: \u0027maintenance\u0027,"},{"line_number":1309,"context_line":"                                          \u0027previous_status\u0027: volume[\u0027status\u0027]})"},{"line_number":1310,"context_line":"        else:"},{"line_number":1311,"context_line":"            self.update(context, volume, {\u0027migration_status\u0027: \u0027starting\u0027,"},{"line_number":1312,"context_line":"                                          \u0027previous_status\u0027: volume[\u0027status\u0027]})"}],"source_content_type":"text/x-python","patch_set":47,"id":"3a50d1a3_4f4fcb33","line":1309,"in_reply_to":"3a50d1a3_a9552ffa","updated":"2015-07-23 16:45:08.000000000","message":"Yang Xing\u0027s patch has been merged. The latest code has already had the previous status.","commit_id":"7e3816d11809136aac6cdab26612ee2f070b969a"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"3483e79dd8fa2ce4d5d78c7a11c995ca6193380a","unresolved":false,"context_lines":[{"line_number":1299,"context_line":""},{"line_number":1300,"context_line":"        # When the migration starts, both the status and the migration status"},{"line_number":1301,"context_line":"        # of the volume will be changed."},{"line_number":1302,"context_line":"        # If the admin use the --force flag or set it to True, the volume"},{"line_number":1303,"context_line":"        # status is changed to \u0027maintenance\u0027, telling the other users"},{"line_number":1304,"context_line":"        # that this volume is in maintenance mode, and no action is allowed"},{"line_number":1305,"context_line":"        # on this volume, e.g. attach, detach, retype, migrate, etc."}],"source_content_type":"text/x-python","patch_set":48,"id":"3a50d1a3_37202df7","line":1302,"updated":"2015-07-27 08:17:40.000000000","message":"s/use the --force flag or set it to True/sets force flag to True/","commit_id":"5fd65381cb5a79c41b2c68228d61d076d3cd5eae"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"3dba6e4e3e20ca4e9daaa75598d010f516371464","unresolved":false,"context_lines":[{"line_number":1299,"context_line":""},{"line_number":1300,"context_line":"        # When the migration starts, both the status and the migration status"},{"line_number":1301,"context_line":"        # of the volume will be changed."},{"line_number":1302,"context_line":"        # If the admin use the --force flag or set it to True, the volume"},{"line_number":1303,"context_line":"        # status is changed to \u0027maintenance\u0027, telling the other users"},{"line_number":1304,"context_line":"        # that this volume is in maintenance mode, and no action is allowed"},{"line_number":1305,"context_line":"        # on this volume, e.g. attach, detach, retype, migrate, etc."}],"source_content_type":"text/x-python","patch_set":48,"id":"3a50d1a3_ec4c1044","line":1302,"in_reply_to":"3a50d1a3_37202df7","updated":"2015-07-27 23:36:33.000000000","message":"Done","commit_id":"5fd65381cb5a79c41b2c68228d61d076d3cd5eae"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"4e8e7d8a7bf0a3aba9cf33b48a0fd76f668a9323","unresolved":false,"context_lines":[{"line_number":794,"context_line":"        check_policy(context, \u0027create_snapshot\u0027, volume)"},{"line_number":795,"context_line":""},{"line_number":796,"context_line":"        if (volume[\u0027migration_status\u0027] is not None"},{"line_number":797,"context_line":"                and volume[\u0027migration_status\u0027] not in [\u0027error\u0027, \u0027success\u0027]):"},{"line_number":798,"context_line":"            # Volume is migrating, wait until done"},{"line_number":799,"context_line":"            msg \u003d _(\"Snapshot cannot be created while volume is migrating.\")"},{"line_number":800,"context_line":"            raise exception.InvalidVolume(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":62,"id":"1a4dcd0f_19fc513d","line":797,"updated":"2015-08-10 21:05:24.000000000","message":"Consider making a little utility function for this test since you use several times.   It could be named \u0027volume_is_migrating\u0027 or something like that.","commit_id":"a71a55854c60050712a25316a850006c02040fd8"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"cc8b1efffc38a4febd0ee35b237aea627c7a2f6b","unresolved":false,"context_lines":[{"line_number":192,"context_line":"        else:"},{"line_number":193,"context_line":"            return False"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    def _handle_volume_maintenance(self, volume, log_msg, msg):"},{"line_number":196,"context_line":"        LOG.info(log_msg)"},{"line_number":197,"context_line":"        raise exception.InvalidVolume(reason\u003dmsg)"},{"line_number":198,"context_line":""}],"source_content_type":"text/x-python","patch_set":72,"id":"1a4dcd0f_8e4ed9c0","line":195,"updated":"2015-08-15 17:15:04.000000000","message":"Could add a log_msg_args argument to pass in formatting args through to the logger to address the comments below.","commit_id":"d20bfb41a20df8d5dd9c383c7ba83089a831caee"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"a4293ce859bd05725dfedc66e213d0bbeb98f877","unresolved":false,"context_lines":[{"line_number":192,"context_line":"        else:"},{"line_number":193,"context_line":"            return False"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    def _handle_volume_maintenance(self, volume, log_msg, msg):"},{"line_number":196,"context_line":"        LOG.info(log_msg)"},{"line_number":197,"context_line":"        raise exception.InvalidVolume(reason\u003dmsg)"},{"line_number":198,"context_line":""}],"source_content_type":"text/x-python","patch_set":72,"id":"1a4dcd0f_4c20c749","line":195,"in_reply_to":"1a4dcd0f_8e4ed9c0","updated":"2015-08-17 04:10:04.000000000","message":"It is really a trouble that I create this method for the common code.\nActually it does not save me that much, so I like to use raise exception.InvalidVolume(reason\u003dmsg) for each method checking the \u0027maintenance\u0027.","commit_id":"d20bfb41a20df8d5dd9c383c7ba83089a831caee"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"cc8b1efffc38a4febd0ee35b237aea627c7a2f6b","unresolved":false,"context_lines":[{"line_number":321,"context_line":""},{"line_number":322,"context_line":"        if volume[\u0027status\u0027] \u003d\u003d \u0027maintenance\u0027:"},{"line_number":323,"context_line":"            log_msg \u003d (_LI(\u0027Unable to delete the volume: %s, \u0027"},{"line_number":324,"context_line":"                           \u0027the volume is in maintenance.\u0027), volume[\u0027id\u0027])"},{"line_number":325,"context_line":"            msg \u003d _(\"The volume cannot be deleted in maintenance mode.\")"},{"line_number":326,"context_line":"            self._handle_volume_maintenance(volume, log_msg, msg)"},{"line_number":327,"context_line":""}],"source_content_type":"text/x-python","patch_set":72,"id":"1a4dcd0f_ae58758b","line":324,"updated":"2015-08-15 17:15:04.000000000","message":"This won\u0027t actually work right. You will need to format the string ahead of time and pass it in to the logger. If you pass this in as a tuple it will print the tuple and not perform string formatting on it.","commit_id":"d20bfb41a20df8d5dd9c383c7ba83089a831caee"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"a4293ce859bd05725dfedc66e213d0bbeb98f877","unresolved":false,"context_lines":[{"line_number":321,"context_line":""},{"line_number":322,"context_line":"        if volume[\u0027status\u0027] \u003d\u003d \u0027maintenance\u0027:"},{"line_number":323,"context_line":"            log_msg \u003d (_LI(\u0027Unable to delete the volume: %s, \u0027"},{"line_number":324,"context_line":"                           \u0027the volume is in maintenance.\u0027), volume[\u0027id\u0027])"},{"line_number":325,"context_line":"            msg \u003d _(\"The volume cannot be deleted in maintenance mode.\")"},{"line_number":326,"context_line":"            self._handle_volume_maintenance(volume, log_msg, msg)"},{"line_number":327,"context_line":""}],"source_content_type":"text/x-python","patch_set":72,"id":"1a4dcd0f_ecd5131b","line":324,"in_reply_to":"1a4dcd0f_ae58758b","updated":"2015-08-17 04:10:04.000000000","message":"Reverse to raise exception.InvalidVolume(reason\u003dmsg)","commit_id":"d20bfb41a20df8d5dd9c383c7ba83089a831caee"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"cc8b1efffc38a4febd0ee35b237aea627c7a2f6b","unresolved":false,"context_lines":[{"line_number":417,"context_line":"    def update(self, context, volume, fields):"},{"line_number":418,"context_line":"        if volume[\u0027status\u0027] \u003d\u003d \u0027maintenance\u0027:"},{"line_number":419,"context_line":"            log_msg \u003d (_LI(\u0027Unable to update volume: %s, \u0027"},{"line_number":420,"context_line":"                           \u0027the volume is in maintenance.\u0027), volume[\u0027id\u0027])"},{"line_number":421,"context_line":"            msg \u003d _(\"The volume cannot be updated during maintenance.\")"},{"line_number":422,"context_line":"            self._handle_volume_maintenance(volume, log_msg, msg)"},{"line_number":423,"context_line":"        vref \u003d self.db.volume_update(context, volume[\u0027id\u0027], fields)"}],"source_content_type":"text/x-python","patch_set":72,"id":"1a4dcd0f_ce5b8185","line":420,"updated":"2015-08-15 17:15:04.000000000","message":"Same.","commit_id":"d20bfb41a20df8d5dd9c383c7ba83089a831caee"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"a4293ce859bd05725dfedc66e213d0bbeb98f877","unresolved":false,"context_lines":[{"line_number":417,"context_line":"    def update(self, context, volume, fields):"},{"line_number":418,"context_line":"        if volume[\u0027status\u0027] \u003d\u003d \u0027maintenance\u0027:"},{"line_number":419,"context_line":"            log_msg \u003d (_LI(\u0027Unable to update volume: %s, \u0027"},{"line_number":420,"context_line":"                           \u0027the volume is in maintenance.\u0027), volume[\u0027id\u0027])"},{"line_number":421,"context_line":"            msg \u003d _(\"The volume cannot be updated during maintenance.\")"},{"line_number":422,"context_line":"            self._handle_volume_maintenance(volume, log_msg, msg)"},{"line_number":423,"context_line":"        vref \u003d self.db.volume_update(context, volume[\u0027id\u0027], fields)"}],"source_content_type":"text/x-python","patch_set":72,"id":"1a4dcd0f_8cdc8f47","line":420,"in_reply_to":"1a4dcd0f_ce5b8185","updated":"2015-08-17 04:10:04.000000000","message":"Reverse to raise exception.InvalidVolume(reason\u003dmsg)","commit_id":"d20bfb41a20df8d5dd9c383c7ba83089a831caee"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"41ccf5d560c565d85aa4a26dcc5ba21d372489d5","unresolved":false,"context_lines":[{"line_number":1339,"context_line":"        # The migration status \u0027none\u0027 means no migration has ever been done"},{"line_number":1340,"context_line":"        # before. The migration status \u0027error\u0027 means the previous migration"},{"line_number":1341,"context_line":"        # failed. The migration status \u0027success\u0027 means the previous migration"},{"line_number":1342,"context_line":"        # succeeded."},{"line_number":1343,"context_line":"        if self._is_volume_migrating(volume):"},{"line_number":1344,"context_line":"            msg \u003d _(\"Volume %s is already part of an active \""},{"line_number":1345,"context_line":"                    \"migration.\") % volume[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":74,"id":"fa1b9901_1e8a981b","line":1342,"updated":"2015-08-20 14:34:10.000000000","message":"Can you add \"deleting\" which is the new status you just added to check in _is_volume_migration?\n\nIs the only \"migrating\" status \"starting\"?  It\u0027s good to add that information here too.","commit_id":"59544dcc110ca8729a1b652c3e058e54206b32fa"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"b57b5f73a9f1a706c3e363173d1ee51ff3de57d3","unresolved":false,"context_lines":[{"line_number":1339,"context_line":"        # The migration status \u0027none\u0027 means no migration has ever been done"},{"line_number":1340,"context_line":"        # before. The migration status \u0027error\u0027 means the previous migration"},{"line_number":1341,"context_line":"        # failed. The migration status \u0027success\u0027 means the previous migration"},{"line_number":1342,"context_line":"        # succeeded."},{"line_number":1343,"context_line":"        if self._is_volume_migrating(volume):"},{"line_number":1344,"context_line":"            msg \u003d _(\"Volume %s is already part of an active \""},{"line_number":1345,"context_line":"                    \"migration.\") % volume[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":74,"id":"fa1b9901_8fd3d003","line":1342,"in_reply_to":"fa1b9901_1e8a981b","updated":"2015-08-20 15:01:05.000000000","message":"Y, sure.","commit_id":"59544dcc110ca8729a1b652c3e058e54206b32fa"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"e29699f73fdbce5b19f0a731411eb331b765f95d","unresolved":false,"context_lines":[{"line_number":1339,"context_line":"        # The migration status \u0027none\u0027 means no migration has ever been done"},{"line_number":1340,"context_line":"        # before. The migration status \u0027error\u0027 means the previous migration"},{"line_number":1341,"context_line":"        # failed. The migration status \u0027success\u0027 means the previous migration"},{"line_number":1342,"context_line":"        # succeeded."},{"line_number":1343,"context_line":"        if self._is_volume_migrating(volume):"},{"line_number":1344,"context_line":"            msg \u003d _(\"Volume %s is already part of an active \""},{"line_number":1345,"context_line":"                    \"migration.\") % volume[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":74,"id":"fa1b9901_c0daf54a","line":1342,"in_reply_to":"fa1b9901_8fd3d003","updated":"2015-08-20 15:33:43.000000000","message":"Sorry, I made a mistake for _is_volume_migrating.\nI will change it. The comment is fine here.","commit_id":"59544dcc110ca8729a1b652c3e058e54206b32fa"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"e76b2f5660c8d6eb41fa8b8181ae58a7efeacb23","unresolved":false,"context_lines":[{"line_number":186,"context_line":"        return safe"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    def _is_volume_migrating(self, volume):"},{"line_number":189,"context_line":"        if volume[\u0027migration_status\u0027] not in [None, \u0027error\u0027, \u0027success\u0027]:"},{"line_number":190,"context_line":"            return True"},{"line_number":191,"context_line":"        else:"},{"line_number":192,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":79,"id":"fa1b9901_59ce6d5b","line":189,"updated":"2015-08-24 08:37:33.000000000","message":"This should be:\n\n return volume[\u0027migration_status\u0027] not in (None, \u0027error\u0027, \u0027success\u0027, \u0027deleting\u0027)\n\nNo need for an if...else","commit_id":"8c517c5a56bbf7063bbfbe4905a3f67e5d2a1531"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"51d8d045473d5148fdd4f02adf1fce34f07b654d","unresolved":false,"context_lines":[{"line_number":368,"context_line":"            raise exception.InvalidVolume(reason\u003dmsg)"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"        if volume[\u0027migration_status\u0027] not in (None, \u0027deleting\u0027, \u0027error\u0027,"},{"line_number":371,"context_line":"                                              \u0027success\u0027):"},{"line_number":372,"context_line":"            # Volume is migrating, wait until done"},{"line_number":373,"context_line":"            LOG.info(_LI(\u0027Unable to delete volume: %s, \u0027"},{"line_number":374,"context_line":"                         \u0027volume is currently migrating.\u0027), volume[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":79,"id":"fa1b9901_008d31d5","line":371,"updated":"2015-08-21 03:35:35.000000000","message":"What is the reason for removing \u0027deleting\u0027 from is_volume_migrating but keeping it here?  Can you call is_volume_migrating here?","commit_id":"8c517c5a56bbf7063bbfbe4905a3f67e5d2a1531"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"b1a09a6776ed1a1dd476ea986cfa64e3e6e8574b","unresolved":false,"context_lines":[{"line_number":368,"context_line":"            raise exception.InvalidVolume(reason\u003dmsg)"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"        if volume[\u0027migration_status\u0027] not in (None, \u0027deleting\u0027, \u0027error\u0027,"},{"line_number":371,"context_line":"                                              \u0027success\u0027):"},{"line_number":372,"context_line":"            # Volume is migrating, wait until done"},{"line_number":373,"context_line":"            LOG.info(_LI(\u0027Unable to delete volume: %s, \u0027"},{"line_number":374,"context_line":"                         \u0027volume is currently migrating.\u0027), volume[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":79,"id":"fa1b9901_6ce0a6cd","line":371,"in_reply_to":"fa1b9901_008d31d5","updated":"2015-08-21 05:59:32.000000000","message":"For the other places, where is_volume_migrating is called, none mean no migration/retype has ever done before;\nsuccess means the previous migration is successful and the migration is finished; and\nerror means the previous migration is not successful and the migration is finished.\nThe commonality is that three of the above status can make sure that the volume is not DURING migration.\n\nHowever, deleting means the migration is still going on, and it is set to the DUMMY \"dest_volume_ref\", which is to be deleted during migration, no matter migration succeeds or not. (Please check https://github.com/openstack/cinder/blob/master/cinder/db/sqlalchemy/api.py#Line1187.)\n\nThis line here is called in def delete(). It means if request is sent to delete this  DUMMY \"dest_volume_ref\". Even if it is during a migration in the \u0027deleting\u0027 status, it is OK to go and delete it. (The comment \u0027 # Volume is migrating, wait until done\u0027 needs to change.)\n\nI was discussing with Gorka with the \u0027deleting\u0027 here. This is the only place where \u0027deleting\u0027 appears, imported by his patch. I need to add two new status: error and success, because this patch is supposed to bring them to indicate the previous migration status. So no need to extend deleting to other places.\n\nI will meet Gorka this afternoon for a final confirm.","commit_id":"8c517c5a56bbf7063bbfbe4905a3f67e5d2a1531"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"e76b2f5660c8d6eb41fa8b8181ae58a7efeacb23","unresolved":false,"context_lines":[{"line_number":368,"context_line":"            raise exception.InvalidVolume(reason\u003dmsg)"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"        if volume[\u0027migration_status\u0027] not in (None, \u0027deleting\u0027, \u0027error\u0027,"},{"line_number":371,"context_line":"                                              \u0027success\u0027):"},{"line_number":372,"context_line":"            # Volume is migrating, wait until done"},{"line_number":373,"context_line":"            LOG.info(_LI(\u0027Unable to delete volume: %s, \u0027"},{"line_number":374,"context_line":"                         \u0027volume is currently migrating.\u0027), volume[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":79,"id":"fa1b9901_99b405d2","line":371,"in_reply_to":"fa1b9901_6ce0a6cd","updated":"2015-08-24 08:37:33.000000000","message":"I haven\u0027t reviewed the whole path, but when a volume has \u0027deleting\u0027 in migration status it means that it is no longer migrating, because migration has already finished (as in a migrated volume exists) and we are only pending the cleanup of the source volume.  So _is_volume_migrating should be returning False with \u0027deleting\u0027.","commit_id":"8c517c5a56bbf7063bbfbe4905a3f67e5d2a1531"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"829a50f41d9579df6b07cc042100519b934fb849","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        # failed. The migration status \u0027success\u0027 means the previous migration"},{"line_number":192,"context_line":"        # succeeded. The migration status \u0027deleting\u0027 means the source volume"},{"line_number":193,"context_line":"        # fails to delete after a migration."},{"line_number":194,"context_line":"        # All of the status above means the volume is not in the process"},{"line_number":195,"context_line":"        # of a migration."},{"line_number":196,"context_line":"        if volume[\u0027migration_status\u0027] not in [None, \u0027deleting\u0027,"},{"line_number":197,"context_line":"                                              \u0027error\u0027, \u0027success\u0027]:"}],"source_content_type":"text/x-python","patch_set":82,"id":"fa1b9901_31ee228c","line":194,"updated":"2015-08-24 14:01:40.000000000","message":"status -\u003e statuses","commit_id":"7d1761ffc0ea9bd9a897323965dd4ad5ac2c7385"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"829a50f41d9579df6b07cc042100519b934fb849","unresolved":false,"context_lines":[{"line_number":597,"context_line":"        # we fail such cases."},{"line_number":598,"context_line":"        volume \u003d self.db.volume_get(context, volume[\u0027id\u0027])"},{"line_number":599,"context_line":"        if volume[\u0027status\u0027] \u003d\u003d \u0027maintenance\u0027:"},{"line_number":600,"context_line":"            LOG.info(_LI(\u0027Unable to begin the detaching for volume, \u0027"},{"line_number":601,"context_line":"                         \u0027because it is in maintenance.\u0027), resource\u003dvolume)"},{"line_number":602,"context_line":"            msg \u003d _(\"The volume cannot begin the detaching in maintenance \""},{"line_number":603,"context_line":"                    \"mode.\")"}],"source_content_type":"text/x-python","patch_set":82,"id":"fa1b9901_514dd697","line":600,"updated":"2015-08-24 14:01:40.000000000","message":"for -\u003e the","commit_id":"7d1761ffc0ea9bd9a897323965dd4ad5ac2c7385"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"829a50f41d9579df6b07cc042100519b934fb849","unresolved":false,"context_lines":[{"line_number":1023,"context_line":"                               key, meta_type\u003dcommon.METADATA_TYPES.user):"},{"line_number":1024,"context_line":"        \"\"\"Delete the given metadata item from a volume.\"\"\""},{"line_number":1025,"context_line":"        if volume[\u0027status\u0027] \u003d\u003d \u0027maintenance\u0027:"},{"line_number":1026,"context_line":"            LOG.info(_LI(\u0027Unable to delete the metadata volume, \u0027"},{"line_number":1027,"context_line":"                         \u0027because it is in maintenance.\u0027), resource\u003dvolume)"},{"line_number":1028,"context_line":"            msg \u003d _(\"The volume metadata cannot be deleted when the volume \""},{"line_number":1029,"context_line":"                    \"is in maintenance mode.\")"}],"source_content_type":"text/x-python","patch_set":82,"id":"fa1b9901_dc0edd31","line":1026,"updated":"2015-08-24 14:01:40.000000000","message":"the metadata volume -\u003e the volume metadata","commit_id":"7d1761ffc0ea9bd9a897323965dd4ad5ac2c7385"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":193,"context_line":"        # fails to delete after a migration."},{"line_number":194,"context_line":"        # All of the statuses above means the volume is not in the process"},{"line_number":195,"context_line":"        # of a migration."},{"line_number":196,"context_line":"        if volume[\u0027migration_status\u0027] not in [None, \u0027deleting\u0027,"},{"line_number":197,"context_line":"                                              \u0027error\u0027, \u0027success\u0027]:"},{"line_number":198,"context_line":"            return True"},{"line_number":199,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_742c4502","line":196,"updated":"2015-08-25 19:01:43.000000000","message":"-1: This should be:\n\n return volume[\u0027migration_status\u0027] not in (None, \u0027deleting\u0027, \u0027error\u0027, \u0027success\u0027)","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"b2f474f6f9f31107b04aa323f1ed2f119e30a657","unresolved":false,"context_lines":[{"line_number":193,"context_line":"        # fails to delete after a migration."},{"line_number":194,"context_line":"        # All of the statuses above means the volume is not in the process"},{"line_number":195,"context_line":"        # of a migration."},{"line_number":196,"context_line":"        if volume[\u0027migration_status\u0027] not in [None, \u0027deleting\u0027,"},{"line_number":197,"context_line":"                                              \u0027error\u0027, \u0027success\u0027]:"},{"line_number":198,"context_line":"            return True"},{"line_number":199,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_04c34158","line":196,"in_reply_to":"fa1b9901_742c4502","updated":"2015-08-26 07:56:33.000000000","message":"Yeah. thx.","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":322,"context_line":"        else:"},{"line_number":323,"context_line":"            project_id \u003d context.project_id"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"        if volume[\u0027status\u0027] \u003d\u003d \u0027maintenance\u0027:"},{"line_number":326,"context_line":"            LOG.info(_LI(\"Unable to delete volume, because it is \""},{"line_number":327,"context_line":"                         \"in maintenance.\"), resource\u003dvolume)"},{"line_number":328,"context_line":"            msg \u003d _(\"The volume cannot be deleted in maintenance mode.\")"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_31e57fa3","line":325,"updated":"2015-08-25 19:01:43.000000000","message":"-1: With this in some cases we cannot force delete a volume.  In line 151 of scheduler.manager.py you may be setting status to \u0027maintenance\u0027 on an error.  You force user to change the status of the volume to force delete.","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"b2f474f6f9f31107b04aa323f1ed2f119e30a657","unresolved":false,"context_lines":[{"line_number":322,"context_line":"        else:"},{"line_number":323,"context_line":"            project_id \u003d context.project_id"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"        if volume[\u0027status\u0027] \u003d\u003d \u0027maintenance\u0027:"},{"line_number":326,"context_line":"            LOG.info(_LI(\"Unable to delete volume, because it is \""},{"line_number":327,"context_line":"                         \"in maintenance.\"), resource\u003dvolume)"},{"line_number":328,"context_line":"            msg \u003d _(\"The volume cannot be deleted in maintenance mode.\")"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_bb3dcf8f","line":325,"in_reply_to":"fa1b9901_31e57fa3","updated":"2015-08-26 07:56:33.000000000","message":"Y, thx.","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":555,"context_line":"    def reserve_volume(self, context, volume):"},{"line_number":556,"context_line":"        # NOTE(jdg): check for Race condition bug 1096983"},{"line_number":557,"context_line":"        # explicitly get updated ref and check"},{"line_number":558,"context_line":"        volume \u003d self.db.volume_get(context, volume[\u0027id\u0027])"},{"line_number":559,"context_line":"        if volume[\u0027status\u0027] \u003d\u003d \u0027available\u0027:"},{"line_number":560,"context_line":"            self.update(context, volume, {\"status\": \"attaching\"})"},{"line_number":561,"context_line":"        elif volume[\u0027status\u0027] \u003d\u003d \u0027in-use\u0027:"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_c55239de","line":558,"updated":"2015-08-25 19:01:43.000000000","message":"?: Why is it allowed to begin attachments?","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"b2f474f6f9f31107b04aa323f1ed2f119e30a657","unresolved":false,"context_lines":[{"line_number":555,"context_line":"    def reserve_volume(self, context, volume):"},{"line_number":556,"context_line":"        # NOTE(jdg): check for Race condition bug 1096983"},{"line_number":557,"context_line":"        # explicitly get updated ref and check"},{"line_number":558,"context_line":"        volume \u003d self.db.volume_get(context, volume[\u0027id\u0027])"},{"line_number":559,"context_line":"        if volume[\u0027status\u0027] \u003d\u003d \u0027available\u0027:"},{"line_number":560,"context_line":"            self.update(context, volume, {\"status\": \"attaching\"})"},{"line_number":561,"context_line":"        elif volume[\u0027status\u0027] \u003d\u003d \u0027in-use\u0027:"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_a654dac5","line":558,"in_reply_to":"fa1b9901_c55239de","updated":"2015-08-26 07:56:33.000000000","message":"Begin attachments?\nAre you sure this is the correct line?\nI have got no change here.","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":575,"context_line":"    @wrap_check_policy"},{"line_number":576,"context_line":"    def unreserve_volume(self, context, volume):"},{"line_number":577,"context_line":"        volume \u003d self.db.volume_get(context, volume[\u0027id\u0027])"},{"line_number":578,"context_line":"        if volume[\u0027status\u0027] \u003d\u003d \u0027maintenance\u0027:"},{"line_number":579,"context_line":"            LOG.info(_LI(\"Unable to unreserve volume, \""},{"line_number":580,"context_line":"                         \"because it is in maintenance.\"), resource\u003dvolume)"},{"line_number":581,"context_line":"            msg \u003d _(\"The volume cannot be unreverved in maintenance mode.\")"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_6a2d3c45","line":578,"updated":"2015-08-25 19:01:43.000000000","message":"-1: This is not needed, this will only do something if status is attaching and ignore anything else.","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"b2f474f6f9f31107b04aa323f1ed2f119e30a657","unresolved":false,"context_lines":[{"line_number":575,"context_line":"    @wrap_check_policy"},{"line_number":576,"context_line":"    def unreserve_volume(self, context, volume):"},{"line_number":577,"context_line":"        volume \u003d self.db.volume_get(context, volume[\u0027id\u0027])"},{"line_number":578,"context_line":"        if volume[\u0027status\u0027] \u003d\u003d \u0027maintenance\u0027:"},{"line_number":579,"context_line":"            LOG.info(_LI(\"Unable to unreserve volume, \""},{"line_number":580,"context_line":"                         \"because it is in maintenance.\"), resource\u003dvolume)"},{"line_number":581,"context_line":"            msg \u003d _(\"The volume cannot be unreverved in maintenance mode.\")"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_86f756d2","line":578,"in_reply_to":"fa1b9901_6a2d3c45","updated":"2015-08-26 07:56:33.000000000","message":"Thx,\nI will double check it.","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":596,"context_line":"        # a previous begin_detaching call. Get updated volume status so that"},{"line_number":597,"context_line":"        # we fail such cases."},{"line_number":598,"context_line":"        volume \u003d self.db.volume_get(context, volume[\u0027id\u0027])"},{"line_number":599,"context_line":"        if volume[\u0027status\u0027] \u003d\u003d \u0027maintenance\u0027:"},{"line_number":600,"context_line":"            LOG.info(_LI(\u0027Unable to begin detaching volume, \u0027"},{"line_number":601,"context_line":"                         \u0027because it is in maintenance.\u0027), resource\u003dvolume)"},{"line_number":602,"context_line":"            msg \u003d _(\"The volume cannot begin the detaching in maintenance \""}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_caeb28db","line":599,"updated":"2015-08-25 19:01:43.000000000","message":"-1: We don\u0027t need this, it will already raise InvalidVolume exception on line 621.","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"b2f474f6f9f31107b04aa323f1ed2f119e30a657","unresolved":false,"context_lines":[{"line_number":596,"context_line":"        # a previous begin_detaching call. Get updated volume status so that"},{"line_number":597,"context_line":"        # we fail such cases."},{"line_number":598,"context_line":"        volume \u003d self.db.volume_get(context, volume[\u0027id\u0027])"},{"line_number":599,"context_line":"        if volume[\u0027status\u0027] \u003d\u003d \u0027maintenance\u0027:"},{"line_number":600,"context_line":"            LOG.info(_LI(\u0027Unable to begin detaching volume, \u0027"},{"line_number":601,"context_line":"                         \u0027because it is in maintenance.\u0027), resource\u003dvolume)"},{"line_number":602,"context_line":"            msg \u003d _(\"The volume cannot begin the detaching in maintenance \""}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_c610ee02","line":599,"in_reply_to":"fa1b9901_caeb28db","updated":"2015-08-26 07:56:33.000000000","message":"Thx,\nI will double check it.","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":625,"context_line":""},{"line_number":626,"context_line":"    @wrap_check_policy"},{"line_number":627,"context_line":"    def roll_detaching(self, context, volume):"},{"line_number":628,"context_line":"        if volume[\u0027status\u0027] \u003d\u003d \u0027maintenance\u0027:"},{"line_number":629,"context_line":"            LOG.info(_LI(\u0027Unable to roll detaching volume, \u0027"},{"line_number":630,"context_line":"                         \u0027because it is in maintenance.\u0027), resource\u003dvolume)"},{"line_number":631,"context_line":"            msg \u003d _(\"The volume cannot roll detaching in maintenance mode.\")"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_6a38dca0","line":628,"updated":"2015-08-25 19:01:43.000000000","message":"-1: This is not needed, this will only do something if status is detaching and ignore anything else.","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"b2f474f6f9f31107b04aa323f1ed2f119e30a657","unresolved":false,"context_lines":[{"line_number":625,"context_line":""},{"line_number":626,"context_line":"    @wrap_check_policy"},{"line_number":627,"context_line":"    def roll_detaching(self, context, volume):"},{"line_number":628,"context_line":"        if volume[\u0027status\u0027] \u003d\u003d \u0027maintenance\u0027:"},{"line_number":629,"context_line":"            LOG.info(_LI(\u0027Unable to roll detaching volume, \u0027"},{"line_number":630,"context_line":"                         \u0027because it is in maintenance.\u0027), resource\u003dvolume)"},{"line_number":631,"context_line":"            msg \u003d _(\"The volume cannot roll detaching in maintenance mode.\")"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_060b46d7","line":628,"in_reply_to":"fa1b9901_6a38dca0","updated":"2015-08-26 07:56:33.000000000","message":"Thx,\nI will double check it.","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":1227,"context_line":"    def copy_volume_to_image(self, context, volume, metadata, force):"},{"line_number":1228,"context_line":"        \"\"\"Create a new image from the specified volume.\"\"\""},{"line_number":1229,"context_line":""},{"line_number":1230,"context_line":"        if volume[\u0027status\u0027] \u003d\u003d \u0027maintenance\u0027:"},{"line_number":1231,"context_line":"            LOG.info(_LI(\u0027Unable to copy volume to the image, \u0027"},{"line_number":1232,"context_line":"                         \u0027because it is in maintenance.\u0027), resource\u003dvolume)"},{"line_number":1233,"context_line":"            msg \u003d _(\"The volume cannot be copied when the volume is in \""}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_34a24dfd","line":1230,"updated":"2015-08-25 19:01:43.000000000","message":"-1: This is not needed, _check_volume_availability will already fail with maintenance status.","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"b2f474f6f9f31107b04aa323f1ed2f119e30a657","unresolved":false,"context_lines":[{"line_number":1227,"context_line":"    def copy_volume_to_image(self, context, volume, metadata, force):"},{"line_number":1228,"context_line":"        \"\"\"Create a new image from the specified volume.\"\"\""},{"line_number":1229,"context_line":""},{"line_number":1230,"context_line":"        if volume[\u0027status\u0027] \u003d\u003d \u0027maintenance\u0027:"},{"line_number":1231,"context_line":"            LOG.info(_LI(\u0027Unable to copy volume to the image, \u0027"},{"line_number":1232,"context_line":"                         \u0027because it is in maintenance.\u0027), resource\u003dvolume)"},{"line_number":1233,"context_line":"            msg \u003d _(\"The volume cannot be copied when the volume is in \""}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_46fdbeaf","line":1230,"in_reply_to":"fa1b9901_34a24dfd","updated":"2015-08-26 07:56:33.000000000","message":"Thx,\nI will double check it.","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":1399,"context_line":"        # that this volume is in maintenance mode, and no action is allowed"},{"line_number":1400,"context_line":"        # on this volume, e.g. attach, detach, retype, migrate, etc."},{"line_number":1401,"context_line":"        if lock_volume:"},{"line_number":1402,"context_line":"            self.update(context, volume, {\u0027migration_status\u0027: \u0027starting\u0027,"},{"line_number":1403,"context_line":"                                          \u0027status\u0027: \u0027maintenance\u0027,"},{"line_number":1404,"context_line":"                                          \u0027previous_status\u0027: volume[\u0027status\u0027]})"},{"line_number":1405,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_18741766","line":1402,"updated":"2015-08-25 19:01:43.000000000","message":"-1: According to the specs only behavior for not in-use volumes should change, and this is changing status for any migration which means it will break live migration.","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"b2f474f6f9f31107b04aa323f1ed2f119e30a657","unresolved":false,"context_lines":[{"line_number":1399,"context_line":"        # that this volume is in maintenance mode, and no action is allowed"},{"line_number":1400,"context_line":"        # on this volume, e.g. attach, detach, retype, migrate, etc."},{"line_number":1401,"context_line":"        if lock_volume:"},{"line_number":1402,"context_line":"            self.update(context, volume, {\u0027migration_status\u0027: \u0027starting\u0027,"},{"line_number":1403,"context_line":"                                          \u0027status\u0027: \u0027maintenance\u0027,"},{"line_number":1404,"context_line":"                                          \u0027previous_status\u0027: volume[\u0027status\u0027]})"},{"line_number":1405,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_a6229a52","line":1402,"in_reply_to":"fa1b9901_18741766","updated":"2015-08-26 07:56:33.000000000","message":"Good point.","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6a9512a613612b7a3ae99317bae2d7072d195d9a","unresolved":false,"context_lines":[{"line_number":193,"context_line":"        # fails to delete after a migration."},{"line_number":194,"context_line":"        # All of the statuses above means the volume is not in the process"},{"line_number":195,"context_line":"        # of a migration."},{"line_number":196,"context_line":"        if volume[\u0027migration_status\u0027] not in (None, \u0027deleting\u0027,"},{"line_number":197,"context_line":"                                              \u0027error\u0027, \u0027success\u0027):"},{"line_number":198,"context_line":"            return True"},{"line_number":199,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":88,"id":"da20952f_85c4c592","line":196,"updated":"2015-08-26 18:56:18.000000000","message":"-1: Why should we do an if to just return True and False?  We can just return the result of the if expresion.\n\n If X:\n  return True\n else:\n  return False\n\nIs the same as\n\n return X","commit_id":"2dd84009569e30b56abdb8c015fe132206005ce8"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6a9512a613612b7a3ae99317bae2d7072d195d9a","unresolved":false,"context_lines":[{"line_number":549,"context_line":"    def reserve_volume(self, context, volume):"},{"line_number":550,"context_line":"        # NOTE(jdg): check for Race condition bug 1096983"},{"line_number":551,"context_line":"        # explicitly get updated ref and check"},{"line_number":552,"context_line":"        volume \u003d self.db.volume_get(context, volume[\u0027id\u0027])"},{"line_number":553,"context_line":"        if volume[\u0027status\u0027] \u003d\u003d \u0027available\u0027:"},{"line_number":554,"context_line":"            self.update(context, volume, {\"status\": \"attaching\"})"},{"line_number":555,"context_line":"        elif volume[\u0027status\u0027] \u003d\u003d \u0027in-use\u0027:"}],"source_content_type":"text/x-python","patch_set":88,"id":"da20952f_a5c78944","line":552,"updated":"2015-08-26 18:56:18.000000000","message":"-1: As I mention in patch 84, it should fail here as well","commit_id":"2dd84009569e30b56abdb8c015fe132206005ce8"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"61aa3acc7b1d79c0a1292a8a352a4627dd30338d","unresolved":false,"context_lines":[{"line_number":549,"context_line":"    def reserve_volume(self, context, volume):"},{"line_number":550,"context_line":"        # NOTE(jdg): check for Race condition bug 1096983"},{"line_number":551,"context_line":"        # explicitly get updated ref and check"},{"line_number":552,"context_line":"        volume \u003d self.db.volume_get(context, volume[\u0027id\u0027])"},{"line_number":553,"context_line":"        if volume[\u0027status\u0027] \u003d\u003d \u0027available\u0027:"},{"line_number":554,"context_line":"            self.update(context, volume, {\"status\": \"attaching\"})"},{"line_number":555,"context_line":"        elif volume[\u0027status\u0027] \u003d\u003d \u0027in-use\u0027:"}],"source_content_type":"text/x-python","patch_set":88,"id":"da20952f_04b0a5dc","line":552,"in_reply_to":"da20952f_a5c78944","updated":"2015-08-27 03:23:41.000000000","message":"reserve_volume check if it is available or in-use.\nIf not, it will raise exception.InvalidVolume(reason\u003dmsg) Line 565.","commit_id":"2dd84009569e30b56abdb8c015fe132206005ce8"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"61aa3acc7b1d79c0a1292a8a352a4627dd30338d","unresolved":false,"context_lines":[{"line_number":561,"context_line":"                raise exception.InvalidVolume(reason\u003dmsg)"},{"line_number":562,"context_line":"        else:"},{"line_number":563,"context_line":"            msg \u003d _(\"Volume status must be available to reserve.\")"},{"line_number":564,"context_line":"            LOG.error(msg)"},{"line_number":565,"context_line":"            raise exception.InvalidVolume(reason\u003dmsg)"},{"line_number":566,"context_line":"        LOG.info(_LI(\"Reserve volume completed successfully.\"),"},{"line_number":567,"context_line":"                 resource\u003dvolume)"}],"source_content_type":"text/x-python","patch_set":88,"id":"da20952f_44b69ddd","line":564,"updated":"2015-08-27 03:23:41.000000000","message":"I guess we can fail here.","commit_id":"2dd84009569e30b56abdb8c015fe132206005ce8"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6a9512a613612b7a3ae99317bae2d7072d195d9a","unresolved":false,"context_lines":[{"line_number":1366,"context_line":"        # When the migration of an available volume starts, both the status"},{"line_number":1367,"context_line":"        # and the migration status of the volume will be changed."},{"line_number":1368,"context_line":"        # If the admin sets lock_volume flag to True, the volume"},{"line_number":1369,"context_line":"        # status is changed to \u0027maintenance\u0027, telling the other users"},{"line_number":1370,"context_line":"        # that this volume is in maintenance mode, and no action is allowed"},{"line_number":1371,"context_line":"        # on this volume, e.g. attach, detach, retype, migrate, etc."},{"line_number":1372,"context_line":"        updates \u003d {\u0027migration_status\u0027: \u0027starting\u0027,"}],"source_content_type":"text/x-python","patch_set":88,"id":"da20952f_f873e8b2","line":1369,"updated":"2015-08-26 18:56:18.000000000","message":"nit: s/the other users/users","commit_id":"2dd84009569e30b56abdb8c015fe132206005ce8"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"61aa3acc7b1d79c0a1292a8a352a4627dd30338d","unresolved":false,"context_lines":[{"line_number":1366,"context_line":"        # When the migration of an available volume starts, both the status"},{"line_number":1367,"context_line":"        # and the migration status of the volume will be changed."},{"line_number":1368,"context_line":"        # If the admin sets lock_volume flag to True, the volume"},{"line_number":1369,"context_line":"        # status is changed to \u0027maintenance\u0027, telling the other users"},{"line_number":1370,"context_line":"        # that this volume is in maintenance mode, and no action is allowed"},{"line_number":1371,"context_line":"        # on this volume, e.g. attach, detach, retype, migrate, etc."},{"line_number":1372,"context_line":"        updates \u003d {\u0027migration_status\u0027: \u0027starting\u0027,"}],"source_content_type":"text/x-python","patch_set":88,"id":"da20952f_c44b8d2a","line":1369,"in_reply_to":"da20952f_f873e8b2","updated":"2015-08-27 03:23:41.000000000","message":"Done","commit_id":"2dd84009569e30b56abdb8c015fe132206005ce8"}],"cinder/volume/manager.py":[{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"3483e79dd8fa2ce4d5d78c7a11c995ca6193380a","unresolved":false,"context_lines":[{"line_number":1401,"context_line":"        return volume[\u0027id\u0027]"},{"line_number":1402,"context_line":""},{"line_number":1403,"context_line":"    def migrate_volume(self, ctxt, volume_id, host, force_host_copy\u003dFalse,"},{"line_number":1404,"context_line":"                       force\u003dFalse, new_type_id\u003dNone):"},{"line_number":1405,"context_line":"        \"\"\"Migrate the volume to the specified host (called on source host).\"\"\""},{"line_number":1406,"context_line":"        try:"},{"line_number":1407,"context_line":"            # NOTE(flaper87): Verify the driver is enabled"}],"source_content_type":"text/x-python","patch_set":48,"id":"3a50d1a3_d70ea98b","line":1404,"updated":"2015-07-27 08:17:40.000000000","message":"\u0027force\u0027 is not needed here, it\u0027s not used at all.","commit_id":"5fd65381cb5a79c41b2c68228d61d076d3cd5eae"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"3dba6e4e3e20ca4e9daaa75598d010f516371464","unresolved":false,"context_lines":[{"line_number":1401,"context_line":"        return volume[\u0027id\u0027]"},{"line_number":1402,"context_line":""},{"line_number":1403,"context_line":"    def migrate_volume(self, ctxt, volume_id, host, force_host_copy\u003dFalse,"},{"line_number":1404,"context_line":"                       force\u003dFalse, new_type_id\u003dNone):"},{"line_number":1405,"context_line":"        \"\"\"Migrate the volume to the specified host (called on source host).\"\"\""},{"line_number":1406,"context_line":"        try:"},{"line_number":1407,"context_line":"            # NOTE(flaper87): Verify the driver is enabled"}],"source_content_type":"text/x-python","patch_set":48,"id":"3a50d1a3_6c900044","line":1404,"in_reply_to":"3a50d1a3_d70ea98b","updated":"2015-07-27 23:36:33.000000000","message":"Y. I got it","commit_id":"5fd65381cb5a79c41b2c68228d61d076d3cd5eae"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"3483e79dd8fa2ce4d5d78c7a11c995ca6193380a","unresolved":false,"context_lines":[{"line_number":1476,"context_line":""},{"line_number":1477,"context_line":"    def _get_previous_status_error_revert(self, volume):"},{"line_number":1478,"context_line":"        if volume[\u0027status\u0027] in [\u0027in-use\u0027, \u0027available\u0027]:"},{"line_number":1479,"context_line":"            return \u0027error_migrating\u0027"},{"line_number":1480,"context_line":"        else:"},{"line_number":1481,"context_line":"            return \u0027error_\u0027 + volume[\u0027status\u0027]"},{"line_number":1482,"context_line":""}],"source_content_type":"text/x-python","patch_set":48,"id":"3a50d1a3_7726b517","line":1479,"updated":"2015-07-27 08:17:40.000000000","message":"Is \u0027previous_status\u0027 supposed to cover both \u0027status\u0027 and \u0027migration_status\u0027?  It\u0027s confusing.","commit_id":"5fd65381cb5a79c41b2c68228d61d076d3cd5eae"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"3dba6e4e3e20ca4e9daaa75598d010f516371464","unresolved":false,"context_lines":[{"line_number":1476,"context_line":""},{"line_number":1477,"context_line":"    def _get_previous_status_error_revert(self, volume):"},{"line_number":1478,"context_line":"        if volume[\u0027status\u0027] in [\u0027in-use\u0027, \u0027available\u0027]:"},{"line_number":1479,"context_line":"            return \u0027error_migrating\u0027"},{"line_number":1480,"context_line":"        else:"},{"line_number":1481,"context_line":"            return \u0027error_\u0027 + volume[\u0027status\u0027]"},{"line_number":1482,"context_line":""}],"source_content_type":"text/x-python","patch_set":48,"id":"3a50d1a3_4ccc24bb","line":1479,"in_reply_to":"3a50d1a3_7726b517","updated":"2015-07-27 23:36:33.000000000","message":"Right this is removed.","commit_id":"5fd65381cb5a79c41b2c68228d61d076d3cd5eae"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"1aea553ba6035dcda5c34527334080ba89bcc1ae","unresolved":false,"context_lines":[{"line_number":1466,"context_line":""},{"line_number":1467,"context_line":"    def _get_previous_status_revert(self, volume):"},{"line_number":1468,"context_line":"        if volume[\u0027status\u0027] in [\u0027in-use\u0027, \u0027available\u0027]:"},{"line_number":1469,"context_line":"            return \u0027migrating\u0027"},{"line_number":1470,"context_line":"        else:"},{"line_number":1471,"context_line":"            return volume[\u0027status\u0027]"},{"line_number":1472,"context_line":""}],"source_content_type":"text/x-python","patch_set":53,"id":"3a50d1a3_d7c806ab","line":1469,"updated":"2015-07-31 06:07:08.000000000","message":"Volume status doesn\u0027t include \u0027migrating\u0027, why should previous_status show this state?","commit_id":"340365c9a6d92113b16a89ea33f0e96f469e554f"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"b14e9f7d182bb95c76b87c1831b4bb51ebec7f92","unresolved":false,"context_lines":[{"line_number":1466,"context_line":""},{"line_number":1467,"context_line":"    def _get_previous_status_revert(self, volume):"},{"line_number":1468,"context_line":"        if volume[\u0027status\u0027] in [\u0027in-use\u0027, \u0027available\u0027]:"},{"line_number":1469,"context_line":"            return \u0027migrating\u0027"},{"line_number":1470,"context_line":"        else:"},{"line_number":1471,"context_line":"            return volume[\u0027status\u0027]"},{"line_number":1472,"context_line":""}],"source_content_type":"text/x-python","patch_set":53,"id":"3a50d1a3_3b36f0b4","line":1469,"in_reply_to":"3a50d1a3_d7c806ab","updated":"2015-07-31 09:36:30.000000000","message":"Right, I think this is for the case that --lock-volume is False.\nHmm, actually no need to differentiate it from --lock-volume being True.","commit_id":"340365c9a6d92113b16a89ea33f0e96f469e554f"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"4e8e7d8a7bf0a3aba9cf33b48a0fd76f668a9323","unresolved":false,"context_lines":[{"line_number":1349,"context_line":"        new_volume \u003d self.db.volume_get(ctxt, new_volume_id)"},{"line_number":1350,"context_line":"        rpcapi \u003d volume_rpcapi.VolumeAPI()"},{"line_number":1351,"context_line":""},{"line_number":1352,"context_line":"        orig_volume_status \u003d (volume.get(\u0027previous_status\u0027, None)"},{"line_number":1353,"context_line":"                              or volume[\u0027status\u0027])"},{"line_number":1354,"context_line":""},{"line_number":1355,"context_line":"        if error:"}],"source_content_type":"text/x-python","patch_set":62,"id":"1a4dcd0f_1ae51fa7","line":1352,"updated":"2015-08-10 21:05:24.000000000","message":"You can just do:\n   orig_volume_status \u003d volume.get(\u0027previous_status\u0027) or volume[\u0027status\u0027]","commit_id":"a71a55854c60050712a25316a850006c02040fd8"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"41ccf5d560c565d85aa4a26dcc5ba21d372489d5","unresolved":false,"context_lines":[{"line_number":1358,"context_line":"        rpcapi \u003d volume_rpcapi.VolumeAPI()"},{"line_number":1359,"context_line":""},{"line_number":1360,"context_line":"        orig_volume_status \u003d (volume.get(\u0027previous_status\u0027)"},{"line_number":1361,"context_line":"                              or volume[\u0027status\u0027])"},{"line_number":1362,"context_line":""},{"line_number":1363,"context_line":"        if error:"},{"line_number":1364,"context_line":"            LOG.info(_LI(\"migrate_volume_completion is cleaning up an error \""}],"source_content_type":"text/x-python","patch_set":74,"id":"fa1b9901_feea4473","line":1361,"updated":"2015-08-20 14:34:10.000000000","message":"Will there be any case where \u0027previous_status\u0027 is not populated and you have to use \u0027status\" as original status?  Is this for backward compatibility?  I mean since you are doing this patch and you\u0027ve set \u0027previous_status\u0027 in the beginning of migration.","commit_id":"59544dcc110ca8729a1b652c3e058e54206b32fa"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"b57b5f73a9f1a706c3e363173d1ee51ff3de57d3","unresolved":false,"context_lines":[{"line_number":1358,"context_line":"        rpcapi \u003d volume_rpcapi.VolumeAPI()"},{"line_number":1359,"context_line":""},{"line_number":1360,"context_line":"        orig_volume_status \u003d (volume.get(\u0027previous_status\u0027)"},{"line_number":1361,"context_line":"                              or volume[\u0027status\u0027])"},{"line_number":1362,"context_line":""},{"line_number":1363,"context_line":"        if error:"},{"line_number":1364,"context_line":"            LOG.info(_LI(\"migrate_volume_completion is cleaning up an error \""}],"source_content_type":"text/x-python","patch_set":74,"id":"fa1b9901_2f1f246d","line":1361,"in_reply_to":"fa1b9901_feea4473","updated":"2015-08-20 15:01:05.000000000","message":"I believe you are right.\nThere is no need to add the volume status. Thanks.","commit_id":"59544dcc110ca8729a1b652c3e058e54206b32fa"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"a2306d89ec4d52800de005a70cb4eafacb6edb55","unresolved":false,"context_lines":[{"line_number":189,"context_line":"class VolumeManager(manager.SchedulerDependentManager):"},{"line_number":190,"context_line":"    \"\"\"Manages attachable block storage devices.\"\"\""},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    RPC_API_VERSION \u003d \u00271.27\u0027"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    target \u003d messaging.Target(version\u003dRPC_API_VERSION)"},{"line_number":195,"context_line":""}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_b17e6fad","line":192,"updated":"2015-08-25 15:54:08.000000000","message":"This version doesn\u0027t match the version you put in https://review.openstack.org/#/c/204953  Shouldn\u0027t this be. 1.28?","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"b2f474f6f9f31107b04aa323f1ed2f119e30a657","unresolved":false,"context_lines":[{"line_number":189,"context_line":"class VolumeManager(manager.SchedulerDependentManager):"},{"line_number":190,"context_line":"    \"\"\"Manages attachable block storage devices.\"\"\""},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    RPC_API_VERSION \u003d \u00271.27\u0027"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    target \u003d messaging.Target(version\u003dRPC_API_VERSION)"},{"line_number":195,"context_line":""}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_c4c0e952","line":192,"in_reply_to":"fa1b9901_b17e6fad","updated":"2015-08-26 07:56:33.000000000","message":"It is OK to leave it 1.27, because 1.28 is for the progress report from the patch 204953, which will change it to 1.28.","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":1425,"context_line":"        if orig_volume_status \u003d\u003d \u0027in-use\u0027:"},{"line_number":1426,"context_line":"            attachments \u003d volume[\u0027volume_attachment\u0027]"},{"line_number":1427,"context_line":"            for attachment in attachments:"},{"line_number":1428,"context_line":"                rpcapi.attach_volume(ctxt, volume,"},{"line_number":1429,"context_line":"                                     attachment[\u0027instance_uuid\u0027],"},{"line_number":1430,"context_line":"                                     attachment[\u0027attached_host\u0027],"},{"line_number":1431,"context_line":"                                     attachment[\u0027mountpoint\u0027],"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_38247bc3","line":1428,"updated":"2015-08-25 19:01:43.000000000","message":"-1: This will not work if status is \u0027maintenance\u0027 because attach_volume will fail.","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"b2f474f6f9f31107b04aa323f1ed2f119e30a657","unresolved":false,"context_lines":[{"line_number":1425,"context_line":"        if orig_volume_status \u003d\u003d \u0027in-use\u0027:"},{"line_number":1426,"context_line":"            attachments \u003d volume[\u0027volume_attachment\u0027]"},{"line_number":1427,"context_line":"            for attachment in attachments:"},{"line_number":1428,"context_line":"                rpcapi.attach_volume(ctxt, volume,"},{"line_number":1429,"context_line":"                                     attachment[\u0027instance_uuid\u0027],"},{"line_number":1430,"context_line":"                                     attachment[\u0027attached_host\u0027],"},{"line_number":1431,"context_line":"                                     attachment[\u0027mountpoint\u0027],"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_8428b134","line":1428,"in_reply_to":"fa1b9901_38247bc3","updated":"2015-08-26 07:56:33.000000000","message":"I check if the volume status is in maintenance for attach() in cinder/volume/api.py.\nThe rpcapi will bypass that and goes to attach_volume cinder/volume/manager.py.\nAnyway, I have changed the code about lock_volume. It only works for available volume now.\n\nIt is OK here.","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":1439,"context_line":"            LOG.error(_LE(\u0027Failed to request async delete of migration source \u0027"},{"line_number":1440,"context_line":"                          \u0027vol %(vol)s: %(err)s\u0027),"},{"line_number":1441,"context_line":"                      {\u0027vol\u0027: volume_id, \u0027err\u0027: ex})"},{"line_number":1442,"context_line":"        updates \u003d {\u0027migration_status\u0027: \u0027success\u0027,"},{"line_number":1443,"context_line":"                   \u0027status\u0027: orig_volume_status,"},{"line_number":1444,"context_line":"                   \u0027previous_status\u0027: volume[\u0027status\u0027]}"},{"line_number":1445,"context_line":"        self.db.volume_update(ctxt, volume_id, updates)"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_7ba74d0b","line":1442,"updated":"2015-08-25 19:01:43.000000000","message":"?: Setting the status after the attachments you could be setting it to in-use even when attachments have failed, right?","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"b2f474f6f9f31107b04aa323f1ed2f119e30a657","unresolved":false,"context_lines":[{"line_number":1439,"context_line":"            LOG.error(_LE(\u0027Failed to request async delete of migration source \u0027"},{"line_number":1440,"context_line":"                          \u0027vol %(vol)s: %(err)s\u0027),"},{"line_number":1441,"context_line":"                      {\u0027vol\u0027: volume_id, \u0027err\u0027: ex})"},{"line_number":1442,"context_line":"        updates \u003d {\u0027migration_status\u0027: \u0027success\u0027,"},{"line_number":1443,"context_line":"                   \u0027status\u0027: orig_volume_status,"},{"line_number":1444,"context_line":"                   \u0027previous_status\u0027: volume[\u0027status\u0027]}"},{"line_number":1445,"context_line":"        self.db.volume_update(ctxt, volume_id, updates)"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_c43229a7","line":1442,"in_reply_to":"fa1b9901_7ba74d0b","updated":"2015-08-26 07:56:33.000000000","message":"Y, orig_volume_status will change it accordingly.\nThe value is from the previous status.","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ecbf30add41bb33b3f1868e0e1b375852ac4a9e","unresolved":false,"context_lines":[{"line_number":1467,"context_line":"        moved \u003d False"},{"line_number":1468,"context_line":""},{"line_number":1469,"context_line":"        status_update \u003d None"},{"line_number":1470,"context_line":"        if volume_ref[\u0027status\u0027] in [\u0027retyping\u0027, \u0027maintenance\u0027]:"},{"line_number":1471,"context_line":"            status_update \u003d {\u0027status\u0027: volume_ref[\u0027previous_status\u0027]}"},{"line_number":1472,"context_line":""},{"line_number":1473,"context_line":"        self.db.volume_update(ctxt, volume_ref[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_7b7e6d6b","line":1470,"updated":"2015-08-25 19:01:43.000000000","message":"nit: Better a tuple than a list here","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"b2f474f6f9f31107b04aa323f1ed2f119e30a657","unresolved":false,"context_lines":[{"line_number":1467,"context_line":"        moved \u003d False"},{"line_number":1468,"context_line":""},{"line_number":1469,"context_line":"        status_update \u003d None"},{"line_number":1470,"context_line":"        if volume_ref[\u0027status\u0027] in [\u0027retyping\u0027, \u0027maintenance\u0027]:"},{"line_number":1471,"context_line":"            status_update \u003d {\u0027status\u0027: volume_ref[\u0027previous_status\u0027]}"},{"line_number":1472,"context_line":""},{"line_number":1473,"context_line":"        self.db.volume_update(ctxt, volume_ref[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":84,"id":"fa1b9901_84119106","line":1470,"in_reply_to":"fa1b9901_7b7e6d6b","updated":"2015-08-26 07:56:33.000000000","message":"tuple better? :-(\nAll right.","commit_id":"e35531ffe26795c8fa95e540bcf033e04faf9310"}],"cinder/volume/rpcapi.py":[{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"45a5b6947c4d3b88d155115505f5c7de8407f452","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        1.21 - Adds update_consistencygroup."},{"line_number":65,"context_line":"        1.22 - Adds create_consistencygroup_from_src."},{"line_number":66,"context_line":"        1.23 - Adds attachment_id to detach_volume"},{"line_number":67,"context_line":"        1.23 - Adds the parameter force to migrate_volume"},{"line_number":68,"context_line":"    \u0027\u0027\u0027"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    BASE_RPC_API_VERSION \u003d \u00271.0\u0027"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba3cc151_019fcf50","line":67,"updated":"2015-07-07 21:48:39.000000000","message":"This doesn\u0027t match what you have in manager.py.  You have 1.24 there.","commit_id":"9bbf36ecbd208317a4e6b038c513e0fd9afdce24"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"d27154489534c9323971b853aba6019dc29258dd","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        1.21 - Adds update_consistencygroup."},{"line_number":65,"context_line":"        1.22 - Adds create_consistencygroup_from_src."},{"line_number":66,"context_line":"        1.23 - Adds attachment_id to detach_volume"},{"line_number":67,"context_line":"        1.23 - Adds the parameter force to migrate_volume"},{"line_number":68,"context_line":"    \u0027\u0027\u0027"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    BASE_RPC_API_VERSION \u003d \u00271.0\u0027"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba3cc151_074bd560","line":67,"in_reply_to":"ba3cc151_019fcf50","updated":"2015-07-10 04:44:53.000000000","message":"Done","commit_id":"9bbf36ecbd208317a4e6b038c513e0fd9afdce24"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"3483e79dd8fa2ce4d5d78c7a11c995ca6193380a","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        1.21 - Adds update_consistencygroup."},{"line_number":65,"context_line":"        1.22 - Adds create_consistencygroup_from_src."},{"line_number":66,"context_line":"        1.23 - Adds attachment_id to detach_volume"},{"line_number":67,"context_line":"        1.24 - Adds the parameter force to migrate_volume"},{"line_number":68,"context_line":"    \u0027\u0027\u0027"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    BASE_RPC_API_VERSION \u003d \u00271.0\u0027"}],"source_content_type":"text/x-python","patch_set":48,"id":"3a50d1a3_b70bdd7c","line":67,"updated":"2015-07-27 08:17:40.000000000","message":"The change for RPC api is not needed.","commit_id":"5fd65381cb5a79c41b2c68228d61d076d3cd5eae"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"3dba6e4e3e20ca4e9daaa75598d010f516371464","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        1.21 - Adds update_consistencygroup."},{"line_number":65,"context_line":"        1.22 - Adds create_consistencygroup_from_src."},{"line_number":66,"context_line":"        1.23 - Adds attachment_id to detach_volume"},{"line_number":67,"context_line":"        1.24 - Adds the parameter force to migrate_volume"},{"line_number":68,"context_line":"    \u0027\u0027\u0027"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    BASE_RPC_API_VERSION \u003d \u00271.0\u0027"}],"source_content_type":"text/x-python","patch_set":48,"id":"3a50d1a3_0cd05cf5","line":67,"in_reply_to":"3a50d1a3_b70bdd7c","updated":"2015-07-27 23:36:33.000000000","message":"I see what u mean. Ok.","commit_id":"5fd65381cb5a79c41b2c68228d61d076d3cd5eae"}]}
