Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1204259 - openstack-glance: fail to run "glance image-create" with the --copy-from argument.
openstack-glance: fail to run "glance image-create" with the --copy-from arg...
Status: CLOSED WONTFIX
Product: Red Hat OpenStack
Classification: Red Hat
Component: rhosp-director (Show other bugs)
Director
Unspecified Unspecified
urgent Severity medium
: ga
: 10.0 (Newton)
Assigned To: Hugh Brock
Shai Revivo
: Regression, TestOnly
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-03-20 13:38 EDT by Alexander Chuzhoy
Modified: 2016-09-12 11:28 EDT (History)
15 users (show)

See Also:
Fixed In Version:
Doc Type: Known Issue
Doc Text:
Glance is not configured with glance.store.http.Store as a known_store in /etc/glance/glance.conf. This means the glance client can not create images with the --copy-from argument. These commands fail with a "400 Bad Request" error. As a workaround, edit /etc/glance/glance-api.conf, add glance.store.http.Store to the list in the "stores" configuration option, then restart the openstack-glance-api server. This enables successful creation of glance images with the --copy-from argument.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-09-12 11:28:42 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Alexander Chuzhoy 2015-03-20 13:38:00 EDT
openstack-glance:  fail to run "glance image-create" with the --copy-from argument.


Environment:
openstack-glance-2014.2.2-1.el7ost.noarch
python-glance-store-0.1.10-2.el7ost.noarch
python-glanceclient-0.14.2-2.el7ost.noarch
python-glance-2014.2.2-1.el7ost.noarch


Steps to reproduce:
1. Deploy rhos.
2. Login to the controller and source the file with all the required variables to be able to run the api commands.
3. Run:  glance image-create --name cirros7 --disk-format qcow2 --container-format bare --is-public 1 --copy-from https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img



Result:
<html>
 <head>
  <title>400 Bad Request</title>
 </head>
 <body>
  <h1>400 Bad Request</h1>
  External source are not supported: 'https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img'<br /><br />

 </body>
</html> (HTTP 400)


Expected result:
The image should be added.

Workaround: Download the image and add it with:
glance image-create --name cirros7 --disk-format qcow2 --container-format bare --is-public 1 --file <path to the image>
Comment 4 Flavio Percoco 2015-03-21 10:53:00 EDT
There are a couple of things that could be going wrong here. It could be the encoding format - `gzip` in this case - the redirect/Location link. This is the output of a HEAD request on that URL:

phantom ~ $ http head https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img
HTTP/1.1 302 Moved Temporarily
Connection: Keep-Alive
Content-Encoding: gzip
Content-Length: 20
Content-Type: text/plain;charset=utf-8
Date: Sat, 21 Mar 2015 14:49:59 GMT
Keep-Alive: timeout=60, max=100
Location: https://launchpadlibrarian.net/83305348/cirros-0.3.0-x86_64-disk.img
Server: zope.server.http (HTTP)
Strict-Transport-Security: max-age=15552000
Vary: Cookie,Authorization,Accept-Encoding
Via: 1.0 banana.canonical.com:3128 (squid/2.7.STABLE7)
X-Cache: MISS from banana.canonical.com
X-Cache-Lookup: MISS from banana.canonical.com:3128
X-Content-Type-Options: nosniff
X-Content-Type-Warning: guessed from content
X-Frame-Options: SAMEORIGIN
X-Powered-By: Zope (www.zope.org), Python (www.python.org)
X-Xss-Protection: 1; mode=block


I'll take a deeper look.
Comment 18 Jason Guiditta 2015-03-24 09:06:03 EDT
Sasha, was this openstack environment deployed via staypuft?  If so, then I am confident it is the same configuration issue Flavio mentions and we can close one of these 2 as a duplicate.
Comment 21 Mike Burns 2015-03-24 12:22:04 EDT
Moving to instack, temporarily.  Eventually this needs to move to puppet-heat, but that component doesn't exist yet.
Comment 22 Alexander Chuzhoy 2015-06-02 14:19:00 EDT
Verified: failedQA.

Environment:
openstack-glance-2015.1.0-6.el7ost.noarch

The same error appears on attempt to use external source for image
Comment 28 Sean Cohen 2016-09-12 11:28:42 EDT
Closing old bugs.
Feel free to reopen if resurface in current release.
Sean

Note You need to log in before you can comment on or make changes to this bug.