Uploaded image for project: 'Libcloud'
  1. Libcloud
  2. LIBCLOUD-910

Not a Gzipped file when using LIBCLOUD_DEBUG

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • Core
    • None
    • python 2.6, debian jessie

    Description

        1. Summary

      When LIBCLOUD_DEBUG is set, receive a gzip error. If the call to decompress_data is commented out, things progress fine.

      Offending line:
      File "./libcloud/utils/loggingconnection.py", line 71, in _log_response
      body = decompress_data('gzip', body)

        1. Stacktrace
          (libcloud-testing) supertom@supertom:~/virts/libcloud-testing/code/apache-libcloud-2.0.0rc2$ demos/gce_demo.py --compute
          => Compute demo/test start time: 2017-04-05 16:22:58.309187
          DEBUG:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): www.googleapis.com
          DEBUG:requests.packages.urllib3.connectionpool:https://www.googleapis.com:443 "GET /compute/v1/projects/supertom-graphite/zones HTTP/1.1" 200 None
          /usr/lib/python2.7/gzip.py:196: UnicodeWarning: Unicode unequal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
          if magic != '\037\213':
          Traceback (most recent call last):
          File "demos/gce_demo.py", line 957, in <module>
          main_compute()
          File "demos/gce_demo.py", line 342, in main_compute
          gce = get_gce_driver()
          File "demos/gce_demo.py", line 111, in get_gce_driver
          driver = get_driver(Provider.GCE)(*args, **kwargs)
          File "./libcloud/compute/drivers/gce.py", line 1803, in _init_
          self.zone_list = self.ex_list_zones()
          File "./libcloud/compute/drivers/gce.py", line 2757, in ex_list_zones
          response = self.connection.request(request, method='GET').object
          File "./libcloud/compute/drivers/gce.py", line 121, in request
          response = super(GCEConnection, self).request(*args, **kwargs)
          File "./libcloud/common/google.py", line 806, in request
          *args, **kwargs)
          File "./libcloud/common/base.py", line 664, in request
          'response': self.connection.getresponse()}
          File "./libcloud/utils/loggingconnection.py", line 141, in getresponse
          rv = self._log_response(HttpLibResponseProxy(original_response))
          File "./libcloud/utils/loggingconnection.py", line 71, in _log_response
          body = decompress_data('gzip', body)
          File "./libcloud/utils/compression.py", line 39, in decompress_data
          return gzip.GzipFile(fileobj=cls(data)).read()
          File "/usr/lib/python2.7/gzip.py", line 261, in read
          self._read(readsize)
          File "/usr/lib/python2.7/gzip.py", line 303, in _read
          self._read_gzip_header()
          File "/usr/lib/python2.7/gzip.py", line 197, in _read_gzip_header
          raise IOError, 'Not a gzipped file'
          IOError: Not a gzipped file
        1. Steps to reproduce

      export LIBCLOUD_DEBUG=/tmp/gce-libcloud.log
      (set values in demos/secrets.py)
      demos/gce_demo.py --compute

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              supertom Tom Melendez
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: