)]}'
{"cinder/api/contrib/consistencygroups.py":[{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"0354f09a40aaeaed557b94efc3eb52d13f15446c","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        LOG.debug(\u0027Update called for consistency group %s.\u0027, id)"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        if not body:"},{"line_number":222,"context_line":"            msg \u003d _(\"Missing request body\")"},{"line_number":223,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":224,"context_line":"        if not self.is_valid_body(body, \u0027consistencygroup\u0027):"},{"line_number":225,"context_line":"            msg \u003d _(\"Incorrect request body format.\")"}],"source_content_type":"text/x-python","patch_set":24,"id":"ba7be1f8_6d1a8d70","line":222,"updated":"2015-03-02 22:33:04.000000000","message":"Should add \u0027.\u0027 here to be consistent.","commit_id":"339f3df7a7d357f232e99189ed61b2fda4d51888"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d65e44f8d22aa79b5546de03f703c23100f14ba4","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        LOG.debug(\u0027Update called for consistency group %s.\u0027, id)"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        if not body:"},{"line_number":222,"context_line":"            msg \u003d _(\"Missing request body\")"},{"line_number":223,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":224,"context_line":"        if not self.is_valid_body(body, \u0027consistencygroup\u0027):"},{"line_number":225,"context_line":"            msg \u003d _(\"Incorrect request body format.\")"}],"source_content_type":"text/x-python","patch_set":24,"id":"ba7be1f8_c296e3ef","line":222,"in_reply_to":"ba7be1f8_6d1a8d70","updated":"2015-03-03 03:39:09.000000000","message":"Done","commit_id":"339f3df7a7d357f232e99189ed61b2fda4d51888"}],"cinder/consistencygroup/api.py":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"49437d40870f64a322e9d3932a0f59202909d0d4","unresolved":false,"context_lines":[{"line_number":328,"context_line":"                # Volume currently in CG. It will be removed from CG."},{"line_number":329,"context_line":"                removevolumes_ref.append(copy.deepcopy(volume))"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"        for addvol in addvolumes_list:"},{"line_number":332,"context_line":"            addvol_ref \u003d self.db.volume_get(context, addvol)"},{"line_number":333,"context_line":"            if addvol_ref:"},{"line_number":334,"context_line":"                addvol_type_id \u003d addvol_ref.get(\u0027volume_type_id\u0027, None)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_1d7b2abf","line":331,"updated":"2015-01-01 16:33:35.000000000","message":"Should there be some checking for add and remove to throw an error if they request a volume that is not found? Either by it just not existing or not accessible by them.","commit_id":"175dfd1d61eacc5c02afd22caa72afb373a39391"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"bb8f011b1672903702541c080fbc4761ab314ae6","unresolved":false,"context_lines":[{"line_number":328,"context_line":"                # Volume currently in CG. It will be removed from CG."},{"line_number":329,"context_line":"                removevolumes_ref.append(copy.deepcopy(volume))"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"        for addvol in addvolumes_list:"},{"line_number":332,"context_line":"            addvol_ref \u003d self.db.volume_get(context, addvol)"},{"line_number":333,"context_line":"            if addvol_ref:"},{"line_number":334,"context_line":"                addvol_type_id \u003d addvol_ref.get(\u0027volume_type_id\u0027, None)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_c0e5390b","line":331,"in_reply_to":"3a961159_1d7b2abf","updated":"2015-01-01 20:43:02.000000000","message":"Good point. Currently I just skipped them silently.  I should at least log a warning message if the volume is not found.\n\nI think trying to add an invalid volume needs an exception, but trying to remove an invalid volume will just get a warning.  This is similar to trying to delete a volume in the regular volume operation. It should just pass.","commit_id":"175dfd1d61eacc5c02afd22caa72afb373a39391"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"56a3a2e53956ea4fdc62d1df000d07aaefd90232","unresolved":false,"context_lines":[{"line_number":293,"context_line":"            msg \u003d _(\"Consistency group status must be available, \""},{"line_number":294,"context_line":"                    \"but current status is: %s.\") % group[\u0027status\u0027]"},{"line_number":295,"context_line":"            raise exception.InvalidConsistencyGroup(reason\u003dmsg)"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"        volumes \u003d self.db.volume_get_all_by_group(context.elevated(),"},{"line_number":298,"context_line":"                                                  group[\u0027id\u0027])"},{"line_number":299,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_f055dcc2","line":296,"updated":"2015-01-12 07:25:07.000000000","message":"If we have a volume uuid in both add and remove, we should just error out immediately. We don\u0027t know what the user wants, and probably is a mistake.","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"83ef90d2bfe935b5c39b78c538c795584b8c0d15","unresolved":false,"context_lines":[{"line_number":293,"context_line":"            msg \u003d _(\"Consistency group status must be available, \""},{"line_number":294,"context_line":"                    \"but current status is: %s.\") % group[\u0027status\u0027]"},{"line_number":295,"context_line":"            raise exception.InvalidConsistencyGroup(reason\u003dmsg)"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"        volumes \u003d self.db.volume_get_all_by_group(context.elevated(),"},{"line_number":298,"context_line":"                                                  group[\u0027id\u0027])"},{"line_number":299,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_02f417cd","line":296,"in_reply_to":"3a961159_f055dcc2","updated":"2015-01-17 06:09:32.000000000","message":"Done","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"56a3a2e53956ea4fdc62d1df000d07aaefd90232","unresolved":false,"context_lines":[{"line_number":328,"context_line":"                           {\u0027volume_id\u0027: volume[\u0027id\u0027],"},{"line_number":329,"context_line":"                            \u0027group_id\u0027: group[\u0027id\u0027],"},{"line_number":330,"context_line":"                            \u0027status\u0027: volume[\u0027status\u0027]})"},{"line_number":331,"context_line":"                    raise exception.InvalidConsistencyGroup(reason\u003dmsg)"},{"line_number":332,"context_line":"                # Volume currently in CG. It will be removed from CG."},{"line_number":333,"context_line":"                if removevolumes_new:"},{"line_number":334,"context_line":"                    removevolumes_new +\u003d \",\""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_10b7c8f6","line":331,"updated":"2015-01-12 07:25:07.000000000","message":"Not sure if that\u0027s the right exception here. This is an invalid volume addition to a consistency group because of it\u0027s state. It seems like this gets used as a general exception throughout here. I think InvalidVolume makes more sense here.","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"83ef90d2bfe935b5c39b78c538c795584b8c0d15","unresolved":false,"context_lines":[{"line_number":328,"context_line":"                           {\u0027volume_id\u0027: volume[\u0027id\u0027],"},{"line_number":329,"context_line":"                            \u0027group_id\u0027: group[\u0027id\u0027],"},{"line_number":330,"context_line":"                            \u0027status\u0027: volume[\u0027status\u0027]})"},{"line_number":331,"context_line":"                    raise exception.InvalidConsistencyGroup(reason\u003dmsg)"},{"line_number":332,"context_line":"                # Volume currently in CG. It will be removed from CG."},{"line_number":333,"context_line":"                if removevolumes_new:"},{"line_number":334,"context_line":"                    removevolumes_new +\u003d \",\""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_a2226351","line":331,"in_reply_to":"3a961159_10b7c8f6","updated":"2015-01-17 06:09:32.000000000","message":"Done","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"56a3a2e53956ea4fdc62d1df000d07aaefd90232","unresolved":false,"context_lines":[{"line_number":335,"context_line":"                removevolumes_new +\u003d volume[\u0027id\u0027]"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"        for remvol in removevolumes_list:"},{"line_number":338,"context_line":"            if remvol not in removevolumes_new:"},{"line_number":339,"context_line":"                LOG.warning(_LW(\"Cannot remove volume %(volume_id)s from \""},{"line_number":340,"context_line":"                                \"consistency group %(group_id)s because it \""},{"line_number":341,"context_line":"                                \"is not in the group.\"),"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_d02e2042","line":338,"updated":"2015-01-12 07:25:07.000000000","message":"We should abort here completely. There\u0027s a mistake in the request probably.","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"83ef90d2bfe935b5c39b78c538c795584b8c0d15","unresolved":false,"context_lines":[{"line_number":335,"context_line":"                removevolumes_new +\u003d volume[\u0027id\u0027]"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"        for remvol in removevolumes_list:"},{"line_number":338,"context_line":"            if remvol not in removevolumes_new:"},{"line_number":339,"context_line":"                LOG.warning(_LW(\"Cannot remove volume %(volume_id)s from \""},{"line_number":340,"context_line":"                                \"consistency group %(group_id)s because it \""},{"line_number":341,"context_line":"                                \"is not in the group.\"),"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_82d64725","line":338,"in_reply_to":"3a961159_d02e2042","updated":"2015-01-17 06:09:32.000000000","message":"Done","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"56a3a2e53956ea4fdc62d1df000d07aaefd90232","unresolved":false,"context_lines":[{"line_number":343,"context_line":"                             \u0027group_id\u0027: group[\u0027id\u0027]})"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"        for addvol in addvolumes_list:"},{"line_number":346,"context_line":"            addvol_ref \u003d self.db.volume_get(context, addvol)"},{"line_number":347,"context_line":"            if addvol_ref:"},{"line_number":348,"context_line":"                addvol_type_id \u003d addvol_ref.get(\u0027volume_type_id\u0027, None)"},{"line_number":349,"context_line":"                if addvol_type_id not in group[\u0027volume_type_id\u0027]:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_10e0a8f9","line":346,"updated":"2015-01-12 07:25:07.000000000","message":"This will raise VolumeNotFound if you don\u0027t have a ref. Should catch that here.","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"83ef90d2bfe935b5c39b78c538c795584b8c0d15","unresolved":false,"context_lines":[{"line_number":343,"context_line":"                             \u0027group_id\u0027: group[\u0027id\u0027]})"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"        for addvol in addvolumes_list:"},{"line_number":346,"context_line":"            addvol_ref \u003d self.db.volume_get(context, addvol)"},{"line_number":347,"context_line":"            if addvol_ref:"},{"line_number":348,"context_line":"                addvol_type_id \u003d addvol_ref.get(\u0027volume_type_id\u0027, None)"},{"line_number":349,"context_line":"                if addvol_type_id not in group[\u0027volume_type_id\u0027]:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_a2d98357","line":346,"in_reply_to":"3a961159_10e0a8f9","updated":"2015-01-17 06:09:32.000000000","message":"Done","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"56a3a2e53956ea4fdc62d1df000d07aaefd90232","unresolved":false,"context_lines":[{"line_number":354,"context_line":"                           {\u0027volume_id\u0027: addvol_ref[\u0027id\u0027],"},{"line_number":355,"context_line":"                            \u0027group_id\u0027: group[\u0027id\u0027],"},{"line_number":356,"context_line":"                            \u0027volume_type\u0027: addvol_type_id})"},{"line_number":357,"context_line":"                    raise exception.InvalidConsistencyGroup(reason\u003dmsg)"},{"line_number":358,"context_line":"                if addvol_ref[\u0027status\u0027] not in [\u0027in-use\u0027, \u0027available\u0027]:"},{"line_number":359,"context_line":"                    msg \u003d (_(\"Cannot add volume %(volume_id)s to consistency \""},{"line_number":360,"context_line":"                             \"group %(group_id)s because volume is in an \""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_30920459","line":357,"updated":"2015-01-12 07:25:07.000000000","message":"Either InvalidVolume or InvalidVolumeType makes more sense here.","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"83ef90d2bfe935b5c39b78c538c795584b8c0d15","unresolved":false,"context_lines":[{"line_number":354,"context_line":"                           {\u0027volume_id\u0027: addvol_ref[\u0027id\u0027],"},{"line_number":355,"context_line":"                            \u0027group_id\u0027: group[\u0027id\u0027],"},{"line_number":356,"context_line":"                            \u0027volume_type\u0027: addvol_type_id})"},{"line_number":357,"context_line":"                    raise exception.InvalidConsistencyGroup(reason\u003dmsg)"},{"line_number":358,"context_line":"                if addvol_ref[\u0027status\u0027] not in [\u0027in-use\u0027, \u0027available\u0027]:"},{"line_number":359,"context_line":"                    msg \u003d (_(\"Cannot add volume %(volume_id)s to consistency \""},{"line_number":360,"context_line":"                             \"group %(group_id)s because volume is in an \""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_02e25700","line":357,"in_reply_to":"3a961159_30920459","updated":"2015-01-17 06:09:32.000000000","message":"Done","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"56a3a2e53956ea4fdc62d1df000d07aaefd90232","unresolved":false,"context_lines":[{"line_number":362,"context_line":"                           {\u0027volume_id\u0027: addvol_ref[\u0027id\u0027],"},{"line_number":363,"context_line":"                            \u0027group_id\u0027: group[\u0027id\u0027],"},{"line_number":364,"context_line":"                            \u0027status\u0027: addvol_ref[\u0027status\u0027]})"},{"line_number":365,"context_line":"                    raise exception.InvalidConsistencyGroup(reason\u003dmsg)"},{"line_number":366,"context_line":"                # Volume exists. It will be added to CG."},{"line_number":367,"context_line":"                if addvolumes_new:"},{"line_number":368,"context_line":"                    addvolumes_new +\u003d \",\""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_508f902e","line":365,"updated":"2015-01-12 07:25:07.000000000","message":"InvalidVolume should be raised here.","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"83ef90d2bfe935b5c39b78c538c795584b8c0d15","unresolved":false,"context_lines":[{"line_number":362,"context_line":"                           {\u0027volume_id\u0027: addvol_ref[\u0027id\u0027],"},{"line_number":363,"context_line":"                            \u0027group_id\u0027: group[\u0027id\u0027],"},{"line_number":364,"context_line":"                            \u0027status\u0027: addvol_ref[\u0027status\u0027]})"},{"line_number":365,"context_line":"                    raise exception.InvalidConsistencyGroup(reason\u003dmsg)"},{"line_number":366,"context_line":"                # Volume exists. It will be added to CG."},{"line_number":367,"context_line":"                if addvolumes_new:"},{"line_number":368,"context_line":"                    addvolumes_new +\u003d \",\""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_22ed93f0","line":365,"in_reply_to":"3a961159_508f902e","updated":"2015-01-17 06:09:32.000000000","message":"Done","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"56a3a2e53956ea4fdc62d1df000d07aaefd90232","unresolved":false,"context_lines":[{"line_number":373,"context_line":"                         \"group %(group_id)s because volume does not exist.\") %"},{"line_number":374,"context_line":"                       {\u0027volume_id\u0027: addvol_ref[\u0027id\u0027],"},{"line_number":375,"context_line":"                        \u0027group_id\u0027: group[\u0027id\u0027]})"},{"line_number":376,"context_line":"                raise exception.InvalidConsistencyGroup(reason\u003dmsg)"},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"        if (not name and not description and not addvolumes_new and"},{"line_number":379,"context_line":"                not removevolumes_new):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_9099f87b","line":376,"updated":"2015-01-12 07:25:07.000000000","message":"InvalidVolume should be raised here.","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"83ef90d2bfe935b5c39b78c538c795584b8c0d15","unresolved":false,"context_lines":[{"line_number":373,"context_line":"                         \"group %(group_id)s because volume does not exist.\") %"},{"line_number":374,"context_line":"                       {\u0027volume_id\u0027: addvol_ref[\u0027id\u0027],"},{"line_number":375,"context_line":"                        \u0027group_id\u0027: group[\u0027id\u0027]})"},{"line_number":376,"context_line":"                raise exception.InvalidConsistencyGroup(reason\u003dmsg)"},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"        if (not name and not description and not addvolumes_new and"},{"line_number":379,"context_line":"                not removevolumes_new):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_42e8dfde","line":376,"in_reply_to":"3a961159_9099f87b","updated":"2015-01-17 06:09:32.000000000","message":"Done","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"56a3a2e53956ea4fdc62d1df000d07aaefd90232","unresolved":false,"context_lines":[{"line_number":389,"context_line":"                                         \u0027updated_at\u0027: now})"},{"line_number":390,"context_line":""},{"line_number":391,"context_line":"        # addvolumes_new and removevolumes_new are strings of volume UUIDs"},{"line_number":392,"context_line":"        # separated by commas with no spaces in between."},{"line_number":393,"context_line":"        self.volume_rpcapi.update_consistencygroup("},{"line_number":394,"context_line":"            context, group, name\u003dname,"},{"line_number":395,"context_line":"            description\u003ddescription,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_109c285d","line":392,"updated":"2015-01-12 07:25:07.000000000","message":"Interesting that we have to do an rpc call if we\u0027re just changing the name and description. Best case of doing this all at once if we\u0027re actually add/removing volumes in the cg.","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"83ef90d2bfe935b5c39b78c538c795584b8c0d15","unresolved":false,"context_lines":[{"line_number":389,"context_line":"                                         \u0027updated_at\u0027: now})"},{"line_number":390,"context_line":""},{"line_number":391,"context_line":"        # addvolumes_new and removevolumes_new are strings of volume UUIDs"},{"line_number":392,"context_line":"        # separated by commas with no spaces in between."},{"line_number":393,"context_line":"        self.volume_rpcapi.update_consistencygroup("},{"line_number":394,"context_line":"            context, group, name\u003dname,"},{"line_number":395,"context_line":"            description\u003ddescription,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_e2cd4b87","line":392,"in_reply_to":"3a961159_109c285d","updated":"2015-01-17 06:09:32.000000000","message":"I moved them to the manager because of add volumes and remove volumes. I can add a check here. If we are only updating name and description, there\u0027s no need to do an rpc call. Done.","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":10628,"name":"Peter Wang","email":"peter.wang13@emc.com","username":"peter_wang"},"change_message_id":"9f8068f1cdd7d92c27c86a8bce0a97a2535b673b","unresolved":false,"context_lines":[{"line_number":421,"context_line":"            fields[\u0027name\u0027] \u003d name"},{"line_number":422,"context_line":"            fields[\u0027description\u0027] \u003d description"},{"line_number":423,"context_line":""},{"line_number":424,"context_line":"        self.db.consistencygroup_update(context, group[\u0027id\u0027], fields)"},{"line_number":425,"context_line":""},{"line_number":426,"context_line":"        # Do a RPC call only if the update request includes"},{"line_number":427,"context_line":"        # adding/removing volumes. add_volumes_new and remove_volumes_new"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_39690f27","line":424,"updated":"2015-01-20 08:51:00.000000000","message":"Hi Xing\ni just tried you patch, if i use:\ncinder consisgroup-update --name name_again f3ce112b-ffc0-4c78-b706-0bee4429ce02\nafter name was successfully updated in database, status would be left as \"updating\" forever, following could be add as well:\n\nfields[\u0027status\u0027] \u003d \u0027available\u0027\n\nBTW: will you tell driver the change of name/description in this case?\n\nThanks\nPeter","commit_id":"0fa5de05e5ef782f9a7f0d08c3ca28997499179a"},{"author":{"_account_id":10628,"name":"Peter Wang","email":"peter.wang13@emc.com","username":"peter_wang"},"change_message_id":"ae91a18ff78df90fb2933ae14157e36a3f746f7c","unresolved":false,"context_lines":[{"line_number":421,"context_line":"            fields[\u0027name\u0027] \u003d name"},{"line_number":422,"context_line":"            fields[\u0027description\u0027] \u003d description"},{"line_number":423,"context_line":""},{"line_number":424,"context_line":"        self.db.consistencygroup_update(context, group[\u0027id\u0027], fields)"},{"line_number":425,"context_line":""},{"line_number":426,"context_line":"        # Do a RPC call only if the update request includes"},{"line_number":427,"context_line":"        # adding/removing volumes. add_volumes_new and remove_volumes_new"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a930d6b_b53057e9","line":424,"in_reply_to":"1a930d6b_77b49bf2","updated":"2015-01-23 12:24:57.000000000","message":"Hi xing\ni have verified the above case,  thanks for fixing it","commit_id":"0fa5de05e5ef782f9a7f0d08c3ca28997499179a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"135029a0f994478a72e11eb9ab4ea7cda47c6a32","unresolved":false,"context_lines":[{"line_number":421,"context_line":"            fields[\u0027name\u0027] \u003d name"},{"line_number":422,"context_line":"            fields[\u0027description\u0027] \u003d description"},{"line_number":423,"context_line":""},{"line_number":424,"context_line":"        self.db.consistencygroup_update(context, group[\u0027id\u0027], fields)"},{"line_number":425,"context_line":""},{"line_number":426,"context_line":"        # Do a RPC call only if the update request includes"},{"line_number":427,"context_line":"        # adding/removing volumes. add_volumes_new and remove_volumes_new"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_ab8e7730","line":424,"in_reply_to":"3a961159_39690f27","updated":"2015-01-20 15:47:26.000000000","message":"Thanks Peter for pointing this out!  I moved name and description back to API and forgot to update the status.  Will update in the next patch.\n\nIf only name and description are updated, it will be just a db change.  Driver  won\u0027t be notified.","commit_id":"0fa5de05e5ef782f9a7f0d08c3ca28997499179a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"8be04bf585763f2a069fd7062f8cce446fa5c611","unresolved":false,"context_lines":[{"line_number":421,"context_line":"            fields[\u0027name\u0027] \u003d name"},{"line_number":422,"context_line":"            fields[\u0027description\u0027] \u003d description"},{"line_number":423,"context_line":""},{"line_number":424,"context_line":"        self.db.consistencygroup_update(context, group[\u0027id\u0027], fields)"},{"line_number":425,"context_line":""},{"line_number":426,"context_line":"        # Do a RPC call only if the update request includes"},{"line_number":427,"context_line":"        # adding/removing volumes. add_volumes_new and remove_volumes_new"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a930d6b_77b49bf2","line":424,"in_reply_to":"3a961159_ab8e7730","updated":"2015-01-21 02:06:36.000000000","message":"Done","commit_id":"0fa5de05e5ef782f9a7f0d08c3ca28997499179a"},{"author":{"_account_id":10628,"name":"Peter Wang","email":"peter.wang13@emc.com","username":"peter_wang"},"change_message_id":"b4ced19b7a48aad310b3d89b7ca9791ed2d847a9","unresolved":false,"context_lines":[{"line_number":363,"context_line":"                        \u0027group_id\u0027: group[\u0027id\u0027]})"},{"line_number":364,"context_line":"                raise exception.InvalidVolume(reason\u003dmsg)"},{"line_number":365,"context_line":"            if add_vol_ref:"},{"line_number":366,"context_line":"                add_vol_type_id \u003d add_vol_ref.get(\u0027volume_type_id\u0027, None)"},{"line_number":367,"context_line":"                if add_vol_type_id not in group[\u0027volume_type_id\u0027]:"},{"line_number":368,"context_line":"                    msg \u003d (_(\"Cannot add volume %(volume_id)s to consistency \""},{"line_number":369,"context_line":"                             \"group %(group_id)s because volume type \""}],"source_content_type":"text/x-python","patch_set":11,"id":"da86d52c_d3fe136b","line":366,"updated":"2015-02-02 13:28:01.000000000","message":"Hi Xing\nif add_vol_type_id is None\nthen following statment\nif add_vol_type_id not in group[\u0027volume_type_id\u0027]:\nwould report \n2015-02-02 03:01:47.425 4964 TRACE cinder.api.openstack.wsgi   File \"/opt/stack/cinder/cinder/consistencygroup/api.py\", line 367, in update\n2015-02-02 03:01:47.425 4964 TRACE cinder.api.openstack.wsgi     if add_vol_type_id not in group[\u0027volume_type_id\u0027]:\n2015-02-02 03:01:47.425 4964 TRACE cinder.api.openstack.wsgi TypeError: coercing to Unicode: need string or buffer, NoneType found\n\nThanks\nPeter","commit_id":"1515464836bd4a65f28c0113001f78b948ec9abe"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"3bf7dea3c1f77679d87eec1467cc91c2f35c6f9a","unresolved":false,"context_lines":[{"line_number":363,"context_line":"                        \u0027group_id\u0027: group[\u0027id\u0027]})"},{"line_number":364,"context_line":"                raise exception.InvalidVolume(reason\u003dmsg)"},{"line_number":365,"context_line":"            if add_vol_ref:"},{"line_number":366,"context_line":"                add_vol_type_id \u003d add_vol_ref.get(\u0027volume_type_id\u0027, None)"},{"line_number":367,"context_line":"                if add_vol_type_id not in group[\u0027volume_type_id\u0027]:"},{"line_number":368,"context_line":"                    msg \u003d (_(\"Cannot add volume %(volume_id)s to consistency \""},{"line_number":369,"context_line":"                             \"group %(group_id)s because volume type \""}],"source_content_type":"text/x-python","patch_set":11,"id":"da86d52c_a0ff6c66","line":366,"in_reply_to":"da86d52c_d3fe136b","updated":"2015-02-02 19:47:51.000000000","message":"I\u0027ll add a check for None volume type.","commit_id":"1515464836bd4a65f28c0113001f78b948ec9abe"},{"author":{"_account_id":10628,"name":"Peter Wang","email":"peter.wang13@emc.com","username":"peter_wang"},"change_message_id":"3462f6ad5a93e76da70c3368b5f93fa7436fa876","unresolved":false,"context_lines":[{"line_number":422,"context_line":""},{"line_number":423,"context_line":"        # Update name and description in db now. No need to"},{"line_number":424,"context_line":"        # to send them over thru a RPC call."},{"line_number":425,"context_line":"        if name:"},{"line_number":426,"context_line":"            fields[\u0027name\u0027] \u003d name"},{"line_number":427,"context_line":"        if description:"},{"line_number":428,"context_line":"            fields[\u0027description\u0027] \u003d description"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_6d963196","line":425,"updated":"2015-02-10 09:38:02.000000000","message":"so user could not set name to EMPTY string?\nhow about:\nif name is None:","commit_id":"45b5cb8d8e7a65de3160a2db953bfd8b0e1200e5"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"88daadcfbb88c600293ee055b585b45425df908d","unresolved":false,"context_lines":[{"line_number":422,"context_line":""},{"line_number":423,"context_line":"        # Update name and description in db now. No need to"},{"line_number":424,"context_line":"        # to send them over thru a RPC call."},{"line_number":425,"context_line":"        if name:"},{"line_number":426,"context_line":"            fields[\u0027name\u0027] \u003d name"},{"line_number":427,"context_line":"        if description:"},{"line_number":428,"context_line":"            fields[\u0027description\u0027] \u003d description"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_5bc4ba91","line":425,"in_reply_to":"da86d52c_6d963196","updated":"2015-02-10 14:14:51.000000000","message":"No, user is not allowed to rename a group to an empty string. So \"if name\" covers both \"if name is None\" and \"if len(name)\u003d\u003d0\".","commit_id":"45b5cb8d8e7a65de3160a2db953bfd8b0e1200e5"},{"author":{"_account_id":10628,"name":"Peter Wang","email":"peter.wang13@emc.com","username":"peter_wang"},"change_message_id":"3462f6ad5a93e76da70c3368b5f93fa7436fa876","unresolved":false,"context_lines":[{"line_number":424,"context_line":"        # to send them over thru a RPC call."},{"line_number":425,"context_line":"        if name:"},{"line_number":426,"context_line":"            fields[\u0027name\u0027] \u003d name"},{"line_number":427,"context_line":"        if description:"},{"line_number":428,"context_line":"            fields[\u0027description\u0027] \u003d description"},{"line_number":429,"context_line":"        if not add_volumes_new and not remove_volumes_new:"},{"line_number":430,"context_line":"            # Only update name or description. Set status to available."}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_0dedb525","line":427,"updated":"2015-02-10 09:38:02.000000000","message":"same above","commit_id":"45b5cb8d8e7a65de3160a2db953bfd8b0e1200e5"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"88daadcfbb88c600293ee055b585b45425df908d","unresolved":false,"context_lines":[{"line_number":424,"context_line":"        # to send them over thru a RPC call."},{"line_number":425,"context_line":"        if name:"},{"line_number":426,"context_line":"            fields[\u0027name\u0027] \u003d name"},{"line_number":427,"context_line":"        if description:"},{"line_number":428,"context_line":"            fields[\u0027description\u0027] \u003d description"},{"line_number":429,"context_line":"        if not add_volumes_new and not remove_volumes_new:"},{"line_number":430,"context_line":"            # Only update name or description. Set status to available."}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_9bbe32fe","line":427,"in_reply_to":"da86d52c_0dedb525","updated":"2015-02-10 14:14:51.000000000","message":"Same here.","commit_id":"45b5cb8d8e7a65de3160a2db953bfd8b0e1200e5"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"816ebd73761f31f7bc486c1fe0adec2666e6576a","unresolved":false,"context_lines":[{"line_number":308,"context_line":""},{"line_number":309,"context_line":"        for uuid in add_volumes_list:"},{"line_number":310,"context_line":"            if uuid in remove_volumes_list:"},{"line_number":311,"context_line":"                msg \u003d _(\"UUID %s is in both add and remove volume \""},{"line_number":312,"context_line":"                        \"list.\") % uuid"},{"line_number":313,"context_line":"                raise exception.InvalidVolume(reason\u003dmsg)"},{"line_number":314,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"da86d52c_665f4c76","line":311,"updated":"2015-02-16 12:51:48.000000000","message":"This will only print the first common UUID, but there could be more.","commit_id":"b8adaadefd86cf3819ae95f4f660bec7450d0e99"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"0b40c99bb95e5f38d52afb43f5064e7a36ca03a7","unresolved":false,"context_lines":[{"line_number":308,"context_line":""},{"line_number":309,"context_line":"        for uuid in add_volumes_list:"},{"line_number":310,"context_line":"            if uuid in remove_volumes_list:"},{"line_number":311,"context_line":"                msg \u003d _(\"UUID %s is in both add and remove volume \""},{"line_number":312,"context_line":"                        \"list.\") % uuid"},{"line_number":313,"context_line":"                raise exception.InvalidVolume(reason\u003dmsg)"},{"line_number":314,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"da86d52c_5fb5a57c","line":311,"in_reply_to":"da86d52c_665f4c76","updated":"2015-02-16 19:53:09.000000000","message":"I\u0027m trying to fail quick here.  So if one uuid is wrong, raise an exception right away.  I have now checked all of them and printed all of them at the end.","commit_id":"b8adaadefd86cf3819ae95f4f660bec7450d0e99"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"816ebd73761f31f7bc486c1fe0adec2666e6576a","unresolved":false,"context_lines":[{"line_number":331,"context_line":"                add_volumes_list.remove(volume[\u0027id\u0027])"},{"line_number":332,"context_line":"            if volume[\u0027id\u0027] in remove_volumes_list:"},{"line_number":333,"context_line":"                if volume[\u0027status\u0027] not in [\u0027in-use\u0027, \u0027available\u0027]:"},{"line_number":334,"context_line":"                    msg \u003d (_(\"Cannot add volume %(volume_id)s to consistency \""},{"line_number":335,"context_line":"                             \"group %(group_id)s because volume is in invalid \""},{"line_number":336,"context_line":"                             \"state: %(status)s.\") %"},{"line_number":337,"context_line":"                           {\u0027volume_id\u0027: volume[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":15,"id":"da86d52c_a6e784ab","line":334,"updated":"2015-02-16 12:51:48.000000000","message":"Cannot remove...","commit_id":"b8adaadefd86cf3819ae95f4f660bec7450d0e99"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"0b40c99bb95e5f38d52afb43f5064e7a36ca03a7","unresolved":false,"context_lines":[{"line_number":331,"context_line":"                add_volumes_list.remove(volume[\u0027id\u0027])"},{"line_number":332,"context_line":"            if volume[\u0027id\u0027] in remove_volumes_list:"},{"line_number":333,"context_line":"                if volume[\u0027status\u0027] not in [\u0027in-use\u0027, \u0027available\u0027]:"},{"line_number":334,"context_line":"                    msg \u003d (_(\"Cannot add volume %(volume_id)s to consistency \""},{"line_number":335,"context_line":"                             \"group %(group_id)s because volume is in invalid \""},{"line_number":336,"context_line":"                             \"state: %(status)s.\") %"},{"line_number":337,"context_line":"                           {\u0027volume_id\u0027: volume[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":15,"id":"da86d52c_7f6fc9fc","line":334,"in_reply_to":"da86d52c_a6e784ab","updated":"2015-02-16 19:53:09.000000000","message":"Good catch. Fixed it.","commit_id":"b8adaadefd86cf3819ae95f4f660bec7450d0e99"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"816ebd73761f31f7bc486c1fe0adec2666e6576a","unresolved":false,"context_lines":[{"line_number":402,"context_line":"                    add_volumes_new +\u003d \",\""},{"line_number":403,"context_line":"                add_volumes_new +\u003d add_vol_ref[\u0027id\u0027]"},{"line_number":404,"context_line":""},{"line_number":405,"context_line":"            else:"},{"line_number":406,"context_line":"                msg \u003d (_(\"Cannot add volume %(volume_id)s to consistency \""},{"line_number":407,"context_line":"                         \"group %(group_id)s because volume does not exist.\") %"},{"line_number":408,"context_line":"                       {\u0027volume_id\u0027: add_vol_ref[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":15,"id":"da86d52c_7a7360b4","line":405,"updated":"2015-02-16 12:51:48.000000000","message":"If the volume doesn\u0027t exist, it will raise the exception in line 357. So do we need this \u0027else\u0027?","commit_id":"b8adaadefd86cf3819ae95f4f660bec7450d0e99"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"0b40c99bb95e5f38d52afb43f5064e7a36ca03a7","unresolved":false,"context_lines":[{"line_number":402,"context_line":"                    add_volumes_new +\u003d \",\""},{"line_number":403,"context_line":"                add_volumes_new +\u003d add_vol_ref[\u0027id\u0027]"},{"line_number":404,"context_line":""},{"line_number":405,"context_line":"            else:"},{"line_number":406,"context_line":"                msg \u003d (_(\"Cannot add volume %(volume_id)s to consistency \""},{"line_number":407,"context_line":"                         \"group %(group_id)s because volume does not exist.\") %"},{"line_number":408,"context_line":"                       {\u0027volume_id\u0027: add_vol_ref[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":15,"id":"da86d52c_c28ffa74","line":405,"in_reply_to":"da86d52c_7a7360b4","updated":"2015-02-16 19:53:09.000000000","message":"Maybe overly cautious here. Since there\u0027s a check for \u0027if add_vol_ref\u0027, I\u0027d like to keep the \u0027else\u0027 here to be complete, unless if someone has strong objections against it.","commit_id":"b8adaadefd86cf3819ae95f4f660bec7450d0e99"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"208469eecdff3d852409eda3f711b6ca93879789","unresolved":false,"context_lines":[{"line_number":313,"context_line":"                    \"list.\") % invalid_uuids"},{"line_number":314,"context_line":"            raise exception.InvalidVolume(reason\u003dmsg)"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"        volumes \u003d self.db.volume_get_all_by_group(context.elevated(),"},{"line_number":317,"context_line":"                                                  group[\u0027id\u0027])"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"        # Validate name."}],"source_content_type":"text/x-python","patch_set":19,"id":"ba7be1f8_38de3c12","line":316,"updated":"2015-02-23 17:30:39.000000000","message":"Are we sure we want an elevated context here?  Are we sure that a user can\u0027t just remove any volumes they want from the CG w/o having permissions to do so?","commit_id":"404b2f69a60f788b5ac7be50e31d2b9a5b4b5077"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d4cb47694e3e107d90acd2d0de62d2dde9d5e2ca","unresolved":false,"context_lines":[{"line_number":313,"context_line":"                    \"list.\") % invalid_uuids"},{"line_number":314,"context_line":"            raise exception.InvalidVolume(reason\u003dmsg)"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"        volumes \u003d self.db.volume_get_all_by_group(context.elevated(),"},{"line_number":317,"context_line":"                                                  group[\u0027id\u0027])"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"        # Validate name."}],"source_content_type":"text/x-python","patch_set":19,"id":"ba7be1f8_d8c8ae24","line":316,"in_reply_to":"ba7be1f8_38de3c12","updated":"2015-02-24 02:10:23.000000000","message":"Good question. volume_get_all() and volume_get_all_by_host() require admin context and that is where I got this from.  However,  volume_get_all_by_project() requires regular context.  The tenant who created the group should be able to retrieve all the volumes.  So this volume_get_all_by_group() should probably follow volume_get_all_by_project().  I also found snapshot_get_all_by_volume() just requires regular context.  So I think it makes sense to change it.","commit_id":"404b2f69a60f788b5ac7be50e31d2b9a5b4b5077"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"208469eecdff3d852409eda3f711b6ca93879789","unresolved":false,"context_lines":[{"line_number":329,"context_line":"        remove_volumes_new \u003d \"\""},{"line_number":330,"context_line":"        if add_volumes_list:"},{"line_number":331,"context_line":"            add_volumes_new \u003d self._validate_add_volumes("},{"line_number":332,"context_line":"                volumes, add_volumes_list, group, context)"},{"line_number":333,"context_line":"        if remove_volumes_list:"},{"line_number":334,"context_line":"            remove_volumes_new \u003d self._validate_remove_volumes("},{"line_number":335,"context_line":"                volumes, remove_volumes_list, group)"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba7be1f8_02a0299e","line":332,"updated":"2015-02-23 17:30:39.000000000","message":"Don\u0027t we typically use the context as the first parameter in function calls in Cinder?   Can we make this consistent please?","commit_id":"404b2f69a60f788b5ac7be50e31d2b9a5b4b5077"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d4cb47694e3e107d90acd2d0de62d2dde9d5e2ca","unresolved":false,"context_lines":[{"line_number":329,"context_line":"        remove_volumes_new \u003d \"\""},{"line_number":330,"context_line":"        if add_volumes_list:"},{"line_number":331,"context_line":"            add_volumes_new \u003d self._validate_add_volumes("},{"line_number":332,"context_line":"                volumes, add_volumes_list, group, context)"},{"line_number":333,"context_line":"        if remove_volumes_list:"},{"line_number":334,"context_line":"            remove_volumes_new \u003d self._validate_remove_volumes("},{"line_number":335,"context_line":"                volumes, remove_volumes_list, group)"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba7be1f8_d82c2e05","line":332,"in_reply_to":"ba7be1f8_02a0299e","updated":"2015-02-24 02:10:23.000000000","message":"Good point. Will change.","commit_id":"404b2f69a60f788b5ac7be50e31d2b9a5b4b5077"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"0354f09a40aaeaed557b94efc3eb52d13f15446c","unresolved":false,"context_lines":[{"line_number":337,"context_line":"                not remove_volumes_new):"},{"line_number":338,"context_line":"                msg \u003d (_(\"Cannot update consistency group %(group_id)s \""},{"line_number":339,"context_line":"                         \"because no valid name, description, add_volumes, \""},{"line_number":340,"context_line":"                         \"or remove_volumes are provided.\") %"},{"line_number":341,"context_line":"                       {\u0027group_id\u0027: group[\u0027id\u0027]})"},{"line_number":342,"context_line":"                raise exception.InvalidConsistencyGroup(reason\u003dmsg)"},{"line_number":343,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"ba7be1f8_0d291137","line":340,"updated":"2015-03-02 22:33:04.000000000","message":"suggest are -\u003e were","commit_id":"339f3df7a7d357f232e99189ed61b2fda4d51888"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d65e44f8d22aa79b5546de03f703c23100f14ba4","unresolved":false,"context_lines":[{"line_number":337,"context_line":"                not remove_volumes_new):"},{"line_number":338,"context_line":"                msg \u003d (_(\"Cannot update consistency group %(group_id)s \""},{"line_number":339,"context_line":"                         \"because no valid name, description, add_volumes, \""},{"line_number":340,"context_line":"                         \"or remove_volumes are provided.\") %"},{"line_number":341,"context_line":"                       {\u0027group_id\u0027: group[\u0027id\u0027]})"},{"line_number":342,"context_line":"                raise exception.InvalidConsistencyGroup(reason\u003dmsg)"},{"line_number":343,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"ba7be1f8_22b97f79","line":340,"in_reply_to":"ba7be1f8_0d291137","updated":"2015-03-03 03:39:09.000000000","message":"Done","commit_id":"339f3df7a7d357f232e99189ed61b2fda4d51888"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"0354f09a40aaeaed557b94efc3eb52d13f15446c","unresolved":false,"context_lines":[{"line_number":345,"context_line":"        fields \u003d {\u0027updated_at\u0027: now}"},{"line_number":346,"context_line":""},{"line_number":347,"context_line":"        # Update name and description in db now. No need to"},{"line_number":348,"context_line":"        # to send them over thru a RPC call."},{"line_number":349,"context_line":"        if name:"},{"line_number":350,"context_line":"            fields[\u0027name\u0027] \u003d name"},{"line_number":351,"context_line":"        if description:"}],"source_content_type":"text/x-python","patch_set":24,"id":"ba7be1f8_4d1ea90d","line":348,"updated":"2015-03-02 22:33:04.000000000","message":"a -\u003e an","commit_id":"339f3df7a7d357f232e99189ed61b2fda4d51888"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d65e44f8d22aa79b5546de03f703c23100f14ba4","unresolved":false,"context_lines":[{"line_number":345,"context_line":"        fields \u003d {\u0027updated_at\u0027: now}"},{"line_number":346,"context_line":""},{"line_number":347,"context_line":"        # Update name and description in db now. No need to"},{"line_number":348,"context_line":"        # to send them over thru a RPC call."},{"line_number":349,"context_line":"        if name:"},{"line_number":350,"context_line":"            fields[\u0027name\u0027] \u003d name"},{"line_number":351,"context_line":"        if description:"}],"source_content_type":"text/x-python","patch_set":24,"id":"ba7be1f8_62ae1730","line":348,"in_reply_to":"ba7be1f8_4d1ea90d","updated":"2015-03-03 03:39:09.000000000","message":"Done","commit_id":"339f3df7a7d357f232e99189ed61b2fda4d51888"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"0354f09a40aaeaed557b94efc3eb52d13f15446c","unresolved":false,"context_lines":[{"line_number":358,"context_line":""},{"line_number":359,"context_line":"        self.db.consistencygroup_update(context, group[\u0027id\u0027], fields)"},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"        # Do a RPC call only if the update request includes"},{"line_number":362,"context_line":"        # adding/removing volumes. add_volumes_new and remove_volumes_new"},{"line_number":363,"context_line":"        # are strings of volume UUIDs separated by commas with no spaces"},{"line_number":364,"context_line":"        # in between."}],"source_content_type":"text/x-python","patch_set":24,"id":"ba7be1f8_0db751f6","line":361,"updated":"2015-03-02 22:33:04.000000000","message":"a -\u003e an","commit_id":"339f3df7a7d357f232e99189ed61b2fda4d51888"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d65e44f8d22aa79b5546de03f703c23100f14ba4","unresolved":false,"context_lines":[{"line_number":358,"context_line":""},{"line_number":359,"context_line":"        self.db.consistencygroup_update(context, group[\u0027id\u0027], fields)"},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"        # Do a RPC call only if the update request includes"},{"line_number":362,"context_line":"        # adding/removing volumes. add_volumes_new and remove_volumes_new"},{"line_number":363,"context_line":"        # are strings of volume UUIDs separated by commas with no spaces"},{"line_number":364,"context_line":"        # in between."}],"source_content_type":"text/x-python","patch_set":24,"id":"ba7be1f8_0a7bad8c","line":361,"in_reply_to":"ba7be1f8_0db751f6","updated":"2015-03-03 03:39:09.000000000","message":"Done","commit_id":"339f3df7a7d357f232e99189ed61b2fda4d51888"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"0354f09a40aaeaed557b94efc3eb52d13f15446c","unresolved":false,"context_lines":[{"line_number":374,"context_line":"        for volume in volumes:"},{"line_number":375,"context_line":"            if volume[\u0027id\u0027] in remove_volumes_list:"},{"line_number":376,"context_line":"                if volume[\u0027status\u0027] not in [\u0027in-use\u0027, \u0027available\u0027]:"},{"line_number":377,"context_line":"                    msg \u003d (_(\"Cannot remove volume %(volume_id)s to \""},{"line_number":378,"context_line":"                             \"consistency group %(group_id)s because volume \""},{"line_number":379,"context_line":"                             \"is in invalid state: %(status)s.\") %"},{"line_number":380,"context_line":"                           {\u0027volume_id\u0027: volume[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":24,"id":"ba7be1f8_ad89e527","line":377,"updated":"2015-03-02 22:33:04.000000000","message":"to -\u003e from","commit_id":"339f3df7a7d357f232e99189ed61b2fda4d51888"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d65e44f8d22aa79b5546de03f703c23100f14ba4","unresolved":false,"context_lines":[{"line_number":374,"context_line":"        for volume in volumes:"},{"line_number":375,"context_line":"            if volume[\u0027id\u0027] in remove_volumes_list:"},{"line_number":376,"context_line":"                if volume[\u0027status\u0027] not in [\u0027in-use\u0027, \u0027available\u0027]:"},{"line_number":377,"context_line":"                    msg \u003d (_(\"Cannot remove volume %(volume_id)s to \""},{"line_number":378,"context_line":"                             \"consistency group %(group_id)s because volume \""},{"line_number":379,"context_line":"                             \"is in invalid state: %(status)s.\") %"},{"line_number":380,"context_line":"                           {\u0027volume_id\u0027: volume[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":24,"id":"ba7be1f8_ca451544","line":377,"in_reply_to":"ba7be1f8_ad89e527","updated":"2015-03-03 03:39:09.000000000","message":"Done","commit_id":"339f3df7a7d357f232e99189ed61b2fda4d51888"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"0354f09a40aaeaed557b94efc3eb52d13f15446c","unresolved":false,"context_lines":[{"line_number":376,"context_line":"                if volume[\u0027status\u0027] not in [\u0027in-use\u0027, \u0027available\u0027]:"},{"line_number":377,"context_line":"                    msg \u003d (_(\"Cannot remove volume %(volume_id)s to \""},{"line_number":378,"context_line":"                             \"consistency group %(group_id)s because volume \""},{"line_number":379,"context_line":"                             \"is in invalid state: %(status)s.\") %"},{"line_number":380,"context_line":"                           {\u0027volume_id\u0027: volume[\u0027id\u0027],"},{"line_number":381,"context_line":"                            \u0027group_id\u0027: group[\u0027id\u0027],"},{"line_number":382,"context_line":"                            \u0027status\u0027: volume[\u0027status\u0027]})"}],"source_content_type":"text/x-python","patch_set":24,"id":"ba7be1f8_2d7df51c","line":379,"updated":"2015-03-02 22:33:04.000000000","message":"Provide the appropriate states here?","commit_id":"339f3df7a7d357f232e99189ed61b2fda4d51888"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d65e44f8d22aa79b5546de03f703c23100f14ba4","unresolved":false,"context_lines":[{"line_number":376,"context_line":"                if volume[\u0027status\u0027] not in [\u0027in-use\u0027, \u0027available\u0027]:"},{"line_number":377,"context_line":"                    msg \u003d (_(\"Cannot remove volume %(volume_id)s to \""},{"line_number":378,"context_line":"                             \"consistency group %(group_id)s because volume \""},{"line_number":379,"context_line":"                             \"is in invalid state: %(status)s.\") %"},{"line_number":380,"context_line":"                           {\u0027volume_id\u0027: volume[\u0027id\u0027],"},{"line_number":381,"context_line":"                            \u0027group_id\u0027: group[\u0027id\u0027],"},{"line_number":382,"context_line":"                            \u0027status\u0027: volume[\u0027status\u0027]})"}],"source_content_type":"text/x-python","patch_set":24,"id":"ba7be1f8_aa48e15c","line":379,"in_reply_to":"ba7be1f8_2d7df51c","updated":"2015-03-03 03:39:09.000000000","message":"Done","commit_id":"339f3df7a7d357f232e99189ed61b2fda4d51888"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"0354f09a40aaeaed557b94efc3eb52d13f15446c","unresolved":false,"context_lines":[{"line_number":435,"context_line":"                if add_vol_ref[\u0027status\u0027] not in [\u0027in-use\u0027, \u0027available\u0027]:"},{"line_number":436,"context_line":"                    msg \u003d (_(\"Cannot add volume %(volume_id)s to consistency \""},{"line_number":437,"context_line":"                             \"group %(group_id)s because volume is in an \""},{"line_number":438,"context_line":"                             \"invalid state: %(status)s.\") %"},{"line_number":439,"context_line":"                           {\u0027volume_id\u0027: add_vol_ref[\u0027id\u0027],"},{"line_number":440,"context_line":"                            \u0027group_id\u0027: group[\u0027id\u0027],"},{"line_number":441,"context_line":"                            \u0027status\u0027: add_vol_ref[\u0027status\u0027]})"}],"source_content_type":"text/x-python","patch_set":24,"id":"ba7be1f8_0db3d1e9","line":438,"updated":"2015-03-02 22:33:04.000000000","message":"List appropriate states here?","commit_id":"339f3df7a7d357f232e99189ed61b2fda4d51888"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d65e44f8d22aa79b5546de03f703c23100f14ba4","unresolved":false,"context_lines":[{"line_number":435,"context_line":"                if add_vol_ref[\u0027status\u0027] not in [\u0027in-use\u0027, \u0027available\u0027]:"},{"line_number":436,"context_line":"                    msg \u003d (_(\"Cannot add volume %(volume_id)s to consistency \""},{"line_number":437,"context_line":"                             \"group %(group_id)s because volume is in an \""},{"line_number":438,"context_line":"                             \"invalid state: %(status)s.\") %"},{"line_number":439,"context_line":"                           {\u0027volume_id\u0027: add_vol_ref[\u0027id\u0027],"},{"line_number":440,"context_line":"                            \u0027group_id\u0027: group[\u0027id\u0027],"},{"line_number":441,"context_line":"                            \u0027status\u0027: add_vol_ref[\u0027status\u0027]})"}],"source_content_type":"text/x-python","patch_set":24,"id":"ba7be1f8_8a3f9db3","line":438,"in_reply_to":"ba7be1f8_0db3d1e9","updated":"2015-03-03 03:39:09.000000000","message":"Done","commit_id":"339f3df7a7d357f232e99189ed61b2fda4d51888"}],"cinder/tests/test_volume.py":[{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"3f00a7f4b147dcc2f1e4dcce2f36d18919dbd006","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                       self.fake_get_all_volume_groups)"},{"line_number":119,"context_line":"        fake_image.stub_out_image_service(self.stubs)"},{"line_number":120,"context_line":"        self.stubs.Set(brick_lvm.LVM, \u0027_vg_exists\u0027, lambda x: True)"},{"line_number":121,"context_line":"        self.os_path_exists_orig \u003d os.path.exists"},{"line_number":122,"context_line":"        self.stubs.Set(os.path, \u0027exists\u0027, lambda x: True)"},{"line_number":123,"context_line":"        self.volume.driver.set_initialized()"},{"line_number":124,"context_line":"        self.volume.stats \u003d {\u0027allocated_capacity_gb\u0027: 0,"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_56d8671d","line":121,"updated":"2015-02-01 14:42:44.000000000","message":"Please, use Mock for such patching.\n\nMonkey-patching global objects and/or modules could raise many issues in concurrency mode. \nNow, our unit-tests can\u0027t work with concurrency\u003e1 but we need to fix it and support it in new unit-tests","commit_id":"3917e80c3befaa0a1673128b34f8a34151dceb51"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"ebe197b446d1f991095a815ba3e92e5e16c408a4","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                       self.fake_get_all_volume_groups)"},{"line_number":119,"context_line":"        fake_image.stub_out_image_service(self.stubs)"},{"line_number":120,"context_line":"        self.stubs.Set(brick_lvm.LVM, \u0027_vg_exists\u0027, lambda x: True)"},{"line_number":121,"context_line":"        self.os_path_exists_orig \u003d os.path.exists"},{"line_number":122,"context_line":"        self.stubs.Set(os.path, \u0027exists\u0027, lambda x: True)"},{"line_number":123,"context_line":"        self.volume.driver.set_initialized()"},{"line_number":124,"context_line":"        self.volume.stats \u003d {\u0027allocated_capacity_gb\u0027: 0,"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_94d81755","line":121,"in_reply_to":"da86d52c_56d8671d","updated":"2015-02-01 22:45:11.000000000","message":"You are right. This kind of unit test that changes global modules should be avoided. Line 122 was actually not added by this patch. test_begin_detaching_fails_available failed on my setup because of this. I was just trying to work around the problem. It is removed now.","commit_id":"3917e80c3befaa0a1673128b34f8a34151dceb51"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"ebe197b446d1f991095a815ba3e92e5e16c408a4","unresolved":false,"context_lines":[{"line_number":2427,"context_line":"                          \u0027description\u0027)"},{"line_number":2428,"context_line":""},{"line_number":2429,"context_line":"    def test_begin_detaching_fails_available(self):"},{"line_number":2430,"context_line":"        os.path.exists \u003d self.os_path_exists_orig"},{"line_number":2431,"context_line":"        volume_api \u003d cinder.volume.api.API()"},{"line_number":2432,"context_line":"        volume \u003d tests_utils.create_volume(self.context, **self.volume_params)"},{"line_number":2433,"context_line":"        self.assertRaises(exception.InvalidVolume, volume_api.begin_detaching,"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_74bac3e2","line":2430,"updated":"2015-02-01 22:45:11.000000000","message":"Removed this as well.","commit_id":"3917e80c3befaa0a1673128b34f8a34151dceb51"}],"cinder/volume/driver.py":[{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"56a3a2e53956ea4fdc62d1df000d07aaefd90232","unresolved":false,"context_lines":[{"line_number":853,"context_line":"        addvolumes_update and removevolumes_update are lists of dictionaries"},{"line_number":854,"context_line":"        and should include updated status of each volume. For example,"},{"line_number":855,"context_line":"        \u0027status\u0027 of a volume in addvolumes_update should be set to"},{"line_number":856,"context_line":"        \u0027error_updating\u0027 if it cannot be added to the group or keep its"},{"line_number":857,"context_line":"        original status from addvolumes."},{"line_number":858,"context_line":"        addvol_update \u003d {\u0027status\u0027: \u0027error_updating\u0027, \u0027updated_at\u0027: now}"},{"line_number":859,"context_line":"        addvolumes_update.append(addvol_update)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_d3762aa3","line":856,"updated":"2015-01-12 07:25:07.000000000","message":"What does a user do after their volume is in error_updating? Is it really an error updating in the volume, or the consistency group? I think it\u0027s the latter.","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"83ef90d2bfe935b5c39b78c538c795584b8c0d15","unresolved":false,"context_lines":[{"line_number":853,"context_line":"        addvolumes_update and removevolumes_update are lists of dictionaries"},{"line_number":854,"context_line":"        and should include updated status of each volume. For example,"},{"line_number":855,"context_line":"        \u0027status\u0027 of a volume in addvolumes_update should be set to"},{"line_number":856,"context_line":"        \u0027error_updating\u0027 if it cannot be added to the group or keep its"},{"line_number":857,"context_line":"        original status from addvolumes."},{"line_number":858,"context_line":"        addvol_update \u003d {\u0027status\u0027: \u0027error_updating\u0027, \u0027updated_at\u0027: now}"},{"line_number":859,"context_line":"        addvolumes_update.append(addvol_update)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_b508db27","line":856,"in_reply_to":"3a961159_d3762aa3","updated":"2015-01-17 06:09:32.000000000","message":"The status of the consistency group is in model_update which is also returned by the driver. I modified the docstring to clarify that. \nThe manager also needs statuses of volumes. This is because the manager doesn\u0027t have knowledge of that status. If a volume is in error_updating, it can be reset using the volume API. However we don\u0027t have a reset admin API at the group level yet. So we also need that. reset status of a group should reset all volumes.","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"56a3a2e53956ea4fdc62d1df000d07aaefd90232","unresolved":false,"context_lines":[{"line_number":858,"context_line":"        addvol_update \u003d {\u0027status\u0027: \u0027error_updating\u0027, \u0027updated_at\u0027: now}"},{"line_number":859,"context_line":"        addvolumes_update.append(addvol_update)"},{"line_number":860,"context_line":"        \"\"\""},{"line_number":861,"context_line":""},{"line_number":862,"context_line":"        raise NotImplementedError()"},{"line_number":863,"context_line":""},{"line_number":864,"context_line":"    def create_cgsnapshot(self, context, cgsnapshot):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_13a8b2da","line":861,"updated":"2015-01-12 07:25:07.000000000","message":"nit, remove this line.","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"83ef90d2bfe935b5c39b78c538c795584b8c0d15","unresolved":false,"context_lines":[{"line_number":858,"context_line":"        addvol_update \u003d {\u0027status\u0027: \u0027error_updating\u0027, \u0027updated_at\u0027: now}"},{"line_number":859,"context_line":"        addvolumes_update.append(addvol_update)"},{"line_number":860,"context_line":"        \"\"\""},{"line_number":861,"context_line":""},{"line_number":862,"context_line":"        raise NotImplementedError()"},{"line_number":863,"context_line":""},{"line_number":864,"context_line":"    def create_cgsnapshot(self, context, cgsnapshot):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_62eebb8c","line":861,"in_reply_to":"3a961159_13a8b2da","updated":"2015-01-17 06:09:32.000000000","message":"Done","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"cb1cf5cda11c6a4b51df5f509d3d010a0e30d5b2","unresolved":false,"context_lines":[{"line_number":905,"context_line":"        \u0027status\u0027 of a volume in add_volumes_update should be set to"},{"line_number":906,"context_line":"        \u0027error\u0027 if it cannot be added to the group or keep its original"},{"line_number":907,"context_line":"        status from add_volumes."},{"line_number":908,"context_line":"        add_vol_update \u003d {\u0027status\u0027: \u0027error\u0027, \u0027updated_at\u0027: now}"},{"line_number":909,"context_line":"        add_volumes_update.append(add_vol_update)"},{"line_number":910,"context_line":"        \"\"\""},{"line_number":911,"context_line":"        raise NotImplementedError()"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_251bb374","line":908,"updated":"2015-02-13 21:23:46.000000000","message":"If I understand the manager.py code that uses these return values, this isn\u0027t a valid example as the update needs an \"id\" field too.\n\nIs the intent that we just modify the add_volumes list that is passed in and return it? Or that we create a new dict containing the fields we need?","commit_id":"45b5cb8d8e7a65de3160a2db953bfd8b0e1200e5"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"e4a318afa08f8facaa322d084d34da4846babde5","unresolved":false,"context_lines":[{"line_number":905,"context_line":"        \u0027status\u0027 of a volume in add_volumes_update should be set to"},{"line_number":906,"context_line":"        \u0027error\u0027 if it cannot be added to the group or keep its original"},{"line_number":907,"context_line":"        status from add_volumes."},{"line_number":908,"context_line":"        add_vol_update \u003d {\u0027status\u0027: \u0027error\u0027, \u0027updated_at\u0027: now}"},{"line_number":909,"context_line":"        add_volumes_update.append(add_vol_update)"},{"line_number":910,"context_line":"        \"\"\""},{"line_number":911,"context_line":"        raise NotImplementedError()"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_c81bcb7e","line":908,"in_reply_to":"da86d52c_251bb374","updated":"2015-02-13 23:00:37.000000000","message":"You are right.  Manager only uses \u0027id\u0027 and \u0027status\u0027.  Driver can just update the add_volumes list with the appropriate status and return that. \nI\u0027ll update the docstring.","commit_id":"45b5cb8d8e7a65de3160a2db953bfd8b0e1200e5"}],"cinder/volume/manager.py":[{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"56a3a2e53956ea4fdc62d1df000d07aaefd90232","unresolved":false,"context_lines":[{"line_number":1815,"context_line":"        return True"},{"line_number":1816,"context_line":""},{"line_number":1817,"context_line":"    def update_consistencygroup(self, context, group_id, name\u003dNone,"},{"line_number":1818,"context_line":"                                description\u003dNone, addvolumes\u003dNone,"},{"line_number":1819,"context_line":"                                removevolumes\u003dNone):"},{"line_number":1820,"context_line":"        \"\"\"Updates consistency group."},{"line_number":1821,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_30d844f0","line":1818,"updated":"2015-01-12 07:25:07.000000000","message":"Can we keep word separation by underscores with kwargs. This is to stay consistent with the rest of Cinder\u0027s use of kwargs.","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"83ef90d2bfe935b5c39b78c538c795584b8c0d15","unresolved":false,"context_lines":[{"line_number":1815,"context_line":"        return True"},{"line_number":1816,"context_line":""},{"line_number":1817,"context_line":"    def update_consistencygroup(self, context, group_id, name\u003dNone,"},{"line_number":1818,"context_line":"                                description\u003dNone, addvolumes\u003dNone,"},{"line_number":1819,"context_line":"                                removevolumes\u003dNone):"},{"line_number":1820,"context_line":"        \"\"\"Updates consistency group."},{"line_number":1821,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_b51ffb58","line":1818,"in_reply_to":"3a961159_30d844f0","updated":"2015-01-17 06:09:32.000000000","message":"Done","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"56a3a2e53956ea4fdc62d1df000d07aaefd90232","unresolved":false,"context_lines":[{"line_number":1826,"context_line":"        LOG.info(_LI(\"Consistency group %s: updating\"), group_id)"},{"line_number":1827,"context_line":"        group \u003d self.db.consistencygroup_get(context, group_id)"},{"line_number":1828,"context_line":""},{"line_number":1829,"context_line":"        addvolumes_ref \u003d []"},{"line_number":1830,"context_line":"        removevolumes_ref \u003d []"},{"line_number":1831,"context_line":"        addvolumes_list \u003d []"},{"line_number":1832,"context_line":"        removevolumes_list \u003d []"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_10d428bc","line":1829,"updated":"2015-01-12 07:25:07.000000000","message":"Throughout variable names here, can we keep word separation by underscores. I would like this to remain consistent with the rest of Cinder\u0027s code.","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"83ef90d2bfe935b5c39b78c538c795584b8c0d15","unresolved":false,"context_lines":[{"line_number":1826,"context_line":"        LOG.info(_LI(\"Consistency group %s: updating\"), group_id)"},{"line_number":1827,"context_line":"        group \u003d self.db.consistencygroup_get(context, group_id)"},{"line_number":1828,"context_line":""},{"line_number":1829,"context_line":"        addvolumes_ref \u003d []"},{"line_number":1830,"context_line":"        removevolumes_ref \u003d []"},{"line_number":1831,"context_line":"        addvolumes_list \u003d []"},{"line_number":1832,"context_line":"        removevolumes_list \u003d []"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_b5561b03","line":1829,"in_reply_to":"3a961159_10d428bc","updated":"2015-01-17 06:09:32.000000000","message":"Done","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"56a3a2e53956ea4fdc62d1df000d07aaefd90232","unresolved":false,"context_lines":[{"line_number":1835,"context_line":"        if removevolumes:"},{"line_number":1836,"context_line":"            removevolumes_list \u003d removevolumes.split(\u0027,\u0027)"},{"line_number":1837,"context_line":"        for addvol in addvolumes_list:"},{"line_number":1838,"context_line":"            addvol_ref \u003d self.db.volume_get(context, addvol)"},{"line_number":1839,"context_line":"            if addvol_ref[\u0027status\u0027] not in [\u0027in-use\u0027, \u0027available\u0027]:"},{"line_number":1840,"context_line":"                msg \u003d (_(\"Cannot add volume %(volume_id)s to consistency \""},{"line_number":1841,"context_line":"                         \"group %(group_id)s because volume is in invalid \""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_90a738a7","line":1838,"updated":"2015-01-12 07:25:07.000000000","message":"Need to catch if VolumeNotFound is raised, for cases where the volume is removed in flight.","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"83ef90d2bfe935b5c39b78c538c795584b8c0d15","unresolved":false,"context_lines":[{"line_number":1835,"context_line":"        if removevolumes:"},{"line_number":1836,"context_line":"            removevolumes_list \u003d removevolumes.split(\u0027,\u0027)"},{"line_number":1837,"context_line":"        for addvol in addvolumes_list:"},{"line_number":1838,"context_line":"            addvol_ref \u003d self.db.volume_get(context, addvol)"},{"line_number":1839,"context_line":"            if addvol_ref[\u0027status\u0027] not in [\u0027in-use\u0027, \u0027available\u0027]:"},{"line_number":1840,"context_line":"                msg \u003d (_(\"Cannot add volume %(volume_id)s to consistency \""},{"line_number":1841,"context_line":"                         \"group %(group_id)s because volume is in invalid \""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_35422b3b","line":1838,"in_reply_to":"3a961159_90a738a7","updated":"2015-01-17 06:09:32.000000000","message":"Done","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"56a3a2e53956ea4fdc62d1df000d07aaefd90232","unresolved":false,"context_lines":[{"line_number":1847,"context_line":"            # self.host is \u0027host@backend\u0027"},{"line_number":1848,"context_line":"            # volume_ref[\u0027host\u0027] is \u0027host@backend#pool\u0027"},{"line_number":1849,"context_line":"            # Extract host before doing comparison"},{"line_number":1850,"context_line":"            new_host \u003d vol_utils.extract_host(addvol_ref[\u0027host\u0027])"},{"line_number":1851,"context_line":"            if new_host !\u003d self.host:"},{"line_number":1852,"context_line":"                raise exception.InvalidVolume("},{"line_number":1853,"context_line":"                    reason\u003d_(\"Volume is not local to this node.\"))"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_50c4f040","line":1850,"updated":"2015-01-12 07:25:07.000000000","message":"Can we validate this at the rest api layer if there is a volume that exists in the cg, by comparing its host with the volume\u0027s host that\u0027s being added?","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"83ef90d2bfe935b5c39b78c538c795584b8c0d15","unresolved":false,"context_lines":[{"line_number":1847,"context_line":"            # self.host is \u0027host@backend\u0027"},{"line_number":1848,"context_line":"            # volume_ref[\u0027host\u0027] is \u0027host@backend#pool\u0027"},{"line_number":1849,"context_line":"            # Extract host before doing comparison"},{"line_number":1850,"context_line":"            new_host \u003d vol_utils.extract_host(addvol_ref[\u0027host\u0027])"},{"line_number":1851,"context_line":"            if new_host !\u003d self.host:"},{"line_number":1852,"context_line":"                raise exception.InvalidVolume("},{"line_number":1853,"context_line":"                    reason\u003d_(\"Volume is not local to this node.\"))"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_5574179b","line":1850,"in_reply_to":"3a961159_50c4f040","updated":"2015-01-17 06:09:32.000000000","message":"Done","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"56a3a2e53956ea4fdc62d1df000d07aaefd90232","unresolved":false,"context_lines":[{"line_number":1854,"context_line":"            addvolumes_ref.append(addvol_ref)"},{"line_number":1855,"context_line":""},{"line_number":1856,"context_line":"        for removevol in removevolumes_list:"},{"line_number":1857,"context_line":"            removevol_ref \u003d self.db.volume_get(context, removevol)"},{"line_number":1858,"context_line":"            removevolumes_ref.append(removevol_ref)"},{"line_number":1859,"context_line":""},{"line_number":1860,"context_line":"        self._notify_about_consistencygroup_usage("}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_b00fd48a","line":1857,"updated":"2015-01-12 07:25:07.000000000","message":"Catch VolumeNotFound being raised here. In case the volume is deleted in flight. Is that a bug, that you\u0027re able to delete volumes that are part of consistency groups?","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"83ef90d2bfe935b5c39b78c538c795584b8c0d15","unresolved":false,"context_lines":[{"line_number":1854,"context_line":"            addvolumes_ref.append(addvol_ref)"},{"line_number":1855,"context_line":""},{"line_number":1856,"context_line":"        for removevol in removevolumes_list:"},{"line_number":1857,"context_line":"            removevol_ref \u003d self.db.volume_get(context, removevol)"},{"line_number":1858,"context_line":"            removevolumes_ref.append(removevol_ref)"},{"line_number":1859,"context_line":""},{"line_number":1860,"context_line":"        self._notify_about_consistencygroup_usage("}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_155e0f13","line":1857,"in_reply_to":"3a961159_b00fd48a","updated":"2015-01-17 06:09:32.000000000","message":"Added try except for VolumeNotFound.\n\nYes, you should not be able to delete a volume that is in a consistency group. Looks like I missed a check in the delete volume routine. I\u0027ll fix it in a different patch.","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"56a3a2e53956ea4fdc62d1df000d07aaefd90232","unresolved":false,"context_lines":[{"line_number":1870,"context_line":"                self.driver.update_consistencygroup("},{"line_number":1871,"context_line":"                    context, group, name\u003dname,"},{"line_number":1872,"context_line":"                    description\u003ddescription,"},{"line_number":1873,"context_line":"                    addvolumes\u003daddvolumes_ref,"},{"line_number":1874,"context_line":"                    removevolumes\u003dremovevolumes_ref))"},{"line_number":1875,"context_line":""},{"line_number":1876,"context_line":"            if addvolumes_return:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_105d087a","line":1873,"updated":"2015-01-12 07:25:07.000000000","message":"a nit, but can we keep word separates here with underscores? So add_volumes and remove_volumes. I would like this to be consistent with other kwargs in cinder.","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"83ef90d2bfe935b5c39b78c538c795584b8c0d15","unresolved":false,"context_lines":[{"line_number":1870,"context_line":"                self.driver.update_consistencygroup("},{"line_number":1871,"context_line":"                    context, group, name\u003dname,"},{"line_number":1872,"context_line":"                    description\u003ddescription,"},{"line_number":1873,"context_line":"                    addvolumes\u003daddvolumes_ref,"},{"line_number":1874,"context_line":"                    removevolumes\u003dremovevolumes_ref))"},{"line_number":1875,"context_line":""},{"line_number":1876,"context_line":"            if addvolumes_return:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_95783f7f","line":1873,"in_reply_to":"3a961159_105d087a","updated":"2015-01-17 06:09:32.000000000","message":"Done","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"56a3a2e53956ea4fdc62d1df000d07aaefd90232","unresolved":false,"context_lines":[{"line_number":1873,"context_line":"                    addvolumes\u003daddvolumes_ref,"},{"line_number":1874,"context_line":"                    removevolumes\u003dremovevolumes_ref))"},{"line_number":1875,"context_line":""},{"line_number":1876,"context_line":"            if addvolumes_return:"},{"line_number":1877,"context_line":"                for volume in addvolumes_return:"},{"line_number":1878,"context_line":"                    update \u003d {\u0027status\u0027: volume[\u0027status\u0027]}"},{"line_number":1879,"context_line":"                    # If we failed to add a volume, make sure the status"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_d01aa07b","line":1876,"updated":"2015-01-12 07:25:07.000000000","message":"These two blocks of code for addvolumes_return and removevolumes_return alone don\u0027t explain to me why we\u0027re doing:\n\n1) Getting volume status changes from the driver, to later update. Why are we not able to recover from this?\n2) The significants of only doing this when the update from the driver is not error_deleting or error.\n\nHence, please provide comments. I know the purpose for model update is explained in driver code docstrings.","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"83ef90d2bfe935b5c39b78c538c795584b8c0d15","unresolved":false,"context_lines":[{"line_number":1873,"context_line":"                    addvolumes\u003daddvolumes_ref,"},{"line_number":1874,"context_line":"                    removevolumes\u003dremovevolumes_ref))"},{"line_number":1875,"context_line":""},{"line_number":1876,"context_line":"            if addvolumes_return:"},{"line_number":1877,"context_line":"                for volume in addvolumes_return:"},{"line_number":1878,"context_line":"                    update \u003d {\u0027status\u0027: volume[\u0027status\u0027]}"},{"line_number":1879,"context_line":"                    # If we failed to add a volume, make sure the status"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_15728f49","line":1876,"in_reply_to":"3a961159_d01aa07b","updated":"2015-01-17 06:09:32.000000000","message":"If driver reports that an error occurred to any volume, the whole update consistency group operation should fail.  That\u0027s why if the status of any volumes is error_updating, the module_update (group status) will be set to the same.\n\nAdded explanation.  Hope it is clear now.","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"56a3a2e53956ea4fdc62d1df000d07aaefd90232","unresolved":false,"context_lines":[{"line_number":1879,"context_line":"                    # If we failed to add a volume, make sure the status"},{"line_number":1880,"context_line":"                    # for the cg is set to error as well."},{"line_number":1881,"context_line":"                    if volume[\u0027status\u0027] in [\u0027error_updating\u0027, \u0027error\u0027]:"},{"line_number":1882,"context_line":"                        if (model_update[\u0027status\u0027] not in"},{"line_number":1883,"context_line":"                                [\u0027error_deleting\u0027, \u0027error\u0027]):"},{"line_number":1884,"context_line":"                            model_update[\u0027status\u0027] \u003d volume[\u0027status\u0027]"},{"line_number":1885,"context_line":"                    else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_5334fade","line":1882,"updated":"2015-01-12 07:25:07.000000000","message":"Why allow \u0027error\u0027? We said only error_updating in the driver doc string.","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"83ef90d2bfe935b5c39b78c538c795584b8c0d15","unresolved":false,"context_lines":[{"line_number":1879,"context_line":"                    # If we failed to add a volume, make sure the status"},{"line_number":1880,"context_line":"                    # for the cg is set to error as well."},{"line_number":1881,"context_line":"                    if volume[\u0027status\u0027] in [\u0027error_updating\u0027, \u0027error\u0027]:"},{"line_number":1882,"context_line":"                        if (model_update[\u0027status\u0027] not in"},{"line_number":1883,"context_line":"                                [\u0027error_deleting\u0027, \u0027error\u0027]):"},{"line_number":1884,"context_line":"                            model_update[\u0027status\u0027] \u003d volume[\u0027status\u0027]"},{"line_number":1885,"context_line":"                    else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_5505f7bf","line":1882,"in_reply_to":"3a961159_5334fade","updated":"2015-01-17 06:09:32.000000000","message":"I included \u0027error\u0027 in case the developer who implemented this feature didn\u0027t read the driver doc string carefully. \u0027error\u0027 seems to be a case that should be handled. So I removed \u0027error\u0027 when checking volume status, but I kept it when checking group status just because I think \u0027error\u0027 seems to be a case that should be handled at least at the group level. Let me know if you think I should remove \u0027error\u0027 from group\u0027s model_update as well.","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"56a3a2e53956ea4fdc62d1df000d07aaefd90232","unresolved":false,"context_lines":[{"line_number":1892,"context_line":"                    update \u003d {\u0027status\u0027: volume[\u0027status\u0027]}"},{"line_number":1893,"context_line":"                    # If we failed to remove a volume, make sure the status"},{"line_number":1894,"context_line":"                    # for the cg is set to error as well."},{"line_number":1895,"context_line":"                    if volume[\u0027status\u0027] in [\u0027error_updating\u0027, \u0027error\u0027]:"},{"line_number":1896,"context_line":"                        if (model_update[\u0027status\u0027] not in"},{"line_number":1897,"context_line":"                                [\u0027error_deleting\u0027, \u0027error\u0027]):"},{"line_number":1898,"context_line":"                            model_update[\u0027status\u0027] \u003d volume[\u0027status\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_932e628b","line":1895,"updated":"2015-01-12 07:25:07.000000000","message":"Why allow \u0027error\u0027? We said only error_updating in the driver doc string.","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"83ef90d2bfe935b5c39b78c538c795584b8c0d15","unresolved":false,"context_lines":[{"line_number":1892,"context_line":"                    update \u003d {\u0027status\u0027: volume[\u0027status\u0027]}"},{"line_number":1893,"context_line":"                    # If we failed to remove a volume, make sure the status"},{"line_number":1894,"context_line":"                    # for the cg is set to error as well."},{"line_number":1895,"context_line":"                    if volume[\u0027status\u0027] in [\u0027error_updating\u0027, \u0027error\u0027]:"},{"line_number":1896,"context_line":"                        if (model_update[\u0027status\u0027] not in"},{"line_number":1897,"context_line":"                                [\u0027error_deleting\u0027, \u0027error\u0027]):"},{"line_number":1898,"context_line":"                            model_update[\u0027status\u0027] \u003d volume[\u0027status\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_552c174a","line":1895,"in_reply_to":"3a961159_932e628b","updated":"2015-01-17 06:09:32.000000000","message":"Same as above.","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"56a3a2e53956ea4fdc62d1df000d07aaefd90232","unresolved":false,"context_lines":[{"line_number":1915,"context_line":"                    self.db.consistencygroup_update(context, group[\u0027id\u0027],"},{"line_number":1916,"context_line":"                                                    model_update)"},{"line_number":1917,"context_line":""},{"line_number":1918,"context_line":"        except Exception:"},{"line_number":1919,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1920,"context_line":"                self.db.consistencygroup_update("},{"line_number":1921,"context_line":"                    context,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_b0b9947e","line":1918,"updated":"2015-01-12 07:25:07.000000000","message":"Can we get some logging here?","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"83ef90d2bfe935b5c39b78c538c795584b8c0d15","unresolved":false,"context_lines":[{"line_number":1915,"context_line":"                    self.db.consistencygroup_update(context, group[\u0027id\u0027],"},{"line_number":1916,"context_line":"                                                    model_update)"},{"line_number":1917,"context_line":""},{"line_number":1918,"context_line":"        except Exception:"},{"line_number":1919,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1920,"context_line":"                self.db.consistencygroup_update("},{"line_number":1921,"context_line":"                    context,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_75ecb329","line":1918,"in_reply_to":"3a961159_b0b9947e","updated":"2015-01-17 06:09:32.000000000","message":"Done","commit_id":"2812eccad7e9a0a73d3c22e2876e5891f96e1f4a"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"d9cfc73efa46f8b57edcc88e75f8886f86398c27","unresolved":false,"context_lines":[{"line_number":1828,"context_line":"            add_volumes_list \u003d add_volumes.split(\u0027,\u0027)"},{"line_number":1829,"context_line":"        if remove_volumes:"},{"line_number":1830,"context_line":"            remove_volumes_list \u003d remove_volumes.split(\u0027,\u0027)"},{"line_number":1831,"context_line":"        for add_vol in add_volumes_list:"},{"line_number":1832,"context_line":"            try:"},{"line_number":1833,"context_line":"                add_vol_ref \u003d self.db.volume_get(context, add_vol)"},{"line_number":1834,"context_line":"            except exception.VolumeNotFound:"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a930d6b_e42dbb96","line":1831,"updated":"2015-01-23 23:03:21.000000000","message":"Why do we re-do a bunch of the same validation that was already done in cinder/consistencygroup/api.py? I admit I haven\u0027t read through a lot of the similar code to see if this is normal, but it seems odd to duplicate the code and db calls. Not really an issue, just curious.","commit_id":"3917e80c3befaa0a1673128b34f8a34151dceb51"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"76a67c2adab46c81d24345e29f8360a9975b7b98","unresolved":false,"context_lines":[{"line_number":1828,"context_line":"            add_volumes_list \u003d add_volumes.split(\u0027,\u0027)"},{"line_number":1829,"context_line":"        if remove_volumes:"},{"line_number":1830,"context_line":"            remove_volumes_list \u003d remove_volumes.split(\u0027,\u0027)"},{"line_number":1831,"context_line":"        for add_vol in add_volumes_list:"},{"line_number":1832,"context_line":"            try:"},{"line_number":1833,"context_line":"                add_vol_ref \u003d self.db.volume_get(context, add_vol)"},{"line_number":1834,"context_line":"            except exception.VolumeNotFound:"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa81d914_a4d65bef","line":1831,"in_reply_to":"1a930d6b_e42dbb96","updated":"2015-01-30 06:06:26.000000000","message":"That\u0027s a valid concern. I think we need to validate it in the manager again because there could be another thread that has deleted the volume that we are trying to add between the time we validated it in the API and the time the RPC call arrived in the manager.","commit_id":"3917e80c3befaa0a1673128b34f8a34151dceb51"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"3f00a7f4b147dcc2f1e4dcce2f36d18919dbd006","unresolved":false,"context_lines":[{"line_number":1828,"context_line":"            add_volumes_list \u003d add_volumes.split(\u0027,\u0027)"},{"line_number":1829,"context_line":"        if remove_volumes:"},{"line_number":1830,"context_line":"            remove_volumes_list \u003d remove_volumes.split(\u0027,\u0027)"},{"line_number":1831,"context_line":"        for add_vol in add_volumes_list:"},{"line_number":1832,"context_line":"            try:"},{"line_number":1833,"context_line":"                add_vol_ref \u003d self.db.volume_get(context, add_vol)"},{"line_number":1834,"context_line":"            except exception.VolumeNotFound:"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_9609ff97","line":1831,"in_reply_to":"fa81d914_a4d65bef","updated":"2015-02-01 14:42:44.000000000","message":"Good catch! Thanks, Xing","commit_id":"3917e80c3befaa0a1673128b34f8a34151dceb51"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"3f00a7f4b147dcc2f1e4dcce2f36d18919dbd006","unresolved":false,"context_lines":[{"line_number":1935,"context_line":"                    self.db.consistencygroup_update(context, group[\u0027id\u0027],"},{"line_number":1936,"context_line":"                                                    model_update)"},{"line_number":1937,"context_line":""},{"line_number":1938,"context_line":"        except Exception:"},{"line_number":1939,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1940,"context_line":"                LOG.error(_LE(\"Error occurred when updating consistency \""},{"line_number":1941,"context_line":"                              \"group %(group_id)s.\"),"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_16f50f83","line":1938,"updated":"2015-02-01 14:42:44.000000000","message":"Could we catch more general exception here?","commit_id":"3917e80c3befaa0a1673128b34f8a34151dceb51"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"ebe197b446d1f991095a815ba3e92e5e16c408a4","unresolved":false,"context_lines":[{"line_number":1935,"context_line":"                    self.db.consistencygroup_update(context, group[\u0027id\u0027],"},{"line_number":1936,"context_line":"                                                    model_update)"},{"line_number":1937,"context_line":""},{"line_number":1938,"context_line":"        except Exception:"},{"line_number":1939,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1940,"context_line":"                LOG.error(_LE(\"Error occurred when updating consistency \""},{"line_number":1941,"context_line":"                              \"group %(group_id)s.\"),"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_54ef7fb0","line":1938,"in_reply_to":"da86d52c_16f50f83","updated":"2015-02-01 22:45:11.000000000","message":"You mean more specific exception? Sure, I added a catch for VolumeDriverException here.","commit_id":"3917e80c3befaa0a1673128b34f8a34151dceb51"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"e40a9cfcffdc47df6d7f715f411195a369fe71f5","unresolved":false,"context_lines":[{"line_number":1902,"context_line":"                    # for the cg is set to error as well."},{"line_number":1903,"context_line":"                    if volume[\u0027status\u0027] in [\u0027error_updating\u0027]:"},{"line_number":1904,"context_line":"                        if (model_update[\u0027status\u0027] not in"},{"line_number":1905,"context_line":"                                [\u0027error_updating\u0027, \u0027error\u0027]):"},{"line_number":1906,"context_line":"                            model_update[\u0027status\u0027] \u003d volume[\u0027status\u0027]"},{"line_number":1907,"context_line":"                    else:"},{"line_number":1908,"context_line":"                        # Driver reports the volume is added to the"}],"source_content_type":"text/x-python","patch_set":11,"id":"da86d52c_652ccb4b","line":1905,"updated":"2015-02-02 03:27:05.000000000","message":"I know I asked this back in patch set 6, but still have some questions.... what do I do once a CG is in error_updating? \n\nDoes the user of CG also have access to reset-status? Is the backend going to be able to determine to set the CG back to active if it\u0027s current in error_updating and I call reset-status, as we discussed at the midcycle meetup.","commit_id":"1515464836bd4a65f28c0113001f78b948ec9abe"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"7b2ef5372561b69dccbf07eb92f55a16b3e431b9","unresolved":false,"context_lines":[{"line_number":1902,"context_line":"                    # for the cg is set to error as well."},{"line_number":1903,"context_line":"                    if volume[\u0027status\u0027] in [\u0027error_updating\u0027]:"},{"line_number":1904,"context_line":"                        if (model_update[\u0027status\u0027] not in"},{"line_number":1905,"context_line":"                                [\u0027error_updating\u0027, \u0027error\u0027]):"},{"line_number":1906,"context_line":"                            model_update[\u0027status\u0027] \u003d volume[\u0027status\u0027]"},{"line_number":1907,"context_line":"                    else:"},{"line_number":1908,"context_line":"                        # Driver reports the volume is added to the"}],"source_content_type":"text/x-python","patch_set":11,"id":"da86d52c_a5a162ab","line":1905,"in_reply_to":"da86d52c_652ccb4b","updated":"2015-02-02 04:41:43.000000000","message":"Hi Mike,\n\nSorry if I didn\u0027t answer your question clearly earlier. This is a similar situation as volume. I wonder if it is better to set it to \u0027error\u0027 rather than \u0027error_updating\u0027?  If it is \u0027error\u0027, user can at least delete the CG. \n\nCurrently there\u0027s no reset-status API for CG yet. So either we can add a reset-status admin API for CG or we can add admin API to force delete, force update, etc. I\u0027ll talk to you more about this.","commit_id":"1515464836bd4a65f28c0113001f78b948ec9abe"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"640f135947a5455fbe282e9a82c630e4f401a8e9","unresolved":false,"context_lines":[{"line_number":1902,"context_line":"                    # for the cg is set to error as well."},{"line_number":1903,"context_line":"                    if volume[\u0027status\u0027] in [\u0027error_updating\u0027]:"},{"line_number":1904,"context_line":"                        if (model_update[\u0027status\u0027] not in"},{"line_number":1905,"context_line":"                                [\u0027error_updating\u0027, \u0027error\u0027]):"},{"line_number":1906,"context_line":"                            model_update[\u0027status\u0027] \u003d volume[\u0027status\u0027]"},{"line_number":1907,"context_line":"                    else:"},{"line_number":1908,"context_line":"                        # Driver reports the volume is added to the"}],"source_content_type":"text/x-python","patch_set":11,"id":"da86d52c_08568cd2","line":1905,"in_reply_to":"da86d52c_a58fa222","updated":"2015-02-03 06:33:37.000000000","message":"After discussing with Mike, I\u0027ll set status to \u0027error\u0027 if an error occurred for now. Will add admin API to force actions in a future patch.","commit_id":"1515464836bd4a65f28c0113001f78b948ec9abe"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"29aca612d4291691fb688fd536801ca85d87b50d","unresolved":false,"context_lines":[{"line_number":1902,"context_line":"                    # for the cg is set to error as well."},{"line_number":1903,"context_line":"                    if volume[\u0027status\u0027] in [\u0027error_updating\u0027]:"},{"line_number":1904,"context_line":"                        if (model_update[\u0027status\u0027] not in"},{"line_number":1905,"context_line":"                                [\u0027error_updating\u0027, \u0027error\u0027]):"},{"line_number":1906,"context_line":"                            model_update[\u0027status\u0027] \u003d volume[\u0027status\u0027]"},{"line_number":1907,"context_line":"                    else:"},{"line_number":1908,"context_line":"                        # Driver reports the volume is added to the"}],"source_content_type":"text/x-python","patch_set":11,"id":"da86d52c_a58fa222","line":1905,"in_reply_to":"da86d52c_a5a162ab","updated":"2015-02-02 04:46:59.000000000","message":"Just remembered from the midcycle meetup discussion, we just want force actions and eliminate reset state.","commit_id":"1515464836bd4a65f28c0113001f78b948ec9abe"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"cb1cf5cda11c6a4b51df5f509d3d010a0e30d5b2","unresolved":false,"context_lines":[{"line_number":1867,"context_line":"                LOG.error(_LE(\"Cannot remove volume %(volume_id)s from \""},{"line_number":1868,"context_line":"                              \"consistency group %(group_id)s because volume \""},{"line_number":1869,"context_line":"                              \"cannot be found.\"),"},{"line_number":1870,"context_line":"                          {\u0027volume_id\u0027: add_vol_ref[\u0027id\u0027],"},{"line_number":1871,"context_line":"                           \u0027group_id\u0027: group[\u0027id\u0027]})"},{"line_number":1872,"context_line":"                raise"},{"line_number":1873,"context_line":"            remove_volumes_ref.append(remove_vol_ref)"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_a51ec35d","line":1870,"updated":"2015-02-13 21:23:46.000000000","message":"should this be remove_vol_ref instead of add_vol_ref?","commit_id":"45b5cb8d8e7a65de3160a2db953bfd8b0e1200e5"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"e4a318afa08f8facaa322d084d34da4846babde5","unresolved":false,"context_lines":[{"line_number":1867,"context_line":"                LOG.error(_LE(\"Cannot remove volume %(volume_id)s from \""},{"line_number":1868,"context_line":"                              \"consistency group %(group_id)s because volume \""},{"line_number":1869,"context_line":"                              \"cannot be found.\"),"},{"line_number":1870,"context_line":"                          {\u0027volume_id\u0027: add_vol_ref[\u0027id\u0027],"},{"line_number":1871,"context_line":"                           \u0027group_id\u0027: group[\u0027id\u0027]})"},{"line_number":1872,"context_line":"                raise"},{"line_number":1873,"context_line":"            remove_volumes_ref.append(remove_vol_ref)"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_c54d769b","line":1870,"in_reply_to":"da86d52c_a51ec35d","updated":"2015-02-13 23:00:37.000000000","message":"Good catch! This is a bug:(.","commit_id":"45b5cb8d8e7a65de3160a2db953bfd8b0e1200e5"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"0354f09a40aaeaed557b94efc3eb52d13f15446c","unresolved":false,"context_lines":[{"line_number":1840,"context_line":"            if add_vol_ref[\u0027status\u0027] not in [\u0027in-use\u0027, \u0027available\u0027]:"},{"line_number":1841,"context_line":"                msg \u003d (_(\"Cannot add volume %(volume_id)s to consistency \""},{"line_number":1842,"context_line":"                         \"group %(group_id)s because volume is in invalid \""},{"line_number":1843,"context_line":"                         \"state: %(status)s.\") %"},{"line_number":1844,"context_line":"                       {\u0027volume_id\u0027: add_vol_ref[\u0027id\u0027],"},{"line_number":1845,"context_line":"                        \u0027group_id\u0027: group_id,"},{"line_number":1846,"context_line":"                        \u0027status\u0027: add_vol_ref[\u0027status\u0027]})"}],"source_content_type":"text/x-python","patch_set":24,"id":"ba7be1f8_edce7d2c","line":1843,"updated":"2015-03-02 22:33:04.000000000","message":"List valid state here?","commit_id":"339f3df7a7d357f232e99189ed61b2fda4d51888"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d65e44f8d22aa79b5546de03f703c23100f14ba4","unresolved":false,"context_lines":[{"line_number":1840,"context_line":"            if add_vol_ref[\u0027status\u0027] not in [\u0027in-use\u0027, \u0027available\u0027]:"},{"line_number":1841,"context_line":"                msg \u003d (_(\"Cannot add volume %(volume_id)s to consistency \""},{"line_number":1842,"context_line":"                         \"group %(group_id)s because volume is in invalid \""},{"line_number":1843,"context_line":"                         \"state: %(status)s.\") %"},{"line_number":1844,"context_line":"                       {\u0027volume_id\u0027: add_vol_ref[\u0027id\u0027],"},{"line_number":1845,"context_line":"                        \u0027group_id\u0027: group_id,"},{"line_number":1846,"context_line":"                        \u0027status\u0027: add_vol_ref[\u0027status\u0027]})"}],"source_content_type":"text/x-python","patch_set":24,"id":"ba7be1f8_2a0dd1e8","line":1843,"in_reply_to":"ba7be1f8_edce7d2c","updated":"2015-03-03 03:39:09.000000000","message":"Done","commit_id":"339f3df7a7d357f232e99189ed61b2fda4d51888"}]}
