]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Slow down Storwize driver initialization
authorTao Bai <baitaosh@cn.ibm.com>
Wed, 2 Jul 2014 10:17:50 +0000 (03:17 -0700)
committerTao Bai <baitaosh@cn.ibm.com>
Mon, 7 Jul 2014 05:06:56 +0000 (22:06 -0700)
Storwize has the limitation that can not burst more than
3 new ssh connection within 1 second.So slow down storwize
driver initialization.

Closes-Bug: #1335722
Change-Id: Id442cd6421ef23b953a3cb45a5f6dd6969064a6e

cinder/volume/drivers/ibm/storwize_svc/__init__.py

index 8105356439b56be823c1bb5863c7f4df24f54279..471ddad3363ef153d7a7cac736a631dbd1ea3afd 100644 (file)
@@ -35,6 +35,8 @@ Limitations:
 """
 
 import math
+import time
+
 from oslo.config import cfg
 
 from cinder import context
@@ -137,6 +139,9 @@ class StorwizeSVCDriver(san.SanDriver):
                        'system_id': None,
                        'code_level': None,
                        }
+        # Storwize has the limitation that can not burst more than 3 new ssh
+        # connections within 1 second. So slow down the initialization.
+        time.sleep(1)
 
     def do_setup(self, ctxt):
         """Check that we have all configuration details from the storage."""