Volume type quotas trigger deprecation notification

Bug #1435807 reported by git-harry
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Cinder
In Progress
High
Gorka Eguileor

Bug Description

On a fresh install of master on devstack.

Running the following command to show the defaults for this tenant I get the class defaults and the defaults for the volume-type quotas.
$ cinder quota-defaults 30f3ea9eb46e41de8842b27e599ccb57
+-----------------------+-------+
| Property | Value |
+-----------------------+-------+
| gigabytes | 1000 |
| gigabytes_lvmdriver-1 | -1 |
| snapshots | 10 |
| snapshots_lvmdriver-1 | -1 |
| volumes | 10 |
| volumes_lvmdriver-1 | -1 |
+-----------------------+-------+

In the api log I see the following deprecation notices:
2015-03-24 11:27:05.976 3372 WARNING cinder.quota [-] Deprecated: Default quota for resource: volumes_lvmdriver-1 is set by the default quota flag: quota_volumes_lvmdriver-1, it is now deprecated. Please use the default quota class for default quota.
2015-03-24 11:27:05.977 3372 WARNING cinder.quota [-] Deprecated: Default quota for resource: backup_gigabytes is set by the default quota flag: quota_backup_gigabytes, it is now deprecated. Please use the default quota class for default quota.
2015-03-24 11:27:05.979 3372 WARNING cinder.quota [-] Deprecated: Default quota for resource: gigabytes_lvmdriver-1 is set by the default quota flag: quota_gigabytes_lvmdriver-1, it is now deprecated. Please use the default quota class for default quota.
2015-03-24 11:27:05.980 3372 WARNING cinder.quota [-] Deprecated: Default quota for resource: snapshots_lvmdriver-1 is set by the default quota flag: quota_snapshots_lvmdriver-1, it is now deprecated. Please use the default quota class for default quota.
2015-03-24 11:27:05.980 3372 WARNING cinder.quota [-] Deprecated: Default quota for resource: backups is set by the default quota flag: quota_backups, it is now deprecated. Please use the default quota class for default quota.

If is set 'fatal_deprecations=True' in cinder.conf and attempt to run the same command.

$ cinder quota-defaults 30f3ea9eb46e41de8842b27e599ccb57
ERROR: Internal Server Error (HTTP 500) (Request-ID: req-078d0cbd-42ef-4755-b09c-6a5b781fdf79)

2015-03-24 11:31:55.318 6421 CRITICAL cinder.quota [-] Deprecated: Default quota for resource: volumes_lvmdriver-1 is set by the default quota flag: quota_volumes_lvmdriver-1, it is now deprecated. Please use the default quota class for default quota.
2015-03-24 11:31:55.319 6421 ERROR cinder.api.middleware.fault [-] Caught error: Fatal call to deprecated config: Deprecated: Default quota for resource: volumes_lvmdriver-1 is set by the default quota flag: quota_volumes_lvmdriver-1, it is now deprecated. Please use the default quota class for default quota.
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault Traceback (most recent call last):
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault File "/opt/stack/cinder/cinder/api/middleware/fault.py", line 76, in __call__
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault return req.get_response(self.application)
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault application, catch_exc_info=False)
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault app_iter = application(self.environ, start_response)
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault return resp(environ, start_response)
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault resp = self.call_func(req, *args, **self.kwargs)
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault return self.func(req, *args, **kwargs)
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault File "/usr/local/lib/python2.7/dist-packages/osprofiler/web.py", line 99, in __call__
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault return request.get_response(self.application)
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault application, catch_exc_info=False)
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault app_iter = application(self.environ, start_response)
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault File "/usr/local/lib/python2.7/dist-packages/keystonemiddleware/auth_token/__init__.py", line 634, in __call__
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault return self._call_app(env, start_response)
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault File "/usr/local/lib/python2.7/dist-packages/keystonemiddleware/auth_token/__init__.py", line 554, in _call_app
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault return self._app(env, _fake_start_response)
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault return resp(environ, start_response)
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault return resp(environ, start_response)
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault File "/usr/local/lib/python2.7/dist-packages/routes/middleware.py", line 136, in __call__
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault response = self.app(environ, start_response)
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault return resp(environ, start_response)
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault resp = self.call_func(req, *args, **self.kwargs)
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault return self.func(req, *args, **kwargs)
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault File "/opt/stack/cinder/cinder/api/openstack/wsgi.py", line 978, in __call__
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault content_type, body, accept)
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault File "/opt/stack/cinder/cinder/api/openstack/wsgi.py", line 1026, in _process_stack
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault action_result = self.dispatch(meth, request, action_args)
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault File "/opt/stack/cinder/cinder/api/openstack/wsgi.py", line 1106, in dispatch
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault return method(req=request, **action_args)
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault File "/opt/stack/cinder/cinder/api/contrib/quotas.py", line 136, in defaults
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault return self._format_quota_set(id, QUOTAS.get_defaults(context))
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault File "/opt/stack/cinder/cinder/quota.py", line 638, in get_defaults
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault return self._driver.get_defaults(context, self.resources)
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault File "/opt/stack/cinder/cinder/quota.py", line 124, in get_defaults
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault "quota.") % {'res': resource.name})
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault File "/opt/stack/cinder/cinder/openstack/common/versionutils.py", line 236, in report_deprecated_feature
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault raise DeprecatedConfig(msg=stdmsg)
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault DeprecatedConfig: Fatal call to deprecated config: Deprecated: Default quota for resource: volumes_lvmdriver-1 is set by the default quota flag: quota_volumes_lvmdriver-1, it is now deprecated. Please use the default quota class for default quota.
2015-03-24 11:31:55.319 6421 TRACE cinder.api.middleware.fault

It looks like the issue may relate to http://git.openstack.org/cgit/openstack/cinder/tree/cinder/quota.py#n117

It appears that the deprecation check is not properly filtering legitimate quota types.

Ian Cordasco (icordasc)
Changed in cinder:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Liyingjun (liyingjun) wrote :

Set use_default_quota_class=True or leave it default, don't have this issue

Revision history for this message
git-harry (git-harry) wrote :

@Liyingjun - I left use_default_quota_class as the default (true) when I tested this. I does not resolve the issue for me.

Anton Arefiev (aarefiev)
Changed in cinder:
assignee: nobody → Anton Arefiev (aarefiev)
Mike Perez (thingee)
Changed in cinder:
milestone: none → liberty-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/174941

Changed in cinder:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (master)

Change abandoned by Anton Arefiev (<email address hidden>) on branch: master
Review: https://review.openstack.org/174941
Reason: Due to https://bugs.launchpad.net/cinder/+bug/1465393

Mike Perez (thingee)
Changed in cinder:
milestone: liberty-1 → liberty-2
Mike Perez (thingee)
Changed in cinder:
milestone: liberty-2 → liberty-3
Anton Arefiev (aarefiev)
Changed in cinder:
assignee: Anton Arefiev (aarefiev) → nobody
Changed in cinder:
status: In Progress → Confirmed
Thierry Carrez (ttx)
Changed in cinder:
milestone: liberty-3 → liberty-rc1
Mike Perez (thingee)
Changed in cinder:
milestone: liberty-rc1 → next
Revision history for this message
Cory Stone (corystone) wrote :

This doesn't really seem like a cinder bug. Config options for quotas has been deprecated, and if you set fatal_deprecations, it'll exit like you just told it to.

The fix for devstack is to set the default quota class entries for all the resources, or just don't set fatal_deprecations.

Changed in cinder:
status: Confirmed → Invalid
Revision history for this message
Gorka Eguileor (gorka) wrote :

This is an actual bug, because even on a deployment that is using the default quota class from the database we'll see the warnings when creating ANY volume unless we manually create the ``volumes_<type-name>``, ``snapshots_<type-name>``, and ``gigabytes_<type-name>`` entries in the ``default`` quota class.

The system should automatically assume that the default value is ``-1``, since the global values (``volumes``, ``snapshots``, and ``gigabytes``), which do exist, will be used on the quota calculations.

Changed in cinder:
assignee: nobody → Gorka Eguileor (gorka)
status: Invalid → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/cinder/+/819691

Changed in cinder:
status: Confirmed → In Progress
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.