summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Dodsley <simon@purestorage.com>2023-05-03 11:59:03 -0400
committerSimon Dodsley <simon@purestorage.com>2023-05-04 13:33:42 +0000
commit5975376ba951d6abb1e31cece2748e25823327e6 (patch)
tree84c5624176ec43daa51149464be6180d0fa4feda
parent63e6dfdb081685e6955409082ed0fadd73b5166b (diff)
downloadcinder-5975376ba951d6abb1e31cece2748e25823327e6.tar.gz
[Pure Storage] Add check for new error message
A new error message has been added to the API response for the add_pod command. This needs to be checked for as a valid error. Without this check the driver will fail. Change-Id: I53d6fc94c9940b13f156772b80596c866bdf26b2 (cherry picked from commit 44217eca7cbfcf79ea13bb9bc6a95d7ad75b0898)
-rw-r--r--cinder/volume/drivers/pure.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/cinder/volume/drivers/pure.py b/cinder/volume/drivers/pure.py
index 8699be15e..d2ed1858c 100644
--- a/cinder/volume/drivers/pure.py
+++ b/cinder/volume/drivers/pure.py
@@ -159,6 +159,7 @@ ERR_MSG_NOT_CONNECTED = "is not connected"
ERR_MSG_ALREADY_BELONGS = "already belongs to"
ERR_MSG_EXISTING_CONNECTIONS = "cannot be deleted due to existing connections"
ERR_MSG_ALREADY_IN_USE = "already in use"
+ERR_MSG_ARRAY_LIMIT = "limit reached"
EXTRA_SPECS_REPL_ENABLED = "replication_enabled"
EXTRA_SPECS_REPL_TYPE = "replication_type"
@@ -2418,8 +2419,9 @@ class PureBaseVolumeDriver(san.SanDriver):
except purestorage.PureHTTPError as err:
with excutils.save_and_reraise_exception() as ctxt:
if err.code == 400 and (
- ERR_MSG_ALREADY_EXISTS
- in err.text):
+ ERR_MSG_ALREADY_EXISTS in err.text
+ or ERR_MSG_ARRAY_LIMIT in err.text
+ ):
ctxt.reraise = False
LOG.info("Skipping add array %(target_array)s to pod"
" %(pod_name)s since it's already added.",