← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1400770] Re: fail to upload object if swift proxy-server is deployed in apache 2.4

 

** Also affects: python-swiftclient
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1400770

Title:
  fail to upload object if swift proxy-server is deployed in apache 2.4

Status in OpenStack Dashboard (Horizon):
  In Progress
Status in Python client library for Swift:
  New

Bug description:
  fail to upload object if swift proxy-server is deployed in apache 2.4:

  Environment:

  Ubuntu 14.04.1 LTS

  horizon (github master branch source code install)
  python-swiftclient (github master branch source code install)
  swift (github master branch source code install)

  Apache/2.4.7 log:
  [Sun Dec 07 00:26:55.329422 2014] [:error] [pid 18608:tid 140692826650368] WARNING:urllib3.connectionpool:HttpConnectionPool is full, discarding connection: 192.168.1.151
  [Sun Dec 07 00:26:55.329525 2014] [:error] [pid 18608:tid 140692826650368] REQ: curl -i http://192.168.1.151:8080/v1/AUTH_faf24933fa804ece91c2da2afdfa4127/testestset/setup.py -X PUT -H "X-Auth-Token: 312a22b6c61b43e08455303003fc72a0"
  [Sun Dec 07 00:26:55.329935 2014] [:error] [pid 18608:tid 140692826650368] RESP STATUS: 411 Length Required
  [Sun Dec 07 00:26:55.330003 2014] [:error] [pid 18608:tid 140692826650368] RESP HEADERS: [('date', 'Sat, 06 Dec 2014 16:26:55 GMT'), ('content-length', '318'), ('content-type', 'text/html; charset=iso-8859-1'), ('connection', 'close'), ('server', 'Apache/2.4.7 (Ubuntu)')]
  [Sun Dec 07 00:26:55.330050 2014] [:error] [pid 18608:tid 140692826650368] RESP BODY: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
  [Sun Dec 07 00:26:55.330058 2014] [:error] [pid 18608:tid 140692826650368] <html><head>
  [Sun Dec 07 00:26:55.330063 2014] [:error] [pid 18608:tid 140692826650368] <title>411 Length Required</title>
  [Sun Dec 07 00:26:55.330068 2014] [:error] [pid 18608:tid 140692826650368] </head><body>
  [Sun Dec 07 00:26:55.330073 2014] [:error] [pid 18608:tid 140692826650368] <h1>Length Required</h1>
  [Sun Dec 07 00:26:55.330078 2014] [:error] [pid 18608:tid 140692826650368] <p>A request of the requested method PUT requires a valid Content-length.<br />
  [Sun Dec 07 00:26:55.330083 2014] [:error] [pid 18608:tid 140692826650368] </p>
  [Sun Dec 07 00:26:55.330088 2014] [:error] [pid 18608:tid 140692826650368] <hr>
  [Sun Dec 07 00:26:55.330093 2014] [:error] [pid 18608:tid 140692826650368] <address>Apache/2.4.7 (Ubuntu) Server at 192.168.1.151 Port 8080</address>
  [Sun Dec 07 00:26:55.330098 2014] [:error] [pid 18608:tid 140692826650368] </body></html>
  [Sun Dec 07 00:26:55.330103 2014] [:error] [pid 18608:tid 140692826650368]
  [Sun Dec 07 00:26:55.330295 2014] [:error] [pid 18608:tid 140692826650368] Object PUT failed: http://192.168.1.151:8080/v1/AUTH_faf24933fa804ece91c2da2afdfa4127/testestset/setup.py 411 Length Required  [first 60 chars of response] <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
  [Sun Dec 07 00:26:55.330306 2014] [:error] [pid 18608:tid 140692826650368] <html><he
  [Sun Dec 07 00:26:55.330312 2014] [:error] [pid 18608:tid 140692826650368] Traceback (most recent call last):
  [Sun Dec 07 00:26:55.330317 2014] [:error] [pid 18608:tid 140692826650368]   File "/home/yulong/openstack/python-swiftclient/swiftclient/client.py", line 1241, in _retry
  [Sun Dec 07 00:26:55.330322 2014] [:error] [pid 18608:tid 140692826650368]     rv = func(self.url, self.token, *args, **kwargs)
  [Sun Dec 07 00:26:55.330327 2014] [:error] [pid 18608:tid 140692826650368]   File "/home/yulong/openstack/python-swiftclient/swiftclient/client.py", line 1014, in put_object
  [Sun Dec 07 00:26:55.330332 2014] [:error] [pid 18608:tid 140692826650368]     http_response_content=body)
  [Sun Dec 07 00:26:55.330338 2014] [:error] [pid 18608:tid 140692826650368] ClientException: Object PUT failed: http://192.168.1.151:8080/v1/AUTH_faf24933fa804ece91c2da2afdfa4127/testestset/setup.py 411 Length Required  [first 60 chars of response] <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
  [Sun Dec 07 00:26:55.330343 2014] [:error] [pid 18608:tid 140692826650368] <html><he
  [Sun Dec 07 00:26:55.330503 2014] [:error] [pid 18608:tid 140692826650368] Recoverable error: Object PUT failed: http://192.168.1.151:8080/v1/AUTH_faf24933fa804ece91c2da2afdfa4127/testestset/setup.py 411 Length Required  [first 60 chars of response] <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
  [Sun Dec 07 00:26:55.330525 2014] [:error] [pid 18608:tid 140692826650368] <html><he

  cli test log:

  curl -i
  http://192.168.1.151:8080/v1/AUTH_faf24933fa804ece91c2da2afdfa4127/testestset/setup.py
  -X PUT -H "X-Auth-Token: 312a22b6c61b43e08455303003fc72a0"

  HTTP/1.1 411 Length Required
  Date: Sat, 06 Dec 2014 16:41:14 GMT
  Server: Apache/2.4.7 (Ubuntu)
  X-Trans-Id: tx0bff2b699baa499baddbd-00548331aa
  Content-Length: 30
  Connection: close
  Content-Type: text/plain

  Missing Content-Length header.

  Horizon Code:
  openstack_dashboard/dashboards/swift.py:
  def swift_upload_object(request, container_name, object_name,
                          object_file=None):
      headers = {}
      size = 0
      if object_file:
          headers['X-Object-Meta-Orig-Filename'] = object_file.name
          size = object_file.size

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


References