testCopyDestinationSlashProblems functional test fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The test.functional
So, it would seem that the test provokes a 412 HTTPException which versioned_writes is not catching and transforming to a Response. container_sync middleware would catch the exception IF in the pipeline, but otherwise it propagates back to catch_errors.
Details:
commit 0279411c5876f81
Merge: 4e717ea 035a411
Author: Jenkins <email address hidden>
Date: Mon Aug 10 17:37:49 2015 +0000
Merge "versioned writes middleware"
Proxy pipeline configured:
pipeline = catch_errors healthcheck proxy-logging cache tempauth slo dlo proxy-logging proxy-server
Proxy pipeline after dynamic modification:
proxy-server: Pipeline was modified. New pipeline is "catch_errors gatekeeper healthcheck proxy-logging cache tempauth versioned_writes slo dlo proxy-logging proxy-server".
Test failures:
```
=======
FAIL: testCopyDestina
-------
Traceback (most recent call last):
File "/home/
self.
File "/home/
(self.
AssertionError: Status returned: 500 Expected: 412
'Status returned: 500 Expected: 412' = self._formatMes
>> raise self.failureExc
=======
FAIL: testCopyDestina
-------
Traceback (most recent call last):
File "/home/
self.
File "/home/
(self.
AssertionError: Status returned: 500 Expected: 412
'Status returned: 500 Expected: 412' = self._formatMes
>> raise self.failureExc
-------
```
proxy.error traceback:
Aug 10 23:53:05 u134 catch_errors: Error: An error occurred:
Traceback (most recent call last):
File "/home/
resp = self._app_call(env)
File "/home/
resp = self.app(env, self._start_
File "/home/
return self.app(env, gatekeeper_
File "/home/
return self.app(env, start_response)
File "/home/
iterable = self.app(env, my_start_response)
File "/home/
return self.app(env, start_response)
File "/home/
return self.app(env, start_response)
File "/home/
return self.app(env, start_response)
File "/home/
return self.app(env, start_response)
File "/home/
return self.app(env, start_response)
File "/home/
return self.app(env, start_response)
File "/home/
return self.app(env, start_response)
File "/home/
allow_
File "/home/
container_name, object_name = check_destinati
File "/home/
'Destination header must be of the form '
File "/home/
body=error_msg)
HTTPException: 412 Precondition Failed (txn: tx4657dbb359dd4
CVE References
Changed in swift: | |
milestone: | none → 2.4.0 |
status: | Fix Committed → Fix Released |
Reviewed: https:/ /review. openstack. org/211626 /git.openstack. org/cgit/ openstack/ swift/commit/ ?id=7064706b272 1c36c5181267f58 704b9344ad4ac0
Committed: https:/
Submitter: Jenkins
Branch: master
commit 7064706b2721c36 c5181267f58704b 9344ad4ac0
Author: Samuel Merritt <email address hidden>
Date: Tue Aug 11 10:17:20 2015 -0500
Fix 500 in versioned writes with bad Destination
When this code lived in the proxy, it was protected by an "except on.handle_ request( ). When it .check_ name_format that raised HTTPException would cause
HTTPException" clause in proxy.Applicati
moved to middleware, it lost that, and then things like
constraints
500s. The HTTPException would make it all the way out to catch_errors
and get translated to a 500.
This commit just wraps a couple try/excepts around the bits in
versioned writes that can raise HTTPException. I tried to make it use
wsgify so I could get that for free, but that wound up being a real
pain because env/start_response are plumbed through pretty much the
whole versioned-writes middleware.
Closes-Bug: 1483705
Change-Id: Ife165bf709e64f 313ed07c779b219 14045e51f25