Merge "VNX: Fix cloning failure when system is busy" into stable/pike

This commit is contained in:
Zuul
2018-01-22 17:35:01 +00:00
committed by Gerrit Code Review
3 changed files with 10 additions and 9 deletions

View File

@@ -12,7 +12,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
import unittest import unittest
from cinder import exception from cinder import exception
@@ -50,10 +49,12 @@ class TestClient(test.TestCase):
super(TestClient, self).setUp() super(TestClient, self).setUp()
self.origin_timeout = vnx_common.DEFAULT_TIMEOUT self.origin_timeout = vnx_common.DEFAULT_TIMEOUT
vnx_common.DEFAULT_TIMEOUT = 0 vnx_common.DEFAULT_TIMEOUT = 0
vnx_common.INTERVAL_30_SEC = 0
def tearDown(self): def tearDown(self):
super(TestClient, self).tearDown() super(TestClient, self).tearDown()
vnx_common.DEFAULT_TIMEOUT = self.origin_timeout vnx_common.DEFAULT_TIMEOUT = self.origin_timeout
vnx_common.INTERVAL_30_SEC = 30
@res_mock.patch_client @res_mock.patch_client
def test_create_lun(self, client, mocked): def test_create_lun(self, client, mocked):
@@ -116,7 +117,6 @@ class TestClient(test.TestCase):
src_id=4, src_id=4,
dst_id=5) dst_id=5)
lun.migrate.assert_called_with(5, storops.VNXMigrationRate.HIGH) lun.migrate.assert_called_with(5, storops.VNXMigrationRate.HIGH)
mock_sleep.assert_called_with(15)
@res_mock.patch_client @res_mock.patch_client
def test_session_finished_faulted(self, client, mocked): def test_session_finished_faulted(self, client, mocked):
@@ -256,10 +256,8 @@ class TestClient(test.TestCase):
def test_expand_lun_already_expanded(self, client, _ignore): def test_expand_lun_already_expanded(self, client, _ignore):
client.expand_lun('lun', 10) client.expand_lun('lun', 10)
@unittest.skip("Skip until bug #1578986 is fixed")
@utils.patch_sleep
@res_mock.patch_client @res_mock.patch_client
def test_expand_lun_not_ops_ready(self, client, _ignore, sleep_mock): def test_expand_lun_not_ops_ready(self, client, _ignore):
self.assertRaises(storops_ex.VNXLunPreparingError, self.assertRaises(storops_ex.VNXLunPreparingError,
client.expand_lun, 'lun', 10) client.expand_lun, 'lun', 10)
lun = client.vnx.get_lun() lun = client.vnx.get_lun()

View File

@@ -12,6 +12,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
import time
from oslo_log import log as logging from oslo_log import log as logging
from oslo_utils import excutils from oslo_utils import excutils
from oslo_utils import importutils from oslo_utils import importutils
@@ -227,7 +229,8 @@ class Client(object):
:returns Boolean: True or False :returns Boolean: True or False
""" """
src_lun = self.vnx.get_lun(lun_id=src_id) src_lun = self.vnx.get_lun(lun_id=src_id)
# Sleep 30 seconds to make sure the session starts on the VNX.
time.sleep(common.INTERVAL_30_SEC)
utils.wait_until(condition=self.session_finished, utils.wait_until(condition=self.session_finished,
interval=common.INTERVAL_30_SEC, interval=common.INTERVAL_30_SEC,
src_lun=src_lun) src_lun=src_lun)

View File

@@ -72,14 +72,14 @@ class VNXDriver(driver.ManageableVD,
Configurable migration rate support Configurable migration rate support
8.0.0 - New VNX Cinder driver 8.0.0 - New VNX Cinder driver
9.0.0 - Use asynchronous migration for cloning 9.0.0 - Use asynchronous migration for cloning
10.0.0 - Extend SMP size before aync migration when cloning from an 10.0.0 - Extend SMP size before async migration when cloning from an
image cache volume image cache volume
10.1.0 - Add QoS support 10.1.0 - Add QoS support
10.2.0 - Add replication group support 10.2.0 - Add replication group support
11.0.0 - Fix failure of migration during cloning
""" """
VERSION = '10.02.00' VERSION = '11.00.00'
VENDOR = 'Dell EMC' VENDOR = 'Dell EMC'
# ThirdPartySystems wiki page # ThirdPartySystems wiki page
CI_WIKI_NAME = "EMC_VNX_CI" CI_WIKI_NAME = "EMC_VNX_CI"