)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"1a60341cb45e5aba594827cc2cacfbd5ac1d2fcf","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"038c5c11_05199b1e","updated":"2022-01-20 17:08:58.000000000","message":"Some suggestions inline!!","commit_id":"25c9a626010eeee13801d6197afa919b9e594a65"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"46c54da57456b6132b29d801bbb8786e8d920ba1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"a54f5466_7ebadef5","updated":"2022-01-24 09:14:03.000000000","message":"Thanks Abhishek for the review.","commit_id":"0fdd64e6f1eb19f393af6b407e8299d0ba50fa14"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"4cfe2b589785b888fa2a5d95940d87bb3aeee03f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"c1eb7762_fb588d1d","updated":"2022-01-28 05:56:59.000000000","message":"Few suggestions inside, other than those it is looking solid now.\nThank you!","commit_id":"806c6094f13056673bcaa3d369fa4036c5d07439"}],"cinder/image/image_utils.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"1a60341cb45e5aba594827cc2cacfbd5ac1d2fcf","unresolved":true,"context_lines":[{"line_number":1053,"context_line":"        image_service: glance.GlanceImageService):"},{"line_number":1054,"context_line":"    stores_info \u003d image_service.get_stores_detail(context)[\u0027stores\u0027]"},{"line_number":1055,"context_line":"    for info in stores_info:"},{"line_number":1056,"context_line":"        if \u0027default\u0027 in info and info[\u0027default\u0027] \u003d\u003d \u0027true\u0027:"},{"line_number":1057,"context_line":"            return info[\u0027id\u0027], info[\u0027type\u0027], info[\u0027properties\u0027]"},{"line_number":1058,"context_line":"    else:"},{"line_number":1059,"context_line":"        return None, None, None"}],"source_content_type":"text/x-python","patch_set":6,"id":"6b3465e7_3a57519e","line":1056,"range":{"start_line":1056,"start_character":11,"end_line":1056,"end_character":59},"updated":"2022-01-20 17:08:58.000000000","message":"if boo(info.get(\u0027default\u0027)):","commit_id":"25c9a626010eeee13801d6197afa919b9e594a65"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"46c54da57456b6132b29d801bbb8786e8d920ba1","unresolved":false,"context_lines":[{"line_number":1053,"context_line":"        image_service: glance.GlanceImageService):"},{"line_number":1054,"context_line":"    stores_info \u003d image_service.get_stores_detail(context)[\u0027stores\u0027]"},{"line_number":1055,"context_line":"    for info in stores_info:"},{"line_number":1056,"context_line":"        if \u0027default\u0027 in info and info[\u0027default\u0027] \u003d\u003d \u0027true\u0027:"},{"line_number":1057,"context_line":"            return info[\u0027id\u0027], info[\u0027type\u0027], info[\u0027properties\u0027]"},{"line_number":1058,"context_line":"    else:"},{"line_number":1059,"context_line":"        return None, None, None"}],"source_content_type":"text/x-python","patch_set":6,"id":"e5357522_24ffd2c3","line":1056,"range":{"start_line":1056,"start_character":11,"end_line":1056,"end_character":59},"in_reply_to":"6b3465e7_3a57519e","updated":"2022-01-24 09:14:03.000000000","message":"Done","commit_id":"25c9a626010eeee13801d6197afa919b9e594a65"}],"cinder/volume/drivers/rbd.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"1a60341cb45e5aba594827cc2cacfbd5ac1d2fcf","unresolved":true,"context_lines":[{"line_number":715,"context_line":"                chunk_size \u003d self.configuration.rbd_store_chunk_size * units.Mi"},{"line_number":716,"context_line":"                order \u003d int(math.log(chunk_size, 2))"},{"line_number":717,"context_line":"                self.RBDProxy().clone(client.ioctx,"},{"line_number":718,"context_line":"                                      utils.convert_str(src_name),"},{"line_number":719,"context_line":"                                      utils.convert_str(clone_snap),"},{"line_number":720,"context_line":"                                      dest_client.ioctx,"},{"line_number":721,"context_line":"                                      dest_name,"}],"source_content_type":"text/x-python","patch_set":6,"id":"a082e7dc_1c4fcfc8","line":718,"range":{"start_line":718,"start_character":38,"end_line":718,"end_character":66},"updated":"2022-01-20 17:08:58.000000000","message":"If I am not wrong, then you are already converting it line #1733","commit_id":"25c9a626010eeee13801d6197afa919b9e594a65"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"46c54da57456b6132b29d801bbb8786e8d920ba1","unresolved":false,"context_lines":[{"line_number":715,"context_line":"                chunk_size \u003d self.configuration.rbd_store_chunk_size * units.Mi"},{"line_number":716,"context_line":"                order \u003d int(math.log(chunk_size, 2))"},{"line_number":717,"context_line":"                self.RBDProxy().clone(client.ioctx,"},{"line_number":718,"context_line":"                                      utils.convert_str(src_name),"},{"line_number":719,"context_line":"                                      utils.convert_str(clone_snap),"},{"line_number":720,"context_line":"                                      dest_client.ioctx,"},{"line_number":721,"context_line":"                                      dest_name,"}],"source_content_type":"text/x-python","patch_set":6,"id":"b8caa572_7fa1bb0d","line":718,"range":{"start_line":718,"start_character":38,"end_line":718,"end_character":66},"in_reply_to":"a082e7dc_1c4fcfc8","updated":"2022-01-24 09:14:03.000000000","message":"Done","commit_id":"25c9a626010eeee13801d6197afa919b9e594a65"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"1a60341cb45e5aba594827cc2cacfbd5ac1d2fcf","unresolved":true,"context_lines":[{"line_number":716,"context_line":"                order \u003d int(math.log(chunk_size, 2))"},{"line_number":717,"context_line":"                self.RBDProxy().clone(client.ioctx,"},{"line_number":718,"context_line":"                                      utils.convert_str(src_name),"},{"line_number":719,"context_line":"                                      utils.convert_str(clone_snap),"},{"line_number":720,"context_line":"                                      dest_client.ioctx,"},{"line_number":721,"context_line":"                                      dest_name,"},{"line_number":722,"context_line":"                                      features\u003dclient.features,"}],"source_content_type":"text/x-python","patch_set":6,"id":"0985fc54_bebeba5b","line":719,"range":{"start_line":719,"start_character":38,"end_line":719,"end_character":68},"updated":"2022-01-20 17:08:58.000000000","message":"why not convert it there only?","commit_id":"25c9a626010eeee13801d6197afa919b9e594a65"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"46c54da57456b6132b29d801bbb8786e8d920ba1","unresolved":false,"context_lines":[{"line_number":716,"context_line":"                order \u003d int(math.log(chunk_size, 2))"},{"line_number":717,"context_line":"                self.RBDProxy().clone(client.ioctx,"},{"line_number":718,"context_line":"                                      utils.convert_str(src_name),"},{"line_number":719,"context_line":"                                      utils.convert_str(clone_snap),"},{"line_number":720,"context_line":"                                      dest_client.ioctx,"},{"line_number":721,"context_line":"                                      dest_name,"},{"line_number":722,"context_line":"                                      features\u003dclient.features,"}],"source_content_type":"text/x-python","patch_set":6,"id":"c9f01b87_1f943db0","line":719,"range":{"start_line":719,"start_character":38,"end_line":719,"end_character":68},"in_reply_to":"0985fc54_bebeba5b","updated":"2022-01-24 09:14:03.000000000","message":"Done","commit_id":"25c9a626010eeee13801d6197afa919b9e594a65"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"1a60341cb45e5aba594827cc2cacfbd5ac1d2fcf","unresolved":true,"context_lines":[{"line_number":1729,"context_line":"            location_metadata \u003d {}"},{"line_number":1730,"context_line":"            if store_id:"},{"line_number":1731,"context_line":"                location_metadata[\u0027store\u0027] \u003d store_id"},{"line_number":1732,"context_line":"            # location \u003d {\u0027url\u0027: uri, \u0027metadata\u0027: location_metadata}"},{"line_number":1733,"context_line":"            src_name \u003d utils.convert_str(volume.name)"},{"line_number":1734,"context_line":"            dest_name \u003d utils.convert_str(image_meta[\u0027id\u0027])"},{"line_number":1735,"context_line":"            clone_snap \u003d \"%s.clone_snap\" % dest_name"}],"source_content_type":"text/x-python","patch_set":6,"id":"f0759834_c5e81821","line":1732,"range":{"start_line":1732,"start_character":12,"end_line":1732,"end_character":68},"updated":"2022-01-20 17:08:58.000000000","message":"need to remove or just an example for developer?","commit_id":"25c9a626010eeee13801d6197afa919b9e594a65"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"46c54da57456b6132b29d801bbb8786e8d920ba1","unresolved":false,"context_lines":[{"line_number":1729,"context_line":"            location_metadata \u003d {}"},{"line_number":1730,"context_line":"            if store_id:"},{"line_number":1731,"context_line":"                location_metadata[\u0027store\u0027] \u003d store_id"},{"line_number":1732,"context_line":"            # location \u003d {\u0027url\u0027: uri, \u0027metadata\u0027: location_metadata}"},{"line_number":1733,"context_line":"            src_name \u003d utils.convert_str(volume.name)"},{"line_number":1734,"context_line":"            dest_name \u003d utils.convert_str(image_meta[\u0027id\u0027])"},{"line_number":1735,"context_line":"            clone_snap \u003d \"%s.clone_snap\" % dest_name"}],"source_content_type":"text/x-python","patch_set":6,"id":"69195a95_b37e0108","line":1732,"range":{"start_line":1732,"start_character":12,"end_line":1732,"end_character":68},"in_reply_to":"f0759834_c5e81821","updated":"2022-01-24 09:14:03.000000000","message":"Done","commit_id":"25c9a626010eeee13801d6197afa919b9e594a65"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"1a60341cb45e5aba594827cc2cacfbd5ac1d2fcf","unresolved":true,"context_lines":[{"line_number":1753,"context_line":"                LOG.warning(\u0027Registration of image volume URI %(uri)s \u0027"},{"line_number":1754,"context_line":"                            \u0027to image %(image_id)s failed.\u0027,"},{"line_number":1755,"context_line":"                            {\u0027uri\u0027: uri, \u0027image_id\u0027: image_meta[\u0027id\u0027]})"},{"line_number":1756,"context_line":"            else:"},{"line_number":1757,"context_line":"                return"},{"line_number":1758,"context_line":""},{"line_number":1759,"context_line":"        tmp_dir \u003d volume_utils.image_conversion_dir()"},{"line_number":1760,"context_line":"        tmp_file \u003d os.path.join(tmp_dir,"}],"source_content_type":"text/x-python","patch_set":6,"id":"075b3190_e49163b3","line":1757,"range":{"start_line":1756,"start_character":12,"end_line":1757,"end_character":22},"updated":"2022-01-20 17:08:58.000000000","message":"I think you can remove it, right?","commit_id":"25c9a626010eeee13801d6197afa919b9e594a65"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"46c54da57456b6132b29d801bbb8786e8d920ba1","unresolved":true,"context_lines":[{"line_number":1753,"context_line":"                LOG.warning(\u0027Registration of image volume URI %(uri)s \u0027"},{"line_number":1754,"context_line":"                            \u0027to image %(image_id)s failed.\u0027,"},{"line_number":1755,"context_line":"                            {\u0027uri\u0027: uri, \u0027image_id\u0027: image_meta[\u0027id\u0027]})"},{"line_number":1756,"context_line":"            else:"},{"line_number":1757,"context_line":"                return"},{"line_number":1758,"context_line":""},{"line_number":1759,"context_line":"        tmp_dir \u003d volume_utils.image_conversion_dir()"},{"line_number":1760,"context_line":"        tmp_file \u003d os.path.join(tmp_dir,"}],"source_content_type":"text/x-python","patch_set":6,"id":"d3ec4b26_727cc932","line":1757,"range":{"start_line":1756,"start_character":12,"end_line":1757,"end_character":22},"in_reply_to":"075b3190_e49163b3","updated":"2022-01-24 09:14:03.000000000","message":"If the clone optimization is successful then we need to return to avoid the generic rbd flow from executing. I\u0027ve refactored the methods in a more readable manner in new patchset.","commit_id":"25c9a626010eeee13801d6197afa919b9e594a65"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"4cfe2b589785b888fa2a5d95940d87bb3aeee03f","unresolved":false,"context_lines":[{"line_number":1753,"context_line":"                LOG.warning(\u0027Registration of image volume URI %(uri)s \u0027"},{"line_number":1754,"context_line":"                            \u0027to image %(image_id)s failed.\u0027,"},{"line_number":1755,"context_line":"                            {\u0027uri\u0027: uri, \u0027image_id\u0027: image_meta[\u0027id\u0027]})"},{"line_number":1756,"context_line":"            else:"},{"line_number":1757,"context_line":"                return"},{"line_number":1758,"context_line":""},{"line_number":1759,"context_line":"        tmp_dir \u003d volume_utils.image_conversion_dir()"},{"line_number":1760,"context_line":"        tmp_file \u003d os.path.join(tmp_dir,"}],"source_content_type":"text/x-python","patch_set":6,"id":"08806cbe_eb3fcab2","line":1757,"range":{"start_line":1756,"start_character":12,"end_line":1757,"end_character":22},"in_reply_to":"d3ec4b26_727cc932","updated":"2022-01-28 05:56:59.000000000","message":"Done","commit_id":"25c9a626010eeee13801d6197afa919b9e594a65"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"4cfe2b589785b888fa2a5d95940d87bb3aeee03f","unresolved":true,"context_lines":[{"line_number":123,"context_line":"    cfg.IntOpt(\u0027deferred_deletion_purge_interval\u0027, default\u003d60,"},{"line_number":124,"context_line":"               help\u003d\u0027Number of seconds between runs of the periodic task \u0027"},{"line_number":125,"context_line":"                    \u0027to purge volumes tagged for deletion.\u0027),"},{"line_number":126,"context_line":"    cfg.BoolOpt(\u0027enable_cow_clone_upload_volume\u0027, default\u003dFalse,"},{"line_number":127,"context_line":"                help\u003d\u0027This option enables to use RBD cow cloning when \u0027"},{"line_number":128,"context_line":"                     \u0027uploading a volume from cinder\\\u0027s RBD backend to \u0027"},{"line_number":129,"context_line":"                     \u0027glance\\\u0027s RBD store. Default\u003dFalse.\u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"6f71970e_7b3747d1","line":126,"range":{"start_line":126,"start_character":17,"end_line":126,"end_character":47},"updated":"2022-01-28 05:56:59.000000000","message":"Suggestion,\n\nuse_cow_clone ??","commit_id":"0fdd64e6f1eb19f393af6b407e8299d0ba50fa14"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"3e0a90c834c17a5de48abc1c51d3bff2bf4a350b","unresolved":true,"context_lines":[{"line_number":705,"context_line":"                       \u0027dst_size\u0027: volume.size})"},{"line_number":706,"context_line":"            self._resize(volume)"},{"line_number":707,"context_line":""},{"line_number":708,"context_line":"    def _do_cow_clone(self, client, src_name, clone_snap, dest_name,"},{"line_number":709,"context_line":"                      dest_client\u003dNone):"},{"line_number":710,"context_line":"        is_cloned \u003d True"},{"line_number":711,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":8,"id":"6d56fc3f_b10f4943","line":708,"range":{"start_line":708,"start_character":8,"end_line":708,"end_character":21},"updated":"2022-03-31 21:39:45.000000000","message":"We have other ongoing work in Cinder to fix issues caused by interdependencies of RBD images -- how is this not introducing a new issue where Glance images will depend on Cinder volumes and not be able to be deleted from Glance?","commit_id":"806c6094f13056673bcaa3d369fa4036c5d07439"},{"author":{"_account_id":32755,"name":"Christian Rohmann","email":"christian.rohmann@inovex.de","username":"frittentheke"},"change_message_id":"988ad52e65e235a2f0ca7e1bcf70a374048c4b45","unresolved":true,"context_lines":[{"line_number":705,"context_line":"                       \u0027dst_size\u0027: volume.size})"},{"line_number":706,"context_line":"            self._resize(volume)"},{"line_number":707,"context_line":""},{"line_number":708,"context_line":"    def _do_cow_clone(self, client, src_name, clone_snap, dest_name,"},{"line_number":709,"context_line":"                      dest_client\u003dNone):"},{"line_number":710,"context_line":"        is_cloned \u003d True"},{"line_number":711,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":8,"id":"621154d5_3d397229","line":708,"range":{"start_line":708,"start_character":8,"end_line":708,"end_character":21},"in_reply_to":"6d56fc3f_b10f4943","updated":"2024-01-30 16:45:01.000000000","message":"Even if this change would \"only\" end up creating an independent copy natively via RBD, it would still be a great gain in speed and efficiency, right?","commit_id":"806c6094f13056673bcaa3d369fa4036c5d07439"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"4cfe2b589785b888fa2a5d95940d87bb3aeee03f","unresolved":true,"context_lines":[{"line_number":719,"context_line":"                      \"\u0027%(dest)s\u0027\","},{"line_number":720,"context_line":"                      {\u0027src_vol\u0027: src_name, \u0027src_snap\u0027: clone_snap,"},{"line_number":721,"context_line":"                       \u0027dest\u0027: dest_name})"},{"line_number":722,"context_line":"            if dest_client:"},{"line_number":723,"context_line":"                chunk_size \u003d self.configuration.rbd_store_chunk_size * units.Mi"},{"line_number":724,"context_line":"                order \u003d int(math.log(chunk_size, 2))"},{"line_number":725,"context_line":"                self.RBDProxy().clone(client.ioctx,"},{"line_number":726,"context_line":"                                      src_name,"},{"line_number":727,"context_line":"                                      clone_snap,"},{"line_number":728,"context_line":"                                      dest_client.ioctx,"},{"line_number":729,"context_line":"                                      dest_name,"},{"line_number":730,"context_line":"                                      features\u003dclient.features,"},{"line_number":731,"context_line":"                                      order\u003dorder)"},{"line_number":732,"context_line":"            else:"},{"line_number":733,"context_line":"                self.RBDProxy().clone(client.ioctx, src_name, clone_snap,"},{"line_number":734,"context_line":"                                      client.ioctx, dest_name,"},{"line_number":735,"context_line":"                                      features\u003dclient.features)"},{"line_number":736,"context_line":"        except Exception as e:"},{"line_number":737,"context_line":"            is_cloned \u003d False"},{"line_number":738,"context_line":"            src_volume.unprotect_snap(clone_snap)"}],"source_content_type":"text/x-python","patch_set":8,"id":"6d4f6154_7fb17928","line":735,"range":{"start_line":722,"start_character":12,"end_line":735,"end_character":63},"updated":"2022-01-28 05:56:59.000000000","message":"I think you can simplify it bit more;\n\n    clone_ioctx \u003d client.ioctx\n    order \u003d None\n    if dest_client:\n        chunk_size \u003d self.configuration.rbd_store_chunk_size * units.Mi\n        order \u003d int(math.log(chunk_size, 2))\n        clone_ioctx \u003d dest_client.ioctx\n\n    self.RBDProxy().clone(client.ioctx,\n\t                  src_name,\n\t\t          clone_snap,\n\t\t          clone_ioctx,\n\t\t          dest_name,\n\t\t          features\u003dclient.features,\n\t\t          order\u003dorder)","commit_id":"806c6094f13056673bcaa3d369fa4036c5d07439"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"287abd976d5e2154ef3a8405e3c4200715b93fac","unresolved":true,"context_lines":[{"line_number":1723,"context_line":"    def _optimize_rbd_upload(self, context, volume, image_service,"},{"line_number":1724,"context_line":"                             image_meta):"},{"line_number":1725,"context_line":"        store_id, store_type, store_prop \u003d ("},{"line_number":1726,"context_line":"            image_utils.get_glance_default_store_details("},{"line_number":1727,"context_line":"                context, image_service))"},{"line_number":1728,"context_line":"        if store_type \u003d\u003d \u0027rbd\u0027:"},{"line_number":1729,"context_line":"            uri \u003d \u0027rbd://%s\u0027 % image_meta[\u0027id\u0027]"},{"line_number":1730,"context_line":"            image_registered \u003d None"}],"source_content_type":"text/x-python","patch_set":8,"id":"a4966e21_897f9250","line":1727,"range":{"start_line":1726,"start_character":12,"end_line":1727,"end_character":40},"updated":"2023-03-31 13:56:30.000000000","message":"If this fails due to not having permission etc. to get these details, I think we want to perform the non-optimized upload instead and still succeed instead of failing?","commit_id":"806c6094f13056673bcaa3d369fa4036c5d07439"},{"author":{"_account_id":32755,"name":"Christian Rohmann","email":"christian.rohmann@inovex.de","username":"frittentheke"},"change_message_id":"988ad52e65e235a2f0ca7e1bcf70a374048c4b45","unresolved":true,"context_lines":[{"line_number":1723,"context_line":"    def _optimize_rbd_upload(self, context, volume, image_service,"},{"line_number":1724,"context_line":"                             image_meta):"},{"line_number":1725,"context_line":"        store_id, store_type, store_prop \u003d ("},{"line_number":1726,"context_line":"            image_utils.get_glance_default_store_details("},{"line_number":1727,"context_line":"                context, image_service))"},{"line_number":1728,"context_line":"        if store_type \u003d\u003d \u0027rbd\u0027:"},{"line_number":1729,"context_line":"            uri \u003d \u0027rbd://%s\u0027 % image_meta[\u0027id\u0027]"},{"line_number":1730,"context_line":"            image_registered \u003d None"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f3633a6_2fc531da","line":1727,"range":{"start_line":1726,"start_character":12,"end_line":1727,"end_character":40},"in_reply_to":"a4966e21_897f9250","updated":"2024-01-30 16:45:01.000000000","message":"See my comment #1 in https://bugs.launchpad.net/openstack-ansible/+bug/2051244.\nIf this change here is implemented and merged, I\u0027d rather have things fail if the option is enabled and the caps are not properly configured.\n\nMagically working around all sorts of misconfigurations (wanting RBD-native CoW but also not configuring caps) is not really helping anyone. To me things like these MUST fail, hard.","commit_id":"806c6094f13056673bcaa3d369fa4036c5d07439"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"4cfe2b589785b888fa2a5d95940d87bb3aeee03f","unresolved":true,"context_lines":[{"line_number":1757,"context_line":"                LOG.warning(\u0027Registration of image volume URI %(uri)s \u0027"},{"line_number":1758,"context_line":"                            \u0027to image %(image_id)s failed.\u0027,"},{"line_number":1759,"context_line":"                            {\u0027uri\u0027: uri, \u0027image_id\u0027: image_meta[\u0027id\u0027]})"},{"line_number":1760,"context_line":"                self._cleanup_rbd_clone("},{"line_number":1761,"context_line":"                    dest_name, src_name, clone_snap, dest_pool)"},{"line_number":1762,"context_line":"                return"},{"line_number":1763,"context_line":"            return True"},{"line_number":1764,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"6217173f_14ddd6bf","line":1761,"range":{"start_line":1760,"start_character":16,"end_line":1761,"end_character":63},"updated":"2022-01-28 05:56:59.000000000","message":"I think this is redundant as you are already cleaning up at line 1753.\n\nTO further make this method short I guess you can extract a new method like;\n\ndef register_image(self, image_service, context, image_id, uri, location_metadata,     dest_name, src_name, clone_snap, dest_pool):\n    try:\n        image_registered \u003d image_service.add_location(\n            context, image_id, uri, location_metadata)\n    except (exception.NotAuthorized, exception.Invalid,\n            exception.NotFound):\n        LOG.exception(\u0027Failed to register image volume location \u0027\n                      \u0027%(uri)s.\u0027, {\u0027uri\u0027: uri})\n        self._cleanup_rbd_clone(\n            dest_name, src_name, clone_snap, dest_pool)\n        return False\n\n    return True\n\nand replace line 1746 to 1762 with\n\nimage_registered \u003d self.register_image(......)\n\nreturn image_registered","commit_id":"806c6094f13056673bcaa3d369fa4036c5d07439"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"4cfe2b589785b888fa2a5d95940d87bb3aeee03f","unresolved":true,"context_lines":[{"line_number":1760,"context_line":"                self._cleanup_rbd_clone("},{"line_number":1761,"context_line":"                    dest_name, src_name, clone_snap, dest_pool)"},{"line_number":1762,"context_line":"                return"},{"line_number":1763,"context_line":"            return True"},{"line_number":1764,"context_line":""},{"line_number":1765,"context_line":"    def _copy_image_to_volume(self, context, volume, image_service, image_id,"},{"line_number":1766,"context_line":"                              encrypted\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f674c5e_0cb1b6f6","line":1763,"range":{"start_line":1763,"start_character":12,"end_line":1763,"end_character":23},"updated":"2022-01-28 05:56:59.000000000","message":"I think you should return False at line 1762, 1755 and 1744 to be consistent with return type","commit_id":"806c6094f13056673bcaa3d369fa4036c5d07439"}]}
