Bug 1049785

Summary: A redundant image copy is created when creating a volume from a glance image. (All-in-One)
Product: [Community] RDO Reporter: Eduardo Warszawski <ewarszaw>
Component: openstack-cinderAssignee: Eric Harney <eharney>
Status: CLOSED NOTABUG QA Contact: Dafna Ron <dron>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: eharney, fpercoco, iheim, lars, pasik, yeylon
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-25 18:51:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Eduardo Warszawski 2014-01-08 08:37:02 UTC
Description of problem:
A redundant image copy is created when creating a volume from a glance image.
Since it is a all in one setup there is no need for craeate an intermediate copy.

Version-Release number of selected component (if applicable):


How reproducible:
cinder create --image-id 3d597ebb-ce76-4323-a71d-f45a3b08ca22 7


Actual results:
The image is copied to a temporal one.
2228508 -rw-------. 1 cinder cinder 294M Jan  7 16:33 /var/lib/cinder/conversion/tmp5wf91A                                                                                                                                                   
2228506 -rw-r-----. 1 glance glance 294M Jan  7 16:17 /var/lib/glance/images/3d597ebb-ce76-4323-a71d-f45a3b08ca22                                                                                                                            

# diff -s /var/lib/cinder/conversion/tmp5wf91A /var/lib/glance/images/3d597ebb-ce76-4323-a71d-f45a3b08ca22
Files /var/lib/cinder/conversion/tmp5wf91A and /var/lib/glance/images/3d597ebb-ce76-4323-a71d-f45a3b08ca22 are identical


Expected results:
Since is the same node there is no need for the copy.

Additional info:

Comment 1 Eric Harney 2014-01-13 21:48:31 UTC
It looks like setting allowed_url_schemes=file in cinder.conf may allow this today.

Comment 3 Lars Kellogg-Stedman 2015-03-25 18:51:11 UTC
As Eric says in #1, this feature is already available.  You would need to set DEFAULT/show_image_direct_url=True in glance-api.conf and set allowed_direct_url_schemes=file in cinder.conf.