[
https://issues.apache.org/jira/browse/JCLOUDS-515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13948737#comment-13948737
]
Jasdeep Hundal commented on JCLOUDS-515:
----------------------------------------
So my Cinder endpoint in fact returns null for the availability zone when a
volume is created:
{code}
{"volume": {"status": "creating", "display_name": "test2", "attachments": [],
"availability_zone": null, "bootable": "false", "created_at":
"2014-03-26T22:26:47.816186", "display_description": null, "volume_type":
"default", "snapshot_id": null, "source_volid": null, "metadata": {}, "id":
"4c60b12e-96ee-4a1d-8ea2-40a69f36369e", "size": 1}}
{code}
This is not typical behavior for Cinder installations, but I couldn't find any
documentation prohibiting it either. python-cinderclient was okay with this
response.
Looking at the Cinder code, the bits that [~everett-toews] mentioned are here:
https://github.com/openstack/cinder/blob/master/cinder/volume/flows/api/create_volume.py#L247-252
These indicate that Cinder falls back to CONF.storage_availability_zone if the
client request did not specify availability zone, which in our installation is
in fact configured to be None. As a subscriber to Postel's Law, I still support
the patch because JClouds doesn't do anything with this value (and of course
because I'd rather not have custom JClouds patches :) ), but also understand
that it's not a particularly necessary patch.
> Cinder volume create does not require availability zone
> -------------------------------------------------------
>
> Key: JCLOUDS-515
> URL: https://issues.apache.org/jira/browse/JCLOUDS-515
> Project: jclouds
> Issue Type: Bug
> Components: jclouds-core
> Affects Versions: 1.7.1
> Reporter: Jasdeep Hundal
> Assignee: Jasdeep Hundal
> Fix For: 1.8.0
>
>
> Openstack Cinder does not require specifying an availability zone for volume
> creation, but the Cinder API as implemented in JClouds does. We should change
> the check in the constructor of org.jclouds.openstack.cinder.v1.domain to
> allow a null value for availability zone.
> The docs on the v1 API are not readily available but tracing through the
> Cinder source code, we find this line that gets executed if we specify no
> availability zone in either the v1 or v2 block storage APIs:
> https://github.com/openstack/cinder/blob/master/cinder/volume/flows/api/create_volume.py#L247
> It can also be noted the the Block Storage v2 request here does not require
> an availability zone:
> http://docs.openstack.org/api/openstack-block-storage/2.0/content/POST_createVolume_v2__tenant_id__volumes_Volumes.html
--
This message was sent by Atlassian JIRA
(v6.2#6252)