greese / dasein-cloud-openstack

Dasein Cloud implementation for all OpenStack components from Bexar to the present. For more information on Dasein Cloud, see the Dasein Cloud home page at https://github.com/greese/dasein-cloud.
https://github.com/greese/dasein-cloud
Apache License 2.0
4 stars 13 forks source link

No support for Volume Availability Zone #2

Open asaenz-vmware opened 11 years ago

asaenz-vmware commented 11 years ago

I see the availabilty zone in the information that comes back for the Volume, but I don't see any Dasein method of getting it.

2013-01-16 11:40:50,102 [http-bio-8080-exec-3] DEBUG dasein.cloud.nova.wire.NovaOpenStack - {"volumes": [{"status": "available", "display_name": null, "attachments": [], "availability_zone": "nova", "created_at": "2012-12-03 22:33:30", "display_description": null, "volume_type": "None", "snapshot_id": null, "size": 6, "id": "274", "metadata": {}}, {"status": "in-use", "display_name": "VOL", "attachments": [{"device": "/dev/vdc", "server_id": "c8a399ec-bcbc-45c6-954e-21e8a13d436f", "id": "314", "volume_id": "314"}], "availability_zone": "nova", "created_at": "2013-01-02 21:39:49", "display_description": "VOL", "volume_type": "None", "snapshot_id": null, "size": 7, "id": "314", "metadata": {}}]}

greese commented 11 years ago

What version of OpenStack are you working with?

Technically, a Dasein "data center" (volume.getProviderDataCenterId()) maps to an availability zone. But it doesn't with OpenStack because OpenStack has not historically supported the concept.

asaenz-vmware commented 11 years ago

We're on Essex. The problem is the volume.getProviderDataCenterId() returns "RegionOne-a" for us, but I'd really like it to return 'nova' which I figured would be fine since the return json has that in there. I will admit though that I am only somewhat knowledgeable about what is going on 'under the covers'.

greese commented 11 years ago

I need to put some thought into this. There may be some odd differences among deployments of the same release.

Basically, getProviderDataCenterId() needs to return "nova" in this instance somehow.

greese commented 11 years ago

I've been working on this only to find that availability zone support in OpenStack is a huge cluster fuck. There are no API mechanisms for looking up availability zones in OpenStack, so the DataCenterServices can't work properly.

The whole AZ support is optional, and there's no way from an API perspective to know if it is enabled. In fact, the only indication it exists is in the attributes for an instance or a cinder volume.

Even worse, the coupling between nova availability zones and cinder availability zones is loose and poorly defined.

In short, I'm stumped on how to make this work given the current state of AZs in OpenStack. I'd actually recommend staying away from this feature of OpenStack.

greese commented 11 years ago

By the way, I'm leaving this open until the OpenStack bugs are addressed.