Red Hat Bugzilla – Bug 1204259
openstack-glance: fail to run "glance image-create" with the --copy-from argument.
Last modified: 2016-09-12 11:28:42 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>
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.
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.
Moving to instack, temporarily. Eventually this needs to move to puppet-heat, but that component doesn't exist yet.
Verified: failedQA. Environment: openstack-glance-2015.1.0-6.el7ost.noarch The same error appears on attempt to use external source for image
Closing old bugs. Feel free to reopen if resurface in current release. Sean