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
