Dell PowerFlex: Unnecessary login happen

The Dell PowerFlex (scaleio) connector maintains a token cache
for PowerFlex OS.
The cache was overwritten with None by misktake
in Change-ID I6f01a178616b74ed9a86876ca46e7e46eb360518.
This patch fixes the broken cache to avoid unnecessary login.

Closes-Bug: #2004630
Change-Id: I2399b0b2af8254cd5697b44dcfcec553c2845bec
This commit is contained in:
Tony Saad 2023-03-09 18:32:28 +00:00 committed by Yian Zong
parent fb23a40a65
commit 14b024c505
2 changed files with 11 additions and 1 deletions

View File

@ -334,8 +334,10 @@ class ScaleIOConnector(base.BaseLinuxConnector):
self.server_ip = connection_properties['serverIP']
self.server_port = connection_properties['serverPort']
self.server_username = connection_properties['serverUsername']
self.server_password, self.server_token = self._get_password_token(
self.server_password, server_token = self._get_password_token(
connection_properties)
if server_token:
self.server_token = server_token
self.iops_limit = connection_properties['iopsLimit']
self.bandwidth_limit = connection_properties['bandwidthLimit']
self.verify_certificate = (

View File

@ -0,0 +1,8 @@
---
fixes:
- |
PowerFlex driver `bug #2004630
<https://bugs.launchpad.net/cinder/+bug/2004630>`_:
Fixed regression which caused the PowerFlex (ScaleIO) connector to
login multiple times, even with an existing valid token. The ScaleIO
connector now caches and reuses the token.