python-glanceclient httplib2 retry issue

Bug #1025265 reported by Lars Gellrich
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Won't Fix
Undecided
Unassigned

Bug Description

python-glanceclient is based on httplib2

httplib2<=0.7.4 has a hardcoded retry in class HTTP:_conn_request.
This leads to a second request if the response exceeds the timeout.
(http://code.google.com/p/httplib2/issues/detail?id=124)

This was fixed on 4/17/2012, but not yet released
http://code.google.com/p/httplib2/source/detail?r=a0d2b4b2f1357659bbdf9d257a053ca82ac49272

How does this affect python-glanceclient?
Consider the following sequence of requests:

Glance client perspective:

1. PUT
Update an image's metadata using x-glance-registry-purge-props=True

2. PUT
Write back a property with x-glance-registry-purge-props=False

Potential timeline leading to loss of metadata:

A. Step 1: First httplib2 PUT
B. Step 1: A response delay of "httplib2 timeout" seconds
C. Step 1: Second httplib2 PUT (retry due to delay)
D. Step 1: Second httplib2 PUT completes, glance client sees '200' return code
E. Step 2: Client performs second PUT (step '2' above)
F. Step 1: First httplib2 PUT eventually completes, metadata update from step '2' is lost.

We've seen this behavior when using httplib2 with our diagnostics.
It seems that it affects V1 and potentially V2, since the purging is not necessary, e.g. if someone writes to a property twice.

Could this affect the other openstack python-clients(nove, keystone, …) as well, since most of them use httplib2 ?

summary: - python-glanceclient sends two request
+ python-glanceclient httplib2 retry issue
Revision history for this message
Brian Waldon (bcwaldon) wrote :

We're actually going to get off of httplib2 so we can use socket-level caching of large image data. Does this same issue affect httplib?

Changed in python-glanceclient:
status: New → Incomplete
Revision history for this message
Lars Gellrich (lars-gellrich) wrote :

We haven't seen any retries with httplib.

Brian Waldon (bcwaldon)
Changed in python-glanceclient:
status: Incomplete → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.