Spelling error: update_volume_status should be update_volume_stats

Bug #1199327 reported by Rohit Karajgi on 2013-07-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Wishlist
Kun Huang

Bug Description

_update_volume_status() private method is called by get_volume_stats(). This is confusing as the volume's stats and not status gets updated.
The method's name in the base driver and the implemented driver should be fixed. Any related confusing comments should also be fixed.
Identified the following places in the code where 'status' should be changed to 'stats':

cinder/tests/test_volume.py:1544: self.volume.driver._update_volume_status()
cinder/volume/driver.py:493: self._update_volume_status()
cinder/volume/driver.py:497: def _update_volume_status(self):
cinder/volume/drivers/emc/emc_smis_common.py:855: def update_volume_status(self):
cinder/volume/drivers/emc/emc_smis_iscsi.py:229: self.update_volume_status()
cinder/volume/drivers/emc/emc_smis_iscsi.py:233: def update_volume_status(self):
cinder/volume/drivers/emc/emc_smis_iscsi.py:236: data = self.common.update_volume_status()
cinder/volume/drivers/huawei/huawei_iscsi.py:554: self._update_volume_status()
cinder/volume/drivers/huawei/huawei_iscsi.py:1504: def _update_volume_status(self):
cinder/volume/drivers/lvm.py:590: self._update_volume_status()
cinder/volume/drivers/lvm.py:594: def _update_volume_status(self):
cinder/volume/drivers/lvm.py:717: self._update_volume_status()
cinder/volume/drivers/lvm.py:721: def _update_volume_status(self):
cinder/volume/drivers/netapp/iscsi.py:545: self._update_volume_status()
cinder/volume/drivers/netapp/iscsi.py:549: def _update_volume_status(self):
cinder/volume/drivers/netapp/iscsi.py:832: def _update_volume_status(self):
cinder/volume/drivers/netapp/iscsi.py:1115: def _update_volume_status(self):
cinder/volume/drivers/netapp/nfs.py:185: def _update_volume_status(self):
cinder/volume/drivers/netapp/nfs.py:187: super(NetAppNFSDriver, self)._update_volume_status()
cinder/volume/drivers/netapp/nfs.py:347: def _update_volume_status(self):
cinder/volume/drivers/netapp/nfs.py:349: super(NetAppDirectCmodeNfsDriver, self)._update_volume_status()
cinder/volume/drivers/netapp/nfs.py:479: def _update_volume_status(self):
cinder/volume/drivers/netapp/nfs.py:481: super(NetAppDirect7modeNfsDriver, self)._update_volume_status()
cinder/volume/drivers/nexenta/volume.py:304: self._update_volume_status()
cinder/volume/drivers/nexenta/volume.py:308: def _update_volume_status(self):
cinder/volume/drivers/nfs.py:444: self._update_volume_status()
cinder/volume/drivers/nfs.py:448: def _update_volume_status(self):
cinder/volume/drivers/storwize_svc.py:1339: self._update_volume_status()
cinder/volume/drivers/storwize_svc.py:1343: def _update_volume_status(self):
cinder/volume/drivers/storwize_svc.py:1363: exception_message = (_('_update_volume_status: '
cinder/volume/drivers/storwize_svc.py:1376: exception_message = (_('_update_volume_status: '

Rohit Karajgi (rohitk) on 2013-07-09
tags: added: low-hanging-fruit
Joe Hakim Rahme (rahmu) wrote :
Download full text (8.3 KiB)

What about all the occurrences in the locale/ directory? Should they be renamed as well?

cinder/locale/bg_BG/LC_MESSAGES/cinder.po:msgid "_update_volume_status: Could not get system name"
cinder/locale/bg_BG/LC_MESSAGES/cinder.po:msgid "_update_volume_status: Could not get storage pool data"
cinder/locale/bs/LC_MESSAGES/cinder.po:msgid "_update_volume_status: Could not get system name"
cinder/locale/bs/LC_MESSAGES/cinder.po:msgid "_update_volume_status: Could not get storage pool data"
cinder/locale/ca/LC_MESSAGES/cinder.po:msgid "_update_volume_status: Could not get system name"
cinder/locale/ca/LC_MESSAGES/cinder.po:msgid "_update_volume_status: Could not get storage pool data"
cinder/locale/cinder.pot:msgid "_update_volume_status: Could not get system name"
cinder/locale/cinder.pot:msgid "_update_volume_status: Could not get storage pool data"
cinder/locale/cs/LC_MESSAGES/cinder.po:msgid "_update_volume_status: Could not get system name"
cinder/locale/cs/LC_MESSAGES/cinder.po:msgid "_update_volume_status: Could not get storage pool data"
cinder/locale/da/LC_MESSAGES/cinder.po:msgid "_update_volume_status: Could not get system name"
cinder/locale/da/LC_MESSAGES/cinder.po:msgid "_update_volume_status: Could not get storage pool data"
cinder/locale/de/LC_MESSAGES/cinder.po:msgid "_update_volume_status: Could not get system name"
cinder/locale/de/LC_MESSAGES/cinder.po:msgid "_update_volume_status: Could not get storage pool data"
cinder/locale/en_AU/LC_MESSAGES/cinder.po:msgid "_update_volume_status: Could not get system name"
cinder/locale/en_AU/LC_MESSAGES/cinder.po:msgid "_update_volume_status: Could not get storage pool data"
cinder/locale/en_GB/LC_MESSAGES/cinder.po:msgid "_update_volume_status: Could not get system name"
cinder/locale/en_GB/LC_MESSAGES/cinder.po:msgid "_update_volume_status: Could not get storage pool data"
cinder/locale/en_US/LC_MESSAGES/cinder.po:msgid "_update_volume_status: Could not get system name"
cinder/locale/en_US/LC_MESSAGES/cinder.po:msgstr "_update_volume_status: Could not get system name"
cinder/locale/en_US/LC_MESSAGES/cinder.po:msgid "_update_volume_status: Could not get storage pool data"
cinder/locale/en_US/LC_MESSAGES/cinder.po:msgstr "_update_volume_status: Could not get storage pool data"
cinder/locale/es/LC_MESSAGES/cinder.po:msgid "_update_volume_status: Could not get system name"
cinder/locale/es/LC_MESSAGES/cinder.po:msgid "_update_volume_status: Could not get storage pool data"
cinder/locale/fi_FI/LC_MESSAGES/cinder.po:msgid "_update_volume_status: Could not get system name"
cinder/locale/fi_FI/LC_MESSAGES/cinder.po:msgid "_update_volume_status: Could not get storage pool data"
cinder/locale/fr/LC_MESSAGES/cinder.po:msgid "_update_volume_status: Could not get system name"
cinder/locale/fr/LC_MESSAGES/cinder.po:msgid "_update_volume_status: Could not get storage pool data"
cinder/locale/hr/LC_MESSAGES/cinder.po:msgid "_update_volume_status: Could not get system name"
cinder/locale/hr/LC_MESSAGES/cinder.po:msgid "_update_volume_status: Could not get storage pool data"
cinder/locale/hu/LC_MESSAGES/cinder.po:msgid "_update_volume_status: Could not get system name"
cinder/locale/hu/LC_MESSAGES/cinde...

Read more...

Changed in cinder:
assignee: nobody → Joe Hakim Rahme (rahmu)
Changed in cinder:
status: New → Confirmed
importance: Undecided → Low
Rohit Karajgi (rohitk) wrote :

@rahmu: I just grepped out occurrences in modules. IMO, all of them should be fixed, including locale/ directory.

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

Changed in cinder:
assignee: Joe Hakim Rahme (rahmu) → Kun Huang (academicgareth)
status: Confirmed → In Progress
Changed in cinder:
importance: Low → Wishlist

Reviewed: https://review.openstack.org/38044
Committed: http://github.com/openstack/cinder/commit/5b50bd8d515e8a69e2f57baffc42f5d4e2bc17a2
Submitter: Jenkins
Branch: master

commit 5b50bd8d515e8a69e2f57baffc42f5d4e2bc17a2
Author: Kun Huang <email address hidden>
Date: Sun Jul 21 02:00:33 2013 +0800

    fix name 'update_volume_status' to 'update_volume_stats'

    _update_volume_status() private method is called by
    get_volume_stats(). This is confusing as the volume's
    stats and not status gets updated.

    fixes bug #1199327

    Change-Id: I9f7971e457250798320c14d3f58bdc199c8cfceb

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2013-09-05
Changed in cinder:
milestone: none → havana-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-10-17
Changed in cinder:
milestone: havana-3 → 2013.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers