share groups api does not support AZs

Bug #1662870 reported by Valeriy Ponomaryov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
New
Undecided
Unassigned

Bug Description

API for share groups does not support setting "availability zone". Also, DB model does not have appropriate field. BUT, its support stated in spec [1] and supported by client:

$ manila help share-group-create
usage: manila share-group-create [--name <name>] [--description <description>]
                                 [--share-types <share_types>]
                                 [--share-group-type <share_group_type>]
                                 [--share-network <share_network>]
                                 [--source-share-group-snapshot <source_share_group_snapshot>]
                                 [--availability-zone <availability-zone>]

Creates a new share group (Experimental).

Optional arguments:
  --name <name> Optional share group name. (Default=None)
  --description <description>
                        Optional share group description. (Default=None)
  --share-types <share_types>, --share_types <share_types>
                        Comma-separated list of share types. (Default=None)
  --share-group-type <share_group_type>, --share_group_type <share_group_type>, --type <share_group_type>
                        Share group type name or ID of the share group to be
                        created. (Default=None)
  --share-network <share_network>, --share_network <share_network>
                        Specify share network name or id.
  --source-share-group-snapshot <source_share_group_snapshot>, --source_share_group_snapshot <source_share_group_snapshot>
                        Optional share group snapshot name or ID to create the
                        share group from. (Default=None)
  --availability-zone <availability-zone>, --availability_zone <availability-zone>, --az <availability-zone>
                        Optional availability zone in which group should be
                        created. (Default=None)

And attempt to create share group with AZ returns error code 400 and following message:

$ manila -d share-group-create --name az1 --availability-zone nova
...
REQ: curl -i -X POST http://%server-ip%:8786/v2/%project-id%/share-groups -H "Accept: application/json" -H "X-Auth-Token: %token%" -H "X-Openstack-Manila-Api-Version: 2.32" -H "X-OpenStack-Manila-API-Experimental: true" -H "User-Agent: python-manilaclient" -H "Content-Type: application/json" -d '{"share_group": {"name": "az1", "availability_zone": "nova"}}'

RESP: [400] {'Content-Length': '95', 'X-Compute-Request-Id': 'req-%some-id%', 'Vary': 'X-OpenStack-Manila-API-Version', 'Connection': 'close', 'X-Openstack-Manila-Api-Version': '2.32', 'Date': 'Wed, 08 Feb 2017 11:55:35 GMT', 'X-Openstack-Manila-Api-Experimental': 'True', 'Content-Type': 'application/json; charset=UTF-8'}
RESP BODY: {"badRequest": {"message": "The fields set([u'availability_zone']) are invalid.", "code": 400}}
...

[1] https://github.com/openstack/manila-specs/blob/master/specs/ocata/manila-share-groups.rst#rest-api-impact

description: updated
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.