It actually is possible (and even possible to have multiple locations with the v2 API).
http://www.sebastien-han.fr/blog/2015/05/13/openstack-glance-use-multiple-location-for-an-image/ Regarding image-update with name, this is something that happens at the client side, I suspect you're not getting the exact correct image name. "Unable to upload image data to an image which is active." We do something like this... $ glance image-create --architecture x86_64 --protected True --name "Ubuntu 12.04.5 LTS" --visibility public --tags ubuntu precise latest --os-version 12.04.5 --disk-format qcow2 --os-distro ubuntu --container-format bare --property libvirt_use_agent=True <get the uuid> $ glance location-add --url http://.... <uuid> Note that I strongly suggest you do not add/remove locations once an image is used, because you might have cache issues (image would be cached on a compute host, so deploying after updating location might not result in a re-download). On Tue, Oct 20, 2015 at 2:24 AM, Martinx - ジェームズ <[email protected]> wrote: > Am I experimenting a problem that was introduced by this fix: > > https://review.openstack.org/#/c/136520/ > > ??? > > On 20 October 2015 at 04:13, Martinx - ジェームズ <[email protected]> > wrote: >> Guys, >> >> I have an Ansible automation to deploy OpenStack Kilo, it works like >> a charm, specially the following playbook: >> >> >> https://github.com/sandvine/os-ansible-deployment-lite/blob/kilo/ansible/roles/glance/tasks/default-images.yml >> >> >> In one shot, I can add remote images (Glance downloads on demand) and >> update its properties immediatly... But, new Glance lost all >> functionality that make this to work. >> >> To begin with, OS_IMAGE_API version 2, doesn't have "--location" >> anymore... Why not? It is VERY useful. Please, bring it back. Or at >> least, document how to do the same when using API 2... >> >> Also, new (API 2) "glance image-update" REQUIRES the Image ID, this >> sucks because it is much easier to use the Image Name instead... >> >> So, I updated my Ansible playbook to deploy Liberty... But Glance >> doesn't work the way it should work... >> >> For example, here...: >> >> >> >> https://github.com/sandvine/os-ansible-deployment-lite/blob/liberty/ansible/roles/glance/tasks/default-images.yml >> >> >> ...I had to disable all "glance image-update" calls, because it simple >> doesn't work anymore, even using OS_IMAGE_API=1 !!! >> >> >> Look what happens now: >> >> .... >> changed: [localhost] => (item=glance image-create --location >> http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-i386-disk.img >> --name "CirrOS 0.3.4 - Minimalist - 32-bit - Cloud Based Image" >> --is-public true --container-format bare --disk-format qcow2) >> .... >> failed: [localhost] => (item=glance image-update --property >> hw_scsi_model=virtio-scsi --property hw_disk_bus=scsi "CirrOS 0.3.4 - >> Minimalist - 32-bit - Cloud Based Image") => {"changed": true, "cmd": >> ["glance", "image-update", "--property", "hw_scsi_model=virtio-scsi", >> "--property", "hw_disk_bus=scsi", "CirrOS 0.3.4 - Minimalist - 32-bit >> - Cloud Based Image"], "delta": "0:00:00.898007", "end": "2015-10-20 >> 01:10:03.837781", "item": "glance image-update --property >> hw_scsi_model=virtio-scsi --property hw_disk_bus=scsi \"CirrOS 0.3.4 - >> Minimalist - 32-bit - Cloud Based Image\"", "rc": 1, "start": >> "2015-10-20 01:10:02.939774", "warnings": []} >> stderr: Unable to upload image data to an image which is active. >> .... >> >> It is even more weird, because those two commands, that doesn't work >> when with Ansible, works manually... For example: >> >> --- >> #! /bin/bash >> source ~/admin-openrc.sh >> glance image-create --location >> http://uec-images.ubuntu.com/releases/14.04.3/release/ubuntu-14.04-server-cloudimg-amd64-disk1.img >> --is-public true --disk-format qcow2 --container-format bare --name >> "Ubuntu 14.04.3 LTS - Trusty Tahr - 64-bit - Cloud Based Image" >> glance image-update --property hw_scsi_model=virtio-scsi --property >> hw_disk_bus=scsi "Ubuntu 14.04.3 LTS - Trusty Tahr - 64-bit - Cloud >> Based Image" >> --- >> >> Works! But only outside of Ansible... >> >> I triple checked everything (credentials that Ansible uses >> (ansible/group_vars/all), with the one that I source under Bash)... >> Maybe I am missing some typo again... =) >> >> I appreciate any help! >> >> Thanks in advance! >> >> Best, >> Thiago > > _______________________________________________ > Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack > Post to : [email protected] > Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack -- Mohammed Naser — vexxhost ----------------------------------------------------- D. 514-316-8872 D. 800-910-1726 ext. 200 E. [email protected] W. http://vexxhost.com _______________________________________________ Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack Post to : [email protected] Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
