Bug 1889627

Summary: [RHOSP 16.1] [cinder] PowerStore Cinder Driver does not have ‘get_volume_stats’
Product: Red Hat OpenStack Reporter: Sam Wan <Sam.Wan>
Component: openstack-cinderAssignee: Cinder Bugs List <cinder-bugs>
Status: CLOSED DUPLICATE QA Contact: Tzach Shefi <tshefi>
Severity: urgent Docs Contact: Chuck Copello <ccopello>
Priority: unspecified    
Version: 16.1 (Train)   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-20 09:08:44 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:

Description Sam Wan 2020-10-20 08:50:30 UTC
Description of problem:

The backported powerstore cinder driver does not have ‘get_volume_stats’which causes it being filtered out by scheduler.


Version-Release number of selected component (if applicable):
VERSION = "1.0.0

How reproducible:


Steps to Reproduce:
1. deploy with latest RHOSP16.1.2 rc container images: rh-osbs/rhosp16-openstack-cinder-volume:16.1_20201003.1 

2. enable powerstore cinder backend.
$ cinder service-list
+------------------+-------------------------------+------+----------+-------+----------------------------+-----------------+
| Binary           | Host                          | Zone | Status   | State | Updated_at                 | Disabled Reason |
+------------------+-------------------------------+------+----------+-------+----------------------------+-----------------+
| cinder-backup    | elabrhosp85ctl0               | nova | enabled  | up    | 2020-10-20T08:45:57.000000 | -               |
| cinder-scheduler | elabrhosp85ctl0               | nova | enabled  | up    | 2020-10-20T08:45:56.000000 | -               |
| cinder-volume    | elabrhosp85ctl0@powerstorefc1 | nova | enabled  | up    | 2020-10-20T08:46:00.000000 | -               |
| cinder-volume    | elabrhosp85ctl0@powerstorefc2 | nova | enabled  | up    | 2020-10-20T08:46:00.000000 | -               |

3.  cinder get-pools to check pool stats.

Actual results:
no pool stats reported by powerstore cinder driver.

Expected results:
pool stats should be reported by powerstore cinder driver like other drivers,


Additional info:

=====================================
Before Victoria release, all drivers report stats using ‘get_volume_stats’ at initialization.
This has been changed in Victoria, 
since all drivers need this, it's been moved to the base volume driver.
https://review.opendev.org/#/c/656888/ Move get_volume_stats impl to the base volume driver

so powerstore driver does not need this function in Victoria.
However when it's been backported to train(RHOSP16.1.2), it causes issue.

------------------------------------------------
()[root@elabrhosp85ctl0 dell_emc]# ls -l
total 88
-rw-r--r--. 1 root root     0 Sep 14 17:37 __init__.py
drwxr-xr-x. 3 root root   178 Oct  3 01:59 powermax
drwxr-xr-x. 1 root root    28 Oct 20 01:12 powerstore
-rw-r--r--. 1 root root 28840 Sep 14 17:37 ps.py
drwxr-xr-x. 2 root root   196 Oct  3 01:59 __pycache__
drwxr-xr-x. 3 root root   160 Oct  3 01:59 sc
drwxr-xr-x. 3 root root   134 Oct  3 01:59 unity
drwxr-xr-x. 3 root root   187 Oct  3 01:59 vnx
drwxr-xr-x. 3 root root   139 Oct  3 01:59 vxflexos
-rw-r--r--. 1 root root 54556 Sep 14 17:37 xtremio.py

()[root@elabrhosp85ctl0 dell_emc]# grep -r 'def get_volume_stats' *
powermax/fc.py:    def get_volume_stats(self, refresh=False):
powermax/iscsi.py:    def get_volume_stats(self, refresh=False):
sc/storagecenter_common.py:    def get_volume_stats(self, refresh=False):
unity/driver.py:    def get_volume_stats(self, refresh=False):
vnx/driver.py:    def get_volume_stats(self, refresh=False):
vxflexos/driver.py:    def get_volume_stats(self, refresh=False):
xtremio.py:    def get_volume_stats(self, refresh=False):
()[root@elabrhosp85ctl0 dell_emc]#
-----------------------------

we can see all dell emc cinder drivers have this get_volume_status except powerstore.

Comment 1 Luigi Toscano 2020-10-20 09:08:44 UTC
Usually the older bug should be kept, but the newer one contains more data.

*** This bug has been marked as a duplicate of bug 1889628 ***

Comment 2 Sam Wan 2020-10-20 09:10:06 UTC
sorry i must have clicked twice.