Bug 1041767

Summary: [RFE][glance]: we should retry swift auth for each chunk upload
Product: Red Hat OpenStack Reporter: RHOS Integration <rhos-integ>
Component: RFEsAssignee: RHOS Maint <rhos-maint>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: markmc, yeylon
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://blueprints.launchpad.net/glance/+spec/retry-auth-swift-uploads
Whiteboard: upstream_milestone_none upstream_status_unknown upstream_definition_obsolete
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-19 17:28:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description RHOS Integration 2013-12-12 19:14:26 UTC
Cloned from launchpad blueprint https://blueprints.launchpad.net/glance/+spec/retry-auth-swift-uploads.

Description:

Currently, if we want to upload a large image file from glance to swift and the auth token is about to expire, it will result into 401. However, if we fetch a new token for each chunk we upload it would be a much safer choice. There can be some optimizations here like:
- we look for the expiration time within the eventlet thread and recreate a new token when the old one is about to expire
We can cache the token if needed and set the expiry time in the cache. 
 - Or, we can try to have a Retryable error raised within the exception and that way either a new thread can be spun up for uploading the remnant chunks.

Specification URL (additional information):

None