)]}'
{"cinder/volume/driver.py":[{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"110acac37b7046030f16280e2f869a0fb03047fd","unresolved":false,"context_lines":[{"line_number":2113,"context_line":"        \"\"\"Deletes a consistency group."},{"line_number":2114,"context_line":""},{"line_number":2115,"context_line":"        :param context: the context of the caller."},{"line_number":2116,"context_line":"        :param group: the dictionary of the consistency group to be created."},{"line_number":2117,"context_line":"        :param volumes: a list of volume dictionaries in the group."},{"line_number":2118,"context_line":"        :return model_update, volumes_model_update"},{"line_number":2119,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"da85f559_a922e8b7","line":2116,"updated":"2015-11-07 17:07:04.000000000","message":"change to \"be deleted\"","commit_id":"c5e40979fff0839dd5914564c8788785a48fa424"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"cec73029a02d532738791ae7b00670663ce4c293","unresolved":false,"context_lines":[{"line_number":2113,"context_line":"        \"\"\"Deletes a consistency group."},{"line_number":2114,"context_line":""},{"line_number":2115,"context_line":"        :param context: the context of the caller."},{"line_number":2116,"context_line":"        :param group: the dictionary of the consistency group to be created."},{"line_number":2117,"context_line":"        :param volumes: a list of volume dictionaries in the group."},{"line_number":2118,"context_line":"        :return model_update, volumes_model_update"},{"line_number":2119,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"da85f559_7ff9114d","line":2116,"in_reply_to":"da85f559_a922e8b7","updated":"2015-11-08 01:39:25.000000000","message":"Done","commit_id":"c5e40979fff0839dd5914564c8788785a48fa424"}],"cinder/volume/drivers/dell/dell_storagecenter_common.py":[{"author":{"_account_id":12112,"name":"Tom Swanson","email":"tom_swanson@dell.com","username":"tomswanson"},"change_message_id":"e744029408b2aefe598c9802b5b44dd02f9a4776","unresolved":false,"context_lines":[{"line_number":430,"context_line":"        raise exception.VolumeBackendAPIException("},{"line_number":431,"context_line":"            _(\u0027Unable to create consistency group %s\u0027) % gid)"},{"line_number":432,"context_line":""},{"line_number":433,"context_line":"    def delete_consistencygroup(self, context, group, volumes):"},{"line_number":434,"context_line":"        \"\"\"Delete the Dell SC profile associated with this consistency group."},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"        :param context: the context of the caller."}],"source_content_type":"text/x-python","patch_set":15,"id":"da85f559_cd8ea12d","line":433,"updated":"2015-11-11 22:53:40.000000000","message":"Probably want to add this param to the docstring.","commit_id":"f18cb6374e68e4d904125e9d99b809354fbdf9ee"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"ba854d4e7aa49ffc608f1040cd2f8a46c6334d56","unresolved":false,"context_lines":[{"line_number":430,"context_line":"        raise exception.VolumeBackendAPIException("},{"line_number":431,"context_line":"            _(\u0027Unable to create consistency group %s\u0027) % gid)"},{"line_number":432,"context_line":""},{"line_number":433,"context_line":"    def delete_consistencygroup(self, context, group, volumes):"},{"line_number":434,"context_line":"        \"\"\"Delete the Dell SC profile associated with this consistency group."},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"        :param context: the context of the caller."}],"source_content_type":"text/x-python","patch_set":15,"id":"da85f559_143491f9","line":433,"in_reply_to":"da85f559_cd8ea12d","updated":"2015-11-12 13:46:58.000000000","message":"Will update if I have to do another patch.  Otherwise, can you please submit a follow up patch to use the newly passed in parameters in the dell driver so you don\u0027t need to directly touch db in the driver?","commit_id":"f18cb6374e68e4d904125e9d99b809354fbdf9ee"},{"author":{"_account_id":12112,"name":"Tom Swanson","email":"tom_swanson@dell.com","username":"tomswanson"},"change_message_id":"e744029408b2aefe598c9802b5b44dd02f9a4776","unresolved":false,"context_lines":[{"line_number":497,"context_line":"        raise exception.VolumeBackendAPIException("},{"line_number":498,"context_line":"            _(\u0027Unable to update consistency group %s\u0027) % gid)"},{"line_number":499,"context_line":""},{"line_number":500,"context_line":"    def create_cgsnapshot(self, context, cgsnapshot, snapshots):"},{"line_number":501,"context_line":"        \"\"\"Takes a snapshot of the consistency group."},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"        :param context: the context of the caller."}],"source_content_type":"text/x-python","patch_set":15,"id":"da85f559_2d808df4","line":500,"updated":"2015-11-11 22:53:40.000000000","message":"As above.","commit_id":"f18cb6374e68e4d904125e9d99b809354fbdf9ee"},{"author":{"_account_id":12112,"name":"Tom Swanson","email":"tom_swanson@dell.com","username":"tomswanson"},"change_message_id":"e744029408b2aefe598c9802b5b44dd02f9a4776","unresolved":false,"context_lines":[{"line_number":530,"context_line":"        raise exception.VolumeBackendAPIException("},{"line_number":531,"context_line":"            _(\u0027Unable to snap Consistency Group %s\u0027) % cgid)"},{"line_number":532,"context_line":""},{"line_number":533,"context_line":"    def delete_cgsnapshot(self, context, cgsnapshot, snapshots):"},{"line_number":534,"context_line":"        \"\"\"Deletes a cgsnapshot."},{"line_number":535,"context_line":""},{"line_number":536,"context_line":"        If profile isn\u0027t found return success.  If failed to delete the"}],"source_content_type":"text/x-python","patch_set":15,"id":"da85f559_2dce4d63","line":533,"updated":"2015-11-11 22:53:40.000000000","message":"Again.\n\nNote that the Dell driver does nothing with this info.  Its CG snapshots are created with the CG snapshot ID.","commit_id":"f18cb6374e68e4d904125e9d99b809354fbdf9ee"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"ba854d4e7aa49ffc608f1040cd2f8a46c6334d56","unresolved":false,"context_lines":[{"line_number":530,"context_line":"        raise exception.VolumeBackendAPIException("},{"line_number":531,"context_line":"            _(\u0027Unable to snap Consistency Group %s\u0027) % cgid)"},{"line_number":532,"context_line":""},{"line_number":533,"context_line":"    def delete_cgsnapshot(self, context, cgsnapshot, snapshots):"},{"line_number":534,"context_line":"        \"\"\"Deletes a cgsnapshot."},{"line_number":535,"context_line":""},{"line_number":536,"context_line":"        If profile isn\u0027t found return success.  If failed to delete the"}],"source_content_type":"text/x-python","patch_set":15,"id":"da85f559_34c2f5e9","line":533,"in_reply_to":"da85f559_2dce4d63","updated":"2015-11-12 13:46:58.000000000","message":"Hi Tom,\n\nThat should be addressed by a follow-up patch, hopefully from you?  This patch just makes sure the interface change doesn\u0027t break the driver.  Driver maintainers know more details about the driver implementation, so I\u0027ll leave the change in the driver to them.","commit_id":"f18cb6374e68e4d904125e9d99b809354fbdf9ee"}],"cinder/volume/drivers/emc/emc_vmax_iscsi.py":[{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"e3fcb8eedfb5f556509b336120402c25fbd4df6a","unresolved":false,"context_lines":[{"line_number":339,"context_line":"    def create_cgsnapshot(self, context, cgsnapshot, snapshots):"},{"line_number":340,"context_line":"        \"\"\"Creates a cgsnapshot.\"\"\""},{"line_number":341,"context_line":"        return self.common.create_cgsnapshot(context, cgsnapshot, self.db)"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"    def delete_cgsnapshot(self, context, cgsnapshot, snapshots):"},{"line_number":344,"context_line":"        \"\"\"Deletes a cgsnapshot.\"\"\""},{"line_number":345,"context_line":"        return self.common.delete_cgsnapshot(context, cgsnapshot, self.db)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_af117bae","line":342,"updated":"2015-10-28 15:53:57.000000000","message":"this seems wrong. why is the db object passed?","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d65eaefc48f0bbff800fc77deb4418a04f798c52","unresolved":false,"context_lines":[{"line_number":339,"context_line":"    def create_cgsnapshot(self, context, cgsnapshot, snapshots):"},{"line_number":340,"context_line":"        \"\"\"Creates a cgsnapshot.\"\"\""},{"line_number":341,"context_line":"        return self.common.create_cgsnapshot(context, cgsnapshot, self.db)"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"    def delete_cgsnapshot(self, context, cgsnapshot, snapshots):"},{"line_number":344,"context_line":"        \"\"\"Deletes a cgsnapshot.\"\"\""},{"line_number":345,"context_line":"        return self.common.delete_cgsnapshot(context, cgsnapshot, self.db)"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa80f949_322d6c95","line":342,"in_reply_to":"1a26ad4f_af117bae","updated":"2015-11-06 17:42:21.000000000","message":"This needs another follow up patch to fix. The driver has to retrieve statuses from db without \"snapshots\" being passed to it.","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"},{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"e3fcb8eedfb5f556509b336120402c25fbd4df6a","unresolved":false,"context_lines":[{"line_number":342,"context_line":""},{"line_number":343,"context_line":"    def delete_cgsnapshot(self, context, cgsnapshot, snapshots):"},{"line_number":344,"context_line":"        \"\"\"Deletes a cgsnapshot.\"\"\""},{"line_number":345,"context_line":"        return self.common.delete_cgsnapshot(context, cgsnapshot, self.db)"},{"line_number":346,"context_line":""},{"line_number":347,"context_line":"    def _check_for_iscsi_ip_address(self):"},{"line_number":348,"context_line":"        \"\"\"Check to see if iscsi_ip_address is set in cinder.conf"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_0f218ffb","line":345,"updated":"2015-10-28 15:53:57.000000000","message":"this seems wrong. why is the db object passed?","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d65eaefc48f0bbff800fc77deb4418a04f798c52","unresolved":false,"context_lines":[{"line_number":342,"context_line":""},{"line_number":343,"context_line":"    def delete_cgsnapshot(self, context, cgsnapshot, snapshots):"},{"line_number":344,"context_line":"        \"\"\"Deletes a cgsnapshot.\"\"\""},{"line_number":345,"context_line":"        return self.common.delete_cgsnapshot(context, cgsnapshot, self.db)"},{"line_number":346,"context_line":""},{"line_number":347,"context_line":"    def _check_for_iscsi_ip_address(self):"},{"line_number":348,"context_line":"        \"\"\"Check to see if iscsi_ip_address is set in cinder.conf"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa80f949_f22284a2","line":345,"in_reply_to":"1a26ad4f_0f218ffb","updated":"2015-11-06 17:42:21.000000000","message":"Same as above.","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"}],"cinder/volume/drivers/emc/xtremio.py":[{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"e3fcb8eedfb5f556509b336120402c25fbd4df6a","unresolved":false,"context_lines":[{"line_number":556,"context_line":"        self.client.req(\u0027consistency-groups\u0027, \u0027DELETE\u0027, name\u003dgroup[\u0027id\u0027],"},{"line_number":557,"context_line":"                        ver\u003d\u0027v2\u0027)"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"        volumes \u003d self.db.volume_get_all_by_group(context, group[\u0027id\u0027])"},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"        for volume in volumes:"},{"line_number":562,"context_line":"            self.delete_volume(volume)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_0f78aff1","line":559,"updated":"2015-10-28 15:53:57.000000000","message":"volumes passed as parameter - line should be removed.","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"},{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"e3fcb8eedfb5f556509b336120402c25fbd4df6a","unresolved":false,"context_lines":[{"line_number":626,"context_line":"        self.client.req(\u0027snapshots\u0027, \u0027POST\u0027, data, ver\u003d\u0027v2\u0027)"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"        snapshots \u003d objects.SnapshotList().get_all_for_cgsnapshot("},{"line_number":629,"context_line":"            context, cgsnapshot[\u0027id\u0027])"},{"line_number":630,"context_line":""},{"line_number":631,"context_line":"        for snapshot in snapshots:"},{"line_number":632,"context_line":"            snapshot.status \u003d \u0027available\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_6f528369","line":629,"updated":"2015-10-28 15:53:57.000000000","message":"snapshots passed as parameter. line should be removed","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"},{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"e3fcb8eedfb5f556509b336120402c25fbd4df6a","unresolved":false,"context_lines":[{"line_number":641,"context_line":"                        name\u003dself._get_cgsnap_name(cgsnapshot), ver\u003d\u0027v2\u0027)"},{"line_number":642,"context_line":""},{"line_number":643,"context_line":"        snapshots \u003d objects.SnapshotList().get_all_for_cgsnapshot("},{"line_number":644,"context_line":"            context, cgsnapshot[\u0027id\u0027])"},{"line_number":645,"context_line":""},{"line_number":646,"context_line":"        for snapshot in snapshots:"},{"line_number":647,"context_line":"            snapshot.status \u003d \u0027deleted\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_0f4f4fbe","line":644,"updated":"2015-10-28 15:53:57.000000000","message":"snapshots passed as parameter. line should be removed","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"}],"cinder/volume/drivers/ibm/gpfs.py":[{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"e3fcb8eedfb5f556509b336120402c25fbd4df6a","unresolved":false,"context_lines":[{"line_number":1168,"context_line":""},{"line_number":1169,"context_line":"        model_update \u003d {}"},{"line_number":1170,"context_line":"        model_update[\u0027status\u0027] \u003d group[\u0027status\u0027]"},{"line_number":1171,"context_line":"        volumes \u003d self.db.volume_get_all_by_group(context, group[\u0027id\u0027])"},{"line_number":1172,"context_line":""},{"line_number":1173,"context_line":"        # Unlink and delete the fileset associated with the consistency group."},{"line_number":1174,"context_line":"        # All of the volumes and volume snapshot data will also be deleted."}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_efcc5337","line":1171,"updated":"2015-10-28 15:53:57.000000000","message":"volumes passed as parameter. line should be removed","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"},{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"e3fcb8eedfb5f556509b336120402c25fbd4df6a","unresolved":false,"context_lines":[{"line_number":1200,"context_line":"    def create_cgsnapshot(self, context, cgsnapshot, snapshots):"},{"line_number":1201,"context_line":"        \"\"\"Create snapshot of a consistency group of GPFS volumes.\"\"\""},{"line_number":1202,"context_line":"        snapshots \u003d self.db.snapshot_get_all_for_cgsnapshot("},{"line_number":1203,"context_line":"            context, cgsnapshot[\u0027id\u0027])"},{"line_number":1204,"context_line":""},{"line_number":1205,"context_line":"        for snapshot in snapshots:"},{"line_number":1206,"context_line":"            self.create_snapshot(snapshot)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_eff3f371","line":1203,"updated":"2015-10-28 15:53:57.000000000","message":"snapshots passed as parameter. line should be removed","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"},{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"e3fcb8eedfb5f556509b336120402c25fbd4df6a","unresolved":false,"context_lines":[{"line_number":1213,"context_line":"    def delete_cgsnapshot(self, context, cgsnapshot, snapshots):"},{"line_number":1214,"context_line":"        \"\"\"Delete snapshot of a consistency group of GPFS volumes.\"\"\""},{"line_number":1215,"context_line":"        snapshots \u003d self.db.snapshot_get_all_for_cgsnapshot("},{"line_number":1216,"context_line":"            context, cgsnapshot[\u0027id\u0027])"},{"line_number":1217,"context_line":""},{"line_number":1218,"context_line":"        for snapshot in snapshots:"},{"line_number":1219,"context_line":"            self.delete_snapshot(snapshot)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_0ffd0f3a","line":1216,"updated":"2015-10-28 15:53:57.000000000","message":"snapshots passed as parameter. line should be removed","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"}],"cinder/volume/drivers/ibm/storwize_svc/__init__.py":[{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"e3fcb8eedfb5f556509b336120402c25fbd4df6a","unresolved":false,"context_lines":[{"line_number":1095,"context_line":"        LOG.debug(\"Deleting consistency group.\")"},{"line_number":1096,"context_line":"        model_update \u003d {}"},{"line_number":1097,"context_line":"        model_update[\u0027status\u0027] \u003d \u0027deleted\u0027"},{"line_number":1098,"context_line":"        volumes \u003d self.db.volume_get_all_by_group(context, group[\u0027id\u0027])"},{"line_number":1099,"context_line":""},{"line_number":1100,"context_line":"        for volume in volumes:"},{"line_number":1101,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_2ffa4b43","line":1098,"updated":"2015-10-28 15:53:57.000000000","message":"volumes passed as parameter. line should be removed","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"},{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"e3fcb8eedfb5f556509b336120402c25fbd4df6a","unresolved":false,"context_lines":[{"line_number":1118,"context_line":"        self._helpers.create_fc_consistgrp(cg_name)"},{"line_number":1119,"context_line":""},{"line_number":1120,"context_line":"        snapshots \u003d self.db.snapshot_get_all_for_cgsnapshot("},{"line_number":1121,"context_line":"            ctxt, cgsnapshot[\u0027id\u0027])"},{"line_number":1122,"context_line":"        timeout \u003d self.configuration.storwize_svc_flashcopy_timeout"},{"line_number":1123,"context_line":""},{"line_number":1124,"context_line":"        model_update, snapshots_model \u003d ("}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_8f9fdf02","line":1121,"updated":"2015-10-28 15:53:57.000000000","message":"snapshots passed as parameter. line should be removed","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"},{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"e3fcb8eedfb5f556509b336120402c25fbd4df6a","unresolved":false,"context_lines":[{"line_number":1136,"context_line":"        cg_name \u003d \u0027cg_snap-\u0027 + cgsnapshot_id"},{"line_number":1137,"context_line":""},{"line_number":1138,"context_line":"        snapshots \u003d self.db.snapshot_get_all_for_cgsnapshot(context,"},{"line_number":1139,"context_line":"                                                            cgsnapshot_id)"},{"line_number":1140,"context_line":""},{"line_number":1141,"context_line":"        model_update, snapshots_model \u003d ("},{"line_number":1142,"context_line":"            self._helpers.delete_consistgrp_snapshots(cg_name,"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_cfbcf76e","line":1139,"updated":"2015-10-28 15:53:57.000000000","message":"snapshots passed as parameter. line should be removed","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"}],"cinder/volume/drivers/ibm/xiv_ds8k.py":[{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"e3fcb8eedfb5f556509b336120402c25fbd4df6a","unresolved":false,"context_lines":[{"line_number":251,"context_line":"    def delete_consistencygroup(self, context, group, volumes):"},{"line_number":252,"context_line":"        \"\"\"Deletes a consistency group.\"\"\""},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"        return self.xiv_ds8k_proxy.delete_consistencygroup(context, group)"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"    def create_cgsnapshot(self, context, cgsnapshot, snapshots):"},{"line_number":257,"context_line":"        \"\"\"Creates a consistency group snapshot.\"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_0fabcf1e","line":254,"updated":"2015-10-28 15:53:57.000000000","message":"should pass volumes","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"},{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"e3fcb8eedfb5f556509b336120402c25fbd4df6a","unresolved":false,"context_lines":[{"line_number":256,"context_line":"    def create_cgsnapshot(self, context, cgsnapshot, snapshots):"},{"line_number":257,"context_line":"        \"\"\"Creates a consistency group snapshot.\"\"\""},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"        return self.xiv_ds8k_proxy.create_cgsnapshot(context, cgsnapshot)"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"    def delete_cgsnapshot(self, context, cgsnapshot, snapshots):"},{"line_number":262,"context_line":"        \"\"\"Deletes a consistency group snapshot.\"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_ef68d3f7","line":259,"updated":"2015-10-28 15:53:57.000000000","message":"should pass snapshots","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"},{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"e3fcb8eedfb5f556509b336120402c25fbd4df6a","unresolved":false,"context_lines":[{"line_number":261,"context_line":"    def delete_cgsnapshot(self, context, cgsnapshot, snapshots):"},{"line_number":262,"context_line":"        \"\"\"Deletes a consistency group snapshot.\"\"\""},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"        return self.xiv_ds8k_proxy.delete_cgsnapshot(context, cgsnapshot)"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    def update_consistencygroup(self, context, group,"},{"line_number":267,"context_line":"                                add_volumes, remove_volumes):"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_af72dbe3","line":264,"updated":"2015-10-28 15:53:57.000000000","message":"should pass snapshots","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"}],"cinder/volume/drivers/prophetstor/dplcommon.py":[{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"e3fcb8eedfb5f556509b336120402c25fbd4df6a","unresolved":false,"context_lines":[{"line_number":891,"context_line":"        \"\"\"Delete a consistency group.\"\"\""},{"line_number":892,"context_line":"        ret \u003d 0"},{"line_number":893,"context_line":"        volumes \u003d self.db.volume_get_all_by_group("},{"line_number":894,"context_line":"            context, group[\u0027id\u0027])"},{"line_number":895,"context_line":"        model_update \u003d {}"},{"line_number":896,"context_line":"        model_update[\u0027status\u0027] \u003d group[\u0027status\u0027]"},{"line_number":897,"context_line":"        LOG.info(_LI(\u0027Start to delete consistency group: %(cg_name)s\u0027),"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_0f82ef94","line":894,"updated":"2015-10-28 15:53:57.000000000","message":"volumes passed as parameter. line should be removed","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"},{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"e3fcb8eedfb5f556509b336120402c25fbd4df6a","unresolved":false,"context_lines":[{"line_number":919,"context_line":"    def create_cgsnapshot(self, context, cgsnapshot, snapshots):"},{"line_number":920,"context_line":"        \"\"\"Creates a cgsnapshot.\"\"\""},{"line_number":921,"context_line":"        snapshots \u003d objects.SnapshotList().get_all_for_cgsnapshot("},{"line_number":922,"context_line":"            context, cgsnapshot[\u0027id\u0027])"},{"line_number":923,"context_line":"        model_update \u003d {}"},{"line_number":924,"context_line":"        LOG.info(_LI(\u0027Start to create cgsnapshot for consistency group\u0027"},{"line_number":925,"context_line":"                     \u0027: %(group_name)s\u0027),"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_ef4f7390","line":922,"updated":"2015-10-28 15:53:57.000000000","message":"snapshots passed as parameter. line should be removed","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"},{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"e3fcb8eedfb5f556509b336120402c25fbd4df6a","unresolved":false,"context_lines":[{"line_number":946,"context_line":"    def delete_cgsnapshot(self, context, cgsnapshot, snapshots):"},{"line_number":947,"context_line":"        \"\"\"Deletes a cgsnapshot.\"\"\""},{"line_number":948,"context_line":"        snapshots \u003d objects.SnapshotList().get_all_for_cgsnapshot("},{"line_number":949,"context_line":"            context, cgsnapshot[\u0027id\u0027])"},{"line_number":950,"context_line":"        model_update \u003d {}"},{"line_number":951,"context_line":"        model_update[\u0027status\u0027] \u003d cgsnapshot[\u0027status\u0027]"},{"line_number":952,"context_line":"        LOG.info(_LI(\u0027Delete cgsnapshot %(snap_name)s for consistency group: \u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_af497b8d","line":949,"updated":"2015-10-28 15:53:57.000000000","message":"snapshots passed as parameter. line should be removed","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"}],"cinder/volume/drivers/pure.py":[{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"e3fcb8eedfb5f556509b336120402c25fbd4df6a","unresolved":false,"context_lines":[{"line_number":415,"context_line":"                    ctxt.reraise \u003d False"},{"line_number":416,"context_line":"                    LOG.warning(_LW(\"Unable to delete Protection Group: %s\"),"},{"line_number":417,"context_line":"                                err.text)"},{"line_number":418,"context_line":""},{"line_number":419,"context_line":"        volumes \u003d self.db.volume_get_all_by_group(context, group.id)"},{"line_number":420,"context_line":""},{"line_number":421,"context_line":"        for volume in volumes:"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_2f56cb29","line":418,"updated":"2015-10-28 15:53:57.000000000","message":"volumes passed as parameter. line should be removed","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"},{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"e3fcb8eedfb5f556509b336120402c25fbd4df6a","unresolved":false,"context_lines":[{"line_number":456,"context_line":"        self._array.create_pgroup_snapshot(pgroup_name, suffix\u003dpgsnap_suffix)"},{"line_number":457,"context_line":""},{"line_number":458,"context_line":"        snapshots \u003d objects.SnapshotList().get_all_for_cgsnapshot("},{"line_number":459,"context_line":"            context, cgsnapshot.id)"},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"        for snapshot in snapshots:"},{"line_number":462,"context_line":"            snapshot.status \u003d \u0027available\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_ef369302","line":459,"updated":"2015-10-28 15:53:57.000000000","message":"snapshots passed as parameter. line should be removed","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"},{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"e3fcb8eedfb5f556509b336120402c25fbd4df6a","unresolved":false,"context_lines":[{"line_number":489,"context_line":"        self._delete_pgsnapshot(pgsnap_name)"},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"        snapshots \u003d objects.SnapshotList.get_all_for_cgsnapshot("},{"line_number":492,"context_line":"            context, cgsnapshot.id)"},{"line_number":493,"context_line":""},{"line_number":494,"context_line":"        for snapshot in snapshots:"},{"line_number":495,"context_line":"            snapshot.status \u003d \u0027deleted\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_af409b57","line":492,"updated":"2015-10-28 15:53:57.000000000","message":"snapshots passed as parameter. line should be removed","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"}],"cinder/volume/drivers/san/hp/hp_3par_fc.py":[{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"e3fcb8eedfb5f556509b336120402c25fbd4df6a","unresolved":false,"context_lines":[{"line_number":458,"context_line":"    def delete_consistencygroup(self, context, group, volumes):"},{"line_number":459,"context_line":"        common \u003d self._login()"},{"line_number":460,"context_line":"        try:"},{"line_number":461,"context_line":"            return common.delete_consistencygroup(context, group)"},{"line_number":462,"context_line":"        finally:"},{"line_number":463,"context_line":"            self._logout(common)"},{"line_number":464,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_0f30af00","line":461,"updated":"2015-10-28 15:53:57.000000000","message":"should pass volumes","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"},{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"e3fcb8eedfb5f556509b336120402c25fbd4df6a","unresolved":false,"context_lines":[{"line_number":474,"context_line":"    def create_cgsnapshot(self, context, cgsnapshot, snapshots):"},{"line_number":475,"context_line":"        common \u003d self._login()"},{"line_number":476,"context_line":"        try:"},{"line_number":477,"context_line":"            return common.create_cgsnapshot(context, cgsnapshot)"},{"line_number":478,"context_line":"        finally:"},{"line_number":479,"context_line":"            self._logout(common)"},{"line_number":480,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_8f127f61","line":477,"updated":"2015-10-28 15:53:57.000000000","message":"should pass snapshots","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"},{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"e3fcb8eedfb5f556509b336120402c25fbd4df6a","unresolved":false,"context_lines":[{"line_number":481,"context_line":"    def delete_cgsnapshot(self, context, cgsnapshot, snapshots):"},{"line_number":482,"context_line":"        common \u003d self._login()"},{"line_number":483,"context_line":"        try:"},{"line_number":484,"context_line":"            return common.delete_cgsnapshot(context, cgsnapshot)"},{"line_number":485,"context_line":"        finally:"},{"line_number":486,"context_line":"            self._logout(common)"},{"line_number":487,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_4f0d473d","line":484,"updated":"2015-10-28 15:53:57.000000000","message":"should pass snapshots","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"}],"cinder/volume/drivers/san/hp/hp_3par_iscsi.py":[{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"e3fcb8eedfb5f556509b336120402c25fbd4df6a","unresolved":false,"context_lines":[{"line_number":755,"context_line":"    def delete_consistencygroup(self, context, group, volumes):"},{"line_number":756,"context_line":"        common \u003d self._login()"},{"line_number":757,"context_line":"        try:"},{"line_number":758,"context_line":"            return common.delete_consistencygroup(context, group)"},{"line_number":759,"context_line":"        finally:"},{"line_number":760,"context_line":"            self._logout(common)"},{"line_number":761,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_0f074f1d","line":758,"updated":"2015-10-28 15:53:57.000000000","message":"should pass volumes","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"},{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"e3fcb8eedfb5f556509b336120402c25fbd4df6a","unresolved":false,"context_lines":[{"line_number":771,"context_line":"    def create_cgsnapshot(self, context, cgsnapshot, snapshots):"},{"line_number":772,"context_line":"        common \u003d self._login()"},{"line_number":773,"context_line":"        try:"},{"line_number":774,"context_line":"            return common.create_cgsnapshot(context, cgsnapshot)"},{"line_number":775,"context_line":"        finally:"},{"line_number":776,"context_line":"            self._logout(common)"},{"line_number":777,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_f2043816","line":774,"updated":"2015-10-28 15:53:57.000000000","message":"should pass snapshots","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"},{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"e3fcb8eedfb5f556509b336120402c25fbd4df6a","unresolved":false,"context_lines":[{"line_number":778,"context_line":"    def delete_cgsnapshot(self, context, cgsnapshot, snapshots):"},{"line_number":779,"context_line":"        common \u003d self._login()"},{"line_number":780,"context_line":"        try:"},{"line_number":781,"context_line":"            return common.delete_cgsnapshot(context, cgsnapshot)"},{"line_number":782,"context_line":"        finally:"},{"line_number":783,"context_line":"            self._logout(common)"},{"line_number":784,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_b20ec032","line":781,"updated":"2015-10-28 15:53:57.000000000","message":"should pass snapshots","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"}],"cinder/volume/drivers/san/hp/hp_lefthand_iscsi.py":[{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"e3fcb8eedfb5f556509b336120402c25fbd4df6a","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    def delete_consistencygroup(self, context, group, volumes):"},{"line_number":134,"context_line":"        \"\"\"Deletes a consistency group.\"\"\""},{"line_number":135,"context_line":"        return self.proxy.delete_consistencygroup(context, group)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def update_consistencygroup(self, context, group,"},{"line_number":138,"context_line":"                                add_volumes\u003dNone, remove_volumes\u003dNone):"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_72110852","line":135,"updated":"2015-10-28 15:53:57.000000000","message":"should pass volumes","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"},{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"e3fcb8eedfb5f556509b336120402c25fbd4df6a","unresolved":false,"context_lines":[{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def create_cgsnapshot(self, context, cgsnapshot, snapshots):"},{"line_number":144,"context_line":"        \"\"\"Creates a consistency group snapshot.\"\"\""},{"line_number":145,"context_line":"        return self.proxy.create_cgsnapshot(context, cgsnapshot)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def delete_cgsnapshot(self, context, cgsnapshot, snapshots):"},{"line_number":148,"context_line":"        \"\"\"Deletes a consistency group snapshot.\"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_121e9463","line":145,"updated":"2015-10-28 15:53:57.000000000","message":"should pass snapshots","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"},{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"e3fcb8eedfb5f556509b336120402c25fbd4df6a","unresolved":false,"context_lines":[{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def delete_cgsnapshot(self, context, cgsnapshot, snapshots):"},{"line_number":148,"context_line":"        \"\"\"Deletes a consistency group snapshot.\"\"\""},{"line_number":149,"context_line":"        return self.proxy.delete_cgsnapshot(context, cgsnapshot)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def create_volume_from_snapshot(self, volume, snapshot):"},{"line_number":152,"context_line":"        \"\"\"Creates a volume from a snapshot.\"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_321b9074","line":149,"updated":"2015-10-28 15:53:57.000000000","message":"should pass snapshots","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"}],"cinder/volume/manager.py":[{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"54c745f9f2c8f1c78c4c1c40e5c3a7e52c812bed","unresolved":false,"context_lines":[{"line_number":2869,"context_line":"            for snapshot in snapshots:"},{"line_number":2870,"context_line":"                snapshot.context \u003d caller_context"},{"line_number":2871,"context_line":""},{"line_number":2872,"context_line":"            model_update, snapshot_mode_updates \u003d \\"},{"line_number":2873,"context_line":"                self.driver.create_cgsnapshot(context, cgsnapshot_ref, snapshots)"},{"line_number":2874,"context_line":""},{"line_number":2875,"context_line":"            if snapshot_model_updates:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_00f19e6a","line":2872,"updated":"2015-10-01 03:24:44.000000000","message":"You missed  the \u0027l\u0027, I think.\ns/snapshot_mode_updates/snapshot_model_updates/","commit_id":"4048fc10f440f36e7c0fd436a6b919ea7d6fd443"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"0d100364e07fd1d1bc6b86dc951597d8b8464d1d","unresolved":false,"context_lines":[{"line_number":2869,"context_line":"            for snapshot in snapshots:"},{"line_number":2870,"context_line":"                snapshot.context \u003d caller_context"},{"line_number":2871,"context_line":""},{"line_number":2872,"context_line":"            model_update, snapshot_mode_updates \u003d \\"},{"line_number":2873,"context_line":"                self.driver.create_cgsnapshot(context, cgsnapshot_ref, snapshots)"},{"line_number":2874,"context_line":""},{"line_number":2875,"context_line":"            if snapshot_model_updates:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_8de588a9","line":2872,"in_reply_to":"9a1a9d01_00f19e6a","updated":"2015-10-03 02:43:24.000000000","message":"Oops:).  Thanks!","commit_id":"4048fc10f440f36e7c0fd436a6b919ea7d6fd443"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"54c745f9f2c8f1c78c4c1c40e5c3a7e52c812bed","unresolved":false,"context_lines":[{"line_number":2872,"context_line":"            model_update, snapshot_mode_updates \u003d \\"},{"line_number":2873,"context_line":"                self.driver.create_cgsnapshot(context, cgsnapshot_ref, snapshots)"},{"line_number":2874,"context_line":""},{"line_number":2875,"context_line":"            if snapshot_model_updates:"},{"line_number":2876,"context_line":"                for snapshot in snapshot_model_updates:"},{"line_number":2877,"context_line":"                    # Update db if status is error"},{"line_number":2878,"context_line":"                    if snapshot[\u0027status\u0027] \u003d\u003d \u0027error\u0027:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_e0d26ad0","line":2875,"updated":"2015-10-01 03:24:44.000000000","message":"You could make the declaration on line 2859 and empty list (snapshot_model_updates \u003d []) and require drivers to return a list and just skip the if?\n\nTotally up to you, just a note.","commit_id":"4048fc10f440f36e7c0fd436a6b919ea7d6fd443"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"0d100364e07fd1d1bc6b86dc951597d8b8464d1d","unresolved":false,"context_lines":[{"line_number":2872,"context_line":"            model_update, snapshot_mode_updates \u003d \\"},{"line_number":2873,"context_line":"                self.driver.create_cgsnapshot(context, cgsnapshot_ref, snapshots)"},{"line_number":2874,"context_line":""},{"line_number":2875,"context_line":"            if snapshot_model_updates:"},{"line_number":2876,"context_line":"                for snapshot in snapshot_model_updates:"},{"line_number":2877,"context_line":"                    # Update db if status is error"},{"line_number":2878,"context_line":"                    if snapshot[\u0027status\u0027] \u003d\u003d \u0027error\u0027:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_6d66f42a","line":2875,"in_reply_to":"9a1a9d01_e0d26ad0","updated":"2015-10-03 02:43:24.000000000","message":"Good idea, but I realized that I\u0027m actually already returning \"None,None\" in create_consistencygroup_from_src for success cases. So should we be consistent with that?\n\nhttps://github.com/openstack/cinder/blob/master/cinder/volume/driver.py#L2072","commit_id":"4048fc10f440f36e7c0fd436a6b919ea7d6fd443"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"54c745f9f2c8f1c78c4c1c40e5c3a7e52c812bed","unresolved":false,"context_lines":[{"line_number":2894,"context_line":"                    LOG.error(msg)"},{"line_number":2895,"context_line":"                    raise exception.VolumeDriverException(message\u003dmsg)"},{"line_number":2896,"context_line":""},{"line_number":2897,"context_line":"        except Exception:"},{"line_number":2898,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":2899,"context_line":"                self.db.cgsnapshot_update(context,"},{"line_number":2900,"context_line":"                                          cgsnapshot_ref[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_a05c724b","line":2897,"updated":"2015-10-01 03:24:44.000000000","message":"This should\u0027ve never been a bare Exception, we should probably consider fixing that to a backendException, in particular it would probably be useful to \"do different things\" based on the exception that is returned from the driver no?","commit_id":"4048fc10f440f36e7c0fd436a6b919ea7d6fd443"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"0d100364e07fd1d1bc6b86dc951597d8b8464d1d","unresolved":false,"context_lines":[{"line_number":2894,"context_line":"                    LOG.error(msg)"},{"line_number":2895,"context_line":"                    raise exception.VolumeDriverException(message\u003dmsg)"},{"line_number":2896,"context_line":""},{"line_number":2897,"context_line":"        except Exception:"},{"line_number":2898,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":2899,"context_line":"                self.db.cgsnapshot_update(context,"},{"line_number":2900,"context_line":"                                          cgsnapshot_ref[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_11299289","line":2897,"in_reply_to":"9a1a9d01_a05c724b","updated":"2015-10-03 02:43:24.000000000","message":"Sure.  I changed it to CinderException here.  Since the exception is thrown by the driver, it could be custom exceptions inherited from VolumeDriverException or VolumeBackendAPIException.  I think we need to update db for all failures.","commit_id":"4048fc10f440f36e7c0fd436a6b919ea7d6fd443"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"54c745f9f2c8f1c78c4c1c40e5c3a7e52c812bed","unresolved":false,"context_lines":[{"line_number":2900,"context_line":"                                          cgsnapshot_ref[\u0027id\u0027],"},{"line_number":2901,"context_line":"                                          {\u0027status\u0027: \u0027error\u0027})"},{"line_number":2902,"context_line":"                # Update snapshot status to \u0027error\u0027 if driver returns"},{"line_number":2903,"context_line":"                # None for snapshot_model_updates."},{"line_number":2904,"context_line":"                if not snapshot_model_updates:"},{"line_number":2905,"context_line":"                    for snapshot in snapshots:"},{"line_number":2906,"context_line":"                        self.db.snapshot_update(context, snapshot[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_206942f9","line":2903,"updated":"2015-10-01 03:24:44.000000000","message":"I know you and Walt have been discussing this extensively, but are you sure you want to set all of the snapshots to error considering the size of your try block?\n\nSeems like you want to focus on this for the driver_create_cgsnashot call.  So maybe even move it up printer to say line 2875 maybe?","commit_id":"4048fc10f440f36e7c0fd436a6b919ea7d6fd443"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"0d100364e07fd1d1bc6b86dc951597d8b8464d1d","unresolved":false,"context_lines":[{"line_number":2900,"context_line":"                                          cgsnapshot_ref[\u0027id\u0027],"},{"line_number":2901,"context_line":"                                          {\u0027status\u0027: \u0027error\u0027})"},{"line_number":2902,"context_line":"                # Update snapshot status to \u0027error\u0027 if driver returns"},{"line_number":2903,"context_line":"                # None for snapshot_model_updates."},{"line_number":2904,"context_line":"                if not snapshot_model_updates:"},{"line_number":2905,"context_line":"                    for snapshot in snapshots:"},{"line_number":2906,"context_line":"                        self.db.snapshot_update(context, snapshot[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_ed20c4b2","line":2903,"in_reply_to":"9a1a9d01_206942f9","updated":"2015-10-03 02:43:24.000000000","message":"Perhaps we should discuss about this again to make sure we are in-sync?\n\nLine 2875-2895 is checking returned model_update from the driver. If status for any individual snapshot is \u0027error\u0027, we make sure the status for the cgsnapshot is also \u0027error\u0027.\n\nThen on line 2895, it raises exception so it will be caught by the except block starting on line 2897.  That is why I can\u0027t move this up.","commit_id":"4048fc10f440f36e7c0fd436a6b919ea7d6fd443"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"54c745f9f2c8f1c78c4c1c40e5c3a7e52c812bed","unresolved":false,"context_lines":[{"line_number":2998,"context_line":"                    self.db.cgsnapshot_update(context, cgsnapshot_ref[\u0027id\u0027],"},{"line_number":2999,"context_line":"                                              model_update)"},{"line_number":3000,"context_line":""},{"line_number":3001,"context_line":"        except Exception:"},{"line_number":3002,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":3003,"context_line":"                self.db.cgsnapshot_update(context,"},{"line_number":3004,"context_line":"                                          cgsnapshot_ref[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_e03caae2","line":3001,"updated":"2015-10-01 03:24:44.000000000","message":"Same note as above, I know you\u0027re not introducing this here, but we should probably consider fixing it.  If nothing else a follow up is fine.  The concerns about the location of the except and the thoughts on using various defined exceptions still apply though :)","commit_id":"4048fc10f440f36e7c0fd436a6b919ea7d6fd443"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"0d100364e07fd1d1bc6b86dc951597d8b8464d1d","unresolved":false,"context_lines":[{"line_number":2998,"context_line":"                    self.db.cgsnapshot_update(context, cgsnapshot_ref[\u0027id\u0027],"},{"line_number":2999,"context_line":"                                              model_update)"},{"line_number":3000,"context_line":""},{"line_number":3001,"context_line":"        except Exception:"},{"line_number":3002,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":3003,"context_line":"                self.db.cgsnapshot_update(context,"},{"line_number":3004,"context_line":"                                          cgsnapshot_ref[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_f15f3e73","line":3001,"in_reply_to":"9a1a9d01_e03caae2","updated":"2015-10-03 02:43:24.000000000","message":"Sure.  I changed it to CinderException, but I\u0027m still updating db for all failures.","commit_id":"4048fc10f440f36e7c0fd436a6b919ea7d6fd443"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"c8ca3058ee6842df0cd5bfc1f7c3124d3acd2200","unresolved":false,"context_lines":[{"line_number":2605,"context_line":"        self._notify_about_consistencygroup_usage("},{"line_number":2606,"context_line":"            context, group, \"delete.start\")"},{"line_number":2607,"context_line":""},{"line_number":2608,"context_line":"        volume_model_updates \u003d None"},{"line_number":2609,"context_line":"        try:"},{"line_number":2610,"context_line":"            utils.require_driver_initialized(self.driver)"},{"line_number":2611,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"5a2ca52d_0153123a","line":2608,"updated":"2015-10-16 20:16:47.000000000","message":"we should set model_update \u003d None here as well.","commit_id":"aae593a703ed90e0ff7a76c6eeca8879ac5fffa9"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"13486e24a987ed40b974fda095f36d8af8aba5b6","unresolved":false,"context_lines":[{"line_number":2605,"context_line":"        self._notify_about_consistencygroup_usage("},{"line_number":2606,"context_line":"            context, group, \"delete.start\")"},{"line_number":2607,"context_line":""},{"line_number":2608,"context_line":"        volume_model_updates \u003d None"},{"line_number":2609,"context_line":"        try:"},{"line_number":2610,"context_line":"            utils.require_driver_initialized(self.driver)"},{"line_number":2611,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a29b11f_9798866c","line":2608,"in_reply_to":"5a2ca52d_0153123a","updated":"2015-10-18 21:07:50.000000000","message":"Done","commit_id":"aae593a703ed90e0ff7a76c6eeca8879ac5fffa9"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"c8ca3058ee6842df0cd5bfc1f7c3124d3acd2200","unresolved":false,"context_lines":[{"line_number":2630,"context_line":"                    LOG.exception(msg,"},{"line_number":2631,"context_line":"                                  resource\u003d{\u0027type\u0027: \u0027consistency_group\u0027,"},{"line_number":2632,"context_line":"                                            \u0027id\u0027: group.id})"},{"line_number":2633,"context_line":"                    raise exception.VolumeDriverException(message\u003dmsg)"},{"line_number":2634,"context_line":"                else:"},{"line_number":2635,"context_line":"                    group.update(model_update)"},{"line_number":2636,"context_line":"                    group.save()"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a2ca52d_bc3da590","line":2633,"updated":"2015-10-16 20:16:47.000000000","message":"If we raise this, it will be caught in 2638 and then we\u0027ll reset all of the volume states to error, after we\u0027ve updated the status of each of the volumes.","commit_id":"aae593a703ed90e0ff7a76c6eeca8879ac5fffa9"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"36607e38f40677fd95c45480745a043dde8d8354","unresolved":false,"context_lines":[{"line_number":2630,"context_line":"                    LOG.exception(msg,"},{"line_number":2631,"context_line":"                                  resource\u003d{\u0027type\u0027: \u0027consistency_group\u0027,"},{"line_number":2632,"context_line":"                                            \u0027id\u0027: group.id})"},{"line_number":2633,"context_line":"                    raise exception.VolumeDriverException(message\u003dmsg)"},{"line_number":2634,"context_line":"                else:"},{"line_number":2635,"context_line":"                    group.update(model_update)"},{"line_number":2636,"context_line":"                    group.save()"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a2ca52d_1cd29928","line":2633,"in_reply_to":"5a2ca52d_bc3da590","updated":"2015-10-16 20:21:28.000000000","message":"nevermind, we check for not volume_model_updates later","commit_id":"aae593a703ed90e0ff7a76c6eeca8879ac5fffa9"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"c4236b57619c0be3d741216fbb3b6975ad250bff","unresolved":false,"context_lines":[{"line_number":2644,"context_line":"                if not volume_model_updates:"},{"line_number":2645,"context_line":"                    for vol in volumes:"},{"line_number":2646,"context_line":"                        self.db.volume_update("},{"line_number":2647,"context_line":"                            context, vol[\u0027id\u0027], {\u0027status\u0027: \u0027error\u0027})"},{"line_number":2648,"context_line":""},{"line_number":2649,"context_line":"        # Get reservations for group"},{"line_number":2650,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a2ca52d_6f4436b6","line":2647,"updated":"2015-10-16 17:17:38.000000000","message":"The contract here seems a bit weird and can lead to inconsistencies in the volume states from what I can tell here.\n\nSo,  say for example we have 3 volumes in a CG.  The driver goes through and tries to delete those 3 volumes inside of delete_cg call.  If the first 2 are successful, but for whatever reason the 3rd one is a failure and the driver raises an exception.\n\nThe volume manager here is going to mark every one of those volumes as error state.   \n\nSo it seems like if we want to have an accurate status on volumes here, the driver should never ever raise an exception inside of delete_cg, or Cinder will have inconsistent status on those volumes.   \n\nI can just see someone trying to reset state on each of them and then trying to do something with them, when some of them are gone and others aren\u0027t.","commit_id":"aae593a703ed90e0ff7a76c6eeca8879ac5fffa9"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"c8ca3058ee6842df0cd5bfc1f7c3124d3acd2200","unresolved":false,"context_lines":[{"line_number":2644,"context_line":"                if not volume_model_updates:"},{"line_number":2645,"context_line":"                    for vol in volumes:"},{"line_number":2646,"context_line":"                        self.db.volume_update("},{"line_number":2647,"context_line":"                            context, vol[\u0027id\u0027], {\u0027status\u0027: \u0027error\u0027})"},{"line_number":2648,"context_line":""},{"line_number":2649,"context_line":"        # Get reservations for group"},{"line_number":2650,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a2ca52d_61d0c6c9","line":2647,"in_reply_to":"5a2ca52d_413eea28","updated":"2015-10-16 20:16:47.000000000","message":"yes, the admin is going to do the reset-state, but the admin doesn\u0027t have any idea which volume it\u0027s safe to set the state to.","commit_id":"aae593a703ed90e0ff7a76c6eeca8879ac5fffa9"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"dd07039bc027082c422a7ce5abc0653cc54b113d","unresolved":false,"context_lines":[{"line_number":2644,"context_line":"                if not volume_model_updates:"},{"line_number":2645,"context_line":"                    for vol in volumes:"},{"line_number":2646,"context_line":"                        self.db.volume_update("},{"line_number":2647,"context_line":"                            context, vol[\u0027id\u0027], {\u0027status\u0027: \u0027error\u0027})"},{"line_number":2648,"context_line":""},{"line_number":2649,"context_line":"        # Get reservations for group"},{"line_number":2650,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a2ca52d_81596237","line":2647,"in_reply_to":"5a2ca52d_6f4436b6","updated":"2015-10-16 19:41:58.000000000","message":"Yes, this is a dilemma.  If driver reports statuses, we\u0027ll set them correctly earlier in the code.  I believe most drivers are reporting statuses for delete_consistencygroup, but some don\u0027t.  I think even if we recommend everyone to report statuses, we should still handle the situation when they don\u0027t.  If we don\u0027t set volume status to error here, volume status could still be out of sync.  It could be deleted already but no one is changing the status to \"deleted\".  It is not accurate either.  Marking it as \"error\" is at least consistent with the group status.\n\nI can remove these if you strongly believe so, but I\u0027m not so sure if that will be better.  Please let me know.","commit_id":"aae593a703ed90e0ff7a76c6eeca8879ac5fffa9"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"a60ff48dd1e7e63c5733102200e4bbccf7e9531a","unresolved":false,"context_lines":[{"line_number":2644,"context_line":"                if not volume_model_updates:"},{"line_number":2645,"context_line":"                    for vol in volumes:"},{"line_number":2646,"context_line":"                        self.db.volume_update("},{"line_number":2647,"context_line":"                            context, vol[\u0027id\u0027], {\u0027status\u0027: \u0027error\u0027})"},{"line_number":2648,"context_line":""},{"line_number":2649,"context_line":"        # Get reservations for group"},{"line_number":2650,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a2ca52d_413eea28","line":2647,"in_reply_to":"5a2ca52d_81596237","updated":"2015-10-16 19:58:15.000000000","message":"I tend to think that this is the only safe way to handle it in the manager code... Like Xing pointed out if the driver *can* determine that some volumes are OK and others are in other states it should catch the errors and return back the appropriate fine-grained status. From the managers point of view though if the driver method had an error and raised an exception, the only safe assumption is that all of its volumes for that cg are in an error.\n\nI agree that for someone trying to do a reset-state it would be weird if they reset to available or something for a volume that (on the backend) was deleted... but isn\u0027t that an admin only action where you are only supposed to reset to a \u0027correct\u0027 state?","commit_id":"aae593a703ed90e0ff7a76c6eeca8879ac5fffa9"},{"author":{"_account_id":16917,"name":"Alex O\u0027Rourke","email":"alex.orourke@hpe.com","username":"aorourke"},"change_message_id":"fa4d9300b679e1eeb5110a12d1d87f42ba3b032f","unresolved":false,"context_lines":[{"line_number":3003,"context_line":"                                          {\u0027status\u0027: \u0027error\u0027})"},{"line_number":3004,"context_line":"                # Update snapshot status to \u0027error\u0027 if driver returns"},{"line_number":3005,"context_line":"                # None for snapshot_model_updates."},{"line_number":3006,"context_line":"                if not snapshot_model_updates:"},{"line_number":3007,"context_line":"                    for snapshot in snapshots:"},{"line_number":3008,"context_line":"                        self.db.snapshot_update(context, snapshot[\u0027id\u0027],"},{"line_number":3009,"context_line":"                                                {\u0027status\u0027: \u0027error\u0027})"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a2ca52d_8f0e7239","line":3006,"updated":"2015-10-16 17:23:36.000000000","message":"I think what Walt pointed out with delete_consistencygroup also applies here. If one snapshot in the cgsnapshot fails to delete for some reason and driver raises an exception, all the snapshots will be marked as error while some may have been properly deleted.\n\nLike mentioned above, the driver must not raise an exception in order to prevent this.","commit_id":"aae593a703ed90e0ff7a76c6eeca8879ac5fffa9"},{"author":{"_account_id":16917,"name":"Alex O\u0027Rourke","email":"alex.orourke@hpe.com","username":"aorourke"},"change_message_id":"dd8393e14ea5a7017fbf28dd8326ce87b217b453","unresolved":false,"context_lines":[{"line_number":2884,"context_line":"                        # NOTE(xyang): snapshots is a list of snapshot objects."},{"line_number":2885,"context_line":"                        # snapshots_model_update should be a list of dicts."},{"line_number":2886,"context_line":"                        snap \u003d next((item for item in snapshots if"},{"line_number":2887,"context_line":"                                     item.id \u003d\u003d snap_model.id), None)"},{"line_number":2888,"context_line":"                        if snap:"},{"line_number":2889,"context_line":"                            snap.status \u003d snap_model.status"},{"line_number":2890,"context_line":"                            snap.save()"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a29b11f_cab8ba13","line":2887,"updated":"2015-10-22 17:00:39.000000000","message":"item.id \u003d\u003d snap_model[\u0027id\u0027]","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d65eaefc48f0bbff800fc77deb4418a04f798c52","unresolved":false,"context_lines":[{"line_number":2884,"context_line":"                        # NOTE(xyang): snapshots is a list of snapshot objects."},{"line_number":2885,"context_line":"                        # snapshots_model_update should be a list of dicts."},{"line_number":2886,"context_line":"                        snap \u003d next((item for item in snapshots if"},{"line_number":2887,"context_line":"                                     item.id \u003d\u003d snap_model.id), None)"},{"line_number":2888,"context_line":"                        if snap:"},{"line_number":2889,"context_line":"                            snap.status \u003d snap_model.status"},{"line_number":2890,"context_line":"                            snap.save()"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa80f949_d85521c2","line":2887,"in_reply_to":"3a29b11f_cab8ba13","updated":"2015-11-06 17:42:21.000000000","message":"Done","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"},{"author":{"_account_id":16917,"name":"Alex O\u0027Rourke","email":"alex.orourke@hpe.com","username":"aorourke"},"change_message_id":"dd8393e14ea5a7017fbf28dd8326ce87b217b453","unresolved":false,"context_lines":[{"line_number":2886,"context_line":"                        snap \u003d next((item for item in snapshots if"},{"line_number":2887,"context_line":"                                     item.id \u003d\u003d snap_model.id), None)"},{"line_number":2888,"context_line":"                        if snap:"},{"line_number":2889,"context_line":"                            snap.status \u003d snap_model.status"},{"line_number":2890,"context_line":"                            snap.save()"},{"line_number":2891,"context_line":""},{"line_number":2892,"context_line":"                    if (snap_model[\u0027status\u0027] in [\u0027error_deleting\u0027, \u0027error\u0027] and"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a29b11f_4a434a13","line":2889,"updated":"2015-10-22 17:00:39.000000000","message":"snap.status \u003d snap_model[\u0027status\u0027]","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d65eaefc48f0bbff800fc77deb4418a04f798c52","unresolved":false,"context_lines":[{"line_number":2886,"context_line":"                        snap \u003d next((item for item in snapshots if"},{"line_number":2887,"context_line":"                                     item.id \u003d\u003d snap_model.id), None)"},{"line_number":2888,"context_line":"                        if snap:"},{"line_number":2889,"context_line":"                            snap.status \u003d snap_model.status"},{"line_number":2890,"context_line":"                            snap.save()"},{"line_number":2891,"context_line":""},{"line_number":2892,"context_line":"                    if (snap_model[\u0027status\u0027] in [\u0027error_deleting\u0027, \u0027error\u0027] and"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa80f949_98747968","line":2889,"in_reply_to":"3a29b11f_4a434a13","updated":"2015-11-06 17:42:21.000000000","message":"Done","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"},{"author":{"_account_id":5164,"name":"jsimms","email":"justin.simms@gmail.com","username":"jsimms"},"change_message_id":"dbbe4642ee201f4e6bb9e5cb8b3f9814e1c4180f","unresolved":false,"context_lines":[{"line_number":2910,"context_line":"                if not snapshots_model_update:"},{"line_number":2911,"context_line":"                    for snapshot in snapshots:"},{"line_number":2912,"context_line":"                        snapshot.status \u003d \u0027error\u0027"},{"line_number":2913,"context_line":"                        snapshot.save()"},{"line_number":2914,"context_line":""},{"line_number":2915,"context_line":"        for snapshot in snapshots:"},{"line_number":2916,"context_line":"            volume_id \u003d snapshot[\u0027volume_id\u0027]"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a29b11f_bc6d299b","line":2913,"updated":"2015-10-27 05:02:17.000000000","message":"Is there any chance that these updates to sqlalchemy snapshot instances could fail (is contention possible with other operations that handle snapshot instances)? I ask because I worry about there being no (visible) transaction that could be rolled back, especially since this is being done in exception handling logic.","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d65eaefc48f0bbff800fc77deb4418a04f798c52","unresolved":false,"context_lines":[{"line_number":2910,"context_line":"                if not snapshots_model_update:"},{"line_number":2911,"context_line":"                    for snapshot in snapshots:"},{"line_number":2912,"context_line":"                        snapshot.status \u003d \u0027error\u0027"},{"line_number":2913,"context_line":"                        snapshot.save()"},{"line_number":2914,"context_line":""},{"line_number":2915,"context_line":"        for snapshot in snapshots:"},{"line_number":2916,"context_line":"            volume_id \u003d snapshot[\u0027volume_id\u0027]"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa80f949_189729ed","line":2913,"in_reply_to":"3a29b11f_bc6d299b","updated":"2015-11-06 17:42:21.000000000","message":"There\u0027s a small possibility that db operation could fail.  I\u0027m not sure we should retry here though as we are already in the exception block.","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"},{"author":{"_account_id":16917,"name":"Alex O\u0027Rourke","email":"alex.orourke@hpe.com","username":"aorourke"},"change_message_id":"dd8393e14ea5a7017fbf28dd8326ce87b217b453","unresolved":false,"context_lines":[{"line_number":2984,"context_line":"                    # NOTE(xyang): snapshots is a list of snapshot objects."},{"line_number":2985,"context_line":"                    # snapshots_model_update should be a list of dicts."},{"line_number":2986,"context_line":"                    snap \u003d next((item for item in snapshots if"},{"line_number":2987,"context_line":"                                 item.id \u003d\u003d snap_model.id), None)"},{"line_number":2988,"context_line":"                    if snap:"},{"line_number":2989,"context_line":"                        snap.status \u003d snap_model.status"},{"line_number":2990,"context_line":"                        snap.save()"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a29b11f_ea44964a","line":2987,"updated":"2015-10-22 17:00:39.000000000","message":"item.id \u003d\u003d snap_model[\u0027id\u0027]","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d65eaefc48f0bbff800fc77deb4418a04f798c52","unresolved":false,"context_lines":[{"line_number":2984,"context_line":"                    # NOTE(xyang): snapshots is a list of snapshot objects."},{"line_number":2985,"context_line":"                    # snapshots_model_update should be a list of dicts."},{"line_number":2986,"context_line":"                    snap \u003d next((item for item in snapshots if"},{"line_number":2987,"context_line":"                                 item.id \u003d\u003d snap_model.id), None)"},{"line_number":2988,"context_line":"                    if snap:"},{"line_number":2989,"context_line":"                        snap.status \u003d snap_model.status"},{"line_number":2990,"context_line":"                        snap.save()"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa80f949_f884a50b","line":2987,"in_reply_to":"3a29b11f_ea44964a","updated":"2015-11-06 17:42:21.000000000","message":"Done","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"},{"author":{"_account_id":16917,"name":"Alex O\u0027Rourke","email":"alex.orourke@hpe.com","username":"aorourke"},"change_message_id":"dd8393e14ea5a7017fbf28dd8326ce87b217b453","unresolved":false,"context_lines":[{"line_number":2986,"context_line":"                    snap \u003d next((item for item in snapshots if"},{"line_number":2987,"context_line":"                                 item.id \u003d\u003d snap_model.id), None)"},{"line_number":2988,"context_line":"                    if snap:"},{"line_number":2989,"context_line":"                        snap.status \u003d snap_model.status"},{"line_number":2990,"context_line":"                        snap.save()"},{"line_number":2991,"context_line":""},{"line_number":2992,"context_line":"                    if (snap_model[\u0027status\u0027] in [\u0027error_deleting\u0027, \u0027error\u0027] and"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a29b11f_2a6daecb","line":2989,"updated":"2015-10-22 17:00:39.000000000","message":"snap.status \u003d snap_model[\u0027status\u0027]","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d65eaefc48f0bbff800fc77deb4418a04f798c52","unresolved":false,"context_lines":[{"line_number":2986,"context_line":"                    snap \u003d next((item for item in snapshots if"},{"line_number":2987,"context_line":"                                 item.id \u003d\u003d snap_model.id), None)"},{"line_number":2988,"context_line":"                    if snap:"},{"line_number":2989,"context_line":"                        snap.status \u003d snap_model.status"},{"line_number":2990,"context_line":"                        snap.save()"},{"line_number":2991,"context_line":""},{"line_number":2992,"context_line":"                    if (snap_model[\u0027status\u0027] in [\u0027error_deleting\u0027, \u0027error\u0027] and"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa80f949_987eb917","line":2989,"in_reply_to":"3a29b11f_2a6daecb","updated":"2015-11-06 17:42:21.000000000","message":"Done","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"},{"author":{"_account_id":5164,"name":"jsimms","email":"justin.simms@gmail.com","username":"jsimms"},"change_message_id":"dbbe4642ee201f4e6bb9e5cb8b3f9814e1c4180f","unresolved":false,"context_lines":[{"line_number":3010,"context_line":"                cgsnapshot.save()"},{"line_number":3011,"context_line":"                # Update snapshot status to \u0027error\u0027 if driver returns"},{"line_number":3012,"context_line":"                # None for snapshots_model_update."},{"line_number":3013,"context_line":"                if not snapshots_model_update:"},{"line_number":3014,"context_line":"                    for snapshot in snapshots:"},{"line_number":3015,"context_line":"                        snapshot.status \u003d \u0027error\u0027"},{"line_number":3016,"context_line":"                        snapshot.save()"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a29b11f_dc0ee5e4","line":3013,"updated":"2015-10-27 05:02:17.000000000","message":"Same as above. Would it make sense to create a reusable method of some sort , or perhaps a context manager that ensures snapshot instance integrity, since you are repeating yourself in terms of the snapshot state management? If not, no worries.","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d65eaefc48f0bbff800fc77deb4418a04f798c52","unresolved":false,"context_lines":[{"line_number":3010,"context_line":"                cgsnapshot.save()"},{"line_number":3011,"context_line":"                # Update snapshot status to \u0027error\u0027 if driver returns"},{"line_number":3012,"context_line":"                # None for snapshots_model_update."},{"line_number":3013,"context_line":"                if not snapshots_model_update:"},{"line_number":3014,"context_line":"                    for snapshot in snapshots:"},{"line_number":3015,"context_line":"                        snapshot.status \u003d \u0027error\u0027"},{"line_number":3016,"context_line":"                        snapshot.save()"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa80f949_9860f902","line":3013,"in_reply_to":"3a29b11f_dc0ee5e4","updated":"2015-11-06 17:42:21.000000000","message":"I wonder if that should be handled in snapshot.save() itself?  I don\u0027t have a good answer to your question.","commit_id":"8350090cc3dee3c06c5d904a38647257c980b966"},{"author":{"_account_id":10213,"name":"Alon Marx","email":"alonma@il.ibm.com","username":"alonmarx"},"change_message_id":"eea7ce9c8a7c4aedcf926e83579353040cb7e525","unresolved":false,"context_lines":[{"line_number":2623,"context_line":"                    update \u003d {\u0027status\u0027: volume[\u0027status\u0027]}"},{"line_number":2624,"context_line":"                    self.db.volume_update(context, volume[\u0027id\u0027],"},{"line_number":2625,"context_line":"                                          update)"},{"line_number":2626,"context_line":"                    # If we failed to delete a volume, make sure the status"},{"line_number":2627,"context_line":"                    # for the cg is set to error as well"},{"line_number":2628,"context_line":"                    if (volume[\u0027status\u0027] in [\u0027error_deleting\u0027, \u0027error\u0027] and"},{"line_number":2629,"context_line":"                            model_update[\u0027status\u0027] not in"}],"source_content_type":"text/x-python","patch_set":14,"id":"da85f559_4fe1ae99","line":2626,"updated":"2015-11-10 07:30:19.000000000","message":"This question comes as a result of reviewing Alex\u0027 changes:\n\nIf the model_update value is checked and set in the manager, why should the driver do this work as well? Is there any point in the driver returning  the model_update?\n\nThis also applies to model_update in create_cgsnapshot and delete_cgsnapshot","commit_id":"274fa0f80be51c699fe3b20b21748f719f92d389"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"af90b63d9b7b533f6dd1bbcf2d09aef8e88c1c25","unresolved":false,"context_lines":[{"line_number":2623,"context_line":"                    update \u003d {\u0027status\u0027: volume[\u0027status\u0027]}"},{"line_number":2624,"context_line":"                    self.db.volume_update(context, volume[\u0027id\u0027],"},{"line_number":2625,"context_line":"                                          update)"},{"line_number":2626,"context_line":"                    # If we failed to delete a volume, make sure the status"},{"line_number":2627,"context_line":"                    # for the cg is set to error as well"},{"line_number":2628,"context_line":"                    if (volume[\u0027status\u0027] in [\u0027error_deleting\u0027, \u0027error\u0027] and"},{"line_number":2629,"context_line":"                            model_update[\u0027status\u0027] not in"}],"source_content_type":"text/x-python","patch_set":14,"id":"da85f559_ad079d80","line":2626,"in_reply_to":"da85f559_4fe1ae99","updated":"2015-11-11 22:44:43.000000000","message":"There\u0027s a very long docstring on what a driver should return.  Hope that helps:).  Manager relies on the driver to return status of each volume because only driver knows if something happens to a particular volume.  If driver didn\u0027t return anything or didn\u0027t set the model_update for the group, the manager will try to set it.\n\nhttps://review.openstack.org/#/c/229580/14/cinder/volume/driver.py","commit_id":"274fa0f80be51c699fe3b20b21748f719f92d389"}]}
