)]}'
{"nova/api/openstack/compute/assisted_volume_snapshots.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"58001dfd28355873e541b1a62edf50b7d5ff596c","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        self.compute_api \u003d compute.API()"},{"line_number":40,"context_line":"        super(AssistedVolumeSnapshotsController, self).__init__()"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    @extensions.expected_errors((400, 409))"},{"line_number":43,"context_line":"    @validation.schema(assisted_volume_snapshots.snapshots_create)"},{"line_number":44,"context_line":"    def create(self, req, body):"},{"line_number":45,"context_line":"        \"\"\"Creates a new snapshot.\"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a430d35_49c80423","line":42,"updated":"2017-02-06 17:19:22.000000000","message":"I\u0027m not bumping the microversion for this because it\u0027s changing a 500 error to a 40x error, which while not directly called out in our docs:\n\nhttp://docs.openstack.org/developer/nova/api_microversion_dev.html#f1\n\nhttp://docs.openstack.org/developer/nova/api_microversion_dev.html#f2\n\nSeems like the same idea. I could return a 400 for this, but it\u0027s really a 409 if we handle InstanceInvalidState in here the same way we do everywhere else.","commit_id":"6b2d139ca463f047eca97ea82c0bb060af3f5740"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"039b0aa4e1dc2facd294a758e524a30d148785fd","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        self.compute_api \u003d compute.API()"},{"line_number":40,"context_line":"        super(AssistedVolumeSnapshotsController, self).__init__()"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    @extensions.expected_errors((400, 409))"},{"line_number":43,"context_line":"    @validation.schema(assisted_volume_snapshots.snapshots_create)"},{"line_number":44,"context_line":"    def create(self, req, body):"},{"line_number":45,"context_line":"        \"\"\"Creates a new snapshot.\"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"da36d5c6_39819b4e","line":42,"range":{"start_line":42,"start_character":37,"end_line":42,"end_character":41},"updated":"2017-02-28 08:42:38.000000000","message":"can we do it with 400 ?  I agree with you that this bug fix does not need microversion but we disallowed the new error code without version bump expect those we have exceptions in doc. \n\nBut i am happy to iterate the doc for fixing 500 without version bump.","commit_id":"ab39d1033b27da752d6c60a3b21e0040deda77ed"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d5b1d404cda74435d20068b914ae20bb42073f4e","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        self.compute_api \u003d compute.API()"},{"line_number":40,"context_line":"        super(AssistedVolumeSnapshotsController, self).__init__()"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    @extensions.expected_errors((400, 409))"},{"line_number":43,"context_line":"    @validation.schema(assisted_volume_snapshots.snapshots_create)"},{"line_number":44,"context_line":"    def create(self, req, body):"},{"line_number":45,"context_line":"        \"\"\"Creates a new snapshot.\"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba2be162_f7d0c755","line":42,"range":{"start_line":42,"start_character":37,"end_line":42,"end_character":41},"in_reply_to":"ba2be162_a851db10","updated":"2017-03-01 20:04:37.000000000","message":"I used a 409 because that\u0027s what we use everywhere else for InstanceInvalidState and InstanceNotReady. 400 would work, but it\u0027s inconsistent. Having said that, I\u0027d prefer to fix with the 400 rather than introduce a microversion to avoid a 500. It seems like our priority is wrong though. But yeah the doc link above is pretty clear, and I know we\u0027ve been down this road before and that\u0027s why we wrote the doc, so I\u0027ll change to a 400.","commit_id":"ab39d1033b27da752d6c60a3b21e0040deda77ed"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"7d59fc1b93e3b24c69cdbcb8a56133455d3ccd93","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        self.compute_api \u003d compute.API()"},{"line_number":40,"context_line":"        super(AssistedVolumeSnapshotsController, self).__init__()"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    @extensions.expected_errors((400, 409))"},{"line_number":43,"context_line":"    @validation.schema(assisted_volume_snapshots.snapshots_create)"},{"line_number":44,"context_line":"    def create(self, req, body):"},{"line_number":45,"context_line":"        \"\"\"Creates a new snapshot.\"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba2be162_a851db10","line":42,"range":{"start_line":42,"start_character":37,"end_line":42,"end_character":41},"in_reply_to":"da36d5c6_39819b4e","updated":"2017-02-28 13:08:29.000000000","message":"I guess you point to this doc https://docs.openstack.org/developer/nova/api_microversion_dev.html#f1\n\nSo I think you are right.","commit_id":"ab39d1033b27da752d6c60a3b21e0040deda77ed"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"aa69b7df66fcdf8513273456c47ee5d08651c8bc","unresolved":false,"context_lines":[{"line_number":59,"context_line":"            raise exc.HTTPBadRequest(explanation\u003derror.format_message())"},{"line_number":60,"context_line":"        except (exception.InstanceInvalidState,"},{"line_number":61,"context_line":"                exception.InstanceNotReady) as e:"},{"line_number":62,"context_line":"            # TODO(mriedem) InstanceInvalidState and InstanceNotReady would"},{"line_number":63,"context_line":"            # normally result in a 409 but that would require bumping the"},{"line_number":64,"context_line":"            # microversion, which we should just do in a single microversion"},{"line_number":65,"context_line":"            # across all APIs when we fix status code wrinkles."},{"line_number":66,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    @wsgi.response(204)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba2be162_cb4dd79a","line":65,"range":{"start_line":62,"start_character":0,"end_line":65,"end_character":63},"updated":"2017-03-02 04:15:13.000000000","message":"nice.+1","commit_id":"dbe0a0c95d4e631c834df0eed165e9ee5915a791"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"90bd702792adcfe2b573347a44ffe7081b821331","unresolved":false,"context_lines":[{"line_number":62,"context_line":"            # TODO(mriedem) InstanceInvalidState and InstanceNotReady would"},{"line_number":63,"context_line":"            # normally result in a 409 but that would require bumping the"},{"line_number":64,"context_line":"            # microversion, which we should just do in a single microversion"},{"line_number":65,"context_line":"            # across all APIs when we fix status code wrinkles."},{"line_number":66,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    @wsgi.response(204)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba2be162_68e386d9","line":65,"updated":"2017-03-05 15:28:07.000000000","message":"++ for the note","commit_id":"70afc0d5408aaae8beb587682fe26c124c0cacee"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a411eb603ddddda6124ac5160bd39c024d8a673f","unresolved":false,"context_lines":[{"line_number":62,"context_line":"            # TODO(mriedem) InstanceInvalidState and InstanceNotReady would"},{"line_number":63,"context_line":"            # normally result in a 409 but that would require bumping the"},{"line_number":64,"context_line":"            # microversion, which we should just do in a single microversion"},{"line_number":65,"context_line":"            # across all APIs when we fix status code wrinkles."},{"line_number":66,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    @wsgi.response(204)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a1ced50_64a4a8b9","line":65,"in_reply_to":"ba2be162_68e386d9","updated":"2017-03-22 13:14:58.000000000","message":"+1","commit_id":"70afc0d5408aaae8beb587682fe26c124c0cacee"}],"nova/compute/api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f9f3986c4415afa535cde61f3141e512b79e1fab","unresolved":false,"context_lines":[{"line_number":4028,"context_line":"        bdm \u003d objects.BlockDeviceMapping.get_by_volume("},{"line_number":4029,"context_line":"                context, volume_id, expected_attrs\u003d[\u0027instance\u0027])"},{"line_number":4030,"context_line":""},{"line_number":4031,"context_line":"        @check_instance_state(vm_state\u003d[vm_states.ACTIVE, vm_states.PAUSED,"},{"line_number":4032,"context_line":"                                        vm_states.STOPPED])"},{"line_number":4033,"context_line":"        def do_volume_snapshot_create(self, context, instance):"},{"line_number":4034,"context_line":"            self.compute_rpcapi.volume_snapshot_create(context, instance,"},{"line_number":4035,"context_line":"                    volume_id, create_info)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a430d35_44ef0bb0","line":4032,"range":{"start_line":4031,"start_character":8,"end_line":4032,"end_character":59},"updated":"2017-02-06 17:40:00.000000000","message":"This should follow snapshot_volume_backed:\n\nhttps://github.com/openstack/nova/blob/9ae5b2306b7a7cc9e77c77292256b13926920ead/nova/compute/api.py#L2805","commit_id":"6b2d139ca463f047eca97ea82c0bb060af3f5740"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"54503b476e9a8c4e4e4b01e0f216874d58f181b2","unresolved":false,"context_lines":[{"line_number":4023,"context_line":"        return objects.Migration.get_by_id_and_instance("},{"line_number":4024,"context_line":"                context, migration_id, instance_uuid)"},{"line_number":4025,"context_line":""},{"line_number":4026,"context_line":"    def volume_snapshot_create(self, context, volume_id, create_info):"},{"line_number":4027,"context_line":"        bdm \u003d objects.BlockDeviceMapping.get_by_volume("},{"line_number":4028,"context_line":"                context, volume_id, expected_attrs\u003d[\u0027instance\u0027])"},{"line_number":4029,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a430d35_1e7b79f6","line":4026,"updated":"2017-02-07 06:23:54.000000000","message":"Why we didn\u0027t check the instance state at here? Then we can save a db call at line 4027.","commit_id":"121eb371b4bc886d4043741891ab49b418444bd1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"97350d853b682a16c646dacb7716f0087680003f","unresolved":false,"context_lines":[{"line_number":4023,"context_line":"        return objects.Migration.get_by_id_and_instance("},{"line_number":4024,"context_line":"                context, migration_id, instance_uuid)"},{"line_number":4025,"context_line":""},{"line_number":4026,"context_line":"    def volume_snapshot_create(self, context, volume_id, create_info):"},{"line_number":4027,"context_line":"        bdm \u003d objects.BlockDeviceMapping.get_by_volume("},{"line_number":4028,"context_line":"                context, volume_id, expected_attrs\u003d[\u0027instance\u0027])"},{"line_number":4029,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a430d35_5a004d66","line":4026,"in_reply_to":"1a430d35_1e7b79f6","updated":"2017-02-08 22:21:31.000000000","message":"Because we don\u0027t have the instance here. @check_instance_state requires that the args start with (context, instance, *args, **kwargs) so it fails if you decorate the method.","commit_id":"121eb371b4bc886d4043741891ab49b418444bd1"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"72e4685bed6e261a8d4e88b6062f1c0f0537b644","unresolved":false,"context_lines":[{"line_number":4023,"context_line":"        return objects.Migration.get_by_id_and_instance("},{"line_number":4024,"context_line":"                context, migration_id, instance_uuid)"},{"line_number":4025,"context_line":""},{"line_number":4026,"context_line":"    def volume_snapshot_create(self, context, volume_id, create_info):"},{"line_number":4027,"context_line":"        bdm \u003d objects.BlockDeviceMapping.get_by_volume("},{"line_number":4028,"context_line":"                context, volume_id, expected_attrs\u003d[\u0027instance\u0027])"},{"line_number":4029,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a430d35_f4d5851b","line":4026,"in_reply_to":"1a430d35_5a004d66","updated":"2017-02-09 05:21:17.000000000","message":"Ah, I got it. But can we change the interface?","commit_id":"121eb371b4bc886d4043741891ab49b418444bd1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fe480fb4108d6ab346f66a4cf3c55d5906b70abf","unresolved":false,"context_lines":[{"line_number":4023,"context_line":"        return objects.Migration.get_by_id_and_instance("},{"line_number":4024,"context_line":"                context, migration_id, instance_uuid)"},{"line_number":4025,"context_line":""},{"line_number":4026,"context_line":"    def volume_snapshot_create(self, context, volume_id, create_info):"},{"line_number":4027,"context_line":"        bdm \u003d objects.BlockDeviceMapping.get_by_volume("},{"line_number":4028,"context_line":"                context, volume_id, expected_attrs\u003d[\u0027instance\u0027])"},{"line_number":4029,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa31d9ce_d499f66f","line":4026,"in_reply_to":"1a430d35_f4d5851b","updated":"2017-02-13 01:19:43.000000000","message":"Which one? volume_snapshot_create? To pass the instance to that, we\u0027d have to get the BDM in the REST API handler code first and pass it in here. I don\u0027t see a major gain in doing that versus just having the nested function in this method that gets us the same thing.","commit_id":"121eb371b4bc886d4043741891ab49b418444bd1"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"18f6390ba95901d6397f36228ecf32e4f18247c6","unresolved":false,"context_lines":[{"line_number":4023,"context_line":"        return objects.Migration.get_by_id_and_instance("},{"line_number":4024,"context_line":"                context, migration_id, instance_uuid)"},{"line_number":4025,"context_line":""},{"line_number":4026,"context_line":"    def volume_snapshot_create(self, context, volume_id, create_info):"},{"line_number":4027,"context_line":"        bdm \u003d objects.BlockDeviceMapping.get_by_volume("},{"line_number":4028,"context_line":"                context, volume_id, expected_attrs\u003d[\u0027instance\u0027])"},{"line_number":4029,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa31d9ce_da12ff61","line":4026,"in_reply_to":"fa31d9ce_d499f66f","updated":"2017-02-13 03:26:03.000000000","message":"yes, right, probably it isn\u0027t worth to do it.","commit_id":"121eb371b4bc886d4043741891ab49b418444bd1"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"54503b476e9a8c4e4e4b01e0f216874d58f181b2","unresolved":false,"context_lines":[{"line_number":4027,"context_line":"        bdm \u003d objects.BlockDeviceMapping.get_by_volume("},{"line_number":4028,"context_line":"                context, volume_id, expected_attrs\u003d[\u0027instance\u0027])"},{"line_number":4029,"context_line":""},{"line_number":4030,"context_line":"        @check_instance_state(vm_state\u003d[vm_states.ACTIVE, vm_states.STOPPED,"},{"line_number":4031,"context_line":"                                        vm_states.SUSPENDED])"},{"line_number":4032,"context_line":"        def do_volume_snapshot_create(self, context, instance):"},{"line_number":4033,"context_line":"            self.compute_rpcapi.volume_snapshot_create(context, instance,"},{"line_number":4034,"context_line":"                    volume_id, create_info)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a430d35_1e62993e","line":4031,"range":{"start_line":4030,"start_character":39,"end_line":4031,"end_character":60},"updated":"2017-02-07 06:23:54.000000000","message":"vm_states.PAUSED should works. and vm_states RESCUED should be ok also.","commit_id":"121eb371b4bc886d4043741891ab49b418444bd1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"97350d853b682a16c646dacb7716f0087680003f","unresolved":false,"context_lines":[{"line_number":4027,"context_line":"        bdm \u003d objects.BlockDeviceMapping.get_by_volume("},{"line_number":4028,"context_line":"                context, volume_id, expected_attrs\u003d[\u0027instance\u0027])"},{"line_number":4029,"context_line":""},{"line_number":4030,"context_line":"        @check_instance_state(vm_state\u003d[vm_states.ACTIVE, vm_states.STOPPED,"},{"line_number":4031,"context_line":"                                        vm_states.SUSPENDED])"},{"line_number":4032,"context_line":"        def do_volume_snapshot_create(self, context, instance):"},{"line_number":4033,"context_line":"            self.compute_rpcapi.volume_snapshot_create(context, instance,"},{"line_number":4034,"context_line":"                    volume_id, create_info)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a430d35_baf13197","line":4031,"range":{"start_line":4030,"start_character":39,"end_line":4031,"end_character":60},"in_reply_to":"1a430d35_1e62993e","updated":"2017-02-08 22:21:31.000000000","message":"I\u0027m following what we have for snapshot_volume_backed, which doesn\u0027t include PAUSED.","commit_id":"121eb371b4bc886d4043741891ab49b418444bd1"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"edf1d13e2004c153de6002e84570840e2e5c3772","unresolved":false,"context_lines":[{"line_number":4027,"context_line":"        bdm \u003d objects.BlockDeviceMapping.get_by_volume("},{"line_number":4028,"context_line":"                context, volume_id, expected_attrs\u003d[\u0027instance\u0027])"},{"line_number":4029,"context_line":""},{"line_number":4030,"context_line":"        @check_instance_state(vm_state\u003d[vm_states.ACTIVE, vm_states.STOPPED,"},{"line_number":4031,"context_line":"                                        vm_states.SUSPENDED])"},{"line_number":4032,"context_line":"        def do_volume_snapshot_create(self, context, instance):"},{"line_number":4033,"context_line":"            self.compute_rpcapi.volume_snapshot_create(context, instance,"},{"line_number":4034,"context_line":"                    volume_id, create_info)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a430d35_f824f8c5","line":4031,"range":{"start_line":4030,"start_character":39,"end_line":4031,"end_character":60},"in_reply_to":"1a430d35_1e62993e","updated":"2017-02-07 10:58:45.000000000","message":"yea,\nand RESIZED ? it wait for resize confirm but what happen when snapshot request on RESIZED VM? definitely it has host etc","commit_id":"121eb371b4bc886d4043741891ab49b418444bd1"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"72e4685bed6e261a8d4e88b6062f1c0f0537b644","unresolved":false,"context_lines":[{"line_number":4027,"context_line":"        bdm \u003d objects.BlockDeviceMapping.get_by_volume("},{"line_number":4028,"context_line":"                context, volume_id, expected_attrs\u003d[\u0027instance\u0027])"},{"line_number":4029,"context_line":""},{"line_number":4030,"context_line":"        @check_instance_state(vm_state\u003d[vm_states.ACTIVE, vm_states.STOPPED,"},{"line_number":4031,"context_line":"                                        vm_states.SUSPENDED])"},{"line_number":4032,"context_line":"        def do_volume_snapshot_create(self, context, instance):"},{"line_number":4033,"context_line":"            self.compute_rpcapi.volume_snapshot_create(context, instance,"},{"line_number":4034,"context_line":"                    volume_id, create_info)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a430d35_d466c9b9","line":4031,"range":{"start_line":4030,"start_character":39,"end_line":4031,"end_character":60},"in_reply_to":"1a430d35_baf13197","updated":"2017-02-09 05:21:17.000000000","message":"We only can fix the state which doesn\u0027t work without Microversion, due to it is a bug.. If disable some of states which works correctly before, that sounds we break the API contract.\n\nFor resized, I\u0027m not sure it is safe, there may have a revert happened during the snapshot, that may break something.","commit_id":"121eb371b4bc886d4043741891ab49b418444bd1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f9cbd799b992c633ec012eabc84edc27ff3312f1","unresolved":false,"context_lines":[{"line_number":4027,"context_line":"        bdm \u003d objects.BlockDeviceMapping.get_by_volume("},{"line_number":4028,"context_line":"                context, volume_id, expected_attrs\u003d[\u0027instance\u0027])"},{"line_number":4029,"context_line":""},{"line_number":4030,"context_line":"        @check_instance_state(vm_state\u003d[vm_states.ACTIVE, vm_states.STOPPED,"},{"line_number":4031,"context_line":"                                        vm_states.SUSPENDED])"},{"line_number":4032,"context_line":"        def do_volume_snapshot_create(self, context, instance):"},{"line_number":4033,"context_line":"            self.compute_rpcapi.volume_snapshot_create(context, instance,"},{"line_number":4034,"context_line":"                    volume_id, create_info)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da36d5c6_b7fa6641","line":4031,"range":{"start_line":4030,"start_character":39,"end_line":4031,"end_character":60},"in_reply_to":"1a430d35_d466c9b9","updated":"2017-02-23 21:12:24.000000000","message":"Alex, to be clear, you\u0027re saying you think we should only fix this in a microversion, even though we shouldn\u0027t be able to snapshot a volume-backed instance if it\u0027s shelved-offloaded, for example, which would today fail with a 500 error?\n\nThis seems like a straight-forward bug fix which is using the same list of accepted states for a normal snapshot of a volume-backed instance.\n\nI\u0027d be happy to add a release note for this to indicate the change in behavior for the fix.","commit_id":"121eb371b4bc886d4043741891ab49b418444bd1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"97350d853b682a16c646dacb7716f0087680003f","unresolved":false,"context_lines":[{"line_number":4027,"context_line":"        bdm \u003d objects.BlockDeviceMapping.get_by_volume("},{"line_number":4028,"context_line":"                context, volume_id, expected_attrs\u003d[\u0027instance\u0027])"},{"line_number":4029,"context_line":""},{"line_number":4030,"context_line":"        @check_instance_state(vm_state\u003d[vm_states.ACTIVE, vm_states.STOPPED,"},{"line_number":4031,"context_line":"                                        vm_states.SUSPENDED])"},{"line_number":4032,"context_line":"        def do_volume_snapshot_create(self, context, instance):"},{"line_number":4033,"context_line":"            self.compute_rpcapi.volume_snapshot_create(context, instance,"},{"line_number":4034,"context_line":"                    volume_id, create_info)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a430d35_9a3d552d","line":4031,"range":{"start_line":4030,"start_character":39,"end_line":4031,"end_character":60},"in_reply_to":"1a430d35_f824f8c5","updated":"2017-02-08 22:21:31.000000000","message":"Same answer as above - we don\u0027t allow snapshot of a volume-backed instance that\u0027s being resized either.","commit_id":"121eb371b4bc886d4043741891ab49b418444bd1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"127f6da02892db2844442c570e95ec728ffad93d","unresolved":false,"context_lines":[{"line_number":4027,"context_line":"        bdm \u003d objects.BlockDeviceMapping.get_by_volume("},{"line_number":4028,"context_line":"                context, volume_id, expected_attrs\u003d[\u0027instance\u0027])"},{"line_number":4029,"context_line":""},{"line_number":4030,"context_line":"        @check_instance_state(vm_state\u003d[vm_states.ACTIVE, vm_states.STOPPED,"},{"line_number":4031,"context_line":"                                        vm_states.SUSPENDED])"},{"line_number":4032,"context_line":"        def do_volume_snapshot_create(self, context, instance):"},{"line_number":4033,"context_line":"            self.compute_rpcapi.volume_snapshot_create(context, instance,"},{"line_number":4034,"context_line":"                    volume_id, create_info)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da36d5c6_d2bfe8a7","line":4031,"range":{"start_line":4030,"start_character":39,"end_line":4031,"end_character":60},"in_reply_to":"da36d5c6_128fc02a","updated":"2017-02-23 21:22:41.000000000","message":"Have you tried this with a paused instance? Does a snapshot of a volume-backed paused instance work in this case but *not* in the \"normal\" volume-backed snapshot case (not guest-assisted snapshot), i.e. not an FS style volume driver in Cinder like NFS.","commit_id":"121eb371b4bc886d4043741891ab49b418444bd1"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"1e98e91969caf83ede66769693adf7d4f98c9979","unresolved":false,"context_lines":[{"line_number":4027,"context_line":"        bdm \u003d objects.BlockDeviceMapping.get_by_volume("},{"line_number":4028,"context_line":"                context, volume_id, expected_attrs\u003d[\u0027instance\u0027])"},{"line_number":4029,"context_line":""},{"line_number":4030,"context_line":"        @check_instance_state(vm_state\u003d[vm_states.ACTIVE, vm_states.STOPPED,"},{"line_number":4031,"context_line":"                                        vm_states.SUSPENDED])"},{"line_number":4032,"context_line":"        def do_volume_snapshot_create(self, context, instance):"},{"line_number":4033,"context_line":"            self.compute_rpcapi.volume_snapshot_create(context, instance,"},{"line_number":4034,"context_line":"                    volume_id, create_info)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da36d5c6_128fc02a","line":4031,"range":{"start_line":4030,"start_character":39,"end_line":4031,"end_character":60},"in_reply_to":"da36d5c6_b7fa6641","updated":"2017-02-23 21:20:58.000000000","message":"I didn\u0027t say we should fix this in a microversion. But the states likes vm_states.PAUSE wouldn\u0027t fail with 500 error, that broke the rule how we fix bug without microversion.","commit_id":"121eb371b4bc886d4043741891ab49b418444bd1"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"9a6b2369f3ad140aa03d40f687a537a667c8c5c8","unresolved":false,"context_lines":[{"line_number":4027,"context_line":"        bdm \u003d objects.BlockDeviceMapping.get_by_volume("},{"line_number":4028,"context_line":"                context, volume_id, expected_attrs\u003d[\u0027instance\u0027])"},{"line_number":4029,"context_line":""},{"line_number":4030,"context_line":"        @check_instance_state(vm_state\u003d[vm_states.ACTIVE, vm_states.STOPPED,"},{"line_number":4031,"context_line":"                                        vm_states.SUSPENDED])"},{"line_number":4032,"context_line":"        def do_volume_snapshot_create(self, context, instance):"},{"line_number":4033,"context_line":"            self.compute_rpcapi.volume_snapshot_create(context, instance,"},{"line_number":4034,"context_line":"                    volume_id, create_info)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da36d5c6_cd25745c","line":4031,"range":{"start_line":4030,"start_character":39,"end_line":4031,"end_character":60},"in_reply_to":"da36d5c6_d2bfe8a7","updated":"2017-02-24 14:00:16.000000000","message":"Below patch for testing the pause and resize scenario. (depends-on on tempest tests patch and checking on nfs experimental job on nova side. )\n\n- https://review.openstack.org/#/c/430587/1","commit_id":"121eb371b4bc886d4043741891ab49b418444bd1"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"148e3c6b844d659849ee601b80f3c3abee3d77b9","unresolved":false,"context_lines":[{"line_number":4042,"context_line":"        # We allow creating the snapshot in any vm_state as long as there is"},{"line_number":4043,"context_line":"        # no task being performed on the instance and it has a host."},{"line_number":4044,"context_line":"        @check_instance_host"},{"line_number":4045,"context_line":"        @check_instance_state(vm_state\u003dNone)"},{"line_number":4046,"context_line":"        def do_volume_snapshot_create(self, context, instance):"},{"line_number":4047,"context_line":"            self.compute_rpcapi.volume_snapshot_create(context, instance,"},{"line_number":4048,"context_line":"                    volume_id, create_info)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba2be162_e1f708f3","line":4045,"updated":"2017-03-02 11:38:38.000000000","message":"This is a confusing api! Specifying vm_state\u003dNone here is both redundant (as None is the default anyway) and a no-op (because a value of None means we don\u0027t check vm_state). However, it *looks* like the intention here is to assert that vm_state is None, which it isn\u0027t.\n\nBy contrast, what we explicitly want to do here is assert that task_state is None. We don\u0027t have to specify this here because it\u0027s the default, which is a different default to vm_state. So we\u0027re explicitly specifying the default for a value which we\u0027re explicitly not interested in, but not specifying the default for the only value which we are explicitly interested in.\n\nThis is a confusing recipe for bugs. It seems to be consistently used this way throughout this file, though, so I guess it\u0027s not an issue with this patch. I might throw up a patch to make it more readable, though.","commit_id":"dbe0a0c95d4e631c834df0eed165e9ee5915a791"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8150b0bf6e8ec8c6e307a69f28a441e74b03cc0f","unresolved":false,"context_lines":[{"line_number":4042,"context_line":"        # We allow creating the snapshot in any vm_state as long as there is"},{"line_number":4043,"context_line":"        # no task being performed on the instance and it has a host."},{"line_number":4044,"context_line":"        @check_instance_host"},{"line_number":4045,"context_line":"        @check_instance_state(vm_state\u003dNone)"},{"line_number":4046,"context_line":"        def do_volume_snapshot_create(self, context, instance):"},{"line_number":4047,"context_line":"            self.compute_rpcapi.volume_snapshot_create(context, instance,"},{"line_number":4048,"context_line":"                    volume_id, create_info)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba2be162_54e95b7f","line":4045,"in_reply_to":"ba2be162_e1f708f3","updated":"2017-03-02 15:47:08.000000000","message":"I agree it\u0027s confusing and I have to put new wrinkles in my brain every time I have to use this decorator.","commit_id":"dbe0a0c95d4e631c834df0eed165e9ee5915a791"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"3e2d6468b3b36b76931ad0b80f8b74549dddc948","unresolved":false,"context_lines":[{"line_number":4042,"context_line":"        # We allow creating the snapshot in any vm_state as long as there is"},{"line_number":4043,"context_line":"        # no task being performed on the instance and it has a host."},{"line_number":4044,"context_line":"        @check_instance_host"},{"line_number":4045,"context_line":"        @check_instance_state(vm_state\u003dNone)"},{"line_number":4046,"context_line":"        def do_volume_snapshot_create(self, context, instance):"},{"line_number":4047,"context_line":"            self.compute_rpcapi.volume_snapshot_create(context, instance,"},{"line_number":4048,"context_line":"                    volume_id, create_info)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba2be162_0450a05c","line":4045,"in_reply_to":"ba2be162_e1f708f3","updated":"2017-03-02 13:09:57.000000000","message":"Incidentally, I posted a check_instance_state cleanup here which uncovered a couple of minor long-standing bugs:\n\n  https://review.openstack.org/440536\n\nIf that change landed, you\u0027d need to change this call to:\n\n  @check_instance_state(task_state\u003d_NO_STATE)\n\nwhich I feel more obviously represents what\u0027s intended here.","commit_id":"dbe0a0c95d4e631c834df0eed165e9ee5915a791"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"148e3c6b844d659849ee601b80f3c3abee3d77b9","unresolved":false,"context_lines":[{"line_number":4043,"context_line":"        # no task being performed on the instance and it has a host."},{"line_number":4044,"context_line":"        @check_instance_host"},{"line_number":4045,"context_line":"        @check_instance_state(vm_state\u003dNone)"},{"line_number":4046,"context_line":"        def do_volume_snapshot_create(self, context, instance):"},{"line_number":4047,"context_line":"            self.compute_rpcapi.volume_snapshot_create(context, instance,"},{"line_number":4048,"context_line":"                    volume_id, create_info)"},{"line_number":4049,"context_line":"            snapshot \u003d {"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba2be162_81de4c0f","line":4046,"updated":"2017-03-02 11:38:38.000000000","message":"nit: your closure arguments aren\u0027t consistent here. You\u0027re passing in self, context, and instance, all of which are available from the closure, but you\u0027re not passing in volume_id or create_info. It would be more consistent to either pass them all or none. Personally I\u0027d pass none.","commit_id":"dbe0a0c95d4e631c834df0eed165e9ee5915a791"}],"nova/tests/unit/api/openstack/compute/test_volumes.py":[{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"039b0aa4e1dc2facd294a758e524a30d148785fd","unresolved":false,"context_lines":[{"line_number":799,"context_line":""},{"line_number":800,"context_line":"    def _test_assisted_create_instance_conflict(self, api_error):"},{"line_number":801,"context_line":"        # unset the stub on volume_snaphost_create from setUp"},{"line_number":802,"context_line":"        self.mox.UnsetStubs()"},{"line_number":803,"context_line":"        req \u003d fakes.HTTPRequest.blank(\u0027/v2/fake/os-assisted-volume-snapshots\u0027)"},{"line_number":804,"context_line":"        body \u003d {\u0027snapshot\u0027:"},{"line_number":805,"context_line":"                   {\u0027volume_id\u0027: \u00271\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"da36d5c6_8ed5dbba","line":802,"range":{"start_line":802,"start_character":8,"end_line":802,"end_character":29},"updated":"2017-02-28 08:42:38.000000000","message":"this should go away when this class get rid of mox things.","commit_id":"ab39d1033b27da752d6c60a3b21e0040deda77ed"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"148e3c6b844d659849ee601b80f3c3abee3d77b9","unresolved":false,"context_lines":[{"line_number":815,"context_line":""},{"line_number":816,"context_line":"    def test_assisted_create_instance_invalid_state(self):"},{"line_number":817,"context_line":"        api_error \u003d exception.InstanceInvalidState("},{"line_number":818,"context_line":"            instance_uuid\u003dFAKE_UUID, attr\u003d\u0027task_state\u0027,"},{"line_number":819,"context_line":"            state\u003dtask_states.SHELVING_OFFLOADING,"},{"line_number":820,"context_line":"            method\u003d\u0027volume_snapshot_create\u0027)"},{"line_number":821,"context_line":"        self._test_assisted_create_instance_conflict(api_error)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba2be162_61e238a1","line":818,"updated":"2017-03-02 11:38:38.000000000","message":"nit: uuids.instance_id","commit_id":"dbe0a0c95d4e631c834df0eed165e9ee5915a791"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8150b0bf6e8ec8c6e307a69f28a441e74b03cc0f","unresolved":false,"context_lines":[{"line_number":815,"context_line":""},{"line_number":816,"context_line":"    def test_assisted_create_instance_invalid_state(self):"},{"line_number":817,"context_line":"        api_error \u003d exception.InstanceInvalidState("},{"line_number":818,"context_line":"            instance_uuid\u003dFAKE_UUID, attr\u003d\u0027task_state\u0027,"},{"line_number":819,"context_line":"            state\u003dtask_states.SHELVING_OFFLOADING,"},{"line_number":820,"context_line":"            method\u003d\u0027volume_snapshot_create\u0027)"},{"line_number":821,"context_line":"        self._test_assisted_create_instance_conflict(api_error)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba2be162_74a3bf4f","line":818,"in_reply_to":"ba2be162_61e238a1","updated":"2017-03-02 15:47:08.000000000","message":"FAKE_UUID is still a uuid so I don\u0027t see the difference.","commit_id":"dbe0a0c95d4e631c834df0eed165e9ee5915a791"}],"nova/tests/unit/compute/test_compute_api.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"148e3c6b844d659849ee601b80f3c3abee3d77b9","unresolved":false,"context_lines":[{"line_number":2838,"context_line":"        \"\"\""},{"line_number":2839,"context_line":"        self.assertRaises(exception.InstanceInvalidState,"},{"line_number":2840,"context_line":"                          self.compute_api.volume_snapshot_create,"},{"line_number":2841,"context_line":"                          self.context, mock.sentinel.volume_id,"},{"line_number":2842,"context_line":"                          mock.sentinel.create_info)"},{"line_number":2843,"context_line":""},{"line_number":2844,"context_line":"    @mock.patch.object("}],"source_content_type":"text/x-python","patch_set":5,"id":"ba2be162_13bb8f28","line":2841,"range":{"start_line":2841,"start_character":40,"end_line":2841,"end_character":63},"updated":"2017-03-02 11:38:38.000000000","message":"nit: uuids.volume_id","commit_id":"dbe0a0c95d4e631c834df0eed165e9ee5915a791"}],"releasenotes/notes/bug-1657585-99b7eddc40c71e5a.yaml":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"148e3c6b844d659849ee601b80f3c3abee3d77b9","unresolved":false,"context_lines":[{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    The ``POST`` and ``DELETE`` operations on the"},{"line_number":5,"context_line":"    ``os-assisted-volume-snapshots`` API will now fail with a 409 error if the"},{"line_number":6,"context_line":"    related instance is undergoing a task state transition or does not have a"},{"line_number":7,"context_line":"    host, i.e. is shelved offloaded."}],"source_content_type":"text/x-yaml","patch_set":5,"id":"ba2be162_acafc492","line":5,"range":{"start_line":5,"start_character":51,"end_line":5,"end_character":71},"updated":"2017-03-02 11:38:38.000000000","message":"This isn\u0027t true, as described in the commit message and comments. It\u0027ll fail with a 400.","commit_id":"dbe0a0c95d4e631c834df0eed165e9ee5915a791"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"c13c8e0aa800a48796f75efd0f830145999f71ee","unresolved":false,"context_lines":[{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    The ``POST`` and ``DELETE`` operations on the"},{"line_number":5,"context_line":"    ``os-assisted-volume-snapshots`` API will now fail with a 409 error if the"},{"line_number":6,"context_line":"    related instance is undergoing a task state transition or does not have a"},{"line_number":7,"context_line":"    host, i.e. is shelved offloaded."}],"source_content_type":"text/x-yaml","patch_set":5,"id":"ba2be162_3470f2a3","line":5,"range":{"start_line":5,"start_character":51,"end_line":5,"end_character":71},"in_reply_to":"ba2be162_745e5f77","updated":"2017-03-06 11:25:50.000000000","message":"nice catch, i too forgot to check this.","commit_id":"dbe0a0c95d4e631c834df0eed165e9ee5915a791"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8150b0bf6e8ec8c6e307a69f28a441e74b03cc0f","unresolved":false,"context_lines":[{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    The ``POST`` and ``DELETE`` operations on the"},{"line_number":5,"context_line":"    ``os-assisted-volume-snapshots`` API will now fail with a 409 error if the"},{"line_number":6,"context_line":"    related instance is undergoing a task state transition or does not have a"},{"line_number":7,"context_line":"    host, i.e. is shelved offloaded."}],"source_content_type":"text/x-yaml","patch_set":5,"id":"ba2be162_745e5f77","line":5,"range":{"start_line":5,"start_character":51,"end_line":5,"end_character":71},"in_reply_to":"ba2be162_acafc492","updated":"2017-03-02 15:47:08.000000000","message":"Yeah good catch, totally forgot about the release note.","commit_id":"dbe0a0c95d4e631c834df0eed165e9ee5915a791"}]}
