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
(cherry picked from commit 14b024c505)
(cherry picked from commit 885fb6a756)
(cherry picked from commit 950a8b1060)
(cherry picked from commit 4ea7f0c352)
(cherry picked from commit 7cee4c141e)
(cherry picked from commit c69faee5f1)
(cherry picked from commit 5a1531f7a8)
This commit is contained in:
Tony Saad
2023-03-09 18:32:28 +00:00
committed by Lajos Katona
parent c9a0170826
commit 8d2e0a697c
2 changed files with 11 additions and 1 deletions

View File

@@ -328,8 +328,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']
device_info = {'type': 'block',

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.