Need clarification on Bootable volume functionality

Asked by Harika Vakadi

While I am trying to create a volume with --image-id option. The flag "bootable: false" should be changed to boolean true. But this is not happening in the xml interface response body.

XML Interface

I am creating a volume with image_ref

curl -i http://10.4.106.40:8776/v1/7d5a4646738a485287615a36222f6241/volumes -X POST -H "X-Auth-Project-Id: demo" -H "User-Agent: python-cinderclient" -H "Content-Type: application/xml" -H "Accept: application/xml" -H "X-Auth-Token: <Omitted>" -d '<volume bootable="false" xmlns="http://docs.openstack.org/compute/api/v1.1" display_name="Volume341822119" imageRef="eb7661b8-be43-4617-a8a2-9bca0d1f1137" size="1"><metadata ><meta key="Type">Test</meta></metadata></volume>'
HTTP/1.1 200 OK
X-Compute-Request-Id: req-b3cd252c-efd9-4d20-b2ad-3a6fa414f87e
Content-Type: application/xml
Content-Length: 458
Date: Tue, 30 Jul 2013 12:30:13 GMT

<?xml version='1.0' encoding='UTF-8'?>
<volume xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/volume/api/v1" status="creating" display_name="Volume341822119" availability_zone="nova" created_at="2013-07-30 12:30:13.337045" display_description="None" volume_type="None" snapshot_id="None" source_volid="None" id="3641b40e-973c-44ff-b182-c93c52e2430e" size="1"><attachments/><metadata><meta key="Type">Test</meta></metadata></volume>

I am doing a GET Operation on the above created volume (XML Interface)

curl -i http://10.4.106.40:8776/v1/7d5a4646738a485287615a36222f6241/volumes/3641b40e-973c-44ff-b182-c93c52e2430e -X GET -H "X-Auth-Project-Id: demo" -H "User-Agent: python-cinderclient" -H "Accept: application/xml" -H "X-Auth-Token: <Omitted>"

HTTP/1.1 200 OK
X-Compute-Request-Id: req-2748a808-58d4-484b-85a9-f37f2c1f8f04
Content-Type: application/xml
Content-Length: 1061
Date: Tue, 30 Jul 2013 13:04:23 GMT

<?xml version='1.0' encoding='UTF-8'?>
<volume xmlns:os-vol-image-meta="http://docs.openstack.org/volume/ext/volume_image_metadata/api/v1" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/volume/api/v1" status="available" display_name="Volume341822119" availability_zone="nova" created_at="2013-07-30 12:30:13" display_description="None" volume_type="None" snapshot_id="None" source_volid="None" id="3641b40e-973c-44ff-b182-c93c52e2430e" size="1"><attachments/><metadata><meta key="Type">Test</meta></metadata><volume_image_metadata><meta key="kernel_id">e20cd257-63ae-475d-848b-dc9120a508df</meta><meta key="container_format">ami</meta><meta key="min_ram">0</meta><meta key="ramdisk_id">b1425ee8-092f-43d5-b616-ebe3f497f758</meta><meta key="disk_format">ami</meta><meta key="image_name">cirros-0.3.1-x86_64-uec</meta><meta key="image_id">eb7661b8-be43-4617-a8a2-9bca0d1f1137</meta><meta key="checksum">f8a2eeee2dc65b3d9b6e63678955bd83</meta><meta key="min_disk">0</meta><meta key="size">25165824</meta></volume_image_metadata></volume>

We can observe that "bootable" flag is not available in the response body on GET of XML

Where as in the case of JSON GET Operation this is happening

Below I have done a GET operation on Same Volume ID

curl -i http://10.4.106.40:8776/v1/7d5a4646738a485287615a36222f6241/volumes/3641b40e-973c-44ff-b182-c93c52e2430e -X GET -H "X-Auth-Project-Id: demo" -H "User-Agent: python-cinderclient" -H "Accept: application/json" -H "X-Auth-Token: <>"

HTTP/1.1 200 OK
X-Compute-Request-Id: req-06e765f5-8e19-4f13-86f7-941c32e46059
Content-Type: application/json
Content-Length: 739
Date: Tue, 30 Jul 2013 13:01:28 GMT

{"volume": {"status": "available", "volume_image_metadata": {"kernel_id": "e20cd257-63ae-475d-848b-dc9120a508df", "container_format": "ami", "min_ram": "0", "ramdisk_id": "b1425ee8-092f-43d5-b616-ebe3f497f758", "disk_format": "ami", "image_name": "cirros-0.3.1-x86_64-uec", "image_id": "eb7661b8-be43-4617-a8a2-9bca0d1f1137", "checksum": "f8a2eeee2dc65b3d9b6e63678955bd83", "min_disk": "0", "size": "25165824"}, "display_name": "Volume341822119", "attachments": [], "availability_zone": "nova", "bootable": true, "created_at": "2013-07-30T12:30:13.000000", "display_description": null, "volume_type": "None", "snapshot_id": null, "source_volid": null, "metadata": {"Type": "Test"}, "id": "3641b40e-973c-44ff-b182-c93c52e2430e", "size": 1}}

Here bootable flag is available in the response body on GET (JSON)

Can this be converted to a bug?

Request anyone to clarify on this.

Thanks in advance,
Harika

Question information

Language:
English Edit question
Status:
Solved
For:
Cinder Edit question
Assignee:
No assignee Edit question
Solved by:
Xiaoxi Chen
Solved:
Last query:
Last reply:
Revision history for this message
Best Xiaoxi Chen (xiaoxi-chen) said :
#1

I have converted this into a bug report and a fix is submitted, hopefully it could be merge soon.

Thank you

Revision history for this message
Harika Vakadi (harika-vakadi) said :
#2

Thanks xiaoxi_chen, that solved my question.