From 86fc539a23b0b2cdd6e0803aa3a3cb10fc5758a6 Mon Sep 17 00:00:00 2001 From: Jeegn Chen Date: Fri, 8 Aug 2014 16:27:38 +0800 Subject: [PATCH] EMC: Fix minor issue in VNX driver and unit tests There were some minor issues in initial commit of VNX Direct Driver Juno Update (https://review.openstack.org/#/c/104413/), such as typo, unclear config option help message and missing period. This change fix these issues. Change-Id: I82bac9695c8138cff858013b3affeb0557dfcc02 Closes-Bug: #1354272 --- cinder/tests/test_emc_vnxdirect.py | 12 ++++++------ cinder/volume/drivers/emc/emc_vnx_cli.py | 7 ++++++- etc/cinder/cinder.conf.sample | 10 +++++++--- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/cinder/tests/test_emc_vnxdirect.py b/cinder/tests/test_emc_vnxdirect.py index f2f0698ea..217e0c69f 100644 --- a/cinder/tests/test_emc_vnxdirect.py +++ b/cinder/tests/test_emc_vnxdirect.py @@ -872,7 +872,7 @@ Message : Error occurred because connection refused. \ Unable to establish a secure connection to the Management Server. """ FAKE_ERROR_MSG = FAKE_ERROR_MSG.replace('\n', ' ') - FAKE_MIGRATE_PROPETY = """\ + FAKE_MIGRATE_PROPERTY = """\ Source LU Name: volume-f6247ae1-8e1c-4927-aa7e-7f8e272e5c3d Source LU ID: 63950 Dest LU Name: volume-f6247ae1-8e1c-4927-aa7e-7f8e272e5c3d_dest @@ -884,7 +884,7 @@ Time Remaining: 0 second(s) """ results = [(FAKE_ERROR_MSG, 255), [SUCCEED, - (FAKE_MIGRATE_PROPETY, 0), + (FAKE_MIGRATE_PROPERTY, 0), ('The specified source LUN is not currently migrating', 23)]] fake_cli = self.driverSetup(commands, results) @@ -917,7 +917,7 @@ Time Remaining: 0 second(s) commands = [self.testData.MIGRATION_CMD(), self.testData.MIGRATION_VERIFY_CMD(1)] - FAKE_MIGRATE_PROPETY = """\ + FAKE_MIGRATE_PROPERTY = """\ Source LU Name: volume-f6247ae1-8e1c-4927-aa7e-7f8e272e5c3d Source LU ID: 63950 Dest LU Name: volume-f6247ae1-8e1c-4927-aa7e-7f8e272e5c3d_dest @@ -927,7 +927,7 @@ Current State: MIGRATED Percent Complete: 100 Time Remaining: 0 second(s) """ - results = [SUCCEED, [(FAKE_MIGRATE_PROPETY, 0), + results = [SUCCEED, [(FAKE_MIGRATE_PROPERTY, 0), ('The specified source LUN is not ' 'currently migrating', 23)]] @@ -957,7 +957,7 @@ Time Remaining: 0 second(s) commands = [self.testData.MIGRATION_CMD(5, 5), self.testData.MIGRATION_VERIFY_CMD(5)] - FAKE_MIGRATE_PROPETY = """\ + FAKE_MIGRATE_PROPERTY = """\ Source LU Name: volume-f6247ae1-8e1c-4927-aa7e-7f8e272e5c3d Source LU ID: 63950 Dest LU Name: volume-f6247ae1-8e1c-4927-aa7e-7f8e272e5c3d_dest @@ -967,7 +967,7 @@ Current State: MIGRATED Percent Complete: 100 Time Remaining: 0 second(s) """ - results = [SUCCEED, [(FAKE_MIGRATE_PROPETY, 0), + results = [SUCCEED, [(FAKE_MIGRATE_PROPERTY, 0), ('The specified source LUN is not ' 'currently migrating', 23)]] diff --git a/cinder/volume/drivers/emc/emc_vnx_cli.py b/cinder/volume/drivers/emc/emc_vnx_cli.py index 9324c6e00..f88f8d19e 100644 --- a/cinder/volume/drivers/emc/emc_vnx_cli.py +++ b/cinder/volume/drivers/emc/emc_vnx_cli.py @@ -61,13 +61,18 @@ loc_opts = [ help='Naviseccli Path.'), cfg.StrOpt('storage_vnx_pool_name', default=None, - help='Storage pool name'), + help='Storage pool name.'), cfg.StrOpt('san_secondary_ip', default=None, help='VNX secondary SP IP Address.'), cfg.IntOpt('default_timeout', default=60 * 24 * 365, help='Default Time Out For CLI operations in minutes. ' + 'For example, LUN migration is a typical long ' + 'running operation, which depends on the LUN size and ' + 'the load of the array. ' + 'An upper bound in the specific deployment can be set to ' + 'avoid unnecessary long wait. ' 'By default, it is 365 days long.'), cfg.IntOpt('max_luns_per_storage_group', default=255, diff --git a/etc/cinder/cinder.conf.sample b/etc/cinder/cinder.conf.sample index 38af8e7cb..ff739810b 100644 --- a/etc/cinder/cinder.conf.sample +++ b/etc/cinder/cinder.conf.sample @@ -1103,14 +1103,18 @@ # Naviseccli Path. (string value) #naviseccli_path= -# Storage pool name (string value) +# Storage pool name. (string value) #storage_vnx_pool_name= # VNX secondary SP IP Address. (string value) #san_secondary_ip= -# Default Time Out For CLI operations in minutes. By default, -# it is 365 days long. (integer value) +# Default Time Out For CLI operations in minutes. For example, +# LUN migration is a typical long running operation, which +# depends on the LUN size and the load of the array. An upper +# bound in the specific deployment can be set to avoid +# unnecessary long wait. By default, it is 365 days long. +# (integer value) #default_timeout=525600 # Default max number of LUNs in a storage group. By default, -- 2.45.2