From 44217eca7cbfcf79ea13bb9bc6a95d7ad75b0898 Mon Sep 17 00:00:00 2001 From: Simon Dodsley Date: Wed, 3 May 2023 11:59:03 -0400 Subject: [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 --- cinder/volume/drivers/pure.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cinder') diff --git a/cinder/volume/drivers/pure.py b/cinder/volume/drivers/pure.py index bf38d88f9..97bb5a007 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.", -- cgit v1.2.1