Cannot update default quotas via quota-class API for share groups and share group snapshots

Bug #1871252 reported by Goutham Pacha Ravi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Invalid
Medium
Unassigned
manila-ui
Confirmed
Medium
Victoria Martinez de la Cruz
python-manilaclient
Fix Released
Medium
Victoria Martinez de la Cruz

Bug Description

Administrators can specify the "default" quotas on their cloud with the help of the Quota Class Set API [1]:

For example, you can set the default share quotas for all projects with this:

 curl -i -X PUT http://10.10.10.10/share/v2/f0bb75f9ea664cc8b83fff46c6535bcd/quota-class-sets/default -H "X-Openstack-Manila-Api-Version: 2.52" -H "X-Auth-Token: {redacted}" -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-manilaclient" -d '{"quota_class_set": {"class_name": "default", "shares": 51}}'

There is currently no support to specify the default quotas for share groups and share group snapshots via this Quota Class Sets API.

The python-manilaclient SDK and CLI doesn't support this [2]
Until there is support in manila and in the manila client SDK, manila-ui can't support this feature either

[1] https://docs.openstack.org/api-ref/shared-file-system/?expanded=update-quota-classes-for-a-project-detail#quota-class-set
[2] https://opendev.org/openstack/python-manilaclient/src/commit/c8bb1a275587e4aafde9850e3133b71f75c0e53b/manilaclient/v2/quota_classes.py

tags: added: low-hanging-fruit
Revision history for this message
Vida Haririan (vhariria) wrote :
Changed in manila:
milestone: none → wallaby-1
Changed in python-manilaclient:
milestone: none → wallaby-1
Changed in manila:
importance: Undecided → Medium
Changed in python-manilaclient:
importance: Undecided → Medium
Changed in manila-ui:
milestone: none → wallaby-2
importance: Undecided → Medium
Changed in manila:
status: New → Confirmed
Changed in manila-ui:
status: New → Confirmed
Changed in python-manilaclient:
status: New → Confirmed
Changed in manila:
assignee: nobody → Victoria Martinez de la Cruz (vkmc)
Changed in manila-ui:
assignee: nobody → Victoria Martinez de la Cruz (vkmc)
Changed in python-manilaclient:
assignee: nobody → Victoria Martinez de la Cruz (vkmc)
Changed in manila:
milestone: wallaby-1 → wallaby-2
Changed in manila-ui:
milestone: wallaby-2 → wallaby-3
Changed in python-manilaclient:
milestone: wallaby-1 → wallaby-2
Changed in python-manilaclient:
milestone: wallaby-2 → wallaby-client-release
Changed in manila:
milestone: wallaby-2 → wallaby-3
Changed in manila:
milestone: wallaby-3 → wallaby-rc1
Changed in manila-ui:
milestone: wallaby-3 → wallaby-rc1
tags: added: wallaby-rc-bugsquash
Changed in python-manilaclient:
milestone: wallaby-client-release → none
milestone: none → xena-1
Changed in manila-ui:
milestone: wallaby-rc1 → none
Changed in manila:
milestone: wallaby-rc1 → none
milestone: none → xena-1
Changed in manila-ui:
milestone: none → xena-rc1
milestone: xena-rc1 → xena-3
tags: removed: wallaby-rc-bugsquash
Changed in manila:
milestone: xena-1 → xena-2
Changed in python-manilaclient:
milestone: xena-1 → xena-2
Changed in manila:
milestone: xena-2 → xena-3
Changed in python-manilaclient:
milestone: xena-2 → xena-client-release
Revision history for this message
Vida Haririan (vhariria) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-manilaclient (master)
Changed in python-manilaclient:
status: Confirmed → In Progress
Revision history for this message
Victoria Martinez de la Cruz (vkmc) wrote :

This issue is no longer reproducible in manila

stack@xena:/opt/stack/manila$ AUTH_TOKEN=$(openstack token issue -f value -c id)

stack@xena:/opt/stack/manila$ curl -i -X PUT http://192.168.122.98/share/v2/quota-class-sets/default -H "X-Openstack-Manila-Api-Version: 2.52" -H "X-Auth-Token: $AUTH_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-manilaclient" -d '{"quota_class_set": {"class_name": "default", "share_groups": 51, "share_group_snapshots": 67}}'
HTTP/1.1 200 OK
Date: Thu, 19 Aug 2021 09:43:50 GMT
Server: Apache/2.4.41 (Ubuntu)
Content-Type: application/json
Content-Length: 170
x-compute-request-id: req-ca5eaed3-8876-47f6-929a-2b15dea4db5b
X-OpenStack-Manila-API-Version: 2.52
Vary: X-OpenStack-Manila-API-Version
Connection: close

{"quota_class_set": {"shares": 51, "gigabytes": 1000, "snapshots": 50, "snapshot_gigabytes": 1000, "share_networks": 10, "share_groups": 51, "share_group_snapshots": 67}}

stack@xena:/opt/stack/manila$ curl -i -X GET http://192.168.122.98/share/v2/quota-class-sets/default -H "X-Openstack-Manila-Api-Version: 2.52" -H "X-Auth-Token: $AUTH_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json"
HTTP/1.1 200 OK
Date: Thu, 19 Aug 2021 09:45:41 GMT
Server: Apache/2.4.41 (Ubuntu)
Content-Type: application/json
Content-Length: 187
x-compute-request-id: req-5ab2a381-ab5f-4bb8-9d9b-d11fd11b0d44
X-OpenStack-Manila-API-Version: 2.52
Vary: X-OpenStack-Manila-API-Version
Connection: close

{"quota_class_set": {"shares": 51, "gigabytes": 1000, "snapshots": 50, "snapshot_gigabytes": 1000, "share_networks": 10, "id": "default", "share_groups": 51, "share_group_snapshots": 67}}

Changed in manila:
status: Confirmed → Incomplete
Changed in python-manilaclient:
milestone: xena-client-release → yoga-1
Changed in manila-ui:
milestone: xena-3 → yoga-1
Changed in manila:
milestone: xena-3 → yoga-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-manilaclient (master)

Reviewed: https://review.opendev.org/c/openstack/python-manilaclient/+/805067
Committed: https://opendev.org/openstack/python-manilaclient/commit/be8326b7ccb0c8ca7eadb1424ed3bb29387174b0
Submitter: "Zuul (22348)"
Branch: master

commit be8326b7ccb0c8ca7eadb1424ed3bb29387174b0
Author: Victoria Martinez de la Cruz <email address hidden>
Date: Tue Aug 17 18:20:42 2021 +0000

    Add share groups/share group snaps to quota class

    Share groups and share group snapshots can be now updated
    through the quota class API

    This change adds this option to the manilaclient CLI

    Closes-Bug: #1871252

    Change-Id: If2faf8a88a0a0e39d7fd0554bc3e530e18c3e922

Changed in python-manilaclient:
status: In Progress → Fix Released
Changed in manila:
status: Incomplete → Fix Released
Changed in manila-ui:
milestone: yoga-1 → yoga-3
Changed in manila:
status: Fix Released → Incomplete
milestone: yoga-1 → yoga-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-manilaclient 3.1.0

This issue was fixed in the openstack/python-manilaclient 3.1.0 release.

Changed in manila:
assignee: Victoria Martinez de la Cruz (vkmc) → nobody
milestone: yoga-2 → none
Changed in manila-ui:
milestone: yoga-3 → yoga-rc1
Changed in python-manilaclient:
milestone: yoga-1 → zed-1
Changed in manila-ui:
milestone: yoga-rc1 → zed-rc1
Changed in python-manilaclient:
milestone: zed-1 → yoga-client-release
Vida Haririan (vhariria)
Changed in manila:
status: Incomplete → Invalid
Revision history for this message
Vida Haririan (vhariria) wrote :
Changed in manila-ui:
milestone: zed-rc1 → none
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.