copy_from test case logic is invalid
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Fix Released
|
High
|
Eoghan Glynn |
Bug Description
In the TestCopyToFile.
# DELETE original image
path = "http://
http = httplib2.Http()
response, content = http.request(path, 'DELETE')
# GET image again to make sure the existence of the original
# image in from_store is not depended on
path = "http://
http = httplib2.Http()
response, content = http.request(path, 'GET')
The problem is that the deletion path for the original image is not correct. It needs to be a DELETE call against the Swift or S3 remote backend image, not the local Glance server.
This causes the following failure:
FAIL: Ensure we can copy from an external image in S3.
-------
Traceback (most recent call last):
File "/home/
func(*args, **kw)
File "/home/
func(*a, **kwargs)
File "/home/
self.
File "/home/
self.
AssertionError: 404 != 200
>> raise self.failureExc
(None or '%r != %r' % (404, 200))
Changed in glance: | |
assignee: | nobody → Eoghan Glynn (eglynn) |
Changed in glance: | |
status: | Confirmed → In Progress |
tags: | added: essex-rc-potential |
Changed in glance: | |
milestone: | essex-rc1 → none |
Changed in glance: | |
milestone: | none → essex-rc2 |
tags: | removed: essex-rc-potential |
Changed in glance: | |
milestone: | essex-rc2 → 2012.1 |
The point of that delete in the test is to ensure that the copied image (in swift) is independent of the original image (in s3).
Now I think it should be OK for the deletion of the *original* image to be mediated by the glance API layer, to avoid the test being directly boto-aware.
But the fact that the subsequent GET of the copied image ID fails with a 404 indicates either:
(a) the copy isn't really independent of the existence of the original,
or:
(b) swift is intermittently broken.
Evidence pointing to option (b) includes the fact that the mysterious 404 returned by swift afflicts other tests intermittently, e.g TestS3. test_remote_ image in https:/ /jenkins. openstack. org/job/ gate-glance- python26/ 85/console
I'll continue to dig tomorrow, but I suspect an intermittent swift issue may be the nub of the problem.