)]}'
{"cinder/volume/drivers/rbd.py":[{"author":{"_account_id":1773,"name":"oliver-leahy-l","email":"oliver.leahy@hpe.com","username":"oliver-leahy-l"},"change_message_id":"26cc1a6dbd0440dfa9fef7211c9315a53190d965","unresolved":false,"context_lines":[{"line_number":360,"context_line":""},{"line_number":361,"context_line":"    def _resize(self, volume, size\u003dNone):"},{"line_number":362,"context_line":"        if not size:"},{"line_number":363,"context_line":"            size \u003d int(volume[\u0027size\u0027]) * 1024 ** 3"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"        with RBDVolumeProxy(self, volume[\u0027name\u0027]) as vol:"},{"line_number":366,"context_line":"            vol.resize(size)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAP3%2F%2F2og%3D","line":363,"updated":"2013-07-10 11:39:37.000000000","message":"This looks like you\u0027ll resize the volume to its existing size if the size parameter is not supplied, is this useful in some circumstances?","commit_id":"0714bb479fbda12868c81c92b0c42ab9fb3229e3"},{"author":{"_account_id":1773,"name":"oliver-leahy-l","email":"oliver.leahy@hpe.com","username":"oliver-leahy-l"},"change_message_id":"26cc1a6dbd0440dfa9fef7211c9315a53190d965","unresolved":false,"context_lines":[{"line_number":559,"context_line":"            LOG.debug(msg % dict(volname\u003dvolume[\u0027name\u0027]))"},{"line_number":560,"context_line":"            raise"},{"line_number":561,"context_line":""},{"line_number":562,"context_line":"        LOG.debug(_(\"Leaving SolidFire extend_volume\"))"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAP3%2F%2F2os%3D","line":562,"updated":"2013-07-10 11:39:37.000000000","message":"s/SolidFire/Rdb/","commit_id":"0714bb479fbda12868c81c92b0c42ab9fb3229e3"},{"author":{"_account_id":7872,"name":"Marc Koderer","email":"marc@koderer.com","username":"mkoderer"},"change_message_id":"9b69a191e50d1f056e5ea87f88143b0b2d3ff6fa","unresolved":false,"context_lines":[{"line_number":550,"context_line":""},{"line_number":551,"context_line":"    def extend_volume(self, volume, new_size):"},{"line_number":552,"context_line":"        \"\"\"Extend an Existing Volume.\"\"\""},{"line_number":553,"context_line":"        LOG.debug(_(\"Entering Rbd extend_volume.\"))"},{"line_number":554,"context_line":""},{"line_number":555,"context_line":"        try:"},{"line_number":556,"context_line":"            self._resize(volume, new_size)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAP3%2F%2F2VY%3D","line":553,"updated":"2013-07-10 13:36:58.000000000","message":"For my point of view just an enter of a function doesn\u0027t need to be logged. I\u0027d remove this line.","commit_id":"6ade5c8b3749176b61a36d43a274cd2ad7d0957d"},{"author":{"_account_id":7872,"name":"Marc Koderer","email":"marc@koderer.com","username":"mkoderer"},"change_message_id":"9b69a191e50d1f056e5ea87f88143b0b2d3ff6fa","unresolved":false,"context_lines":[{"line_number":556,"context_line":"            self._resize(volume, new_size)"},{"line_number":557,"context_line":"        except Exception:"},{"line_number":558,"context_line":"            msg \u003d _(\u0027Failed to Extend Volume %(volname)s\u0027)"},{"line_number":559,"context_line":"            LOG.debug(msg % dict(volname\u003dvolume[\u0027name\u0027]))"},{"line_number":560,"context_line":"            raise"},{"line_number":561,"context_line":""},{"line_number":562,"context_line":"        LOG.debug(_(\"Leaving Rbd extend_volume\"))"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAP3%2F%2F2Tw%3D","line":559,"updated":"2013-07-10 13:36:58.000000000","message":"Please use LOG.error instead","commit_id":"6ade5c8b3749176b61a36d43a274cd2ad7d0957d"},{"author":{"_account_id":7872,"name":"Marc Koderer","email":"marc@koderer.com","username":"mkoderer"},"change_message_id":"9b69a191e50d1f056e5ea87f88143b0b2d3ff6fa","unresolved":false,"context_lines":[{"line_number":557,"context_line":"        except Exception:"},{"line_number":558,"context_line":"            msg \u003d _(\u0027Failed to Extend Volume %(volname)s\u0027)"},{"line_number":559,"context_line":"            LOG.debug(msg % dict(volname\u003dvolume[\u0027name\u0027]))"},{"line_number":560,"context_line":"            raise"},{"line_number":561,"context_line":""},{"line_number":562,"context_line":"        LOG.debug(_(\"Leaving Rbd extend_volume\"))"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAP3%2F%2F2TY%3D","line":560,"updated":"2013-07-10 13:36:58.000000000","message":"You could also introduce a new exception here..","commit_id":"6ade5c8b3749176b61a36d43a274cd2ad7d0957d"},{"author":{"_account_id":7872,"name":"Marc Koderer","email":"marc@koderer.com","username":"mkoderer"},"change_message_id":"9b69a191e50d1f056e5ea87f88143b0b2d3ff6fa","unresolved":false,"context_lines":[{"line_number":559,"context_line":"            LOG.debug(msg % dict(volname\u003dvolume[\u0027name\u0027]))"},{"line_number":560,"context_line":"            raise"},{"line_number":561,"context_line":""},{"line_number":562,"context_line":"        LOG.debug(_(\"Leaving Rbd extend_volume\"))"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAP3%2F%2F2U0%3D","line":562,"updated":"2013-07-10 13:36:58.000000000","message":"See above. Please add additional information like \"extend volume (..) from (old_size) to (new_size)\"","commit_id":"6ade5c8b3749176b61a36d43a274cd2ad7d0957d"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"16b678ecc557f7f32cc5af5a27ae72a1845de35d","unresolved":false,"context_lines":[{"line_number":361,"context_line":"    def _resize(self, volume, new_size\u003dNone):"},{"line_number":362,"context_line":"        if new_size:"},{"line_number":363,"context_line":"            size \u003d int(new_size) * 1024 ** 3"},{"line_number":364,"context_line":"        else:"},{"line_number":365,"context_line":"            size \u003d int(volume[\u0027size\u0027]) * 1024 ** 3"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"        with RBDVolumeProxy(self, volume[\u0027name\u0027]) as vol:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAP3%2F%2F2Bs%3D","line":364,"updated":"2013-07-10 14:45:53.000000000","message":"I don\u0027t understand the logic here?  What\u0027s the purpose of having a default new_size of None in method that \"resize\u0027s\" a volume?\n\nWhy call RBD\u0027s resize on a volume with the same size argument as it already has?","commit_id":"b4a1df0e6f5fa24f9cf90825a09832d3b94c8a21"},{"author":{"_account_id":7593,"name":"Haomai Wang","email":"haomaiwang@gmail.com","username":"HaomaiWang"},"change_message_id":"df8bdb03877773697a04d9d85c5ffc6ca03524b0","unresolved":false,"context_lines":[{"line_number":361,"context_line":"    def _resize(self, volume, new_size\u003dNone):"},{"line_number":362,"context_line":"        if new_size:"},{"line_number":363,"context_line":"            size \u003d int(new_size) * 1024 ** 3"},{"line_number":364,"context_line":"        else:"},{"line_number":365,"context_line":"            size \u003d int(volume[\u0027size\u0027]) * 1024 ** 3"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"        with RBDVolumeProxy(self, volume[\u0027name\u0027]) as vol:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAP3%2F%2F2AA%3D","line":364,"in_reply_to":"AAAAP3%2F%2F2Bs%3D","updated":"2013-07-10 14:52:13.000000000","message":"There is a case that create_volume_from_snapshot() call _resize(volume) in order to extend the creating volume to the original volume size. \n\nSo the argument `new_size` is None means that we only want to resize volume to origin volume size.  \n\nIt\u0027s a legacy problem.","commit_id":"b4a1df0e6f5fa24f9cf90825a09832d3b94c8a21"},{"author":{"_account_id":1773,"name":"oliver-leahy-l","email":"oliver.leahy@hpe.com","username":"oliver-leahy-l"},"change_message_id":"86407a31ba0e8f2a67bbbb4982ba7d781f96e306","unresolved":false,"context_lines":[{"line_number":559,"context_line":"        except Exception:"},{"line_number":560,"context_line":"            msg \u003d _(\u0027Failed to Extend Volume %(volname)s\u0027)"},{"line_number":561,"context_line":"            LOG.error(msg % dict(volname\u003dvolume[\u0027name\u0027]))"},{"line_number":562,"context_line":"            raise exception.VolumeBackendAPIException(data\u003dmsg)"},{"line_number":563,"context_line":""},{"line_number":564,"context_line":"        LOG.debug(_(\"Extend volume from %(old_size) to %(new_size)\"),"},{"line_number":565,"context_line":"                  {\u0027old_size\u0027: old_size, \u0027new_size\u0027: new_size})"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAP3%2F%2F14A%3D","line":562,"updated":"2013-07-10 15:26:57.000000000","message":"Should you log the exception that is raised in _resize() now that you raise a different exception?","commit_id":"b4a1df0e6f5fa24f9cf90825a09832d3b94c8a21"},{"author":{"_account_id":6737,"name":"Edward Hope-Morley","email":"edward.hope-morley@canonical.com","username":"hopem"},"change_message_id":"641ac69aa451a392dfd3e4cb8652d908e663fd10","unresolved":false,"context_lines":[{"line_number":550,"context_line":"    def extend_volume(self, volume, new_size):"},{"line_number":551,"context_line":"        \"\"\"Extend an Existing Volume.\"\"\""},{"line_number":552,"context_line":"        old_size \u003d volume[\u0027size\u0027]"},{"line_number":553,"context_line":""},{"line_number":554,"context_line":"        try:"},{"line_number":555,"context_line":"            size \u003d int(new_size) * 1024 ** 3"},{"line_number":556,"context_line":"            with RBDVolumeProxy(self, volume[\u0027name\u0027]) as vol:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAP3%2F%2FwpQ%3D","line":553,"updated":"2013-07-11 20:43:00.000000000","message":"is it possible that a failed resize might leave the volume in an unusable state? I have not experimented with resizing but it may be worth seeing whether librbd provides info what type of error occured and based on that deciding whether it is safe to mark the volume as available or error.","commit_id":"00e2fdbb5352968b5b916df0d1945647fdee4c27"},{"author":{"_account_id":1107,"name":"Josh Durgin","email":"jdurgin@redhat.com","username":"jdurgin"},"change_message_id":"a5294f3eb31a1435a7d836965de3583b1dd6b046","unresolved":false,"context_lines":[{"line_number":550,"context_line":"    def extend_volume(self, volume, new_size):"},{"line_number":551,"context_line":"        \"\"\"Extend an Existing Volume.\"\"\""},{"line_number":552,"context_line":"        old_size \u003d volume[\u0027size\u0027]"},{"line_number":553,"context_line":""},{"line_number":554,"context_line":"        try:"},{"line_number":555,"context_line":"            size \u003d int(new_size) * 1024 ** 3"},{"line_number":556,"context_line":"            with RBDVolumeProxy(self, volume[\u0027name\u0027]) as vol:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAP3%2F%2Fwa8%3D","line":553,"in_reply_to":"AAAAP3%2F%2FwpQ%3D","updated":"2013-07-11 21:57:39.000000000","message":"the volume will always be safe to use when growing a volume (which is all resize can do in cinder)","commit_id":"00e2fdbb5352968b5b916df0d1945647fdee4c27"},{"author":{"_account_id":6737,"name":"Edward Hope-Morley","email":"edward.hope-morley@canonical.com","username":"hopem"},"change_message_id":"641ac69aa451a392dfd3e4cb8652d908e663fd10","unresolved":false,"context_lines":[{"line_number":552,"context_line":"        old_size \u003d volume[\u0027size\u0027]"},{"line_number":553,"context_line":""},{"line_number":554,"context_line":"        try:"},{"line_number":555,"context_line":"            size \u003d int(new_size) * 1024 ** 3"},{"line_number":556,"context_line":"            with RBDVolumeProxy(self, volume[\u0027name\u0027]) as vol:"},{"line_number":557,"context_line":"                vol.resize(size)"},{"line_number":558,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAP3%2F%2FwpE%3D","line":555,"updated":"2013-07-11 20:43:00.000000000","message":"cinder.units contains standard sizes so you don\u0027t have to do this.","commit_id":"00e2fdbb5352968b5b916df0d1945647fdee4c27"},{"author":{"_account_id":1107,"name":"Josh Durgin","email":"jdurgin@redhat.com","username":"jdurgin"},"change_message_id":"a5294f3eb31a1435a7d836965de3583b1dd6b046","unresolved":false,"context_lines":[{"line_number":554,"context_line":"        try:"},{"line_number":555,"context_line":"            size \u003d int(new_size) * 1024 ** 3"},{"line_number":556,"context_line":"            with RBDVolumeProxy(self, volume[\u0027name\u0027]) as vol:"},{"line_number":557,"context_line":"                vol.resize(size)"},{"line_number":558,"context_line":"        except Exception:"},{"line_number":559,"context_line":"            msg \u003d _(\u0027Failed to Extend Volume %(volname)s\u0027)"},{"line_number":560,"context_line":"            LOG.error(msg % dict(volname\u003dvolume[\u0027name\u0027]))"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAP3%2F%2FwcQ%3D","line":557,"updated":"2013-07-11 21:57:39.000000000","message":"you could still use _resize(), just pass in dict(name\u003dvolume[\u0027name\u0027], size\u003dsize) instead of volume","commit_id":"00e2fdbb5352968b5b916df0d1945647fdee4c27"},{"author":{"_account_id":1107,"name":"Josh Durgin","email":"jdurgin@redhat.com","username":"jdurgin"},"change_message_id":"a5294f3eb31a1435a7d836965de3583b1dd6b046","unresolved":false,"context_lines":[{"line_number":557,"context_line":"                vol.resize(size)"},{"line_number":558,"context_line":"        except Exception:"},{"line_number":559,"context_line":"            msg \u003d _(\u0027Failed to Extend Volume %(volname)s\u0027)"},{"line_number":560,"context_line":"            LOG.error(msg % dict(volname\u003dvolume[\u0027name\u0027]))"},{"line_number":561,"context_line":"            raise"},{"line_number":562,"context_line":""},{"line_number":563,"context_line":"        LOG.debug(_(\"Extend volume from %(old_size) to %(new_size)\"),"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAP3%2F%2Fwaw%3D","line":560,"updated":"2013-07-11 21:57:39.000000000","message":"log.exception will include the full details, then you can raise a cinder-specific exception","commit_id":"00e2fdbb5352968b5b916df0d1945647fdee4c27"}]}
