)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"eb1d9b0cf23d0f8dc079f707127de37167b35141","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Do not fail when depth is greater than rbd_max_clone_depth"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The current behavior is to fail when rbd_max_clone_depth is reached"},{"line_number":10,"context_line":"instead of attempting to flatten the volumes/images/etc.   This patch"},{"line_number":11,"context_line":"change the behavior to attempt a volume flattening when"},{"line_number":12,"context_line":"rbd_max_clone_depth is reached instead and raise if that fails."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I8c445058a25c2eca2fda91bdeb6befedae34ccf2"},{"line_number":15,"context_line":"Closes-bug: #1901241"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"3f65232a_0d685bf3","line":12,"range":{"start_line":9,"start_character":0,"end_line":12,"end_character":63},"updated":"2020-10-24 00:41:06.000000000","message":"I think something like this would be more accurate:\n\nRemoved a sanity check in the code that raised an exception if the clone depth of a volume to be cloned exceeded the rbd_max_clone_depth config value.  A consequence of this check was that if an operator lowered the value, volumes whose clone depth was greater than the new value (as would be allowed by the previous, higher setting) could no longer be cloned.","commit_id":"1d91bd010358eba7bc5ccb7c454cfb281926bcf8"}],"cinder/volume/drivers/rbd.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"35d9a09a7fcd3de1f61431713eafabe93eaa3a58","unresolved":false,"context_lines":[{"line_number":661,"context_line":""},{"line_number":662,"context_line":"        # If clone depth was reached, flatten should have occurred so if it has"},{"line_number":663,"context_line":"        # been exceeded then something has gone wrong."},{"line_number":664,"context_line":"        if not force_volume_flattening:"},{"line_number":665,"context_line":"            if depth \u003e self.configuration.rbd_max_clone_depth:"},{"line_number":666,"context_line":"                raise Exception(_(\"clone depth exceeds limit of %s\") %"},{"line_number":667,"context_line":"                                (self.configuration.rbd_max_clone_depth))"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f65232a_817d64b3","line":664,"updated":"2020-10-23 02:15:05.000000000","message":"pep8: F821 undefined name \u0027force_volume_flattening\u0027","commit_id":"c9519ede1524ebce25800c246f1ca0c7986c8c07"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"eb1d9b0cf23d0f8dc079f707127de37167b35141","unresolved":false,"context_lines":[{"line_number":724,"context_line":""},{"line_number":725,"context_line":"            depth \u003d self._get_clone_depth(client, src_name)"},{"line_number":726,"context_line":"            # If dest volume is a clone and rbd_max_clone_depth reached,"},{"line_number":727,"context_line":"            # flatten the dest after cloning. Zero rbd_max_clone_depth means"},{"line_number":728,"context_line":"            # infinite is allowed."},{"line_number":729,"context_line":"            if depth \u003e\u003d self.configuration.rbd_max_clone_depth:"},{"line_number":730,"context_line":"                LOG.info(\"maximum clone depth (%d) has been reached - \""},{"line_number":731,"context_line":"                         \"flattening dest volume\","}],"source_content_type":"text/x-python","patch_set":9,"id":"3f65232a_4dd6d3c7","line":728,"range":{"start_line":727,"start_character":45,"end_line":728,"end_character":34},"updated":"2020-10-24 00:41:06.000000000","message":"This isn\u0027t part of your change, but might as well fix it while you\u0027re working on this.  I suggest just deleting the highlighted sentence.  (The help text for the option on lines 77-79 already explains what a zero value means.)","commit_id":"1d91bd010358eba7bc5ccb7c454cfb281926bcf8"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"6ca742f1a1b8e5719f48381186edea008480e3b7","unresolved":false,"context_lines":[{"line_number":656,"context_line":"        if not parent:"},{"line_number":657,"context_line":"            return depth"},{"line_number":658,"context_line":""},{"line_number":659,"context_line":"        # If clone depth was reached, flatten should have occurred so if it has"},{"line_number":660,"context_line":"        # been exceeded then something has gone wrong."},{"line_number":661,"context_line":"        if depth \u003e self.configuration.rbd_max_clone_depth:"},{"line_number":662,"context_line":"            raise Exception(_(\"clone depth exceeds limit of %s\") %"},{"line_number":663,"context_line":"                            (self.configuration.rbd_max_clone_depth))"},{"line_number":664,"context_line":""},{"line_number":665,"context_line":"        return self._get_clone_depth(client, parent, depth + 1)"},{"line_number":666,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3f65232a_99f0146a","side":"PARENT","line":663,"range":{"start_line":659,"start_character":0,"end_line":663,"end_character":69},"updated":"2020-10-27 11:45:11.000000000","message":"removing this doesn\u0027t seem like a good idea, see my comment on PS10 L#729","commit_id":"0f2eff2ec3ab5f94ddb63f63d18d66ba99934867"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"5b336988023b00aa4dc285062e005f1d8e743f33","unresolved":false,"context_lines":[{"line_number":656,"context_line":"        if not parent:"},{"line_number":657,"context_line":"            return depth"},{"line_number":658,"context_line":""},{"line_number":659,"context_line":"        # If clone depth was reached, flatten should have occurred so if it has"},{"line_number":660,"context_line":"        # been exceeded then something has gone wrong."},{"line_number":661,"context_line":"        if depth \u003e self.configuration.rbd_max_clone_depth:"},{"line_number":662,"context_line":"            raise Exception(_(\"clone depth exceeds limit of %s\") %"},{"line_number":663,"context_line":"                            (self.configuration.rbd_max_clone_depth))"},{"line_number":664,"context_line":""},{"line_number":665,"context_line":"        return self._get_clone_depth(client, parent, depth + 1)"},{"line_number":666,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3f65232a_fcd7764e","side":"PARENT","line":663,"range":{"start_line":659,"start_character":0,"end_line":663,"end_character":69},"in_reply_to":"3f65232a_99f0146a","updated":"2020-10-27 12:24:10.000000000","message":"I have two problems with this code:\n(1) it\u0027s not correct; see https://review.opendev.org/#/c/759536/\n(2) it violates the single responsibility principle for a function that\u0027s supposed to determine the clone depth","commit_id":"0f2eff2ec3ab5f94ddb63f63d18d66ba99934867"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"1e3435a7422474878f4b758998e5f5383e00e55d","unresolved":false,"context_lines":[{"line_number":76,"context_line":"               default\u003d5,"},{"line_number":77,"context_line":"               help\u003d\u0027Maximum number of nested volume clones that are \u0027"},{"line_number":78,"context_line":"                    \u0027taken before a flatten occurs. Set to 0 to disable \u0027"},{"line_number":79,"context_line":"                    \u0027cloning.\u0027),"},{"line_number":80,"context_line":"    cfg.IntOpt(\u0027rbd_store_chunk_size\u0027, default\u003d4,"},{"line_number":81,"context_line":"               help\u003d\u0027Volumes will be chunked into objects of this size \u0027"},{"line_number":82,"context_line":"                    \u0027(in megabytes).\u0027),"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f65232a_c8a2b44b","line":79,"updated":"2020-10-27 16:55:40.000000000","message":"I suppose you could add \u0027Note that lowering this value does not affect existing volumes whose clone depth exceeds the new value.\u0027, or do you think that would be more confusing than saying nothing?","commit_id":"81654234d30d593e819ef8f4fd13d578e990afb5"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"6ca742f1a1b8e5719f48381186edea008480e3b7","unresolved":false,"context_lines":[{"line_number":726,"context_line":"            # If dest volume is a clone and rbd_max_clone_depth reached,"},{"line_number":727,"context_line":"            # flatten the dest after cloning. Zero rbd_max_clone_depth means"},{"line_number":728,"context_line":"            # volumes are always flattened."},{"line_number":729,"context_line":"            if depth \u003e\u003d self.configuration.rbd_max_clone_depth:"},{"line_number":730,"context_line":"                LOG.info(\"maximum clone depth (%d) has been reached - \""},{"line_number":731,"context_line":"                         \"flattening dest volume\","},{"line_number":732,"context_line":"                         self.configuration.rbd_max_clone_depth)"},{"line_number":733,"context_line":""},{"line_number":734,"context_line":"                # Flatten destination volume"},{"line_number":735,"context_line":"                try:"},{"line_number":736,"context_line":"                    with RBDVolumeProxy(self, dest_name, client\u003dclient,"},{"line_number":737,"context_line":"                                        ioctx\u003dclient.ioctx) as dest_volume:"},{"line_number":738,"context_line":"                        LOG.debug(\"flattening dest volume %s\", dest_name)"},{"line_number":739,"context_line":"                        dest_volume.flatten()"},{"line_number":740,"context_line":"                except Exception as e:"},{"line_number":741,"context_line":"                    msg \u003d (_(\"Failed to flatten volume %(volume)s with \""},{"line_number":742,"context_line":"                             \"error: %(error)s.\") %"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f65232a_d99f2c01","line":739,"range":{"start_line":729,"start_character":12,"end_line":739,"end_character":45},"updated":"2020-10-27 11:45:11.000000000","message":"this code doesn\u0027t account for flattening a chain of volumes.\nSuppose we have a value of rbd_max_clone_depth \u003d 5 and we\u0027ve 5 volumes created (initial volume and 4 in it\u0027s clone chain)\nwe now change the rbd_max_clone_depth\u003d1 then this will only flatten the latest volume created and not the previous ones in chain\nWe need a mechanism to flatten all volumes in the chain","commit_id":"81654234d30d593e819ef8f4fd13d578e990afb5"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"1e3435a7422474878f4b758998e5f5383e00e55d","unresolved":false,"context_lines":[{"line_number":726,"context_line":"            # If dest volume is a clone and rbd_max_clone_depth reached,"},{"line_number":727,"context_line":"            # flatten the dest after cloning. Zero rbd_max_clone_depth means"},{"line_number":728,"context_line":"            # volumes are always flattened."},{"line_number":729,"context_line":"            if depth \u003e\u003d self.configuration.rbd_max_clone_depth:"},{"line_number":730,"context_line":"                LOG.info(\"maximum clone depth (%d) has been reached - \""},{"line_number":731,"context_line":"                         \"flattening dest volume\","},{"line_number":732,"context_line":"                         self.configuration.rbd_max_clone_depth)"},{"line_number":733,"context_line":""},{"line_number":734,"context_line":"                # Flatten destination volume"},{"line_number":735,"context_line":"                try:"},{"line_number":736,"context_line":"                    with RBDVolumeProxy(self, dest_name, client\u003dclient,"},{"line_number":737,"context_line":"                                        ioctx\u003dclient.ioctx) as dest_volume:"},{"line_number":738,"context_line":"                        LOG.debug(\"flattening dest volume %s\", dest_name)"},{"line_number":739,"context_line":"                        dest_volume.flatten()"},{"line_number":740,"context_line":"                except Exception as e:"},{"line_number":741,"context_line":"                    msg \u003d (_(\"Failed to flatten volume %(volume)s with \""},{"line_number":742,"context_line":"                             \"error: %(error)s.\") %"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f65232a_08d66cc4","line":739,"range":{"start_line":729,"start_character":12,"end_line":739,"end_character":45},"in_reply_to":"3f65232a_bcb5fecf","updated":"2020-10-27 16:55:40.000000000","message":"OK, just wanted to verify.  It might be worth pointing this out in the release note (or maybe the option help text?) so it\u0027s clear what the expected behavior is, namely, that we don\u0027t go back and change all the current volumes.","commit_id":"81654234d30d593e819ef8f4fd13d578e990afb5"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"5b336988023b00aa4dc285062e005f1d8e743f33","unresolved":false,"context_lines":[{"line_number":726,"context_line":"            # If dest volume is a clone and rbd_max_clone_depth reached,"},{"line_number":727,"context_line":"            # flatten the dest after cloning. Zero rbd_max_clone_depth means"},{"line_number":728,"context_line":"            # volumes are always flattened."},{"line_number":729,"context_line":"            if depth \u003e\u003d self.configuration.rbd_max_clone_depth:"},{"line_number":730,"context_line":"                LOG.info(\"maximum clone depth (%d) has been reached - \""},{"line_number":731,"context_line":"                         \"flattening dest volume\","},{"line_number":732,"context_line":"                         self.configuration.rbd_max_clone_depth)"},{"line_number":733,"context_line":""},{"line_number":734,"context_line":"                # Flatten destination volume"},{"line_number":735,"context_line":"                try:"},{"line_number":736,"context_line":"                    with RBDVolumeProxy(self, dest_name, client\u003dclient,"},{"line_number":737,"context_line":"                                        ioctx\u003dclient.ioctx) as dest_volume:"},{"line_number":738,"context_line":"                        LOG.debug(\"flattening dest volume %s\", dest_name)"},{"line_number":739,"context_line":"                        dest_volume.flatten()"},{"line_number":740,"context_line":"                except Exception as e:"},{"line_number":741,"context_line":"                    msg \u003d (_(\"Failed to flatten volume %(volume)s with \""},{"line_number":742,"context_line":"                             \"error: %(error)s.\") %"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f65232a_dccc3abe","line":739,"range":{"start_line":729,"start_character":12,"end_line":739,"end_character":45},"in_reply_to":"3f65232a_d99f2c01","updated":"2020-10-27 12:24:10.000000000","message":"Quick question: is there a technical Ceph problem if we flatten volume #6 but leave volumes 2 through 5 unflattened?  Or is your point that there are now volumes in the system that \"violate\" the max_clone_depth?","commit_id":"81654234d30d593e819ef8f4fd13d578e990afb5"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"c46269b462fdae92cba1719222fd66c85fbb5440","unresolved":false,"context_lines":[{"line_number":726,"context_line":"            # If dest volume is a clone and rbd_max_clone_depth reached,"},{"line_number":727,"context_line":"            # flatten the dest after cloning. Zero rbd_max_clone_depth means"},{"line_number":728,"context_line":"            # volumes are always flattened."},{"line_number":729,"context_line":"            if depth \u003e\u003d self.configuration.rbd_max_clone_depth:"},{"line_number":730,"context_line":"                LOG.info(\"maximum clone depth (%d) has been reached - \""},{"line_number":731,"context_line":"                         \"flattening dest volume\","},{"line_number":732,"context_line":"                         self.configuration.rbd_max_clone_depth)"},{"line_number":733,"context_line":""},{"line_number":734,"context_line":"                # Flatten destination volume"},{"line_number":735,"context_line":"                try:"},{"line_number":736,"context_line":"                    with RBDVolumeProxy(self, dest_name, client\u003dclient,"},{"line_number":737,"context_line":"                                        ioctx\u003dclient.ioctx) as dest_volume:"},{"line_number":738,"context_line":"                        LOG.debug(\"flattening dest volume %s\", dest_name)"},{"line_number":739,"context_line":"                        dest_volume.flatten()"},{"line_number":740,"context_line":"                except Exception as e:"},{"line_number":741,"context_line":"                    msg \u003d (_(\"Failed to flatten volume %(volume)s with \""},{"line_number":742,"context_line":"                             \"error: %(error)s.\") %"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f65232a_bcb5fecf","line":739,"range":{"start_line":729,"start_character":12,"end_line":739,"end_character":45},"in_reply_to":"3f65232a_dccc3abe","updated":"2020-10-27 13:00:20.000000000","message":"My concern is the 2nd part, clone volume chains existing in the system exceeding the max_clone_depth value but that maybe just my opinion.","commit_id":"81654234d30d593e819ef8f4fd13d578e990afb5"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"15f10fd5a1cfc49a225b977126c8f5c4fe722e9c","unresolved":false,"context_lines":[{"line_number":77,"context_line":"               help\u003d\u0027Maximum number of nested volume clones that are \u0027"},{"line_number":78,"context_line":"                    \u0027taken before a flatten occurs. Set to 0 to disable \u0027"},{"line_number":79,"context_line":"                    \u0027cloning. Note: lowering this value will not affect \u0027"},{"line_number":80,"context_line":"                    \u0027existing volumes whose clone deph exceeds the new \u0027"},{"line_number":81,"context_line":"                    \u0027value.\u0027),"},{"line_number":82,"context_line":"    cfg.IntOpt(\u0027rbd_store_chunk_size\u0027, default\u003d4,"},{"line_number":83,"context_line":"               help\u003d\u0027Volumes will be chunked into objects of this size \u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"1f621f24_064cdfc5","line":80,"range":{"start_line":80,"start_character":50,"end_line":80,"end_character":54},"updated":"2020-10-28 21:36:31.000000000","message":"typo: depth","commit_id":"7273f199c5b198f5c54e964f68123175ab1f6f1d"}],"releasenotes/notes/bug-1901241-361b1b361bfa5152.yaml":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"eb1d9b0cf23d0f8dc079f707127de37167b35141","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"3f65232a_8d690b27","line":8,"updated":"2020-10-24 00:41:06.000000000","message":"Cinder is using a standard format these days:\nhttps://docs.openstack.org/cinder/latest/contributor/releasenotes.html#drivers\n\nAlso, it would be a good idea to make the content more general and not go into the implementation.  Something like:\n\nFixed an issue where decreasing the ``rbd_max_clone_depth`` configuration option would prevent volumes that had already exceeded that depth from being cloned.","commit_id":"1d91bd010358eba7bc5ccb7c454cfb281926bcf8"}]}
