Browse Source

Fix volume_stats storage_protocol usage in vol mgr

Commit
 afcaf0b9 Add support volume local cache

added usage of volume_stats['storage_protocol'] in
the volume manager.  Some drivers only supply this in
volume_stats['pools']['storage_protocol'].

This patch fixes the volume manager failure but means
that such drivers won't use the local cache.

Change-Id: I5329e02cb15babed6b63de9faae3440583b8d7a1
Closes-Bug: #1896764
changes/19/753719/1
Eric Harney 11 months ago
parent
commit
19a128c31b
  1. 2
      cinder/volume/manager.py

2
cinder/volume/manager.py

@ -2627,7 +2627,7 @@ class VolumeManager(manager.CleanableManager,
# Append cacheable flag for iSCSI/FC/NVMe-oF and only when
# cacheable is not set in driver level
if volume_stats['storage_protocol'] in [
if volume_stats.get('storage_protocol') in [
'iSCSI', 'FC', 'NVMe-oF']:
if volume_stats.get('pools'):
for pool in volume_stats.get('pools'):

Loading…
Cancel
Save