Skip to content

Commit 09cd547

Browse files
committed
CA-411927: guard check with presence of ScsiId key
Otherwise we can get a key error. This check is looking for a legacy ScsiId key which only existed in some experimental SM implementations. Just be careful to ensure that both provider and ScsiId exist in case this is necessary. Signed-off-by: Mark Syms <mark.syms@cloud.com>
1 parent 6deddfd commit 09cd547

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libs/sm/mpathcount.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def get_SCSIidlist(devconfig, sm_config):
156156
SCSIidlist = sm_config['SCSIid'].split(',')
157157
elif 'SCSIid' in devconfig:
158158
SCSIidlist.append(devconfig['SCSIid'])
159-
elif 'provider' in devconfig:
159+
elif 'provider' in devconfig and 'ScsiId' in devconfig:
160160
SCSIidlist.append(devconfig['ScsiId'])
161161
else:
162162
for key in sm_config:

0 commit comments

Comments
 (0)