From 9d32ad6cb78f3f20e5d70d62bc4dfe79f2b14870 Mon Sep 17 00:00:00 2001 From: Tomas Hancock Date: Wed, 2 Dec 2015 15:07:05 +0000 Subject: [PATCH] Fix dictionary key error The key 'multipath' was being referenced in the 'connector' dictionary in initialize_connection(), even though the key was not always set. Change-Id: Ia3c7640a24ebe9bedec3402f6cefb7e457c66ecd Closes-Bug: #1522062 --- cinder/volume/drivers/hpe/hpe_3par_iscsi.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cinder/volume/drivers/hpe/hpe_3par_iscsi.py b/cinder/volume/drivers/hpe/hpe_3par_iscsi.py index bdd310fff..fca825108 100644 --- a/cinder/volume/drivers/hpe/hpe_3par_iscsi.py +++ b/cinder/volume/drivers/hpe/hpe_3par_iscsi.py @@ -102,10 +102,11 @@ class HPE3PARISCSIDriver(driver.TransferVD, 3.0.0 - Rebranded HP to HPE. 3.0.1 - Python 3 support 3.0.2 - Remove db access for consistency groups + 3.0.3 - Fix multipath dictionary key error. bug #1522062 """ - VERSION = "3.0.2" + VERSION = "3.0.3" def __init__(self, *args, **kwargs): super(HPE3PARISCSIDriver, self).__init__(*args, **kwargs) @@ -304,7 +305,7 @@ class HPE3PARISCSIDriver(driver.TransferVD, volume, connector) - if connector['multipath']: + if connector.get('multipath'): ready_ports = common.client.getiSCSIPorts( state=common.client.PORT_STATE_READY) -- 2.45.2