[Bug 1657459] Re: WebOb>=1.2.3 requirement for Glance will lead to 0 bytes backing image files on OpenStack Newton, although the image file sent to the python client does not have 0 bytes

OpenStack Infra 1657459 at bugs.launchpad.net
Wed Mar 29 15:17:19 UTC 2017


Reviewed:  https://review.openstack.org/423366
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=7a843f7e1fb1bab504fea0b2c59bf7c22121da71
Submitter: Jenkins
Branch:    master

commit 7a843f7e1fb1bab504fea0b2c59bf7c22121da71
Author: Ian Cordasco <graffatcolmingov at gmail.com>
Date:   Fri Jan 20 16:38:10 2017 +0000

    Fix incompatibilities with WebOb 1.7
    
    WebOb 1.7 changed [0] how request bodies are determined to be
    readable. Prior to version 1.7, the following is how WebOb
    determined if a request body is readable:
      #1 Request method is one of POST, PUT or PATCH
      #2 ``content_length`` length is set
      #3 Special flag ``webob.is_body_readable`` is set
    
    The special flag ``webob.is_body_readable`` was used to signal
    WebOb to consider a request body readable despite the content length
    not being set. #1 above is how ``chunked`` Transfer Encoding was
    supported implicitly in WebOb < 1.7.
    
    Now with WebOb 1.7, a request body is considered readable only if
    ``content_length`` is set and it's non-zero [1]. So, we are only left
    with #2 and #3 now. This drops implicit support for ``chunked``
    Transfer Encoding Glance relied on. Hence, to emulate #1, Glance must
    set the the special flag upon checking the HTTP methods that may have
    bodies. This is precisely what this patch attemps to do.
    
    [0] https://github.com/Pylons/webob/pull/283
    [1] https://github.com/Pylons/webob/pull/283/files#diff-706d71e82f473a3b61d95c2c0d833b60R894
    
    Closes-bug: #1657459
    Closes-bug: #1657452
    Co-Authored-By: Hemanth Makkapati <hemanth.makkapati at rackspace.com>
    Change-Id: I19f15165a3d664d5f3a361f29ad7000ba2465a85


** Changed in: glance
       Status: Triaged => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to glance in Ubuntu.
https://bugs.launchpad.net/bugs/1657459

Title:
  WebOb>=1.2.3 requirement for Glance will  lead to 0 bytes backing
  image files on OpenStack Newton, although the image file sent to the
  python client does not have 0 bytes

Status in Glance:
  Fix Released
Status in glance package in Ubuntu:
  Triaged

Bug description:
  On CentOS 7 AIO Newton OpenStack deployed with packstack, the default
  WebOb glance requirement was >= 1.2.3 and pip installed the 1.7.0
  version.

  When I created a glance image from the cli, using the filesystem
  backend as default, with a raw file of 1GB, the glance image-create
  command showed that a image was created, but with the size of 0 bytes.

  After forcing with pip the WebOb==1.2.3 version, the issue was not
  longer there.

  I have tried with python 2.7 and 3.4 and to upload the image via
  horizon or with different python-glance client versions => when WebOb
  version was 1.7.0 the outcome was wrong, as I ended up with a 0 bytes
  image in the backing store.

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1657459/+subscriptions



More information about the Ubuntu-openstack-bugs mailing list