Bug 1269332
| Summary: | "cinder quota-class-update default" does not work | ||
|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | Shinobu KINJO <skinjo> |
| Component: | python-cinderclient | Assignee: | Sergey Gotliv <sgotliv> |
| Status: | CLOSED ERRATA | QA Contact: | lkuchlan <lkuchlan> |
| Severity: | high | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.0 (Juno) | CC: | eharney, jruzicka, lyarwood, rcernin, scohen, sgotliv, skinjo, srevivo |
| Target Milestone: | --- | Keywords: | Reopened, ZStream |
| Target Release: | 6.0 (Juno) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | python-cinderclient-1.1.1-3.el7ost | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-06-23 18:37:27 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
I think its already reported [1] and fixed [2] upstream in python-cinderclient 1.3.1. [1] https://bugs.launchpad.net/python-cinderclient/+bug/1423884 [2] https://review.openstack.org/#/c/160253/ Shinobu, Can you, please, ask partner to use cinder client version >= 1.3.1. See my previous comment. @Shinobu, I created python-cinderclient-1.1.1-2.el7ost which is basically customer's python-cinderclient-1.1.1-1.el7ost with the fix [1] on top. You can find the new build here [2], can you, please, give it to the customer as a test package? [1] https://review.openstack.org/#/c/160253/ [2] [1] https://brewweb.devel.redhat.com/buildinfo?buildID=471951 *** Bug 1297613 has been marked as a duplicate of this bug. *** Tested using: python-cinderclient-1.1.1-3.el7ost.noarch Verification flow: [root@dhcp162-21 ~(keystone_admin)]# cinder quota-class-show default +-----------------+-------+ | Property | Value | +-----------------+-------+ | gigabytes | 1000 | | gigabytes_iscsi | -1 | | snapshots | 10 | | snapshots_iscsi | -1 | | volumes | 10 | | volumes_iscsi | -1 | +-----------------+-------+ [root@dhcp162-21 ~(keystone_admin)]# cinder --os-volume-api-version 1 quota-class-update --volumes 1 default +-----------------+-------+ | Property | Value | +-----------------+-------+ | gigabytes | 1000 | | gigabytes_iscsi | -1 | | snapshots | 10 | | snapshots_iscsi | -1 | | volumes | 1 | | volumes_iscsi | -1 | +-----------------+-------+ [root@dhcp162-21 ~(keystone_admin)]# cinder quota-class-show default +-----------------+-------+ | Property | Value | +-----------------+-------+ | gigabytes | 1000 | | gigabytes_iscsi | -1 | | snapshots | 10 | | snapshots_iscsi | -1 | | volumes | 1 | | volumes_iscsi | -1 | +-----------------+-------+ [root@dhcp162-21 ~(keystone_admin)]# cinder --os-volume-api-version 2 quota-class-update --volumes 2 default +-----------------+-------+ | Property | Value | +-----------------+-------+ | gigabytes | 1000 | | gigabytes_iscsi | -1 | | snapshots | 10 | | snapshots_iscsi | -1 | | volumes | 2 | | volumes_iscsi | -1 | +-----------------+-------+ [root@dhcp162-21 ~(keystone_admin)]# cinder quota-class-show default +-----------------+-------+ | Property | Value | +-----------------+-------+ | gigabytes | 1000 | | gigabytes_iscsi | -1 | | snapshots | 10 | | snapshots_iscsi | -1 | | volumes | 2 | | volumes_iscsi | -1 | +-----------------+-------+ Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:1315 |
Description of problem: "cinder quota-class-update default" does not work Note: Customer is using: python-cinderclient-1.1.1-1.el7ost DETAILS is below: When "cinder quota-class-update default" was executed, it's always failed. I'm assuming, for instance v1: When that command is executed, it ends up with calling: do_quota_class_update defined in: /usr/lib/python2.7/site-packages/cinderclient/v1/shell.py 788 def do_quota_class_update(cs, args): And quota is updated by: update defined in: /usr/lib/python2.7/site-packages/cinderclient/v1/quota_classes.py 39 def update(self, class_name, **updates): In quota_classes.py, there are 2 classes and each of 2 has 2 functions. QuotaClassSet id update QuotaClassSetManager get update Each update function are called but as belows, it seems not to return anything. 19 class QuotaClassSet(base.Resource): ... 28 def update(self, *args, **kwargs): 29 self.manager.update(self.class_name, *args, **kwargs) 32 class QuotaClassSetManager(base.Manager): ... 39 def update(self, class_name, **updates): 40 body = {'quota_class_set': {'class_name': class_name}} 41 42 for update in updates: 43 body['quota_class_set'][update] = updates[update] 44 45 self._update('/os-quota-class-sets/%s' % (class_name), body) Is this procedure right? I don't think it's supposed to work as expected. And there is confusion to me about inconsistency format between "class_name" and "class-name". usr/lib/python2.7/site-packages/cinderclient/v1/shell.py:760:@utils.arg('class_name', usr/lib/python2.7/site-packages/cinderclient/v1/shell.py:769:@utils.arg('class_name', usr/lib/python2.7/site-packages/cinderclient/v2/shell.py:866:@utils.arg('class_name', usr/lib/python2.7/site-packages/cinderclient/v2/shell.py:876:@utils.arg('class-name', Let me know If I've missed anything. Version-Release number of selected component (if applicable): python-cinderclient-1.1.1-1.el7ost How reproducible: cinder quota-class-update default Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: