)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"ca85ea196c01e97cc817c5b570504b5184c58399","unresolved":false,"context_lines":[{"line_number":9,"context_line":"If a request to Swift for an image fails before the full image is"},{"line_number":10,"context_line":"downloaded, this will reconnect to Swift and download the remainder of"},{"line_number":11,"context_line":"the image without having to start from scratch."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"DocImpact"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: Ifde68415707506b56ffac1939c6750b216b87a87"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"AAAATn%2F%2FN1c%3D","line":12,"updated":"2013-11-12 18:58:41.000000000","message":"may be we should create a bp for this one. seems like an important fix :)","commit_id":"70299e2b6baba1d3e2dd7d2a123216b53d3cdd9d"}],"doc/source/configuring.rst":[{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"f3b0cc7bb57e4e517749f5e6abf5cb5c01568c55","unresolved":false,"context_lines":[{"line_number":528,"context_line":"use. This setting is only used if swift_store_auth_version is ``2``."},{"line_number":529,"context_line":""},{"line_number":530,"context_line":"* ``swift_store_ssl_compression``"},{"line_number":531,"context_line":""},{"line_number":532,"context_line":"Optional. Default: True."},{"line_number":533,"context_line":""},{"line_number":534,"context_line":"If set to False, disables SSL layer compression of https swift"}],"source_content_type":"text/x-rst","patch_set":3,"id":"AAAATn%2F%2Fq3E%3D","line":531,"updated":"2013-10-30 16:21:22.000000000","message":"Is the change to the swift_store_ssl_compression option intended?","commit_id":"39266101cac15c019782a6e9c44f4656414b7c4a"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"f3b0cc7bb57e4e517749f5e6abf5cb5c01568c55","unresolved":false,"context_lines":[{"line_number":539,"context_line":""},{"line_number":540,"context_line":"* ``swift_store_get_retries_count``"},{"line_number":541,"context_line":""},{"line_number":542,"context_line":"Can only be specified in configuration files."},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"`This option is specific to the Swift storage backend.`"},{"line_number":545,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"AAAATn%2F%2Fq28%3D","line":542,"updated":"2013-10-30 16:21:22.000000000","message":"Is this a stray comment?","commit_id":"39266101cac15c019782a6e9c44f4656414b7c4a"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"f3b0cc7bb57e4e517749f5e6abf5cb5c01568c55","unresolved":false,"context_lines":[{"line_number":545,"context_line":""},{"line_number":546,"context_line":"Optional. Default: ``0``"},{"line_number":547,"context_line":""},{"line_number":548,"context_line":"The number of times a Swift connection will be retried before the request"},{"line_number":549,"context_line":"fails."},{"line_number":550,"context_line":""},{"line_number":551,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"AAAATn%2F%2Fq2s%3D","line":548,"updated":"2013-10-30 16:21:22.000000000","message":"I think this is specific to swift downloads rather than generic swift connections?","commit_id":"39266101cac15c019782a6e9c44f4656414b7c4a"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"3b6429f104c0a9fcabb881cc64d53fd6311066cb","unresolved":false,"context_lines":[{"line_number":531,"context_line":""},{"line_number":532,"context_line":"Can only be specified in configuration files."},{"line_number":533,"context_line":""},{"line_number":534,"context_line":"`This options is specific to the Swift storage backend.`"},{"line_number":535,"context_line":""},{"line_number":536,"context_line":"Optional. Default: True."},{"line_number":537,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"AAAATn%2F%2BFwM%3D","line":534,"updated":"2013-12-02 17:32:18.000000000","message":"typo (options)","commit_id":"70e7e7c72a05feeacd254a7be469d22879dd0b88"},{"author":{"_account_id":7884,"name":"Noboru Arai","email":"arai@mxa.nes.nec.co.jp","username":"NoboruArai"},"change_message_id":"dee23461c189d0dc43cd8d14ec1d1bc276099888","unresolved":false,"context_lines":[{"line_number":595,"context_line":"proxy)."},{"line_number":596,"context_line":""},{"line_number":597,"context_line":"* ``swift_store_get_retries_count``"},{"line_number":598,"context_line":""},{"line_number":599,"context_line":"The number of times a Swift download will be retried before the request"},{"line_number":600,"context_line":"fails."},{"line_number":601,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"AAAAUH%2F%2Foec%3D","line":598,"updated":"2014-01-10 09:44:41.000000000","message":"In other source,  it is defined as \"swift_store_retry_get_count\".\n\ne.g)\n  glance/store/swift.py - line 111\n\n-------------------------------------------------------------------------------------\n cfg.IntOpt(\u0027swift_store_retry_get_count\u0027, default\u003d0,help\u003d_(\u0027The number of times a Swift download will be retried \u0027 \u0027before the request fails.\u0027))\n-------------------------------------------------------------------------------------------","commit_id":"93efbb403be6e562cfe004b66f69a78efb6ffe2b"}],"etc/glance-api.conf":[{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"f3b0cc7bb57e4e517749f5e6abf5cb5c01568c55","unresolved":false,"context_lines":[{"line_number":326,"context_line":"# compression (provided it is supported by the target swift proxy)."},{"line_number":327,"context_line":"#swift_store_ssl_compression \u003d True"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"# The number of times a Swift connection will be retried before the"},{"line_number":330,"context_line":"# request fails"},{"line_number":331,"context_line":"#swift_store_retry_get_count \u003d 0"},{"line_number":332,"context_line":""}],"source_content_type":"text/plain","patch_set":3,"id":"AAAATn%2F%2Fq2o%3D","line":329,"updated":"2013-10-30 16:21:22.000000000","message":"Again is this actually download specific?","commit_id":"39266101cac15c019782a6e9c44f4656414b7c4a"}],"glance/store/swift.py":[{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"f8ae982c1e14be4558a2dbf05fc4f1873469a06b","unresolved":false,"context_lines":[{"line_number":301,"context_line":"                self.bytes_written \u003d 0"},{"line_number":302,"context_line":"                self.retries \u003d 0"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"            def __iter__(self):"},{"line_number":305,"context_line":"                while self.retries \u003c\u003d CONF.swift_store_retry_get_count:"},{"line_number":306,"context_line":"                    try:"},{"line_number":307,"context_line":"                        for chunk in self.wrapped:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAS3%2F%2FT8Y%3D","line":304,"updated":"2013-09-30 13:44:50.000000000","message":"Hi Tom,\n\nIt might be worth seeing if we can define a new iter and put the retry logic in that and then feed that into ResponseIndexable. The code would essentially work the same way, but the flow might be a little more natural.","commit_id":"5568e07126001d12ecda515795753d8eab2d1d3f"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"9fc3a4ed5a3e87db58a0cdd0be8ae279a0eaa8f1","unresolved":false,"context_lines":[{"line_number":318,"context_line":"                            break"},{"line_number":319,"context_line":"                        else:"},{"line_number":320,"context_line":"                            self.retries +\u003d 1"},{"line_number":321,"context_line":"                            LOG.debug(_(\"Retrying Swift connection with \""},{"line_number":322,"context_line":"                                        \"range\u003d%d-%d\") %"},{"line_number":323,"context_line":"                                      (self.bytes_written, self.size))"},{"line_number":324,"context_line":"                            self.wrapped \u003d self.store.reget(self.location,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAS3%2F%2FQOg%3D","line":321,"updated":"2013-10-01 14:00:05.000000000","message":"How about printing out the retry #? eg Retry 1/4.\nAlso what do you think about bumping to info/warn from debug?","commit_id":"5568e07126001d12ecda515795753d8eab2d1d3f"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"f3b0cc7bb57e4e517749f5e6abf5cb5c01568c55","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                       \u0027performance for images which are already in a \u0027"},{"line_number":110,"context_line":"                       \u0027compressed format, eg qcow2.\u0027)),"},{"line_number":111,"context_line":"    cfg.IntOpt(\u0027swift_store_retry_get_count\u0027, default\u003d0,"},{"line_number":112,"context_line":"               help\u003d_(\u0027The number of times a Swift connection will be retried \u0027"},{"line_number":113,"context_line":"                      \u0027before the request fails.\u0027))"},{"line_number":114,"context_line":"]"},{"line_number":115,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2Fq2c%3D","line":112,"updated":"2013-10-30 16:21:22.000000000","message":"Again, is this download specific?","commit_id":"39266101cac15c019782a6e9c44f4656414b7c4a"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"38fee6c0c73b5ddbcd66312e03d8d6729e429bef","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        return self.resp_iter.getvalue()"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def __len__(self):"},{"line_number":135,"context_line":"        return self.length"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def __iter__(self):"},{"line_number":138,"context_line":"        while self.retries \u003c\u003d CONF.swift_store_retry_get_count:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2FoJg%3D","line":135,"updated":"2013-10-31 08:21:17.000000000","message":"seems an undefined variable in the context.\n\nI\u0027m also thinking, how it going if backend can\u0027t provided a correct responsed data length? (how about the zero value of self.len?)","commit_id":"39266101cac15c019782a6e9c44f4656414b7c4a"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"38fee6c0c73b5ddbcd66312e03d8d6729e429bef","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                for chunk in self.resp_iter:"},{"line_number":141,"context_line":"                    yield chunk"},{"line_number":142,"context_line":"                    self.bytes_written +\u003d len(chunk)"},{"line_number":143,"context_line":"            except Exception as e:"},{"line_number":144,"context_line":"                LOG.debug(_(\"Swift exception raise %s\") % e)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"            if self.bytes_written !\u003d self.len:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2FoIg%3D","line":143,"updated":"2013-10-31 08:21:17.000000000","message":"do you think it will be better if we catch a clear exception here but this common one? I\u0027m not pretty sure TBH, but I think it make more sense to me if we only do re-get for the exception which we can do re-get and do it when driver receive other exception is useless.","commit_id":"39266101cac15c019782a6e9c44f4656414b7c4a"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"38fee6c0c73b5ddbcd66312e03d8d6729e429bef","unresolved":false,"context_lines":[{"line_number":146,"context_line":"            if self.bytes_written !\u003d self.len:"},{"line_number":147,"context_line":"                if self.retries \u003d\u003d CONF.swift_store_retry_get_count:"},{"line_number":148,"context_line":"                    # terminate silently and let higher level decide"},{"line_number":149,"context_line":"                    LOG.debug(_(\"Swift stopping retries after %d \""},{"line_number":150,"context_line":"                                \"attempts\") % self.retries)"},{"line_number":151,"context_line":"                    break"},{"line_number":152,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2FoG4%3D","line":149,"updated":"2013-10-31 08:21:17.000000000","message":"I prefer info level bug since it\u0027s value thing for admin/operator debug this issue from log.","commit_id":"39266101cac15c019782a6e9c44f4656414b7c4a"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"38fee6c0c73b5ddbcd66312e03d8d6729e429bef","unresolved":false,"context_lines":[{"line_number":156,"context_line":"                              (self.retries, CONF.swift_store_retry_get_count,"},{"line_number":157,"context_line":"                               self.bytes_written, self.len))"},{"line_number":158,"context_line":"                    self.resp_iter \u003d self.store.reget(self.location,"},{"line_number":159,"context_line":"                                                      self.bytes_written,"},{"line_number":160,"context_line":"                                                      self.len)"},{"line_number":161,"context_line":"            else:"},{"line_number":162,"context_line":"                break"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2FoGo%3D","line":159,"updated":"2013-10-31 08:21:17.000000000","message":"Question: is start position should be self.bytes_written + 1? thanks.","commit_id":"39266101cac15c019782a6e9c44f4656414b7c4a"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"ca85ea196c01e97cc817c5b570504b5184c58399","unresolved":false,"context_lines":[{"line_number":134,"context_line":"    def __len__(self):"},{"line_number":135,"context_line":"        return self.len"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def __iter__(self):"},{"line_number":138,"context_line":"        while self.retries \u003c\u003d CONF.swift_store_retry_get_count:"},{"line_number":139,"context_line":"            try:"},{"line_number":140,"context_line":"                for chunk in self.resp_iter:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2FN0c%3D","line":137,"updated":"2013-11-12 18:58:41.000000000","message":"Can we please have a docstring for this method explaining the logic, the number of retries, how those are being used? It\u0027s just so much easier to debug this kind of stuff..","commit_id":"70299e2b6baba1d3e2dd7d2a123216b53d3cdd9d"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"3b6429f104c0a9fcabb881cc64d53fd6311066cb","unresolved":false,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"def swift_iter(resp_iter, length, store, location):"},{"line_number":121,"context_line":"    length \u003d length if length else (resp_iter.len"},{"line_number":122,"context_line":"                                    if hasattr(resp_iter, \u0027len\u0027) else 0)"},{"line_number":123,"context_line":"    retries \u003d 0"},{"line_number":124,"context_line":"    bytes_written \u003d 0"},{"line_number":125,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2BFvI%3D","line":122,"updated":"2013-12-02 17:32:18.000000000","message":"Do we need this line? Length will be set to something at this point (even it its only \u00270\u0027).","commit_id":"70e7e7c72a05feeacd254a7be469d22879dd0b88"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"3b6429f104c0a9fcabb881cc64d53fd6311066cb","unresolved":false,"context_lines":[{"line_number":310,"context_line":"        self.snet \u003d CONF.swift_enable_snet"},{"line_number":311,"context_line":"        self.insecure \u003d CONF.swift_store_auth_insecure"},{"line_number":312,"context_line":"        self.ssl_compression \u003d CONF.swift_store_ssl_compression"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"    def get(self, location, connection\u003dNone):"},{"line_number":315,"context_line":"        location \u003d location.store_location"},{"line_number":316,"context_line":"        if not connection:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2BFnY%3D","line":313,"updated":"2013-12-02 17:32:18.000000000","message":"there\u0027s some duplication here between get and reget. Potentially we could have\na get_object function which would have \u0027start and \u0027stop\u0027 parameters. \u0027get\u0027 could be a thin wrapper around this (just wrap the response in the ResponseIndexable) and the retry code could call it directly.","commit_id":"70e7e7c72a05feeacd254a7be469d22879dd0b88"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"737838847434078ab4e6a4449f402c2d2ef038d7","unresolved":false,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"def swift_retry_iter(resp_iter, length, store, location):"},{"line_number":121,"context_line":"    length \u003d length if length else (resp_iter.len"},{"line_number":122,"context_line":"                                    if hasattr(resp_iter, \u0027len\u0027) else 0)"},{"line_number":123,"context_line":"    retries \u003d 0"},{"line_number":124,"context_line":"    bytes_written \u003d 0"},{"line_number":125,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F9oNE%3D","line":122,"updated":"2013-12-09 14:58:37.000000000","message":"Do we need this line? Length will be set to something at this point (even it its only \u00270\u0027).","commit_id":"a36157df2d83b486ee2358641f95e0ea83cfc229"},{"author":{"_account_id":7817,"name":"Thomas Leaman","email":"thomas.leaman@hp.com","username":"bugsduggan"},"change_message_id":"d3828fa88e17300bb427e39e8da6c0c3bcda15ff","unresolved":false,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"def swift_retry_iter(resp_iter, length, store, location):"},{"line_number":121,"context_line":"    length \u003d length if length else (resp_iter.len"},{"line_number":122,"context_line":"                                    if hasattr(resp_iter, \u0027len\u0027) else 0)"},{"line_number":123,"context_line":"    retries \u003d 0"},{"line_number":124,"context_line":"    bytes_written \u003d 0"},{"line_number":125,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F9n%2BQ%3D","line":122,"in_reply_to":"AAAATn%2F9oNE%3D","updated":"2013-12-09 15:27:52.000000000","message":"Yes, we need this.","commit_id":"a36157df2d83b486ee2358641f95e0ea83cfc229"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"737838847434078ab4e6a4449f402c2d2ef038d7","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    length \u003d length if length else (resp_iter.len"},{"line_number":122,"context_line":"                                    if hasattr(resp_iter, \u0027len\u0027) else 0)"},{"line_number":123,"context_line":"    retries \u003d 0"},{"line_number":124,"context_line":"    bytes_written \u003d 0"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    while retries \u003c\u003d CONF.swift_store_retry_get_count:"},{"line_number":127,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F9oME%3D","line":124,"updated":"2013-12-09 14:58:37.000000000","message":"would bytes_read (from swift) be more intuitive?","commit_id":"a36157df2d83b486ee2358641f95e0ea83cfc229"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"737838847434078ab4e6a4449f402c2d2ef038d7","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                yield chunk"},{"line_number":130,"context_line":"                bytes_written +\u003d len(chunk)"},{"line_number":131,"context_line":"        except swiftclient.ClientException as e:"},{"line_number":132,"context_line":"            LOG.debug(_(\"Swift exception raised %s\") % e)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        if bytes_written !\u003d length:"},{"line_number":135,"context_line":"            if retries \u003d\u003d CONF.swift_store_retry_get_count:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F9oOY%3D","line":132,"updated":"2013-12-09 14:58:37.000000000","message":"debug -\u003e warn?","commit_id":"a36157df2d83b486ee2358641f95e0ea83cfc229"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"737838847434078ab4e6a4449f402c2d2ef038d7","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        if bytes_written !\u003d length:"},{"line_number":135,"context_line":"            if retries \u003d\u003d CONF.swift_store_retry_get_count:"},{"line_number":136,"context_line":"                # terminate silently and let higher level decide"},{"line_number":137,"context_line":"                LOG.info(_(\"Swift stopping retries after %d \""},{"line_number":138,"context_line":"                           \"attempts\") % retries)"},{"line_number":139,"context_line":"                break"},{"line_number":140,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F9oOM%3D","line":137,"updated":"2013-12-09 14:58:37.000000000","message":"info -\u003e error? (Perhaps \u0027Stopping Swift retries\u0027 rather than \"Swift stopping retries\"?)","commit_id":"a36157df2d83b486ee2358641f95e0ea83cfc229"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"0af6de904ade2ba786cb3161194b1849f67a2a5d","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"def swift_retry_iter(resp_iter, length, store, location):"},{"line_number":121,"context_line":"    length \u003d length if length else (resp_iter.len"},{"line_number":122,"context_line":"                                    if hasattr(resp_iter, \u0027len\u0027) else 0)"},{"line_number":123,"context_line":"    retries \u003d 0"},{"line_number":124,"context_line":"    bytes_read \u003d 0"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F9kq8%3D","line":121,"updated":"2013-12-10 03:40:04.000000000","message":"I\u0027m not sure so could you pls tell me will it be ok if var \"length\" value equal zero, does swift support request header like this \u0027\u0027Range: bytes\u003dX-Y\" and X\u003eY? what\u0027s it mean? thanks.","commit_id":"93efbb403be6e562cfe004b66f69a78efb6ffe2b"},{"author":{"_account_id":7817,"name":"Thomas Leaman","email":"thomas.leaman@hp.com","username":"bugsduggan"},"change_message_id":"81706c3f858668f205246619bfa38198a9524b95","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"def swift_retry_iter(resp_iter, length, store, location):"},{"line_number":121,"context_line":"    length \u003d length if length else (resp_iter.len"},{"line_number":122,"context_line":"                                    if hasattr(resp_iter, \u0027len\u0027) else 0)"},{"line_number":123,"context_line":"    retries \u003d 0"},{"line_number":124,"context_line":"    bytes_read \u003d 0"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F9inU%3D","line":121,"in_reply_to":"AAAATn%2F9kq8%3D","updated":"2013-12-10 12:56:21.000000000","message":"I\u0027m not 100% certain of the cases where it is possible to have length \u003d 0 here. Obviously anything covered by the test cases works. Maybe someone can enumerate any cases that are not currently tested for (assuming they exist).\n\nSwift does support the Range header and any \"Range: bytes\u003dX-Y\" where X\u003eY will result in 0 bytes being returned.","commit_id":"93efbb403be6e562cfe004b66f69a78efb6ffe2b"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"8a0c2a3b1df28a4a8f08893b1193339960d40844","unresolved":false,"context_lines":[{"line_number":311,"context_line":"        self.insecure \u003d CONF.swift_store_auth_insecure"},{"line_number":312,"context_line":"        self.ssl_compression \u003d CONF.swift_store_ssl_compression"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"    def _get_object(self, location, connection\u003dNone, start\u003dNone, stop\u003dNone):"},{"line_number":315,"context_line":"        if not connection:"},{"line_number":316,"context_line":"            connection \u003d self.get_connection(location)"},{"line_number":317,"context_line":"        headers \u003d {}"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F%2Fcvg%3D","line":314,"updated":"2014-01-13 19:13:46.000000000","message":"From my reading of http://tools.ietf.org/search/rfc2616#section-14.35 we can get away with omitting the last_byte_pos (\u0027stop\u0027). I think that would make the logic that calls this function a lot easier.","commit_id":"6d4dac770d5f8558f977cc98fbf1c12618acdf42"},{"author":{"_account_id":7884,"name":"Noboru Arai","email":"arai@mxa.nes.nec.co.jp","username":"NoboruArai"},"change_message_id":"f7efe12e01fc837eb1d625c6d575b5587e77ebf2","unresolved":false,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"def swift_retry_iter(resp_iter, length, store, location):"},{"line_number":121,"context_line":"    length \u003d length if length else (resp_iter.len"},{"line_number":122,"context_line":"                                    if hasattr(resp_iter, \u0027len\u0027) else 0)"},{"line_number":123,"context_line":"    retries \u003d 0"},{"line_number":124,"context_line":"    bytes_read \u003d 0"},{"line_number":125,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F%2FPJg%3D","line":122,"updated":"2014-01-16 03:15:51.000000000","message":"If hasattr(resp_iter, \u0027len\u0027) is True, is \"resp_iter.len\" always valuable of number?\n\nIf resp_iter.len is object (e.g function), length is set something which is not number.\n\nI seem that TypeError raises because of using \"%d\"  in line 142.\n\nIf I\u0027m wrong or this error is no problem,   let me know.\n\ne.g)\n\n\u003e\u003e\u003e length\u003d0\n\n\u003e\u003e\u003e length \u003d length if length else ([].append if hasattr([], \u0027append\u0027) else 0)\n\n\u003e\u003e\u003e length\n\n\u003cbuilt-in method append of list object at 0x021868F0\u003e\n\n\u003e\u003e\u003e \"%d\" % length\n\nTraceback (most recent call last):\n  File \"\u003cpyshell#37\u003e\", line 1, in \u003cmodule\u003e\n    \"%d\" % length\nTypeError: %d format: a number is required, not builtin_function_or_method","commit_id":"de9e7576699caf6ef479936e290becf955500b24"},{"author":{"_account_id":7884,"name":"Noboru Arai","email":"arai@mxa.nes.nec.co.jp","username":"NoboruArai"},"change_message_id":"9e5be43b04f6c4e525590733dae16ff444e999ec","unresolved":false,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"def swift_retry_iter(resp_iter, length, store, location):"},{"line_number":121,"context_line":"    length \u003d length if length else (resp_iter.len"},{"line_number":122,"context_line":"                                    if hasattr(resp_iter, \u0027len\u0027) else 0)"},{"line_number":123,"context_line":"    retries \u003d 0"},{"line_number":124,"context_line":"    bytes_read \u003d 0"},{"line_number":125,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F%2B45k%3D","line":122,"in_reply_to":"AAAAUH%2F%2FGzk%3D","updated":"2014-01-21 02:36:06.000000000","message":"Thank you for your comment.\n\nNow, I can\u0027t find concrete example. I\u0027m sorry.\n\nIf I find,  I will say.","commit_id":"de9e7576699caf6ef479936e290becf955500b24"},{"author":{"_account_id":7817,"name":"Thomas Leaman","email":"thomas.leaman@hp.com","username":"bugsduggan"},"change_message_id":"a68574f5f1e5b05b78d102fe7c8e818c053a46ba","unresolved":false,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"def swift_retry_iter(resp_iter, length, store, location):"},{"line_number":121,"context_line":"    length \u003d length if length else (resp_iter.len"},{"line_number":122,"context_line":"                                    if hasattr(resp_iter, \u0027len\u0027) else 0)"},{"line_number":123,"context_line":"    retries \u003d 0"},{"line_number":124,"context_line":"    bytes_read \u003d 0"},{"line_number":125,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F%2FGzk%3D","line":122,"in_reply_to":"AAAAUH%2F%2FPJg%3D","updated":"2014-01-17 11:39:32.000000000","message":"That\u0027s certainly a valid concern! Can you tell me what you ran to generate this error please and I\u0027ll look into it.","commit_id":"de9e7576699caf6ef479936e290becf955500b24"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"c9cfce9beddea9fd172ae630740e9cd6f4a1dd09","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                retries +\u003d 1"},{"line_number":142,"context_line":"                LOG.info(_(\"Retrying Swift connection (%d/%d) with \""},{"line_number":143,"context_line":"                           \"range\u003d%d-%d\") %"},{"line_number":144,"context_line":"                          (retries, CONF.swift_store_retry_get_count,"},{"line_number":145,"context_line":"                           bytes_read, length))"},{"line_number":146,"context_line":"                (resp_headers, resp_iter) \u003d store._get_object(location, None,"},{"line_number":147,"context_line":"                                                              bytes_read)"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F%2FTOg%3D","line":144,"updated":"2014-01-15 10:11:55.000000000","message":"Nit: it will be better if we using a dict with a named parameter formation.","commit_id":"de9e7576699caf6ef479936e290becf955500b24"},{"author":{"_account_id":7817,"name":"Thomas Leaman","email":"thomas.leaman@hp.com","username":"bugsduggan"},"change_message_id":"a68574f5f1e5b05b78d102fe7c8e818c053a46ba","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                retries +\u003d 1"},{"line_number":142,"context_line":"                LOG.info(_(\"Retrying Swift connection (%d/%d) with \""},{"line_number":143,"context_line":"                           \"range\u003d%d-%d\") %"},{"line_number":144,"context_line":"                          (retries, CONF.swift_store_retry_get_count,"},{"line_number":145,"context_line":"                           bytes_read, length))"},{"line_number":146,"context_line":"                (resp_headers, resp_iter) \u003d store._get_object(location, None,"},{"line_number":147,"context_line":"                                                              bytes_read)"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F%2FGzY%3D","line":144,"in_reply_to":"AAAAUH%2F%2FTOg%3D","updated":"2014-01-17 11:39:32.000000000","message":"I\u0027ll update this with the next patch. Thanks.","commit_id":"de9e7576699caf6ef479936e290becf955500b24"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"78223ed0030c680230f5c273e110b6fc84c47e2a","unresolved":false,"context_lines":[{"line_number":137,"context_line":"                break"},{"line_number":138,"context_line":"            else:"},{"line_number":139,"context_line":"                retries +\u003d 1"},{"line_number":140,"context_line":"                LOG.info(_(\"Retrying Swift connection (%d/%d) with \""},{"line_number":141,"context_line":"                           \"range\u003d%d-%d\") %"},{"line_number":142,"context_line":"                          (retries, CONF[\u0027swift_store_retry_get_count\u0027],"},{"line_number":143,"context_line":"                           bytes_read, length))"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F%2Bx3o%3D","line":140,"updated":"2014-01-22 08:41:46.000000000","message":"I have a same expectation at here which I mentioned in https://review.openstack.org/#/c/48913/13/glance/store/swift.py (and seems you agree to fix this)","commit_id":"941fa8ad14d4646ff03f92199001f76a7bba3d5e"},{"author":{"_account_id":7817,"name":"Thomas Leaman","email":"thomas.leaman@hp.com","username":"bugsduggan"},"change_message_id":"b62eae330f0a8c559d1d02439b47d0bdfbd1ff60","unresolved":false,"context_lines":[{"line_number":137,"context_line":"                break"},{"line_number":138,"context_line":"            else:"},{"line_number":139,"context_line":"                retries +\u003d 1"},{"line_number":140,"context_line":"                LOG.info(_(\"Retrying Swift connection (%d/%d) with \""},{"line_number":141,"context_line":"                           \"range\u003d%d-%d\") %"},{"line_number":142,"context_line":"                          (retries, CONF[\u0027swift_store_retry_get_count\u0027],"},{"line_number":143,"context_line":"                           bytes_read, length))"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F%2BxSk%3D","line":140,"in_reply_to":"AAAAUH%2F%2Bx3o%3D","updated":"2014-01-22 10:12:47.000000000","message":"Sorry, I misunderstood what you meant; I\u0027ll update this today.","commit_id":"941fa8ad14d4646ff03f92199001f76a7bba3d5e"}],"glance/tests/functional/store/test_swift.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"f22108170c9fee9134d13c804996a92b694118e3","unresolved":false,"context_lines":[{"line_number":303,"context_line":"        store \u003d self.get_store()"},{"line_number":304,"context_line":"        image_id \u003d uuidutils.generate_uuid()"},{"line_number":305,"context_line":"        image_size \u003d 1024 * 1024 * 5  # 5 MB"},{"line_number":306,"context_line":"        image_data \u003d StringIO.StringIO(\u0027X\u0027 * image_size)"},{"line_number":307,"context_line":"        image_checksum \u003d \u0027eb7f8c3716b9f059cee7617a4ba9d0d3\u0027"},{"line_number":308,"context_line":"        uri, add_size, add_checksum, _ \u003d store.add(image_id,"},{"line_number":309,"context_line":"                                                   image_data,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2FQPo%3D","line":306,"updated":"2013-11-12 08:03:07.000000000","message":"We\u0027d better verify image context is correct also when driver do retry-download handling internally. IMO, make buffer contain more complex content but all \u0027X\u0027 char, and using checksum verify it after download.","commit_id":"39266101cac15c019782a6e9c44f4656414b7c4a"},{"author":{"_account_id":8759,"name":"Arnaud Legendre","email":"arnaudleg@gmail.com","username":"arnaud"},"change_message_id":"01f69be8cd005821b6dd6f37434809ee70cfc36b","unresolved":false,"context_lines":[{"line_number":304,"context_line":"            swift_store_retry_get_count\u003d1,"},{"line_number":305,"context_line":"        )"},{"line_number":306,"context_line":"        store \u003d self.get_store()"},{"line_number":307,"context_line":"        image_id \u003d uuidutils.generate_uuid()"},{"line_number":308,"context_line":"        image_size \u003d 1024 * 1024 * 5  # 5 MB"},{"line_number":309,"context_line":"        chars \u003d string.ascii_uppercase + string.digits"},{"line_number":310,"context_line":"        image_data \u003d \u0027\u0027.join(random.choice(chars) for x in range(image_size))"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2Flio%3D","line":307,"updated":"2014-01-10 18:56:34.000000000","message":"please use str(uuid.uuid4()) instead of uuidutils.generate_uuid()","commit_id":"3668b89b466ac64a66217b5626355d86c2538bf1"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"09f17b671868ecda45b5db6c750166d14132e48e","unresolved":false,"context_lines":[{"line_number":304,"context_line":"            swift_store_retry_get_count\u003d1,"},{"line_number":305,"context_line":"        )"},{"line_number":306,"context_line":"        store \u003d self.get_store()"},{"line_number":307,"context_line":"        image_id \u003d uuidutils.generate_uuid()"},{"line_number":308,"context_line":"        image_size \u003d 1024 * 1024 * 5  # 5 MB"},{"line_number":309,"context_line":"        chars \u003d string.ascii_uppercase + string.digits"},{"line_number":310,"context_line":"        image_data \u003d \u0027\u0027.join(random.choice(chars) for x in range(image_size))"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2Fj6s%3D","line":307,"in_reply_to":"AAAAUH%2F%2Flio%3D","updated":"2014-01-11 05:00:44.000000000","message":"+1","commit_id":"3668b89b466ac64a66217b5626355d86c2538bf1"},{"author":{"_account_id":8759,"name":"Arnaud Legendre","email":"arnaudleg@gmail.com","username":"arnaud"},"change_message_id":"01f69be8cd005821b6dd6f37434809ee70cfc36b","unresolved":false,"context_lines":[{"line_number":342,"context_line":"            swift_store_retry_get_count\u003d1,"},{"line_number":343,"context_line":"        )"},{"line_number":344,"context_line":"        store \u003d self.get_store()"},{"line_number":345,"context_line":"        image_id \u003d uuidutils.generate_uuid()"},{"line_number":346,"context_line":"        image_size \u003d 1024 * 1024 * 5  # 5 MB"},{"line_number":347,"context_line":"        chars \u003d string.ascii_uppercase + string.digits"},{"line_number":348,"context_line":"        image_data \u003d \u0027\u0027.join(random.choice(chars) for x in range(image_size))"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2FliM%3D","line":345,"updated":"2014-01-10 18:56:34.000000000","message":"ditto","commit_id":"3668b89b466ac64a66217b5626355d86c2538bf1"},{"author":{"_account_id":8759,"name":"Arnaud Legendre","email":"arnaudleg@gmail.com","username":"arnaud"},"change_message_id":"01f69be8cd005821b6dd6f37434809ee70cfc36b","unresolved":false,"context_lines":[{"line_number":384,"context_line":"            swift_store_retry_get_count\u003d1,"},{"line_number":385,"context_line":"        )"},{"line_number":386,"context_line":"        store \u003d self.get_store()"},{"line_number":387,"context_line":"        image_id \u003d uuidutils.generate_uuid()"},{"line_number":388,"context_line":"        image_size \u003d 1024 * 1024 * 5  # 5 MB"},{"line_number":389,"context_line":"        chars \u003d string.ascii_uppercase + string.digits"},{"line_number":390,"context_line":"        image_data \u003d \u0027\u0027.join(random.choice(chars) for x in range(image_size))"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2FliI%3D","line":387,"updated":"2014-01-10 18:56:34.000000000","message":"ditto","commit_id":"3668b89b466ac64a66217b5626355d86c2538bf1"}]}
