Ask Your Question
0

glance: error: unrecognized arguments: --copy-from

asked 2015-07-05 06:55:35 -0600

daghemo gravatar image

Is "--copy-from" going to be deprecated in the near future? Is there an API v2 equivalent?

As you may know "--copy-from" allows you to specify an URL where the data already resides just like "--location", but the Glance server would immediately copy the data and store it in its configured image store. Right now I'm following the guide at http://docs.openstack.org/kilo/install-guide/install/yum/content/index.html (http://docs.openstack.org/kilo/instal...) to setup Kilo and I can create an image with the following command:

glance image-create --name "cirros-0.3.4-x86_64" --file /tmp/images/cirros-0.3.4-x86_64-disk.img --disk-format qcow2 --container-format bare --visibility public --progress

But I would prefer to use "copy-from" so I try to use:

glance image-create --name "cirros-0.3.4-x86_64" --copy-from http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img --disk-format qcow2 --container-format bare --visibility public --progress

But this is giving me an error:

glance: error: unrecognized arguments: --copy-from http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img

To get back "--copy-from" I had to switch to API v1 (please note the guide above ask you to use API v2) and replace "--visibility" as follows:

unset OS_IMAGE_API_VERSION
glance image-create --name "cirros-0.3.4-x86_64" --copy-from http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img --disk-format qcow2 --container-format bare --is-public true --progress

I'm running with Glance 0.17.0.

edit retag flag offensive close merge delete

Comments

Please also note http://lists.openstack.org/pipermail/openstack-dev/2015-February/055887.html (this question on the mailing list) and https://ask.openstack.org/en/question/2974/terms-of-support-for-x-glance-api-copy-from-header-in-glance-api/ (this question on Ask OpenStack).

daghemo gravatar imagedaghemo ( 2015-07-05 06:56:34 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-11-12 04:59:16 -0600

jokke gravatar image

The Images API v2 does not contain copy_from functionality due to some concerns around it's safety for public cloud deployers. Similar functionality was provided via Images API v2 tasks, but as it's not widely enabled for public this might not be the solution either.

I would suggest following the Images API v2 Image Import Refactoring work that is discussed here: https://review.openstack.org/#/c/232371/

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-07-05 06:55:35 -0600

Seen: 2,129 times

Last updated: Jul 05 '15