)]}'
{"cinder/consistencygroup/api.py":[{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"fc9250d7c5397384c0913ed7a4473cc5de89f413","unresolved":false,"context_lines":[{"line_number":436,"context_line":"        if elevated_context.project_id !\u003d group.project_id:"},{"line_number":437,"context_line":"            project_id \u003d group.project_id"},{"line_number":438,"context_line":"        else:"},{"line_number":439,"context_line":"            project_id \u003d elevated_context.project_id"},{"line_number":440,"context_line":"        if not group.host:"},{"line_number":441,"context_line":"            self.update_quota(context, group, -1, group.project_id)"},{"line_number":442,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"da85f559_20900695","line":439,"updated":"2015-11-15 09:09:59.000000000","message":"Surely we can just do \"project_id \u003d group.project_id\" and skip the if? If they\u0027re different, we use the group one... otherwise they\u0027re the same, so we can still use the group one. Unless I\u0027m missing something, which is entirely possible.","commit_id":"6f42240592b808761a374545a70de5b4c3a54f98"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"0b2581a419cf3d4c5ecbca9cd60f00c4be5ec3a4","unresolved":false,"context_lines":[{"line_number":436,"context_line":"        if elevated_context.project_id !\u003d group.project_id:"},{"line_number":437,"context_line":"            project_id \u003d group.project_id"},{"line_number":438,"context_line":"        else:"},{"line_number":439,"context_line":"            project_id \u003d elevated_context.project_id"},{"line_number":440,"context_line":"        if not group.host:"},{"line_number":441,"context_line":"            self.update_quota(context, group, -1, group.project_id)"},{"line_number":442,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_47099430","line":439,"in_reply_to":"da85f559_20900695","updated":"2015-11-17 19:38:37.000000000","message":"Done","commit_id":"6f42240592b808761a374545a70de5b4c3a54f98"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"8bf55c790d177ea9c0d92d6d73435a74dbf944a8","unresolved":false,"context_lines":[{"line_number":436,"context_line":"        if elevated_context.project_id !\u003d group.project_id:"},{"line_number":437,"context_line":"            project_id \u003d group.project_id"},{"line_number":438,"context_line":"        else:"},{"line_number":439,"context_line":"            project_id \u003d elevated_context.project_id"},{"line_number":440,"context_line":"        if not group.host:"},{"line_number":441,"context_line":"            self.update_quota(context, group, -1, group.project_id)"},{"line_number":442,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"da85f559_cc3611b4","line":439,"in_reply_to":"da85f559_20900695","updated":"2015-11-15 15:58:41.000000000","message":"Yes, it seems like we definitely can, I was trying to keep all the logic the same as it was in manager, and this if statement is taken from lines 2615-2618 in cinder.volume.manager. If I get rid of it here, do you think getting rid of it there would also be a good idea?","commit_id":"6f42240592b808761a374545a70de5b4c3a54f98"}],"cinder/scheduler/manager.py":[{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"c570c2dd5ee9be358da5c27081526947af2fc367","unresolved":false,"context_lines":[{"line_number":244,"context_line":"                                             new_type[\u0027id\u0027], tgt_host,"},{"line_number":245,"context_line":"                                             migration_policy,"},{"line_number":246,"context_line":"                                             old_reservations,"},{"line_number":247,"context_line":"                                             reservations)"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    def manage_existing(self, context, topic, volume_id,"},{"line_number":250,"context_line":"                        request_spec, filter_properties\u003dNone):"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba8a016a_9f3011a0","line":247,"updated":"2015-11-18 03:16:12.000000000","message":"Suggest to adjust the order of params, like reservations, old_reservations.","commit_id":"542b64d203571ab4147435abde59a312a66f9632"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"2fcef053d6878643c7104b6d474cb74825d386eb","unresolved":false,"context_lines":[{"line_number":244,"context_line":"                                             new_type[\u0027id\u0027], tgt_host,"},{"line_number":245,"context_line":"                                             migration_policy,"},{"line_number":246,"context_line":"                                             old_reservations,"},{"line_number":247,"context_line":"                                             reservations)"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    def manage_existing(self, context, topic, volume_id,"},{"line_number":250,"context_line":"                        request_spec, filter_properties\u003dNone):"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba8a016a_7842076a","line":247,"in_reply_to":"ba8a016a_9f3011a0","updated":"2015-11-18 15:27:13.000000000","message":"Done","commit_id":"542b64d203571ab4147435abde59a312a66f9632"}],"cinder/volume/api.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"1b69e7b59a979450fc19c4ff8df89c39922510cf","unresolved":false,"context_lines":[{"line_number":456,"context_line":"                                          **reserve_opts)"},{"line_number":457,"context_line":"        except Exception:"},{"line_number":458,"context_line":"            reservations \u003d None"},{"line_number":459,"context_line":"            LOG.exception(_LE(\"Failed to update quota while deleting volume\"))"},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"        self.volume_rpcapi.delete_volume(context, volume, unmanage_only)"},{"line_number":462,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_2417daee","line":459,"updated":"2015-11-13 16:45:56.000000000","message":"You should catch more specific exception and pass it to the user with meaningful message.","commit_id":"1b70c87c2227bfd4c5737a703457fc1e27af98c4"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"8b36687e6cce4f27aab4c418b84e2ca249b84916","unresolved":false,"context_lines":[{"line_number":1023,"context_line":"                                           unmanage_only\u003dunmanage_only)"},{"line_number":1024,"context_line":"        # Commit the reservations"},{"line_number":1025,"context_line":"        if reservations:"},{"line_number":1026,"context_line":"            QUOTAS.commit(context, reservations, project_id\u003dproject_id)"},{"line_number":1027,"context_line":"        LOG.info(_LI(\"Snapshot delete request issued successfully.\"),"},{"line_number":1028,"context_line":"                 resource\u003dsnapshot)"},{"line_number":1029,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_a1518a10","line":1026,"updated":"2015-11-13 12:20:32.000000000","message":"Okay, some background - delete_snapshot is a RPC cast. That means it doesn\u0027t return anything. It can however fail (for example when we get SnapshotIsBusy from the driver) resulting in not deleting the snapshot. This means that on failure we don\u0027t know that it happened here.\n\nAs you\u0027re committing the reservation regardless of the fact if snapshot deletion succeeded, it\u0027s would be possible to desync quota here. I think that skilled user would be able to overcommit his quota quite easily if we\u0027ll do it that way. This makes me think that whole approach is wrong in this patch. I also cannot think of an approach better than what we have now.\n\nDoes this makes sense?","commit_id":"1b70c87c2227bfd4c5737a703457fc1e27af98c4"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"7acf9b31f8632b89e3d9541714d412f82557b388","unresolved":false,"context_lines":[{"line_number":1023,"context_line":"                                           unmanage_only\u003dunmanage_only)"},{"line_number":1024,"context_line":"        # Commit the reservations"},{"line_number":1025,"context_line":"        if reservations:"},{"line_number":1026,"context_line":"            QUOTAS.commit(context, reservations, project_id\u003dproject_id)"},{"line_number":1027,"context_line":"        LOG.info(_LI(\"Snapshot delete request issued successfully.\"),"},{"line_number":1028,"context_line":"                 resource\u003dsnapshot)"},{"line_number":1029,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_9b75ca33","line":1026,"in_reply_to":"da85f559_40ebefb0","updated":"2015-11-13 15:35:06.000000000","message":"Ah I misintetrpreted that sentence, I thought he meant \u0027in case of failure in manager\u0027 as in \u0027in case the manager fails, rollback in the api\u0027. Looking at it again after watching a video on the RPC layer I understand that better - I should probably do checks on the API side and then commit or rollback in the manager in case of failure?","commit_id":"1b70c87c2227bfd4c5737a703457fc1e27af98c4"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"eff3ed6cc9c5de6fbb5ee9b5cf5253702acd6b18","unresolved":false,"context_lines":[{"line_number":1023,"context_line":"                                           unmanage_only\u003dunmanage_only)"},{"line_number":1024,"context_line":"        # Commit the reservations"},{"line_number":1025,"context_line":"        if reservations:"},{"line_number":1026,"context_line":"            QUOTAS.commit(context, reservations, project_id\u003dproject_id)"},{"line_number":1027,"context_line":"        LOG.info(_LI(\"Snapshot delete request issued successfully.\"),"},{"line_number":1028,"context_line":"                 resource\u003dsnapshot)"},{"line_number":1029,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_64f5e281","line":1026,"in_reply_to":"da85f559_44e77e12","updated":"2015-11-13 16:51:44.000000000","message":"There are some methods here in API that are already passing reservations along to manager, with the default value None to help with backwards compatibility. I think if I used them as a model it shouldn\u0027t be too bad.","commit_id":"1b70c87c2227bfd4c5737a703457fc1e27af98c4"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"1b69e7b59a979450fc19c4ff8df89c39922510cf","unresolved":false,"context_lines":[{"line_number":1023,"context_line":"                                           unmanage_only\u003dunmanage_only)"},{"line_number":1024,"context_line":"        # Commit the reservations"},{"line_number":1025,"context_line":"        if reservations:"},{"line_number":1026,"context_line":"            QUOTAS.commit(context, reservations, project_id\u003dproject_id)"},{"line_number":1027,"context_line":"        LOG.info(_LI(\"Snapshot delete request issued successfully.\"),"},{"line_number":1028,"context_line":"                 resource\u003dsnapshot)"},{"line_number":1029,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_44e77e12","line":1026,"in_reply_to":"da85f559_9b75ca33","updated":"2015-11-13 16:45:56.000000000","message":"Aaah. Right. Okay, so now the approach is wrong, but the commit itself isn\u0027t lost - you can still move commits to manager. You would probably need to pass reservations over RPC - so it would be needed to make sure changes are backwards compatible (if no reservations - do them in manager).\n\nThat seems like a lot of work and I\u0027m not sure it is worth it right now…","commit_id":"1b70c87c2227bfd4c5737a703457fc1e27af98c4"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"d078d040c8c8312549b1087b01b1dfc9a5866444","unresolved":false,"context_lines":[{"line_number":1023,"context_line":"                                           unmanage_only\u003dunmanage_only)"},{"line_number":1024,"context_line":"        # Commit the reservations"},{"line_number":1025,"context_line":"        if reservations:"},{"line_number":1026,"context_line":"            QUOTAS.commit(context, reservations, project_id\u003dproject_id)"},{"line_number":1027,"context_line":"        LOG.info(_LI(\"Snapshot delete request issued successfully.\"),"},{"line_number":1028,"context_line":"                 resource\u003dsnapshot)"},{"line_number":1029,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_c55131da","line":1026,"in_reply_to":"da85f559_a1518a10","updated":"2015-11-13 14:56:37.000000000","message":"Ah yes, that does make good sense. Do you think that the filed bug is perhaps invalid then in this case? If the API is just handing things over to other parts of Cinder and not knowing what happened, it seems impossible to know if/when to rollback or commit the quota changes here.","commit_id":"1b70c87c2227bfd4c5737a703457fc1e27af98c4"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"15cc9c9fe448563482aafc63623777d696c7f12a","unresolved":false,"context_lines":[{"line_number":1023,"context_line":"                                           unmanage_only\u003dunmanage_only)"},{"line_number":1024,"context_line":"        # Commit the reservations"},{"line_number":1025,"context_line":"        if reservations:"},{"line_number":1026,"context_line":"            QUOTAS.commit(context, reservations, project_id\u003dproject_id)"},{"line_number":1027,"context_line":"        LOG.info(_LI(\"Snapshot delete request issued successfully.\"),"},{"line_number":1028,"context_line":"                 resource\u003dsnapshot)"},{"line_number":1029,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_40ebefb0","line":1026,"in_reply_to":"da85f559_c55131da","updated":"2015-11-13 15:16:53.000000000","message":"\"This is mostly due to blocking vs non-blocking calls but we should take a look at cleaning some of these up. We should be able to always check the reservations in volume.api and then roll-back adjust in the case of failure in the volume.manager if need be.\"\n\nThis explains it on the bug. I would ping jgriffith to clarify what he had in mind. I don\u0027t think he wanted to convert all the RPC casts to call…","commit_id":"1b70c87c2227bfd4c5737a703457fc1e27af98c4"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"232fe05f74c4461b17ca29ae98f1f9ebac0b7fd8","unresolved":false,"context_lines":[{"line_number":1605,"context_line":"                        \u0027volume_id\u0027: volume.id,"},{"line_number":1606,"context_line":"                        \u0027volume_type\u0027: vol_type,"},{"line_number":1607,"context_line":"                        \u0027migration_policy\u0027: migration_policy,"},{"line_number":1608,"context_line":"                        \u0027reservations\u0027: reservations,"},{"line_number":1609,"context_line":"                        \u0027old_reservations\u0027: old_reservations}"},{"line_number":1610,"context_line":""},{"line_number":1611,"context_line":"        self.scheduler_rpcapi.retype(context, CONF.volume_topic, volume.id,"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba8a016a_4e6d2803","line":1608,"updated":"2015-11-23 19:47:04.000000000","message":"Hm, you\u0027re renaming a RequestSpec field, that is certainly not backward compatible. You should either leave things as they are or wait till we\u0027ve merge RequestSpec versioned object and add this with proper object translation.","commit_id":"7e2cc104fa069554a1afcf33cf3c1787cfb9f396"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"ce71f1a4503e53456a197aaa0bf60750ee1e8bb3","unresolved":false,"context_lines":[{"line_number":1605,"context_line":"                        \u0027volume_id\u0027: volume.id,"},{"line_number":1606,"context_line":"                        \u0027volume_type\u0027: vol_type,"},{"line_number":1607,"context_line":"                        \u0027migration_policy\u0027: migration_policy,"},{"line_number":1608,"context_line":"                        \u0027reservations\u0027: reservations,"},{"line_number":1609,"context_line":"                        \u0027old_reservations\u0027: old_reservations}"},{"line_number":1610,"context_line":""},{"line_number":1611,"context_line":"        self.scheduler_rpcapi.retype(context, CONF.volume_topic, volume.id,"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba8a016a_fa46124e","line":1608,"in_reply_to":"ba8a016a_4e6d2803","updated":"2015-11-23 20:48:01.000000000","message":"I can leave it as it was, sure.","commit_id":"7e2cc104fa069554a1afcf33cf3c1787cfb9f396"}],"cinder/volume/manager.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"8b36687e6cce4f27aab4c418b84e2ca249b84916","unresolved":false,"context_lines":[{"line_number":1974,"context_line":"                 resource\u003dvolume)"},{"line_number":1975,"context_line":""},{"line_number":1976,"context_line":"    def retype(self, ctxt, volume_id, new_type_id, host,"},{"line_number":1977,"context_line":"               migration_policy\u003d\u0027never\u0027):"},{"line_number":1978,"context_line":""},{"line_number":1979,"context_line":"        def _retype_error(context, volume_id, status_update):"},{"line_number":1980,"context_line":"            self.db.volume_update(context, volume_id, status_update)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_f0cd2287","line":1977,"updated":"2015-11-13 12:20:32.000000000","message":"This is non-backward compatible change which would result in blocking rolling upgrades. See [1] to understand how to make it backward-compatible.\n\n[1] http://www.danplanet.com/blog/2015/10/05/upgrades-in-nova-rpc-apis/","commit_id":"1b70c87c2227bfd4c5737a703457fc1e27af98c4"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"8d3e676c5ec06cc2ec5314b2428904f72da186d5","unresolved":false,"context_lines":[{"line_number":1974,"context_line":"                 resource\u003dvolume)"},{"line_number":1975,"context_line":""},{"line_number":1976,"context_line":"    def retype(self, ctxt, volume_id, new_type_id, host,"},{"line_number":1977,"context_line":"               migration_policy\u003d\u0027never\u0027):"},{"line_number":1978,"context_line":""},{"line_number":1979,"context_line":"        def _retype_error(context, volume_id, status_update):"},{"line_number":1980,"context_line":"            self.db.volume_update(context, volume_id, status_update)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_2034ab48","line":1977,"in_reply_to":"da85f559_051df90e","updated":"2015-11-13 15:17:40.000000000","message":"There are two more posts on rolling upgrades. Very interesting, but also quite challenging to understand… ;)","commit_id":"1b70c87c2227bfd4c5737a703457fc1e27af98c4"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"7bd76013aca6fb42218244e3181fb1ff3dc8fe11","unresolved":false,"context_lines":[{"line_number":1974,"context_line":"                 resource\u003dvolume)"},{"line_number":1975,"context_line":""},{"line_number":1976,"context_line":"    def retype(self, ctxt, volume_id, new_type_id, host,"},{"line_number":1977,"context_line":"               migration_policy\u003d\u0027never\u0027):"},{"line_number":1978,"context_line":""},{"line_number":1979,"context_line":"        def _retype_error(context, volume_id, status_update):"},{"line_number":1980,"context_line":"            self.db.volume_update(context, volume_id, status_update)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_051df90e","line":1977,"in_reply_to":"da85f559_f0cd2287","updated":"2015-11-13 14:58:22.000000000","message":"Thanks for the resource! I hadn\u0027t seen this.","commit_id":"1b70c87c2227bfd4c5737a703457fc1e27af98c4"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"23c03bcaa22be7c12aba19aa732fad096ef5b9f6","unresolved":false,"context_lines":[{"line_number":658,"context_line":""},{"line_number":659,"context_line":"        # If deleting source/destination volume in a migration, we should"},{"line_number":660,"context_line":"        # skip quotas."},{"line_number":661,"context_line":"        if not is_migrating:"},{"line_number":662,"context_line":"            # Get reservations"},{"line_number":663,"context_line":"            try:"},{"line_number":664,"context_line":"                reserve_opts \u003d {\u0027volumes\u0027: -1,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_bf2a232b","side":"PARENT","line":661,"updated":"2015-11-16 10:55:02.000000000","message":"We shouldn\u0027t remove that. First of all we\u0027re sometimes doing delete_volume from inside this manager (see init_host), so API won\u0027t do the reservations for us in such case. Secondly - this would make delete_volume RPC call non-backward compatible.\n\nYou should leave it here and maybe make the condition:\n\n    if not is_migrating and not reservations:","commit_id":"0a7103a24295e677e26a4a72d69830c2d4c41c48"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"11d160dd61433ad8427f61483c23c40f664e1e05","unresolved":false,"context_lines":[{"line_number":658,"context_line":""},{"line_number":659,"context_line":"        # If deleting source/destination volume in a migration, we should"},{"line_number":660,"context_line":"        # skip quotas."},{"line_number":661,"context_line":"        if not is_migrating:"},{"line_number":662,"context_line":"            # Get reservations"},{"line_number":663,"context_line":"            try:"},{"line_number":664,"context_line":"                reserve_opts \u003d {\u0027volumes\u0027: -1,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_f86c139e","side":"PARENT","line":661,"in_reply_to":"ba8a016a_810f9ae0","updated":"2015-11-17 04:56:21.000000000","message":"Sounds good, I\u0027ll make that update tomorrow - thank you for the feedback.","commit_id":"0a7103a24295e677e26a4a72d69830c2d4c41c48"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"4fb2d7717db64b1773a55446cf6e7948ce97addd","unresolved":false,"context_lines":[{"line_number":658,"context_line":""},{"line_number":659,"context_line":"        # If deleting source/destination volume in a migration, we should"},{"line_number":660,"context_line":"        # skip quotas."},{"line_number":661,"context_line":"        if not is_migrating:"},{"line_number":662,"context_line":"            # Get reservations"},{"line_number":663,"context_line":"            try:"},{"line_number":664,"context_line":"                reserve_opts \u003d {\u0027volumes\u0027: -1,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_810f9ae0","side":"PARENT","line":661,"in_reply_to":"ba8a016a_bf2a232b","updated":"2015-11-17 02:36:04.000000000","message":"+1 for this, \u0027cinder-manage delete volume\u0027 also can delete volume that don\u0027t pass by API.","commit_id":"0a7103a24295e677e26a4a72d69830c2d4c41c48"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"0b2581a419cf3d4c5ecbca9cd60f00c4be5ec3a4","unresolved":false,"context_lines":[{"line_number":658,"context_line":""},{"line_number":659,"context_line":"        # If deleting source/destination volume in a migration, we should"},{"line_number":660,"context_line":"        # skip quotas."},{"line_number":661,"context_line":"        if not is_migrating:"},{"line_number":662,"context_line":"            # Get reservations"},{"line_number":663,"context_line":"            try:"},{"line_number":664,"context_line":"                reserve_opts \u003d {\u0027volumes\u0027: -1,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_c73584f7","side":"PARENT","line":661,"in_reply_to":"ba8a016a_f86c139e","updated":"2015-11-17 19:38:37.000000000","message":"Done","commit_id":"0a7103a24295e677e26a4a72d69830c2d4c41c48"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"23c03bcaa22be7c12aba19aa732fad096ef5b9f6","unresolved":false,"context_lines":[{"line_number":811,"context_line":"                snapshot.status \u003d \u0027error_deleting\u0027"},{"line_number":812,"context_line":"                snapshot.save()"},{"line_number":813,"context_line":""},{"line_number":814,"context_line":"        # Get reservations"},{"line_number":815,"context_line":"        try:"},{"line_number":816,"context_line":"            if CONF.no_snapshot_gb_quota:"},{"line_number":817,"context_line":"                reserve_opts \u003d {\u0027snapshots\u0027: -1}"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_5fe77712","side":"PARENT","line":814,"updated":"2015-11-16 10:55:02.000000000","message":"ditto","commit_id":"0a7103a24295e677e26a4a72d69830c2d4c41c48"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"0b2581a419cf3d4c5ecbca9cd60f00c4be5ec3a4","unresolved":false,"context_lines":[{"line_number":811,"context_line":"                snapshot.status \u003d \u0027error_deleting\u0027"},{"line_number":812,"context_line":"                snapshot.save()"},{"line_number":813,"context_line":""},{"line_number":814,"context_line":"        # Get reservations"},{"line_number":815,"context_line":"        try:"},{"line_number":816,"context_line":"            if CONF.no_snapshot_gb_quota:"},{"line_number":817,"context_line":"                reserve_opts \u003d {\u0027snapshots\u0027: -1}"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_0755cc1b","side":"PARENT","line":814,"in_reply_to":"ba8a016a_5fe77712","updated":"2015-11-17 19:38:37.000000000","message":"Done","commit_id":"0a7103a24295e677e26a4a72d69830c2d4c41c48"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"11d160dd61433ad8427f61483c23c40f664e1e05","unresolved":false,"context_lines":[{"line_number":811,"context_line":"                snapshot.status \u003d \u0027error_deleting\u0027"},{"line_number":812,"context_line":"                snapshot.save()"},{"line_number":813,"context_line":""},{"line_number":814,"context_line":"        # Get reservations"},{"line_number":815,"context_line":"        try:"},{"line_number":816,"context_line":"            if CONF.no_snapshot_gb_quota:"},{"line_number":817,"context_line":"                reserve_opts \u003d {\u0027snapshots\u0027: -1}"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_b8052bc3","side":"PARENT","line":814,"in_reply_to":"ba8a016a_5fe77712","updated":"2015-11-17 04:56:21.000000000","message":"ditto","commit_id":"0a7103a24295e677e26a4a72d69830c2d4c41c48"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"fc9250d7c5397384c0913ed7a4473cc5de89f413","unresolved":false,"context_lines":[{"line_number":814,"context_line":"        # Get reservations"},{"line_number":815,"context_line":"        try:"},{"line_number":816,"context_line":"            if CONF.no_snapshot_gb_quota:"},{"line_number":817,"context_line":"                reserve_opts \u003d {\u0027snapshots\u0027: -1}"},{"line_number":818,"context_line":"            else:"},{"line_number":819,"context_line":"                reserve_opts \u003d {"},{"line_number":820,"context_line":"                    \u0027snapshots\u0027: -1,"}],"source_content_type":"text/x-python","patch_set":8,"id":"da85f559_40e2ea30","side":"PARENT","line":817,"updated":"2015-11-15 09:09:59.000000000","message":"Is it worth the complexity of moving negative quota changes into API? They can never fail except for DB problems.","commit_id":"0a7103a24295e677e26a4a72d69830c2d4c41c48"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"8bf55c790d177ea9c0d92d6d73435a74dbf944a8","unresolved":false,"context_lines":[{"line_number":814,"context_line":"        # Get reservations"},{"line_number":815,"context_line":"        try:"},{"line_number":816,"context_line":"            if CONF.no_snapshot_gb_quota:"},{"line_number":817,"context_line":"                reserve_opts \u003d {\u0027snapshots\u0027: -1}"},{"line_number":818,"context_line":"            else:"},{"line_number":819,"context_line":"                reserve_opts \u003d {"},{"line_number":820,"context_line":"                    \u0027snapshots\u0027: -1,"}],"source_content_type":"text/x-python","patch_set":8,"id":"da85f559_ec60b5a6","side":"PARENT","line":817,"in_reply_to":"da85f559_40e2ea30","updated":"2015-11-15 15:58:41.000000000","message":"Hmm, maybe not, but this one was actually one of the less complicated ones and it keeps everything consistent - this way there are no quota checks left in the manager at all.","commit_id":"0a7103a24295e677e26a4a72d69830c2d4c41c48"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"4fb2d7717db64b1773a55446cf6e7948ce97addd","unresolved":false,"context_lines":[{"line_number":2082,"context_line":"                volume.update(status_update)"},{"line_number":2083,"context_line":"                volume.save()"},{"line_number":2084,"context_line":""},{"line_number":2085,"context_line":"        # Get old reservations"},{"line_number":2086,"context_line":"        try:"},{"line_number":2087,"context_line":"            reserve_opts \u003d {\u0027volumes\u0027: -1, \u0027gigabytes\u0027: -volume.size}"},{"line_number":2088,"context_line":"            QUOTAS.add_volume_type_opts(context,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_c4a130ab","side":"PARENT","line":2085,"updated":"2015-11-17 02:36:04.000000000","message":"For compatibility, suggest we keep those codes here, and add:\n\"if not old_reservation:\".","commit_id":"0a7103a24295e677e26a4a72d69830c2d4c41c48"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"23c03bcaa22be7c12aba19aa732fad096ef5b9f6","unresolved":false,"context_lines":[{"line_number":2082,"context_line":"                volume.update(status_update)"},{"line_number":2083,"context_line":"                volume.save()"},{"line_number":2084,"context_line":""},{"line_number":2085,"context_line":"        # Get old reservations"},{"line_number":2086,"context_line":"        try:"},{"line_number":2087,"context_line":"            reserve_opts \u003d {\u0027volumes\u0027: -1, \u0027gigabytes\u0027: -volume.size}"},{"line_number":2088,"context_line":"            QUOTAS.add_volume_type_opts(context,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_5f3f7725","side":"PARENT","line":2085,"updated":"2015-11-16 10:55:02.000000000","message":"Removing this seems like more possible but you should still guard for any of the old_reservations being none.","commit_id":"0a7103a24295e677e26a4a72d69830c2d4c41c48"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"0b2581a419cf3d4c5ecbca9cd60f00c4be5ec3a4","unresolved":false,"context_lines":[{"line_number":2082,"context_line":"                volume.update(status_update)"},{"line_number":2083,"context_line":"                volume.save()"},{"line_number":2084,"context_line":""},{"line_number":2085,"context_line":"        # Get old reservations"},{"line_number":2086,"context_line":"        try:"},{"line_number":2087,"context_line":"            reserve_opts \u003d {\u0027volumes\u0027: -1, \u0027gigabytes\u0027: -volume.size}"},{"line_number":2088,"context_line":"            QUOTAS.add_volume_type_opts(context,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_e730c803","side":"PARENT","line":2085,"in_reply_to":"ba8a016a_38fa9bbe","updated":"2015-11-17 19:38:37.000000000","message":"Done","commit_id":"0a7103a24295e677e26a4a72d69830c2d4c41c48"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"11d160dd61433ad8427f61483c23c40f664e1e05","unresolved":false,"context_lines":[{"line_number":2082,"context_line":"                volume.update(status_update)"},{"line_number":2083,"context_line":"                volume.save()"},{"line_number":2084,"context_line":""},{"line_number":2085,"context_line":"        # Get old reservations"},{"line_number":2086,"context_line":"        try:"},{"line_number":2087,"context_line":"            reserve_opts \u003d {\u0027volumes\u0027: -1, \u0027gigabytes\u0027: -volume.size}"},{"line_number":2088,"context_line":"            QUOTAS.add_volume_type_opts(context,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_38fa9bbe","side":"PARENT","line":2085,"in_reply_to":"ba8a016a_c4a130ab","updated":"2015-11-17 04:56:21.000000000","message":"I\u0027ll update this one too for good measure.","commit_id":"0a7103a24295e677e26a4a72d69830c2d4c41c48"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"cb4df23615cf57281e129b67d5af1b1af9f1fa8b","unresolved":false,"context_lines":[{"line_number":1015,"context_line":"            image_volume \u003d self._clone_image_volume(ctx,"},{"line_number":1016,"context_line":"                                                    volume_ref,"},{"line_number":1017,"context_line":"                                                    image_meta,"},{"line_number":1018,"context_line":"                                                    None)"},{"line_number":1019,"context_line":"            if not image_volume:"},{"line_number":1020,"context_line":"                LOG.warning(_LW(\u0027Unable to clone image_volume for image \u0027"},{"line_number":1021,"context_line":"                                \u0027%(image_id)s will not create cache entry.\u0027),"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_f8be53fe","line":1018,"updated":"2015-11-17 05:12:09.000000000","message":"Add a `reservations\u003dNone` default parameter to _clone_image_volume so that existing calls are compatible? It is also more consistent, since some other methods has the `reservations\u003dNone`.","commit_id":"6f42240592b808761a374545a70de5b4c3a54f98"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"0b2581a419cf3d4c5ecbca9cd60f00c4be5ec3a4","unresolved":false,"context_lines":[{"line_number":1015,"context_line":"            image_volume \u003d self._clone_image_volume(ctx,"},{"line_number":1016,"context_line":"                                                    volume_ref,"},{"line_number":1017,"context_line":"                                                    image_meta,"},{"line_number":1018,"context_line":"                                                    None)"},{"line_number":1019,"context_line":"            if not image_volume:"},{"line_number":1020,"context_line":"                LOG.warning(_LW(\u0027Unable to clone image_volume for image \u0027"},{"line_number":1021,"context_line":"                                \u0027%(image_id)s will not create cache entry.\u0027),"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_c767c423","line":1018,"in_reply_to":"ba8a016a_f8be53fe","updated":"2015-11-17 19:38:37.000000000","message":"Done","commit_id":"6f42240592b808761a374545a70de5b4c3a54f98"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"cb4df23615cf57281e129b67d5af1b1af9f1fa8b","unresolved":false,"context_lines":[{"line_number":1083,"context_line":"                              {\u0027id\u0027: volume.id})"},{"line_number":1084,"context_line":"            return False"},{"line_number":1085,"context_line":""},{"line_number":1086,"context_line":"    def _clone_image_volume_and_add_location(self, ctx, volume, image_service,"},{"line_number":1087,"context_line":"                                             image_meta, reservations):"},{"line_number":1088,"context_line":"        \"\"\"Create a cloned volume and register its location to the image.\"\"\""},{"line_number":1089,"context_line":"        if (image_meta[\u0027disk_format\u0027] !\u003d \u0027raw\u0027 or"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_384cdb41","line":1086,"updated":"2015-11-17 05:12:09.000000000","message":"Ditto.","commit_id":"6f42240592b808761a374545a70de5b4c3a54f98"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"0b2581a419cf3d4c5ecbca9cd60f00c4be5ec3a4","unresolved":false,"context_lines":[{"line_number":1083,"context_line":"                              {\u0027id\u0027: volume.id})"},{"line_number":1084,"context_line":"            return False"},{"line_number":1085,"context_line":""},{"line_number":1086,"context_line":"    def _clone_image_volume_and_add_location(self, ctx, volume, image_service,"},{"line_number":1087,"context_line":"                                             image_meta, reservations):"},{"line_number":1088,"context_line":"        \"\"\"Create a cloned volume and register its location to the image.\"\"\""},{"line_number":1089,"context_line":"        if (image_meta[\u0027disk_format\u0027] !\u003d \u0027raw\u0027 or"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_27b25095","line":1086,"in_reply_to":"ba8a016a_384cdb41","updated":"2015-11-17 19:38:37.000000000","message":"Done","commit_id":"6f42240592b808761a374545a70de5b4c3a54f98"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"23c03bcaa22be7c12aba19aa732fad096ef5b9f6","unresolved":false,"context_lines":[{"line_number":2011,"context_line":""},{"line_number":2012,"context_line":"    def retype(self, ctxt, volume_id, new_type_id, host,"},{"line_number":2013,"context_line":"               migration_policy\u003d\u0027never\u0027, old_reservations\u003dNone,"},{"line_number":2014,"context_line":"               new_reservations\u003dNone, volume\u003dNone):"},{"line_number":2015,"context_line":""},{"line_number":2016,"context_line":"        def _retype_error(context, volume, old_reservations,"},{"line_number":2017,"context_line":"                          new_reservations, status_update):"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_5ff8d77c","line":2014,"updated":"2015-11-16 10:55:02.000000000","message":"We should rather leave reservations without renaming it and add old_reservations.","commit_id":"6f42240592b808761a374545a70de5b4c3a54f98"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"0b2581a419cf3d4c5ecbca9cd60f00c4be5ec3a4","unresolved":false,"context_lines":[{"line_number":2011,"context_line":""},{"line_number":2012,"context_line":"    def retype(self, ctxt, volume_id, new_type_id, host,"},{"line_number":2013,"context_line":"               migration_policy\u003d\u0027never\u0027, old_reservations\u003dNone,"},{"line_number":2014,"context_line":"               new_reservations\u003dNone, volume\u003dNone):"},{"line_number":2015,"context_line":""},{"line_number":2016,"context_line":"        def _retype_error(context, volume, old_reservations,"},{"line_number":2017,"context_line":"                          new_reservations, status_update):"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_e7abe81b","line":2014,"in_reply_to":"ba8a016a_5ff8d77c","updated":"2015-11-17 19:38:37.000000000","message":"Done","commit_id":"6f42240592b808761a374545a70de5b4c3a54f98"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"cb4df23615cf57281e129b67d5af1b1af9f1fa8b","unresolved":false,"context_lines":[{"line_number":2556,"context_line":"                allocated_capacity_gb\u003dvol[\u0027size\u0027])"},{"line_number":2557,"context_line":""},{"line_number":2558,"context_line":"    def delete_consistencygroup(self, context, group,"},{"line_number":2559,"context_line":"                                reservations_list, cgreservations):"},{"line_number":2560,"context_line":"        \"\"\"Deletes consistency group and the volumes in the group.\"\"\""},{"line_number":2561,"context_line":"        context \u003d context.elevated()"},{"line_number":2562,"context_line":"        project_id \u003d group.project_id"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_5893df5b","line":2559,"updated":"2015-11-17 05:12:09.000000000","message":"Ditto add defaults for `reservations_list` and `cgreservations`?","commit_id":"6f42240592b808761a374545a70de5b4c3a54f98"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"0b2581a419cf3d4c5ecbca9cd60f00c4be5ec3a4","unresolved":false,"context_lines":[{"line_number":2556,"context_line":"                allocated_capacity_gb\u003dvol[\u0027size\u0027])"},{"line_number":2557,"context_line":""},{"line_number":2558,"context_line":"    def delete_consistencygroup(self, context, group,"},{"line_number":2559,"context_line":"                                reservations_list, cgreservations):"},{"line_number":2560,"context_line":"        \"\"\"Deletes consistency group and the volumes in the group.\"\"\""},{"line_number":2561,"context_line":"        context \u003d context.elevated()"},{"line_number":2562,"context_line":"        project_id \u003d group.project_id"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_8771bce2","line":2559,"in_reply_to":"ba8a016a_5893df5b","updated":"2015-11-17 19:38:37.000000000","message":"Done","commit_id":"6f42240592b808761a374545a70de5b4c3a54f98"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"232fe05f74c4461b17ca29ae98f1f9ebac0b7fd8","unresolved":false,"context_lines":[{"line_number":3077,"context_line":""},{"line_number":3078,"context_line":"            # Commit the reservations"},{"line_number":3079,"context_line":"            if reservations:"},{"line_number":3080,"context_line":"                QUOTAS.commit(context, reservations, project_id\u003dproject_id)"},{"line_number":3081,"context_line":""},{"line_number":3082,"context_line":"        cgsnapshot.destroy()"},{"line_number":3083,"context_line":"        LOG.info(_LI(\"cgsnapshot %s: deleted successfully\"), cgsnapshot.id)"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba8a016a_e4e2fb2e","side":"PARENT","line":3080,"updated":"2015-11-23 19:47:04.000000000","message":"Hey, isn\u0027t this a bug in current codebase? We\u0027re reserving multiple times, but committing just once…? Same for delete_consistencygroup.","commit_id":"f38e70031afef9f05eeb8b33ed94901da5fac032"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"ca6579d055fe954c8366d5975e436320efd3227f","unresolved":false,"context_lines":[{"line_number":3077,"context_line":""},{"line_number":3078,"context_line":"            # Commit the reservations"},{"line_number":3079,"context_line":"            if reservations:"},{"line_number":3080,"context_line":"                QUOTAS.commit(context, reservations, project_id\u003dproject_id)"},{"line_number":3081,"context_line":""},{"line_number":3082,"context_line":"        cgsnapshot.destroy()"},{"line_number":3083,"context_line":"        LOG.info(_LI(\"cgsnapshot %s: deleted successfully\"), cgsnapshot.id)"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a8ffd7b_0309872c","side":"PARENT","line":3080,"in_reply_to":"ba8a016a_9ac7c611","updated":"2015-11-24 17:51:41.000000000","message":"It would be probably wise to ask Xing for opinion, but if it\u0027s a bug an idea of fixing it in another patch seems great.","commit_id":"f38e70031afef9f05eeb8b33ed94901da5fac032"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"ce71f1a4503e53456a197aaa0bf60750ee1e8bb3","unresolved":false,"context_lines":[{"line_number":3077,"context_line":""},{"line_number":3078,"context_line":"            # Commit the reservations"},{"line_number":3079,"context_line":"            if reservations:"},{"line_number":3080,"context_line":"                QUOTAS.commit(context, reservations, project_id\u003dproject_id)"},{"line_number":3081,"context_line":""},{"line_number":3082,"context_line":"        cgsnapshot.destroy()"},{"line_number":3083,"context_line":"        LOG.info(_LI(\"cgsnapshot %s: deleted successfully\"), cgsnapshot.id)"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba8a016a_9ac7c611","side":"PARENT","line":3080,"in_reply_to":"ba8a016a_e4e2fb2e","updated":"2015-11-23 20:48:01.000000000","message":"Yeah, I think it definitely is. For every iteration through that loop \u0027reservations\u0027 would get overwritten, and it would only commit the last one. I can push up a patch for that in the meantime while this patch is still being worked on.","commit_id":"f38e70031afef9f05eeb8b33ed94901da5fac032"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"232fe05f74c4461b17ca29ae98f1f9ebac0b7fd8","unresolved":false,"context_lines":[{"line_number":817,"context_line":""},{"line_number":818,"context_line":"        # If reservations has been passed in from the API, we should"},{"line_number":819,"context_line":"        # skip quotas."},{"line_number":820,"context_line":"        if not reservations:"},{"line_number":821,"context_line":"            try:"},{"line_number":822,"context_line":"                if CONF.no_snapshot_db_quota:"},{"line_number":823,"context_line":"                    reserve_opts \u003d {\u0027snapshots\u0027: -1}"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba8a016a_21feb538","line":820,"updated":"2015-11-23 19:47:04.000000000","message":"You should mark places where we\u0027re guarding from None to achieve backwards compatibility with TODO item. These places would be able to be cleaned up in early N (we\u0027re supposed to be backward compatible with only X-1 version).","commit_id":"7e2cc104fa069554a1afcf33cf3c1787cfb9f396"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"ce71f1a4503e53456a197aaa0bf60750ee1e8bb3","unresolved":false,"context_lines":[{"line_number":817,"context_line":""},{"line_number":818,"context_line":"        # If reservations has been passed in from the API, we should"},{"line_number":819,"context_line":"        # skip quotas."},{"line_number":820,"context_line":"        if not reservations:"},{"line_number":821,"context_line":"            try:"},{"line_number":822,"context_line":"                if CONF.no_snapshot_db_quota:"},{"line_number":823,"context_line":"                    reserve_opts \u003d {\u0027snapshots\u0027: -1}"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba8a016a_7aa8e2db","line":820,"in_reply_to":"ba8a016a_21feb538","updated":"2015-11-23 20:48:01.000000000","message":"Okay, will do.","commit_id":"7e2cc104fa069554a1afcf33cf3c1787cfb9f396"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"232fe05f74c4461b17ca29ae98f1f9ebac0b7fd8","unresolved":false,"context_lines":[{"line_number":819,"context_line":"        # skip quotas."},{"line_number":820,"context_line":"        if not reservations:"},{"line_number":821,"context_line":"            try:"},{"line_number":822,"context_line":"                if CONF.no_snapshot_db_quota:"},{"line_number":823,"context_line":"                    reserve_opts \u003d {\u0027snapshots\u0027: -1}"},{"line_number":824,"context_line":"                else:"},{"line_number":825,"context_line":"                    reserve_opts \u003d {"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba8a016a_4199796d","line":822,"updated":"2015-11-23 19:47:04.000000000","message":"Whoa, it\u0027s no_snapshot_gb_quota for certain. ;)","commit_id":"7e2cc104fa069554a1afcf33cf3c1787cfb9f396"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"ce71f1a4503e53456a197aaa0bf60750ee1e8bb3","unresolved":false,"context_lines":[{"line_number":819,"context_line":"        # skip quotas."},{"line_number":820,"context_line":"        if not reservations:"},{"line_number":821,"context_line":"            try:"},{"line_number":822,"context_line":"                if CONF.no_snapshot_db_quota:"},{"line_number":823,"context_line":"                    reserve_opts \u003d {\u0027snapshots\u0027: -1}"},{"line_number":824,"context_line":"                else:"},{"line_number":825,"context_line":"                    reserve_opts \u003d {"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba8a016a_9a826651","line":822,"in_reply_to":"ba8a016a_4199796d","updated":"2015-11-23 20:48:01.000000000","message":"whoops!","commit_id":"7e2cc104fa069554a1afcf33cf3c1787cfb9f396"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"232fe05f74c4461b17ca29ae98f1f9ebac0b7fd8","unresolved":false,"context_lines":[{"line_number":1072,"context_line":"            if image_volume:"},{"line_number":1073,"context_line":"                self.delete_volume(ctx, image_volume.id)"},{"line_number":1074,"context_line":""},{"line_number":1075,"context_line":"    def _clone_image_volume(self, ctx, volume, image_meta, reservations\u003dNone):"},{"line_number":1076,"context_line":"        volume_type_id \u003d volume.get(\u0027volume_type_id\u0027)"},{"line_number":1077,"context_line":"        try:"},{"line_number":1078,"context_line":"            new_vol_values \u003d {}"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba8a016a_81bc416d","line":1075,"updated":"2015-11-23 19:47:04.000000000","message":"What happens when reservations\u003dNone? You need protection for that in this method or in something\u0027s that\u0027s calling this method.","commit_id":"7e2cc104fa069554a1afcf33cf3c1787cfb9f396"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"072fc2576be1bd6148419747cb29598fa141154f","unresolved":false,"context_lines":[{"line_number":1072,"context_line":"            if image_volume:"},{"line_number":1073,"context_line":"                self.delete_volume(ctx, image_volume.id)"},{"line_number":1074,"context_line":""},{"line_number":1075,"context_line":"    def _clone_image_volume(self, ctx, volume, image_meta, reservations\u003dNone):"},{"line_number":1076,"context_line":"        volume_type_id \u003d volume.get(\u0027volume_type_id\u0027)"},{"line_number":1077,"context_line":"        try:"},{"line_number":1078,"context_line":"            new_vol_values \u003d {}"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a8ffd7b_94c5ab5c","line":1075,"in_reply_to":"9a8ffd7b_2049218c","updated":"2015-11-24 18:47:16.000000000","message":"So, what protection could be given at the beginning of copy_volume_to_image? Should it raise an exception and fail? If I add the if statement into this function just before committing reservations it would still do everything else, but if it should fail instead I agree putting it at the beginning of copy_volume_to_image would be better.","commit_id":"7e2cc104fa069554a1afcf33cf3c1787cfb9f396"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"fe843ba372c49b1483cbac8cefcb07b98ae24f0c","unresolved":false,"context_lines":[{"line_number":1072,"context_line":"            if image_volume:"},{"line_number":1073,"context_line":"                self.delete_volume(ctx, image_volume.id)"},{"line_number":1074,"context_line":""},{"line_number":1075,"context_line":"    def _clone_image_volume(self, ctx, volume, image_meta, reservations\u003dNone):"},{"line_number":1076,"context_line":"        volume_type_id \u003d volume.get(\u0027volume_type_id\u0027)"},{"line_number":1077,"context_line":"        try:"},{"line_number":1078,"context_line":"            new_vol_values \u003d {}"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a8ffd7b_7f37bbb0","line":1075,"in_reply_to":"9a8ffd7b_315acc84","updated":"2015-11-24 20:46:02.000000000","message":"Oh yeah, that does complicate things. Well, in my first patch I just pushed up that breaks this up into smaller chunks I didn\u0027t include that one, so I won\u0027t put it in the next patch either for now.","commit_id":"7e2cc104fa069554a1afcf33cf3c1787cfb9f396"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"13d825f1fbb7e1ed98bdee2a8818cd55a4ec4fb3","unresolved":false,"context_lines":[{"line_number":1072,"context_line":"            if image_volume:"},{"line_number":1073,"context_line":"                self.delete_volume(ctx, image_volume.id)"},{"line_number":1074,"context_line":""},{"line_number":1075,"context_line":"    def _clone_image_volume(self, ctx, volume, image_meta, reservations\u003dNone):"},{"line_number":1076,"context_line":"        volume_type_id \u003d volume.get(\u0027volume_type_id\u0027)"},{"line_number":1077,"context_line":"        try:"},{"line_number":1078,"context_line":"            new_vol_values \u003d {}"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a8ffd7b_315acc84","line":1075,"in_reply_to":"9a8ffd7b_94c5ab5c","updated":"2015-11-24 20:11:04.000000000","message":"Oh, now when I think of it… This is a \"little\" more complicated… :(\n\nLook at if-else block in L1194-L1206. We\u0027re doing reservations *only if* self.driver.configuration.image_upload_use_cinder_backend is True. This means that to do reservations in the API we would need to decide there. I\u0027m not sure if it\u0027s even possible. We don\u0027t have access to the driver there. Even if we\u0027ve had node with c-api can have different config than c-vol.\n\nBased on that reasoning I think that the reservation for copy_volume_to_image should be left in manager.","commit_id":"7e2cc104fa069554a1afcf33cf3c1787cfb9f396"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"ca6579d055fe954c8366d5975e436320efd3227f","unresolved":false,"context_lines":[{"line_number":1072,"context_line":"            if image_volume:"},{"line_number":1073,"context_line":"                self.delete_volume(ctx, image_volume.id)"},{"line_number":1074,"context_line":""},{"line_number":1075,"context_line":"    def _clone_image_volume(self, ctx, volume, image_meta, reservations\u003dNone):"},{"line_number":1076,"context_line":"        volume_type_id \u003d volume.get(\u0027volume_type_id\u0027)"},{"line_number":1077,"context_line":"        try:"},{"line_number":1078,"context_line":"            new_vol_values \u003d {}"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a8ffd7b_2049218c","line":1075,"in_reply_to":"ba8a016a_5fd4e9bb","updated":"2015-11-24 17:51:41.000000000","message":"Hm, maybe doing an if at the beginning of copy_volume_to_image sounds better, but I don\u0027t have a strong preference, so whatever works for you.","commit_id":"7e2cc104fa069554a1afcf33cf3c1787cfb9f396"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"0a94f1118a70e5fc0bfed636e0964bf9703138c1","unresolved":false,"context_lines":[{"line_number":1072,"context_line":"            if image_volume:"},{"line_number":1073,"context_line":"                self.delete_volume(ctx, image_volume.id)"},{"line_number":1074,"context_line":""},{"line_number":1075,"context_line":"    def _clone_image_volume(self, ctx, volume, image_meta, reservations\u003dNone):"},{"line_number":1076,"context_line":"        volume_type_id \u003d volume.get(\u0027volume_type_id\u0027)"},{"line_number":1077,"context_line":"        try:"},{"line_number":1078,"context_line":"            new_vol_values \u003d {}"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba8a016a_5fd4e9bb","line":1075,"in_reply_to":"ba8a016a_81bc416d","updated":"2015-11-23 23:51:33.000000000","message":"I think putting an if statement before the commit at the end of this function would probably be sufficient, since the only API call that reaches this method is copy_volume_to_image, and if it passes along None that means it caught an exception when getting reservations. If that sounds right I\u0027ll add that in when splitting this up into two patches.","commit_id":"7e2cc104fa069554a1afcf33cf3c1787cfb9f396"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"232fe05f74c4461b17ca29ae98f1f9ebac0b7fd8","unresolved":false,"context_lines":[{"line_number":1171,"context_line":"        return True"},{"line_number":1172,"context_line":""},{"line_number":1173,"context_line":"    def copy_volume_to_image(self, context, volume_id, image_meta,"},{"line_number":1174,"context_line":"                             reservations\u003dNone):"},{"line_number":1175,"context_line":"        \"\"\"Uploads the specified volume to Glance."},{"line_number":1176,"context_line":""},{"line_number":1177,"context_line":"        image_meta is a dictionary containing the following keys:"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba8a016a_21223502","line":1174,"updated":"2015-11-23 19:47:04.000000000","message":"What happens if reservations are none? You don\u0027t have protection for that here.","commit_id":"7e2cc104fa069554a1afcf33cf3c1787cfb9f396"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"0a94f1118a70e5fc0bfed636e0964bf9703138c1","unresolved":false,"context_lines":[{"line_number":1171,"context_line":"        return True"},{"line_number":1172,"context_line":""},{"line_number":1173,"context_line":"    def copy_volume_to_image(self, context, volume_id, image_meta,"},{"line_number":1174,"context_line":"                             reservations\u003dNone):"},{"line_number":1175,"context_line":"        \"\"\"Uploads the specified volume to Glance."},{"line_number":1176,"context_line":""},{"line_number":1177,"context_line":"        image_meta is a dictionary containing the following keys:"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba8a016a_1fd741c0","line":1174,"in_reply_to":"ba8a016a_21223502","updated":"2015-11-23 23:51:33.000000000","message":"will be addressed in _clone_image_volume","commit_id":"7e2cc104fa069554a1afcf33cf3c1787cfb9f396"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"232fe05f74c4461b17ca29ae98f1f9ebac0b7fd8","unresolved":false,"context_lines":[{"line_number":2056,"context_line":"               old_reservations\u003dNone, volume\u003dNone):"},{"line_number":2057,"context_line":""},{"line_number":2058,"context_line":"        def _retype_error(context, volume, old_reservations,"},{"line_number":2059,"context_line":"                          reservations, status_update):"},{"line_number":2060,"context_line":"            try:"},{"line_number":2061,"context_line":"                volume.update(status_update)"},{"line_number":2062,"context_line":"                volume.save()"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba8a016a_e17c2db7","line":2059,"updated":"2015-11-23 19:47:04.000000000","message":"You probably don\u0027t need to rename that - it\u0027s only an internal method.","commit_id":"7e2cc104fa069554a1afcf33cf3c1787cfb9f396"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"0a94f1118a70e5fc0bfed636e0964bf9703138c1","unresolved":false,"context_lines":[{"line_number":2056,"context_line":"               old_reservations\u003dNone, volume\u003dNone):"},{"line_number":2057,"context_line":""},{"line_number":2058,"context_line":"        def _retype_error(context, volume, old_reservations,"},{"line_number":2059,"context_line":"                          reservations, status_update):"},{"line_number":2060,"context_line":"            try:"},{"line_number":2061,"context_line":"                volume.update(status_update)"},{"line_number":2062,"context_line":"                volume.save()"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba8a016a_7f952de2","line":2059,"in_reply_to":"ba8a016a_e17c2db7","updated":"2015-11-23 23:51:33.000000000","message":"Doesn\u0027t it make the code more readable to have it all just be \u0027reservations\u0027 rather than having it sometimes be passed in as \u0027new_reservations\u0027 though?","commit_id":"7e2cc104fa069554a1afcf33cf3c1787cfb9f396"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"232fe05f74c4461b17ca29ae98f1f9ebac0b7fd8","unresolved":false,"context_lines":[{"line_number":2704,"context_line":"                              resource\u003d{\u0027type\u0027: \u0027consistency_group\u0027,"},{"line_number":2705,"context_line":"                                        \u0027id\u0027: group.id})"},{"line_number":2706,"context_line":""},{"line_number":2707,"context_line":"        if not reservations_list:"},{"line_number":2708,"context_line":"            get_reservations \u003d True"},{"line_number":2709,"context_line":"            reservations_list \u003d []"},{"line_number":2710,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba8a016a_e418bb77","line":2707,"updated":"2015-11-23 19:47:04.000000000","message":"Are you sure the block between L2707-L2732 is needed to be done that way? If get_reservations\u0027s False we don\u0027t need to iterate over volumes… This looks like needing refactoring  - am I missing something?\n\nAh, and remember that \"not reservation_list\" condition will be true for []. If we\u0027ve got empty list do we need to make reservations?","commit_id":"7e2cc104fa069554a1afcf33cf3c1787cfb9f396"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"ef10404ea95219ce90aa64bcd1b1b0ba695ad40c","unresolved":false,"context_lines":[{"line_number":2704,"context_line":"                              resource\u003d{\u0027type\u0027: \u0027consistency_group\u0027,"},{"line_number":2705,"context_line":"                                        \u0027id\u0027: group.id})"},{"line_number":2706,"context_line":""},{"line_number":2707,"context_line":"        if not reservations_list:"},{"line_number":2708,"context_line":"            get_reservations \u003d True"},{"line_number":2709,"context_line":"            reservations_list \u003d []"},{"line_number":2710,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a8ffd7b_df55871d","line":2707,"in_reply_to":"ba8a016a_e418bb77","updated":"2015-11-24 20:57:53.000000000","message":"Ah wait I\u0027m looking at this section again now and I remembered why I iterated over the volumes if get_reservations is None. I thought we should still be deleting glance metadata if it exists. This should still be refactored though, that should be in a separate loop outside of this conditional.","commit_id":"7e2cc104fa069554a1afcf33cf3c1787cfb9f396"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"ce71f1a4503e53456a197aaa0bf60750ee1e8bb3","unresolved":false,"context_lines":[{"line_number":2704,"context_line":"                              resource\u003d{\u0027type\u0027: \u0027consistency_group\u0027,"},{"line_number":2705,"context_line":"                                        \u0027id\u0027: group.id})"},{"line_number":2706,"context_line":""},{"line_number":2707,"context_line":"        if not reservations_list:"},{"line_number":2708,"context_line":"            get_reservations \u003d True"},{"line_number":2709,"context_line":"            reservations_list \u003d []"},{"line_number":2710,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba8a016a_7ab302ea","line":2707,"in_reply_to":"ba8a016a_e418bb77","updated":"2015-11-23 20:48:01.000000000","message":"Oh I didn\u0027t include the line \u0027if get reservations\u0027 before looping through the volumes, thanks for catching that. We also obviously don\u0027t need to make reservations for an empty list, so I\u0027ll update that conditional.","commit_id":"7e2cc104fa069554a1afcf33cf3c1787cfb9f396"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"232fe05f74c4461b17ca29ae98f1f9ebac0b7fd8","unresolved":false,"context_lines":[{"line_number":3064,"context_line":"                        snapshot.status \u003d \u0027error\u0027"},{"line_number":3065,"context_line":"                        snapshot.save()"},{"line_number":3066,"context_line":""},{"line_number":3067,"context_line":"        if not reservations_list:"},{"line_number":3068,"context_line":"            get_reservations \u003d True"},{"line_number":3069,"context_line":"            reservations_list \u003d []"},{"line_number":3070,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba8a016a_04429f3e","line":3067,"updated":"2015-11-23 19:47:04.000000000","message":"Ditto.","commit_id":"7e2cc104fa069554a1afcf33cf3c1787cfb9f396"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"232fe05f74c4461b17ca29ae98f1f9ebac0b7fd8","unresolved":false,"context_lines":[{"line_number":3080,"context_line":"                    else:"},{"line_number":3081,"context_line":"                        reserve_opts \u003d {"},{"line_number":3082,"context_line":"                            \u0027snapshots\u0027: -1,"},{"line_number":3083,"context_line":"                            \u0027gigabyts\u0027: -snapshot[\u0027volume_size\u0027],"},{"line_number":3084,"context_line":"                        }"},{"line_number":3085,"context_line":"                    volume_ref \u003d self.db.volume_get(context,"},{"line_number":3086,"context_line":"                                                    snapshot[\u0027volume_id\u0027])"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba8a016a_a485d359","line":3083,"updated":"2015-11-23 19:47:04.000000000","message":"s/gigabyts/gigabytes","commit_id":"7e2cc104fa069554a1afcf33cf3c1787cfb9f396"}],"cinder/volume/rpcapi.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"8b36687e6cce4f27aab4c418b84e2ca249b84916","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        return cctxt.call(ctxt, \u0027accept_transfer\u0027, volume_id\u003dvolume[\u0027id\u0027],"},{"line_number":213,"context_line":"                          new_user\u003dnew_user, new_project\u003dnew_project)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    def extend_volume(self, ctxt, volume, new_size):"},{"line_number":216,"context_line":"        new_host \u003d utils.extract_host(volume[\u0027host\u0027])"},{"line_number":217,"context_line":"        cctxt \u003d self.client.prepare(server\u003dnew_host, version\u003d\u00271.14\u0027)"},{"line_number":218,"context_line":"        cctxt.cast(ctxt, \u0027extend_volume\u0027, volume_id\u003dvolume[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_30aaca86","line":215,"updated":"2015-11-13 12:20:32.000000000","message":"Also that\u0027s non-backward compatible change. See [1].\n\n[1] http://www.danplanet.com/blog/2015/10/05/upgrades-in-nova-rpc-apis/","commit_id":"1b70c87c2227bfd4c5737a703457fc1e27af98c4"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"8b36687e6cce4f27aab4c418b84e2ca249b84916","unresolved":false,"context_lines":[{"line_number":235,"context_line":"                          error\u003derror)"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"    def retype(self, ctxt, volume, new_type_id, dest_host,"},{"line_number":238,"context_line":"               migration_policy\u003d\u0027never\u0027):"},{"line_number":239,"context_line":"        new_host \u003d utils.extract_host(volume[\u0027host\u0027])"},{"line_number":240,"context_line":"        cctxt \u003d self.client.prepare(server\u003dnew_host, version\u003d\u00271.12\u0027)"},{"line_number":241,"context_line":"        host_p \u003d {\u0027host\u0027: dest_host.host,"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_b09eba61","line":238,"updated":"2015-11-13 12:20:32.000000000","message":"ditto","commit_id":"1b70c87c2227bfd4c5737a703457fc1e27af98c4"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"4fb2d7717db64b1773a55446cf6e7948ce97addd","unresolved":false,"context_lines":[{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    def retype(self, ctxt, volume, new_type_id, dest_host,"},{"line_number":266,"context_line":"               migration_policy\u003d\u0027never\u0027, old_reservations\u003dNone,"},{"line_number":267,"context_line":"               new_reservations\u003dNone):"},{"line_number":268,"context_line":"        host_p \u003d {\u0027host\u0027: dest_host.host,"},{"line_number":269,"context_line":"                  \u0027capabilities\u0027: dest_host.capabilities}"},{"line_number":270,"context_line":"        msg_args \u003d {\u0027volume_id\u0027: volume.id, \u0027new_type_id\u0027: new_type_id,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_418a12c1","line":267,"updated":"2015-11-17 02:36:04.000000000","message":"I feel this will break the backward compatibility and rolling upgrade by change reservation to new_reservations. Could it be \"reservation\u003dNone, old_reservations\u003dNone\"?","commit_id":"6f42240592b808761a374545a70de5b4c3a54f98"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"0b2581a419cf3d4c5ecbca9cd60f00c4be5ec3a4","unresolved":false,"context_lines":[{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    def retype(self, ctxt, volume, new_type_id, dest_host,"},{"line_number":266,"context_line":"               migration_policy\u003d\u0027never\u0027, old_reservations\u003dNone,"},{"line_number":267,"context_line":"               new_reservations\u003dNone):"},{"line_number":268,"context_line":"        host_p \u003d {\u0027host\u0027: dest_host.host,"},{"line_number":269,"context_line":"                  \u0027capabilities\u0027: dest_host.capabilities}"},{"line_number":270,"context_line":"        msg_args \u003d {\u0027volume_id\u0027: volume.id, \u0027new_type_id\u0027: new_type_id,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_e707681a","line":267,"in_reply_to":"ba8a016a_418a12c1","updated":"2015-11-17 19:38:37.000000000","message":"Done","commit_id":"6f42240592b808761a374545a70de5b4c3a54f98"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"11d160dd61433ad8427f61483c23c40f664e1e05","unresolved":false,"context_lines":[{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    def retype(self, ctxt, volume, new_type_id, dest_host,"},{"line_number":266,"context_line":"               migration_policy\u003d\u0027never\u0027, old_reservations\u003dNone,"},{"line_number":267,"context_line":"               new_reservations\u003dNone):"},{"line_number":268,"context_line":"        host_p \u003d {\u0027host\u0027: dest_host.host,"},{"line_number":269,"context_line":"                  \u0027capabilities\u0027: dest_host.capabilities}"},{"line_number":270,"context_line":"        msg_args \u003d {\u0027volume_id\u0027: volume.id, \u0027new_type_id\u0027: new_type_id,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_f803b3b6","line":267,"in_reply_to":"ba8a016a_418a12c1","updated":"2015-11-17 04:56:21.000000000","message":"yes, I can do that - I\u0027ll get an update out tomorrow.","commit_id":"6f42240592b808761a374545a70de5b4c3a54f98"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"c570c2dd5ee9be358da5c27081526947af2fc367","unresolved":false,"context_lines":[{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    def retype(self, ctxt, volume, new_type_id, dest_host,"},{"line_number":266,"context_line":"               migration_policy\u003d\u0027never\u0027, old_reservations\u003dNone,"},{"line_number":267,"context_line":"               reservations\u003dNone):"},{"line_number":268,"context_line":"        host_p \u003d {\u0027host\u0027: dest_host.host,"},{"line_number":269,"context_line":"                  \u0027capabilities\u0027: dest_host.capabilities}"},{"line_number":270,"context_line":"        msg_args \u003d {\u0027volume_id\u0027: volume.id, \u0027new_type_id\u0027: new_type_id,"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba8a016a_7f5f6de5","line":267,"updated":"2015-11-18 03:16:12.000000000","message":"suggest we adjust the order of params, like reservation \u003d None, old_reservations \u003d None.","commit_id":"542b64d203571ab4147435abde59a312a66f9632"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"2fcef053d6878643c7104b6d474cb74825d386eb","unresolved":false,"context_lines":[{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    def retype(self, ctxt, volume, new_type_id, dest_host,"},{"line_number":266,"context_line":"               migration_policy\u003d\u0027never\u0027, old_reservations\u003dNone,"},{"line_number":267,"context_line":"               reservations\u003dNone):"},{"line_number":268,"context_line":"        host_p \u003d {\u0027host\u0027: dest_host.host,"},{"line_number":269,"context_line":"                  \u0027capabilities\u0027: dest_host.capabilities}"},{"line_number":270,"context_line":"        msg_args \u003d {\u0027volume_id\u0027: volume.id, \u0027new_type_id\u0027: new_type_id,"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba8a016a_f82d97a8","line":267,"in_reply_to":"ba8a016a_7f5f6de5","updated":"2015-11-18 15:27:13.000000000","message":"Done","commit_id":"542b64d203571ab4147435abde59a312a66f9632"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"79c9723d758a1016d38bb3460facb91717da5f17","unresolved":false,"context_lines":[{"line_number":111,"context_line":"                                reservations_list\u003dNone,"},{"line_number":112,"context_line":"                                cgreservations\u003dNone):"},{"line_number":113,"context_line":"        host \u003d utils.extract_host(group.host)"},{"line_number":114,"context_line":"        cctxt \u003d self.client.prepare(server\u003dhost, version\u003d\u00271.26\u0027)"},{"line_number":115,"context_line":"        cctxt.cast(ctxt, \u0027delete_consistencygroup\u0027,"},{"line_number":116,"context_line":"                   group\u003dgroup, reservations_list\u003dreservations_list,"},{"line_number":117,"context_line":"                   cgreservations\u003dcgreservations)"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba8a016a_df92729f","line":114,"updated":"2015-11-20 18:03:32.000000000","message":"You\u0027re changing this, so it\u0027s 1.36 now. Same for other methods.","commit_id":"92ddc0b89a8b6c4ac6bf9cac14163a30ca4ce09f"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"232fe05f74c4461b17ca29ae98f1f9ebac0b7fd8","unresolved":false,"context_lines":[{"line_number":167,"context_line":"                      reservations\u003dNone):"},{"line_number":168,"context_line":"        msg_args \u003d {\u0027volume_id\u0027: volume.id, \u0027unmanage_only\u0027: unmanage_only,"},{"line_number":169,"context_line":"                    \u0027reservations\u0027: reservations}"},{"line_number":170,"context_line":"        if self.client.can_send_version(\u00271.36\u0027):"},{"line_number":171,"context_line":"            version \u003d \u00271.36\u0027"},{"line_number":172,"context_line":"            msg_args[\u0027volume\u0027] \u003d volume"},{"line_number":173,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba8a016a_014cd140","line":170,"updated":"2015-11-23 19:47:04.000000000","message":"You shouldn\u0027t change it that way. It\u0027s supposed to be something like:\n\n msg_args \u003d {\u0027volume_id\u0027: volume.id, \u0027unmanage_only\u0027: unmanage_only,\n             \u0027reservations\u0027: reservations, \u0027volume\u0027: volume}\n\nversion \u003d \u00271.36\u0027\n if not self.client.can_send_version(\u00271.36\u0027):\n     version \u003d \u00271.33\u0027\n     msg_args.pop(\u0027reservations\u0027)\n if not self.client.can_send_version(\u00271.33\u0027):\n     version \u003d \u00271.15\u0027\n     msg_args.pop(\u0027volume\u0027)\n\nYou can refer to Dan Smith\u0027s post explaining that [1]. I believe you should make similar changes in rest of changed calls. I\u0027m adding thangp as reviewer to confirm.\n\n[1] http://www.danplanet.com/blog/2015/10/05/upgrades-in-nova-rpc-apis/","commit_id":"7e2cc104fa069554a1afcf33cf3c1787cfb9f396"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"ce71f1a4503e53456a197aaa0bf60750ee1e8bb3","unresolved":false,"context_lines":[{"line_number":167,"context_line":"                      reservations\u003dNone):"},{"line_number":168,"context_line":"        msg_args \u003d {\u0027volume_id\u0027: volume.id, \u0027unmanage_only\u0027: unmanage_only,"},{"line_number":169,"context_line":"                    \u0027reservations\u0027: reservations}"},{"line_number":170,"context_line":"        if self.client.can_send_version(\u00271.36\u0027):"},{"line_number":171,"context_line":"            version \u003d \u00271.36\u0027"},{"line_number":172,"context_line":"            msg_args[\u0027volume\u0027] \u003d volume"},{"line_number":173,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba8a016a_5a6e3eca","line":170,"in_reply_to":"ba8a016a_014cd140","updated":"2015-11-23 20:48:01.000000000","message":"Ah okay, thanks for the resource!","commit_id":"7e2cc104fa069554a1afcf33cf3c1787cfb9f396"}]}
