[Bug 1948507] Re: TypeError when computing QOS feature name
Corey Bryant
1948507 at bugs.launchpad.net
Tue Mar 15 17:37:06 UTC 2022
This bug was fixed in the package cinder - 2:19.0.0+git2022030310.b49fb59a6-0ubuntu2~cloud0
---------------
cinder (2:19.0.0+git2022030310.b49fb59a6-0ubuntu2~cloud0) focal-yoga; urgency=medium
.
* New update for the Ubuntu Cloud Archive.
.
cinder (2:19.0.0+git2022030310.b49fb59a6-0ubuntu2) jammy; urgency=medium
.
* d/p/fix-qos-computation.patch: Cherry-pick from upstream review to
fix TypeError exception when generating QOS feature name (LP: #1948507).
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to Ubuntu Cloud Archive.
https://bugs.launchpad.net/bugs/1948507
Title:
TypeError when computing QOS feature name
Status in Cinder:
In Progress
Status in Ubuntu Cloud Archive:
Fix Released
Status in Ubuntu Cloud Archive yoga series:
Fix Released
Status in cinder package in Ubuntu:
Triaged
Status in cinder source package in Jammy:
Triaged
Bug description:
=========== Bug description =============
The utility function 'qos_min_feature_name' computes the QOS by
concatenating a prefix to a node name. However, under some
circumstances, it's possible that the node name is `None`, thus
raising a TypeError. This can happen for example, if the
'storage.aggregate' feature is not present (or the user doesn't have
privileges for it), which leads to an always-None node_name (see the
method '_get_ssc_aggregate_info' in
volume/drivers/netapp/utils/capabilities:270)
An easy fix is to check for `None`, and if so, return an empty string.
=========== SRU details for Ubuntu =============
[Impact]
See above.
[Test Case]
charm-cinder-netapp gate fails (https://review.opendev.org/c/openstack/charm-cinder-netapp/+/815130) with the following when unpatched:
2021-11-22 21:17:10.298776 | focal-medium | 2021-11-22 21:17:10 [INFO] test_create_volume (zaza.openstack.charm_tests.cinder_netapp.tests.CinderNetAppTest)
2021-11-22 21:17:10.298864 | focal-medium | 2021-11-22 21:17:10 [INFO] Test creating volumes with basic configuration.
2021-11-22 21:17:10.298940 | focal-medium | 2021-11-22 21:17:10 [INFO] ...
2021-11-22 21:17:34.664694 | focal-medium | 2021-11-22 21:17:34 [INFO] Volume status wait: resource 26a180f3-07d3-4297-99ff-6f7045b8b7d8 in available state, waiting for available
2021-11-22 21:17:36.016716 | focal-medium | 2021-11-22 21:17:36 [INFO] ERROR
2021-11-22 21:17:36.016827 | focal-medium | 2021-11-22 21:17:36 [INFO] ======================================================================
2021-11-22 21:17:36.016905 | focal-medium | 2021-11-22 21:17:36 [INFO] ERROR: test_create_volume (zaza.openstack.charm_tests.cinder_netapp.tests.CinderNetAppTest)
2021-11-22 21:17:36.016915 | focal-medium | 2021-11-22 21:17:36 [INFO] Test creating volumes with basic configuration.
2021-11-22 21:17:36.016922 | focal-medium | 2021-11-22 21:17:36 [INFO] ----------------------------------------------------------------------
2021-11-22 21:17:36.016930 | focal-medium | 2021-11-22 21:17:36 [INFO] Traceback (most recent call last):
2021-11-22 21:17:36.016938 | focal-medium | 2021-11-22 21:17:36 [INFO] File "/home/ubuntu/src/review.opendev.org/openstack/charm-cinder-netapp/build/builds/cinder-netapp/.tox/func-target/lib/python3.8/site-packages/zaza/openstack/charm_tests/cinder_netapp/tests.py", line 93, in test_create_volume
2021-11-22 21:17:36.017021 | focal-medium | 2021-11-22 21:17:36 [INFO] host = getattr(test_vol, 'os-vol-host-attr:host').split('#')[0]
2021-11-22 21:17:36.017030 | focal-medium | 2021-11-22 21:17:36 [INFO] AttributeError: 'NoneType' object has no attribute 'split'
2021-11-22 21:17:36.017037 | focal-medium | 2021-11-22 21:17:36 [INFO] ----------------------------------------------------------------------
[Regression Potential]
It's possible that a user may expect the QOS to be non-empty and make
some assertions based on that assumption. In addition, a user may
expect an exception of type `TypeError` to be raised when the node name
is None.
To manage notifications about this bug go to:
https://bugs.launchpad.net/cinder/+bug/1948507/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list