)]}'
{"cinder/api/contrib/consistencygroups.py":[{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"477030d508bd4886d56c4234a14b752caf449f1b","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                    \"consistency group %(name)s from source.\") % {\u0027name\u0027: name}"},{"line_number":272,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"        LOG.info(_LI(\"Creating consistency group %(name)s.\"),"},{"line_number":275,"context_line":"                 {\u0027name\u0027: name},"},{"line_number":276,"context_line":"                 context\u003dcontext)"},{"line_number":277,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_9f17e444","line":274,"updated":"2015-03-02 22:53:25.000000000","message":"Should we change this message as compared to the others so that we know we are creating it from a source?  That might be more helpful.","commit_id":"6ad39bd10ec505797e85e1da5fcbae999e134f24"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"691c7acfbcee0d013fb3be31364831db047b9b73","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                    \"consistency group %(name)s from source.\") % {\u0027name\u0027: name}"},{"line_number":272,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"        LOG.info(_LI(\"Creating consistency group %(name)s.\"),"},{"line_number":275,"context_line":"                 {\u0027name\u0027: name},"},{"line_number":276,"context_line":"                 context\u003dcontext)"},{"line_number":277,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_ed891327","line":274,"in_reply_to":"ba7be1f8_9f17e444","updated":"2015-03-03 04:35:20.000000000","message":"Done","commit_id":"6ad39bd10ec505797e85e1da5fcbae999e134f24"}],"cinder/consistencygroup/api.py":[{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"d3126e9261206671a6fc45c0bd02a8909017b5d7","unresolved":false,"context_lines":[{"line_number":193,"context_line":"                kwargs[\u0027cgsnapshot\u0027] \u003d cgsnapshot"},{"line_number":194,"context_line":"                kwargs[\u0027consistencygroup\u0027] \u003d group"},{"line_number":195,"context_line":"                kwargs[\u0027snapshot\u0027] \u003d snapshot"},{"line_number":196,"context_line":"                kwargs[\u0027volume_type\u0027] \u003d volume_types.get_volume_type("},{"line_number":197,"context_line":"                    context, snapshot[\u0027volume_type_id\u0027])"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"                self.volume_api.create(context,"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_85f37f72","line":196,"updated":"2015-02-02 04:44:00.000000000","message":"We don\u0027t need to do a db hit if snapshot[\u0027volume_type_id\u0027] isn\u0027t set.","commit_id":"525c995f4232fd0fef0f865a47e18c3b2e43fe81"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"5b1d22b181d96b3c142b22a56d23e82718a2859e","unresolved":false,"context_lines":[{"line_number":193,"context_line":"                kwargs[\u0027cgsnapshot\u0027] \u003d cgsnapshot"},{"line_number":194,"context_line":"                kwargs[\u0027consistencygroup\u0027] \u003d group"},{"line_number":195,"context_line":"                kwargs[\u0027snapshot\u0027] \u003d snapshot"},{"line_number":196,"context_line":"                kwargs[\u0027volume_type\u0027] \u003d volume_types.get_volume_type("},{"line_number":197,"context_line":"                    context, snapshot[\u0027volume_type_id\u0027])"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"                self.volume_api.create(context,"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_69645ee5","line":196,"in_reply_to":"da86d52c_85f37f72","updated":"2015-02-23 23:34:30.000000000","message":"Done","commit_id":"525c995f4232fd0fef0f865a47e18c3b2e43fe81"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"d3126e9261206671a6fc45c0bd02a8909017b5d7","unresolved":false,"context_lines":[{"line_number":202,"context_line":"                                       None,"},{"line_number":203,"context_line":"                                       **kwargs)"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"        except Exception:"},{"line_number":206,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":207,"context_line":"                try:"},{"line_number":208,"context_line":"                    self.db.consistencygroup_destroy(context, group[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_25e573a8","line":205,"updated":"2015-02-02 04:44:00.000000000","message":"A couple of things missing in the clean up:\n\n1) Delete orphan volumes that would\u0027ve been part of CG being destroyed. This is not a simple volume delete from the db though. Some volumes might\u0027ve been created, some in flight, etc. This is kind of tricky.\n\n2) Rollback quota as updated from line 167 here.","commit_id":"525c995f4232fd0fef0f865a47e18c3b2e43fe81"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"5b1d22b181d96b3c142b22a56d23e82718a2859e","unresolved":false,"context_lines":[{"line_number":202,"context_line":"                                       None,"},{"line_number":203,"context_line":"                                       **kwargs)"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"        except Exception:"},{"line_number":206,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":207,"context_line":"                try:"},{"line_number":208,"context_line":"                    self.db.consistencygroup_destroy(context, group[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_49979a90","line":205,"in_reply_to":"da86d52c_25e573a8","updated":"2015-02-23 23:34:30.000000000","message":"I made changes in the next patch. self.volume_api.create will only create entries in the db. I catch exception from each volume_api.create, and won\u0027t continue if it fails already.  I think rollback will be handled by taskflow.","commit_id":"525c995f4232fd0fef0f865a47e18c3b2e43fe81"}],"cinder/db/sqlalchemy/migrate_repo/versions/037_add_cgsnapshot_id_column_to_consistencygroups.py":[{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"477030d508bd4886d56c4234a14b752caf449f1b","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    consistencygroups \u003d Table(\u0027consistencygroups\u0027, meta, autoload\u003dTrue)"},{"line_number":23,"context_line":"    cgsnapshot_id \u003d Column(\u0027cgsnapshot_id\u0027, String(36))"},{"line_number":24,"context_line":"    consistencygroups.create_column(cgsnapshot_id)"},{"line_number":25,"context_line":"    consistencygroups.update().values(cgsnapshot_id\u003dNone).execute()"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"def downgrade(migrate_engine):"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_dfa15cf9","line":25,"updated":"2015-03-02 22:53:25.000000000","message":"We should add error checking around this please.","commit_id":"6ad39bd10ec505797e85e1da5fcbae999e134f24"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"691c7acfbcee0d013fb3be31364831db047b9b73","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    consistencygroups \u003d Table(\u0027consistencygroups\u0027, meta, autoload\u003dTrue)"},{"line_number":23,"context_line":"    cgsnapshot_id \u003d Column(\u0027cgsnapshot_id\u0027, String(36))"},{"line_number":24,"context_line":"    consistencygroups.create_column(cgsnapshot_id)"},{"line_number":25,"context_line":"    consistencygroups.update().values(cgsnapshot_id\u003dNone).execute()"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"def downgrade(migrate_engine):"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_d014e2ea","line":25,"in_reply_to":"ba7be1f8_dfa15cf9","updated":"2015-03-03 04:35:20.000000000","message":"Done","commit_id":"6ad39bd10ec505797e85e1da5fcbae999e134f24"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"477030d508bd4886d56c4234a14b752caf449f1b","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    consistencygroups \u003d Table(\u0027consistencygroups\u0027, meta, autoload\u003dTrue)"},{"line_number":34,"context_line":"    cgsnapshot_id \u003d consistencygroups.columns.cgsnapshot_id"},{"line_number":35,"context_line":"    consistencygroups.drop_column(cgsnapshot_id)"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_3fb0b842","line":35,"updated":"2015-03-02 22:53:25.000000000","message":"Same here.","commit_id":"6ad39bd10ec505797e85e1da5fcbae999e134f24"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"691c7acfbcee0d013fb3be31364831db047b9b73","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    consistencygroups \u003d Table(\u0027consistencygroups\u0027, meta, autoload\u003dTrue)"},{"line_number":34,"context_line":"    cgsnapshot_id \u003d consistencygroups.columns.cgsnapshot_id"},{"line_number":35,"context_line":"    consistencygroups.drop_column(cgsnapshot_id)"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_70e896e2","line":35,"in_reply_to":"ba7be1f8_3fb0b842","updated":"2015-03-03 04:35:20.000000000","message":"Done","commit_id":"6ad39bd10ec505797e85e1da5fcbae999e134f24"}],"cinder/volume/driver.py":[{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"5ce7090878687411114f648218d6a877cacfbaa2","unresolved":false,"context_lines":[{"line_number":1100,"context_line":"        the model_update and volumes_model_update and return them or"},{"line_number":1101,"context_line":"        return None, None."},{"line_number":1102,"context_line":"        \"\"\""},{"line_number":1103,"context_line":"        raise NotImplementedError()"},{"line_number":1104,"context_line":""},{"line_number":1105,"context_line":"    def delete_consistencygroup(self, context, group):"},{"line_number":1106,"context_line":"        \"\"\"Deletes a consistency group.\"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_99ab7574","line":1103,"updated":"2015-02-24 19:05:39.000000000","message":"Would it be helpful to add a default impl of this that just calls self.create_consistencygroup(...) and then iterate over each volume calling self.create_volume_from_snapshot(...) passing in the cgsnapshot and group id?\n\nI know at least for my impl of create_consistencygroup_from_src we won\u0027t actually do anything new, it would just call existing driver methods, not sure if other drivers would work the same way or not though.\n\nMy thinking is if there is a default impl this would just work (yay free things!), but if a backend can/needs to do something special to make it work better for them they have the opportunity to override it.","commit_id":"059299a3a309536039b22639cd07a608ecfdefd8"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"a13050e5e327bfdc28fb54309e0dc8b22fba08bc","unresolved":false,"context_lines":[{"line_number":1100,"context_line":"        the model_update and volumes_model_update and return them or"},{"line_number":1101,"context_line":"        return None, None."},{"line_number":1102,"context_line":"        \"\"\""},{"line_number":1103,"context_line":"        raise NotImplementedError()"},{"line_number":1104,"context_line":""},{"line_number":1105,"context_line":"    def delete_consistencygroup(self, context, group):"},{"line_number":1106,"context_line":"        \"\"\"Deletes a consistency group.\"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_54da984c","line":1103,"in_reply_to":"ba7be1f8_44a3d44e","updated":"2015-02-24 23:32:06.000000000","message":"As soon as I\u0027ve implemented this, I\u0027ll get requests to implement the same for create CG and CG snapshot:).  So that is what I\u0027m worried about. Then we\u0027ll go back to the proposal that was rejected before. For people who are not familiar with CG, this is no different from a group of volumes. I\u0027ve seen people asking questions on why we need a new API when we can do this in a loop.  Providing a default implementation will just reinforce the misconception.","commit_id":"059299a3a309536039b22639cd07a608ecfdefd8"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"2cb6bcb6cc771f8566612b2f5dfb62d43355a705","unresolved":false,"context_lines":[{"line_number":1100,"context_line":"        the model_update and volumes_model_update and return them or"},{"line_number":1101,"context_line":"        return None, None."},{"line_number":1102,"context_line":"        \"\"\""},{"line_number":1103,"context_line":"        raise NotImplementedError()"},{"line_number":1104,"context_line":""},{"line_number":1105,"context_line":"    def delete_consistencygroup(self, context, group):"},{"line_number":1106,"context_line":"        \"\"\"Deletes a consistency group.\"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_945df07b","line":1103,"in_reply_to":"ba7be1f8_54da984c","updated":"2015-02-24 23:38:21.000000000","message":"Haha, alright, you\u0027ve convinced me to change my mind about the default impl :D","commit_id":"059299a3a309536039b22639cd07a608ecfdefd8"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"6b66658a465706671f8ba0420c42aa6d5c7e9c46","unresolved":false,"context_lines":[{"line_number":1100,"context_line":"        the model_update and volumes_model_update and return them or"},{"line_number":1101,"context_line":"        return None, None."},{"line_number":1102,"context_line":"        \"\"\""},{"line_number":1103,"context_line":"        raise NotImplementedError()"},{"line_number":1104,"context_line":""},{"line_number":1105,"context_line":"    def delete_consistencygroup(self, context, group):"},{"line_number":1106,"context_line":"        \"\"\"Deletes a consistency group.\"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_44a3d44e","line":1103,"in_reply_to":"ba7be1f8_84406c35","updated":"2015-02-24 19:33:24.000000000","message":"Ah ok, that makes sense, I can understand not wanting to give that impression.\n\nI guess in my mind this method is a bit different from creating volumes in a consistency group or taking snapshots. It would be requiring them to be created from a cgsnapshot (which wouldn\u0027t exist of the driver can\u0027t do cg operations) and creating a consistency group (again, needs a driver impl to make it work). So a default implementation would just error out with NotImplementedError as soon as you try and create the new consistency group anyway. This method doesn\u0027t really need to do anything consistency-wise other than create new volumes that (after this method) will be in a group together. I see it more like a helpful batch method to save some time on the user/admin side.","commit_id":"059299a3a309536039b22639cd07a608ecfdefd8"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d971de236b455d44b0a8194f5c5f6a25ef127323","unresolved":false,"context_lines":[{"line_number":1100,"context_line":"        the model_update and volumes_model_update and return them or"},{"line_number":1101,"context_line":"        return None, None."},{"line_number":1102,"context_line":"        \"\"\""},{"line_number":1103,"context_line":"        raise NotImplementedError()"},{"line_number":1104,"context_line":""},{"line_number":1105,"context_line":"    def delete_consistencygroup(self, context, group):"},{"line_number":1106,"context_line":"        \"\"\"Deletes a consistency group.\"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_84406c35","line":1103,"in_reply_to":"ba7be1f8_99ab7574","updated":"2015-02-24 19:19:27.000000000","message":"If we provide a default implementation like that, it will just be a grouping of volumes which has nothing to do with consistency in CG.  Initially in Juno when I first proposed the CG feature, I had plan to implement it for LVM.  The volumes in a CG will be created just like that. Then I would call a Nova API to freeze filesystem IO and then take snapshots.\n\nThat part of the proposal was rejected by the Cinder core because there\u0027s no real storage level consistency support in LVM.  It could lead to problems if we let that happen.\n\nBecause of that, I\u0027d rather not to provide a default implementation, because it could make false impression that storage level consistency is free for all arrays.","commit_id":"059299a3a309536039b22639cd07a608ecfdefd8"}],"cinder/volume/flows/api/create_volume.py":[{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"d3126e9261206671a6fc45c0bd02a8909017b5d7","unresolved":false,"context_lines":[{"line_number":750,"context_line":"            now \u003d timeutils.utcnow()"},{"line_number":751,"context_line":"            values \u003d {\u0027host\u0027: host, \u0027scheduled_at\u0027: now}"},{"line_number":752,"context_line":"            volume_ref \u003d self.db.volume_update(context, volume_id, values)"},{"line_number":753,"context_line":"            if not cgsnapshot_id:"},{"line_number":754,"context_line":"                self.volume_rpcapi.create_volume("},{"line_number":755,"context_line":"                    context,"},{"line_number":756,"context_line":"                    volume_ref,"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_e526fa67","line":753,"updated":"2015-02-02 04:44:00.000000000","message":"I don\u0027t understand this.","commit_id":"525c995f4232fd0fef0f865a47e18c3b2e43fe81"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"5b1d22b181d96b3c142b22a56d23e82718a2859e","unresolved":false,"context_lines":[{"line_number":750,"context_line":"            now \u003d timeutils.utcnow()"},{"line_number":751,"context_line":"            values \u003d {\u0027host\u0027: host, \u0027scheduled_at\u0027: now}"},{"line_number":752,"context_line":"            volume_ref \u003d self.db.volume_update(context, volume_id, values)"},{"line_number":753,"context_line":"            if not cgsnapshot_id:"},{"line_number":754,"context_line":"                self.volume_rpcapi.create_volume("},{"line_number":755,"context_line":"                    context,"},{"line_number":756,"context_line":"                    volume_ref,"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_a9bad607","line":753,"in_reply_to":"da86d52c_e526fa67","updated":"2015-02-23 23:34:30.000000000","message":"This means don\u0027t send create volume request to volume manager. There will be a request to create consistency group that will be send to the volume manager. We only want to create db entries here.  We want the volume manager to control the creation of all volumes in the group together.","commit_id":"525c995f4232fd0fef0f865a47e18c3b2e43fe81"}],"cinder/volume/manager.py":[{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"d3126e9261206671a6fc45c0bd02a8909017b5d7","unresolved":false,"context_lines":[{"line_number":1655,"context_line":"        cgsnapshot \u003d None"},{"line_number":1656,"context_line":"        snapshots \u003d None"},{"line_number":1657,"context_line":"        if cgsnapshot_id:"},{"line_number":1658,"context_line":"            cgsnapshot \u003d self.db.cgsnapshot_get(context, cgsnapshot_id)"},{"line_number":1659,"context_line":"            if cgsnapshot:"},{"line_number":1660,"context_line":"                snapshots \u003d self.db.snapshot_get_all_for_cgsnapshot("},{"line_number":1661,"context_line":"                    context.elevated(), cgsnapshot_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_4503470f","line":1658,"updated":"2015-02-02 04:44:00.000000000","message":"This will raise CgSnapShotNotFound. That should be caught.","commit_id":"525c995f4232fd0fef0f865a47e18c3b2e43fe81"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"5b1d22b181d96b3c142b22a56d23e82718a2859e","unresolved":false,"context_lines":[{"line_number":1655,"context_line":"        cgsnapshot \u003d None"},{"line_number":1656,"context_line":"        snapshots \u003d None"},{"line_number":1657,"context_line":"        if cgsnapshot_id:"},{"line_number":1658,"context_line":"            cgsnapshot \u003d self.db.cgsnapshot_get(context, cgsnapshot_id)"},{"line_number":1659,"context_line":"            if cgsnapshot:"},{"line_number":1660,"context_line":"                snapshots \u003d self.db.snapshot_get_all_for_cgsnapshot("},{"line_number":1661,"context_line":"                    context.elevated(), cgsnapshot_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_e9d76e21","line":1658,"in_reply_to":"da86d52c_4503470f","updated":"2015-02-23 23:34:30.000000000","message":"Done","commit_id":"525c995f4232fd0fef0f865a47e18c3b2e43fe81"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"7a41e6398b135092dd696532393fa2039954c016","unresolved":false,"context_lines":[{"line_number":1658,"context_line":"            cgsnapshot \u003d self.db.cgsnapshot_get(context, cgsnapshot_id)"},{"line_number":1659,"context_line":"            if cgsnapshot:"},{"line_number":1660,"context_line":"                snapshots \u003d self.db.snapshot_get_all_for_cgsnapshot("},{"line_number":1661,"context_line":"                    context.elevated(), cgsnapshot_id)"},{"line_number":1662,"context_line":""},{"line_number":1663,"context_line":"        status \u003d \u0027available\u0027"},{"line_number":1664,"context_line":"        model_update \u003d False"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_c51d7675","line":1661,"updated":"2015-02-02 05:38:39.000000000","message":"What if one of the snapshots is in an error state?","commit_id":"525c995f4232fd0fef0f865a47e18c3b2e43fe81"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"5b1d22b181d96b3c142b22a56d23e82718a2859e","unresolved":false,"context_lines":[{"line_number":1658,"context_line":"            cgsnapshot \u003d self.db.cgsnapshot_get(context, cgsnapshot_id)"},{"line_number":1659,"context_line":"            if cgsnapshot:"},{"line_number":1660,"context_line":"                snapshots \u003d self.db.snapshot_get_all_for_cgsnapshot("},{"line_number":1661,"context_line":"                    context.elevated(), cgsnapshot_id)"},{"line_number":1662,"context_line":""},{"line_number":1663,"context_line":"        status \u003d \u0027available\u0027"},{"line_number":1664,"context_line":"        model_update \u003d False"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_c9d46a22","line":1661,"in_reply_to":"da86d52c_c51d7675","updated":"2015-02-23 23:34:30.000000000","message":"Good point. Should check and bail out.","commit_id":"525c995f4232fd0fef0f865a47e18c3b2e43fe81"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"d3126e9261206671a6fc45c0bd02a8909017b5d7","unresolved":false,"context_lines":[{"line_number":1672,"context_line":"            LOG.info(_LI(\"Consistency group %s: creating\"), group_ref[\u0027name\u0027])"},{"line_number":1673,"context_line":"            model_update \u003d self.driver.create_consistencygroup(context,"},{"line_number":1674,"context_line":"                                                               group_ref,"},{"line_number":1675,"context_line":"                                                               cgsnapshot,"},{"line_number":1676,"context_line":"                                                               snapshots)"},{"line_number":1677,"context_line":""},{"line_number":1678,"context_line":"            if model_update:"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_654bea59","line":1675,"updated":"2015-02-02 04:44:00.000000000","message":"This breaks existing drivers implementing this. pure, emc, ibm, prophet. We should update those. What\u0027s the plan for getting existing drivers to get this working? It seems like it\u0027ll be confusing from the deployer/end user point of view if the driver says it supports consistency groups, but this doesn\u0027t work. That should be communicated clearly somewhere.\n\n\nSeparately, should we have the existing drivers that implement this raise immediately if these kwargs are passed in?","commit_id":"525c995f4232fd0fef0f865a47e18c3b2e43fe81"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"5b1d22b181d96b3c142b22a56d23e82718a2859e","unresolved":false,"context_lines":[{"line_number":1672,"context_line":"            LOG.info(_LI(\"Consistency group %s: creating\"), group_ref[\u0027name\u0027])"},{"line_number":1673,"context_line":"            model_update \u003d self.driver.create_consistencygroup(context,"},{"line_number":1674,"context_line":"                                                               group_ref,"},{"line_number":1675,"context_line":"                                                               cgsnapshot,"},{"line_number":1676,"context_line":"                                                               snapshots)"},{"line_number":1677,"context_line":""},{"line_number":1678,"context_line":"            if model_update:"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_e9092ede","line":1675,"in_reply_to":"da86d52c_654bea59","updated":"2015-02-23 23:34:30.000000000","message":"Introduced a different API in the next patch.","commit_id":"525c995f4232fd0fef0f865a47e18c3b2e43fe81"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"d3126e9261206671a6fc45c0bd02a8909017b5d7","unresolved":false,"context_lines":[{"line_number":1679,"context_line":"                group_ref \u003d self.db.consistencygroup_update("},{"line_number":1680,"context_line":"                    context, group_ref[\u0027id\u0027], model_update)"},{"line_number":1681,"context_line":""},{"line_number":1682,"context_line":"        except Exception:"},{"line_number":1683,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1684,"context_line":"                self.db.consistencygroup_update("},{"line_number":1685,"context_line":"                    context,"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_859c5e6b","line":1682,"updated":"2015-02-02 04:44:00.000000000","message":"We should probably do clean up with the list of snapshot refs if the CG goes to error state right?","commit_id":"525c995f4232fd0fef0f865a47e18c3b2e43fe81"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"5b1d22b181d96b3c142b22a56d23e82718a2859e","unresolved":false,"context_lines":[{"line_number":1679,"context_line":"                group_ref \u003d self.db.consistencygroup_update("},{"line_number":1680,"context_line":"                    context, group_ref[\u0027id\u0027], model_update)"},{"line_number":1681,"context_line":""},{"line_number":1682,"context_line":"        except Exception:"},{"line_number":1683,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1684,"context_line":"                self.db.consistencygroup_update("},{"line_number":1685,"context_line":"                    context,"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_09284233","line":1682,"in_reply_to":"da86d52c_859c5e6b","updated":"2015-02-23 23:34:30.000000000","message":"You mean volumes in the CG? In the next patch, I\u0027ll update the volumes statuses to \u0027error\u0027 as well.","commit_id":"525c995f4232fd0fef0f865a47e18c3b2e43fe81"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"477030d508bd4886d56c4234a14b752caf449f1b","unresolved":false,"context_lines":[{"line_number":1720,"context_line":"                        if snap[\u0027status\u0027] not in [\"available\"]:"},{"line_number":1721,"context_line":"                            msg \u003d (_(\"Cannot create consistency group \""},{"line_number":1722,"context_line":"                                     \"%(group)s because snapshot %(snap)s is \""},{"line_number":1723,"context_line":"                                     \"not in a valid state.\") %"},{"line_number":1724,"context_line":"                                   {\u0027group\u0027: group_id,"},{"line_number":1725,"context_line":"                                    \u0027snap\u0027: snap[\u0027id\u0027]})"},{"line_number":1726,"context_line":"                            raise exception.InvalidConsistencyGroup(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_7fc5d05a","line":1723,"updated":"2015-03-02 22:53:25.000000000","message":"List valid states.","commit_id":"6ad39bd10ec505797e85e1da5fcbae999e134f24"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"691c7acfbcee0d013fb3be31364831db047b9b73","unresolved":false,"context_lines":[{"line_number":1720,"context_line":"                        if snap[\u0027status\u0027] not in [\"available\"]:"},{"line_number":1721,"context_line":"                            msg \u003d (_(\"Cannot create consistency group \""},{"line_number":1722,"context_line":"                                     \"%(group)s because snapshot %(snap)s is \""},{"line_number":1723,"context_line":"                                     \"not in a valid state.\") %"},{"line_number":1724,"context_line":"                                   {\u0027group\u0027: group_id,"},{"line_number":1725,"context_line":"                                    \u0027snap\u0027: snap[\u0027id\u0027]})"},{"line_number":1726,"context_line":"                            raise exception.InvalidConsistencyGroup(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_500c723b","line":1723,"in_reply_to":"ba7be1f8_7fc5d05a","updated":"2015-03-03 04:35:20.000000000","message":"Done","commit_id":"6ad39bd10ec505797e85e1da5fcbae999e134f24"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"477030d508bd4886d56c4234a14b752caf449f1b","unresolved":false,"context_lines":[{"line_number":1730,"context_line":""},{"line_number":1731,"context_line":"            utils.require_driver_initialized(self.driver)"},{"line_number":1732,"context_line":""},{"line_number":1733,"context_line":"            LOG.info(_LI(\"Consistency group %s: creating.\"), group_id)"},{"line_number":1734,"context_line":"            model_update, volumes_model_update \u003d ("},{"line_number":1735,"context_line":"                self.driver.create_consistencygroup_from_src("},{"line_number":1736,"context_line":"                    context, group_ref, volumes, cgsnapshot, snapshots))"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_5f93ac5a","line":1733,"updated":"2015-03-02 22:53:25.000000000","message":"Add note here that it is from source.","commit_id":"6ad39bd10ec505797e85e1da5fcbae999e134f24"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"691c7acfbcee0d013fb3be31364831db047b9b73","unresolved":false,"context_lines":[{"line_number":1730,"context_line":""},{"line_number":1731,"context_line":"            utils.require_driver_initialized(self.driver)"},{"line_number":1732,"context_line":""},{"line_number":1733,"context_line":"            LOG.info(_LI(\"Consistency group %s: creating.\"), group_id)"},{"line_number":1734,"context_line":"            model_update, volumes_model_update \u003d ("},{"line_number":1735,"context_line":"                self.driver.create_consistencygroup_from_src("},{"line_number":1736,"context_line":"                    context, group_ref, volumes, cgsnapshot, snapshots))"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_70141644","line":1733,"in_reply_to":"ba7be1f8_5f93ac5a","updated":"2015-03-03 04:35:20.000000000","message":"Done","commit_id":"6ad39bd10ec505797e85e1da5fcbae999e134f24"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"477030d508bd4886d56c4234a14b752caf449f1b","unresolved":false,"context_lines":[{"line_number":1768,"context_line":"                                        group_id,"},{"line_number":1769,"context_line":"                                        {\u0027status\u0027: status,"},{"line_number":1770,"context_line":"                                         \u0027created_at\u0027: now})"},{"line_number":1771,"context_line":"        LOG.info(_LI(\"Consistency group %s: created successfully.\"),"},{"line_number":1772,"context_line":"                 group_id)"},{"line_number":1773,"context_line":""},{"line_number":1774,"context_line":"        self._notify_about_consistencygroup_usage("}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_bfb748d7","line":1771,"updated":"2015-03-02 22:53:25.000000000","message":"created successfully from source","commit_id":"6ad39bd10ec505797e85e1da5fcbae999e134f24"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"691c7acfbcee0d013fb3be31364831db047b9b73","unresolved":false,"context_lines":[{"line_number":1768,"context_line":"                                        group_id,"},{"line_number":1769,"context_line":"                                        {\u0027status\u0027: status,"},{"line_number":1770,"context_line":"                                         \u0027created_at\u0027: now})"},{"line_number":1771,"context_line":"        LOG.info(_LI(\"Consistency group %s: created successfully.\"),"},{"line_number":1772,"context_line":"                 group_id)"},{"line_number":1773,"context_line":""},{"line_number":1774,"context_line":"        self._notify_about_consistencygroup_usage("}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_b01a0e6d","line":1771,"in_reply_to":"ba7be1f8_bfb748d7","updated":"2015-03-03 04:35:20.000000000","message":"Done","commit_id":"6ad39bd10ec505797e85e1da5fcbae999e134f24"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"477030d508bd4886d56c4234a14b752caf449f1b","unresolved":false,"context_lines":[{"line_number":1796,"context_line":"                    context, group_id, {\u0027status\u0027: \u0027error\u0027})"},{"line_number":1797,"context_line":"            raise"},{"line_number":1798,"context_line":"        except exception.VolumeNotFound:"},{"line_number":1799,"context_line":"            LOG.error(_LE(\"The original volume %(volume_id)s \""},{"line_number":1800,"context_line":"                          \"cannot be found.\"),"},{"line_number":1801,"context_line":"                      {\u0027volume_id\u0027: snapshot_ref[\u0027volume_id\u0027]})"},{"line_number":1802,"context_line":"            self.db.volume_update(context, vol[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_5fc80c55","line":1799,"updated":"2015-03-02 22:53:25.000000000","message":"original -\u003e source ?  That might be clearer.","commit_id":"6ad39bd10ec505797e85e1da5fcbae999e134f24"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"691c7acfbcee0d013fb3be31364831db047b9b73","unresolved":false,"context_lines":[{"line_number":1796,"context_line":"                    context, group_id, {\u0027status\u0027: \u0027error\u0027})"},{"line_number":1797,"context_line":"            raise"},{"line_number":1798,"context_line":"        except exception.VolumeNotFound:"},{"line_number":1799,"context_line":"            LOG.error(_LE(\"The original volume %(volume_id)s \""},{"line_number":1800,"context_line":"                          \"cannot be found.\"),"},{"line_number":1801,"context_line":"                      {\u0027volume_id\u0027: snapshot_ref[\u0027volume_id\u0027]})"},{"line_number":1802,"context_line":"            self.db.volume_update(context, vol[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_102d9a95","line":1799,"in_reply_to":"ba7be1f8_5fc80c55","updated":"2015-03-03 04:35:20.000000000","message":"Done","commit_id":"6ad39bd10ec505797e85e1da5fcbae999e134f24"}],"cinder/volume/rpcapi.py":[{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"d3126e9261206671a6fc45c0bd02a8909017b5d7","unresolved":false,"context_lines":[{"line_number":58,"context_line":"               create_cgsnapshot, and delete_cgsnapshot. Also adds"},{"line_number":59,"context_line":"               the consistencygroup_id parameter in create_volume."},{"line_number":60,"context_line":"        1.19 - Adds update_migrated_volume"},{"line_number":61,"context_line":"        1.20 - Adds update_consistencygroup."},{"line_number":62,"context_line":"    \u0027\u0027\u0027"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    BASE_RPC_API_VERSION \u003d \u00271.0\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_e55d1b4a","line":61,"updated":"2015-02-02 04:44:00.000000000","message":"Update history.","commit_id":"525c995f4232fd0fef0f865a47e18c3b2e43fe81"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"5b1d22b181d96b3c142b22a56d23e82718a2859e","unresolved":false,"context_lines":[{"line_number":58,"context_line":"               create_cgsnapshot, and delete_cgsnapshot. Also adds"},{"line_number":59,"context_line":"               the consistencygroup_id parameter in create_volume."},{"line_number":60,"context_line":"        1.19 - Adds update_migrated_volume"},{"line_number":61,"context_line":"        1.20 - Adds update_consistencygroup."},{"line_number":62,"context_line":"    \u0027\u0027\u0027"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    BASE_RPC_API_VERSION \u003d \u00271.0\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_4926bacf","line":61,"in_reply_to":"da86d52c_e55d1b4a","updated":"2015-02-23 23:34:30.000000000","message":"Done","commit_id":"525c995f4232fd0fef0f865a47e18c3b2e43fe81"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"d3126e9261206671a6fc45c0bd02a8909017b5d7","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        super(VolumeAPI, self).__init__()"},{"line_number":68,"context_line":"        target \u003d messaging.Target(topic\u003dCONF.volume_topic,"},{"line_number":69,"context_line":"                                  version\u003dself.BASE_RPC_API_VERSION)"},{"line_number":70,"context_line":"        self.client \u003d rpc.get_client(target, \u00271.20\u0027)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def create_consistencygroup(self, ctxt, group, host, cgsnapshot\u003dNone):"},{"line_number":73,"context_line":"        new_host \u003d utils.extract_host(host)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_25581356","line":70,"updated":"2015-02-02 04:44:00.000000000","message":"bump","commit_id":"525c995f4232fd0fef0f865a47e18c3b2e43fe81"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"5b1d22b181d96b3c142b22a56d23e82718a2859e","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        super(VolumeAPI, self).__init__()"},{"line_number":68,"context_line":"        target \u003d messaging.Target(topic\u003dCONF.volume_topic,"},{"line_number":69,"context_line":"                                  version\u003dself.BASE_RPC_API_VERSION)"},{"line_number":70,"context_line":"        self.client \u003d rpc.get_client(target, \u00271.20\u0027)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def create_consistencygroup(self, ctxt, group, host, cgsnapshot\u003dNone):"},{"line_number":73,"context_line":"        new_host \u003d utils.extract_host(host)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_a92bb692","line":70,"in_reply_to":"da86d52c_25581356","updated":"2015-02-23 23:34:30.000000000","message":"Done","commit_id":"525c995f4232fd0fef0f865a47e18c3b2e43fe81"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"d3126e9261206671a6fc45c0bd02a8909017b5d7","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def delete_consistencygroup(self, ctxt, group):"},{"line_number":80,"context_line":"        host \u003d utils.extract_host(group[\u0027host\u0027])"},{"line_number":81,"context_line":"        cctxt \u003d self.client.prepare(server\u003dhost, version\u003d\u00271.18\u0027)"},{"line_number":82,"context_line":"        cctxt.cast(ctxt, \u0027delete_consistencygroup\u0027,"},{"line_number":83,"context_line":"                   group_id\u003dgroup[\u0027id\u0027])"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_851d3f76","line":81,"updated":"2015-02-02 04:44:00.000000000","message":"Are we suppose to update this too? Might check with Winston.","commit_id":"525c995f4232fd0fef0f865a47e18c3b2e43fe81"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"5b1d22b181d96b3c142b22a56d23e82718a2859e","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def delete_consistencygroup(self, ctxt, group):"},{"line_number":80,"context_line":"        host \u003d utils.extract_host(group[\u0027host\u0027])"},{"line_number":81,"context_line":"        cctxt \u003d self.client.prepare(server\u003dhost, version\u003d\u00271.18\u0027)"},{"line_number":82,"context_line":"        cctxt.cast(ctxt, \u0027delete_consistencygroup\u0027,"},{"line_number":83,"context_line":"                   group_id\u003dgroup[\u0027id\u0027])"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_cc00f803","line":81,"in_reply_to":"da86d52c_851d3f76","updated":"2015-02-23 23:34:30.000000000","message":"We don\u0027t need to pump version for delete_consistencygroup because we didn\u0027t change this.","commit_id":"525c995f4232fd0fef0f865a47e18c3b2e43fe81"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"d3126e9261206671a6fc45c0bd02a8909017b5d7","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                      cgsnapshot_id\u003dNone):"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        new_host \u003d utils.extract_host(host)"},{"line_number":120,"context_line":"        cctxt \u003d self.client.prepare(server\u003dnew_host, version\u003d\u00271.4\u0027)"},{"line_number":121,"context_line":"        request_spec_p \u003d jsonutils.to_primitive(request_spec)"},{"line_number":122,"context_line":"        cctxt.cast(ctxt, \u0027create_volume\u0027,"},{"line_number":123,"context_line":"                   volume_id\u003dvolume[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_e5243bc8","line":120,"updated":"2015-02-02 04:44:00.000000000","message":"Are we suppose to update this too? Might check with Winston.","commit_id":"525c995f4232fd0fef0f865a47e18c3b2e43fe81"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"5b1d22b181d96b3c142b22a56d23e82718a2859e","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                      cgsnapshot_id\u003dNone):"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        new_host \u003d utils.extract_host(host)"},{"line_number":120,"context_line":"        cctxt \u003d self.client.prepare(server\u003dnew_host, version\u003d\u00271.4\u0027)"},{"line_number":121,"context_line":"        request_spec_p \u003d jsonutils.to_primitive(request_spec)"},{"line_number":122,"context_line":"        cctxt.cast(ctxt, \u0027create_volume\u0027,"},{"line_number":123,"context_line":"                   volume_id\u003dvolume[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_2c2514ab","line":120,"in_reply_to":"da86d52c_e5243bc8","updated":"2015-02-23 23:34:30.000000000","message":"I don\u0027t believe we need to update this.","commit_id":"525c995f4232fd0fef0f865a47e18c3b2e43fe81"}]}
