From f82d2bf6f13a360f6a1c08066cf682e2e07043db Mon Sep 17 00:00:00 2001 From: Patrick East Date: Thu, 10 Aug 2017 16:38:10 -0700 Subject: [PATCH] Change pure drivers default replication interval With newer versions of Purity the previous default value would not be allowed, the minimum is 60 minutes (3600 seconds). While this does change a default config value, it goes from a non-working-crash-the-driver-at-startup value to a working one. Along with this I'm bumping the driver version numbers and fixing typo in the docs about the purity version (this bug was found with REST API 1.5). Change-Id: I21148f0d56cb7ce376107253aa67fc808fa40f9f Closes-Bug: #1709720 --- cinder/tests/unit/volume/drivers/test_pure.py | 2 +- cinder/volume/drivers/pure.py | 6 +++--- .../block-storage/drivers/pure-storage-driver.rst | 4 ++-- ...pure-default-replica-interval-07de0a56f61c7c1e.yaml | 10 ++++++++++ 4 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 releasenotes/notes/pure-default-replica-interval-07de0a56f61c7c1e.yaml diff --git a/cinder/tests/unit/volume/drivers/test_pure.py b/cinder/tests/unit/volume/drivers/test_pure.py index bc894158157..0e7473aada8 100644 --- a/cinder/tests/unit/volume/drivers/test_pure.py +++ b/cinder/tests/unit/volume/drivers/test_pure.py @@ -60,7 +60,7 @@ GET_ARRAY_SECONDARY = {"version": "99.9.9", REPLICATION_TARGET_TOKEN = "12345678-abcd-1234-abcd-1234567890ab" REPLICATION_PROTECTION_GROUP = "cinder-group" -REPLICATION_INTERVAL_IN_SEC = 900 +REPLICATION_INTERVAL_IN_SEC = 3600 REPLICATION_RETENTION_SHORT_TERM = 14400 REPLICATION_RETENTION_LONG_TERM = 6 REPLICATION_RETENTION_LONG_TERM_PER_DAY = 3 diff --git a/cinder/volume/drivers/pure.py b/cinder/volume/drivers/pure.py index f13ed3ececc..87edfc3c99b 100644 --- a/cinder/volume/drivers/pure.py +++ b/cinder/volume/drivers/pure.py @@ -61,7 +61,7 @@ PURE_OPTS = [ "max_over_subscription_ratio config option."), # These are used as default settings. In future these can be overridden # by settings in volume-type. - cfg.IntOpt("pure_replica_interval_default", default=900, + cfg.IntOpt("pure_replica_interval_default", default=3600, help="Snapshot replication interval in seconds."), cfg.IntOpt("pure_replica_retention_short_term_default", default=14400, help="Retain all snapshots on target for this " @@ -1719,7 +1719,7 @@ class PureISCSIDriver(PureBaseVolumeDriver, san.SanISCSIDriver): the underlying storage connectivity with the FlashArray. """ - VERSION = "6.0.0" + VERSION = "7.0.0" def __init__(self, *args, **kwargs): execute = kwargs.pop("execute", utils.execute) @@ -1907,7 +1907,7 @@ class PureFCDriver(PureBaseVolumeDriver, driver.FibreChannelDriver): supports the Cinder Fibre Channel Zone Manager. """ - VERSION = "4.0.0" + VERSION = "5.0.0" def __init__(self, *args, **kwargs): execute = kwargs.pop("execute", utils.execute) diff --git a/doc/source/configuration/block-storage/drivers/pure-storage-driver.rst b/doc/source/configuration/block-storage/drivers/pure-storage-driver.rst index 6e39fd1715b..cb75477f4dc 100644 --- a/doc/source/configuration/block-storage/drivers/pure-storage-driver.rst +++ b/doc/source/configuration/block-storage/drivers/pure-storage-driver.rst @@ -10,7 +10,7 @@ Support for iSCSI storage protocol is available with the PureISCSIDriver Volume Driver class, and Fibre Channel with PureFCDriver. All drivers are compatible with Purity FlashArrays that support the REST -API version 1.2, 1.3, or 1.4 (Purity 4.0.0 and newer). +API version 1.2, 1.3, 1.4, or 1.5 (Purity 4.0.0 and newer). Limitations and known issues ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -237,7 +237,7 @@ Option Description Default ``pure_replica_interval_default`` Snapshot replication interval in - seconds. ``900`` + seconds. ``3600`` ``pure_replica_retention_short_term_default`` Retain all snapshots on target for diff --git a/releasenotes/notes/pure-default-replica-interval-07de0a56f61c7c1e.yaml b/releasenotes/notes/pure-default-replica-interval-07de0a56f61c7c1e.yaml new file mode 100644 index 00000000000..76f35676922 --- /dev/null +++ b/releasenotes/notes/pure-default-replica-interval-07de0a56f61c7c1e.yaml @@ -0,0 +1,10 @@ +--- +upgrade: + - The default value for pure_replica_interval_default + used by Pure Storage volume drivers has changed from + 900 to 3600 seconds. +fixes: + - Fixes an issue where starting the Pure volume drivers + with replication enabled and default values for + pure_replica_interval_default would cause an error to + be raised from the backend. \ No newline at end of file