]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Misused and not used config options
authorZhongyue Luo <lzyeval@gmail.com>
Mon, 16 Jul 2012 19:37:54 +0000 (20:37 +0100)
committerMark McLoughlin <markmc@redhat.com>
Mon, 16 Jul 2012 20:49:38 +0000 (21:49 +0100)
Cherry picks dc9c3cb from Nova.

Fixes bug #1000071

[nova.api.sizelimit.py]
osapi_max_request_body_size: BoolOpt -> IntOpt

[nova.rpc.__init__.py]
allowed_rpc_exception_modules: IntOpt -> ListOpt

[nova.volume.driver.py]
num_shell_tries: StrOpt -> IntOpt
num_iscsi_scan_tries: StrOpt -> IntOpt

[nova.volume.driver.py]
san_thin_provision: 'true' -> True
san_is_local: 'false' -> False

Change-Id: If283dd7c4feba69c07bd483acd14f45c2659b743

cinder/api/sizelimit.py
cinder/rpc/__init__.py
cinder/volume/driver.py
cinder/volume/san.py

index 3bde3bf8dc066b9900ac8434f0d2d8be758f81d9..3da38f3ac86488c09d0976ce7c04d3efbd705e8b 100644 (file)
@@ -29,9 +29,9 @@ from cinder import wsgi
 
 
 #default request size is 112k
-max_request_body_size_opt = cfg.BoolOpt('osapi_max_request_body_size',
-        default=114688,
-        help='')
+max_request_body_size_opt = cfg.IntOpt('osapi_max_request_body_size',
+                                       default=114688,
+                                       help='')
 
 FLAGS = flags.FLAGS
 FLAGS.register_opt(max_request_body_size_opt)
index 0340116f6fba09c80d4b946fb4f1414d7237bcb4..ea36c9c38ca4a190bcbb1f3c9ab4412634b6ef64 100644 (file)
@@ -34,7 +34,7 @@ rpc_opts = [
     cfg.IntOpt('rpc_response_timeout',
                default=60,
                help='Seconds to wait for a response from call or multicall'),
-    cfg.IntOpt('allowed_rpc_exception_modules',
+    cfg.ListOpt('allowed_rpc_exception_modules',
                default=['cinder.exception'],
                help='Modules of exceptions that are permitted to be recreated'
                     'upon receiving exception data from an rpc call.'),
index 54709e1a24641ae585da46ced0e4ff18c1f1538f..c1b2229b26f845a8bee989833fe60535081dc45e 100644 (file)
@@ -36,10 +36,10 @@ volume_opts = [
     cfg.StrOpt('volume_group',
                default='cinder-volumes',
                help='Name for the VG that will contain exported volumes'),
-    cfg.StrOpt('num_shell_tries',
+    cfg.IntOpt('num_shell_tries',
                default=3,
                help='number of times to attempt to run flakey shell commands'),
-    cfg.StrOpt('num_iscsi_scan_tries',
+    cfg.IntOpt('num_iscsi_scan_tries',
                default=3,
                help='number of times to rescan iSCSI target to find volume'),
     cfg.IntOpt('iscsi_num_targets',
index 26e214222df3eec62bc31c71c2f0ea18610bce29..af21612594c7aaec45fee71b930d25c2999634ef 100644 (file)
@@ -45,7 +45,7 @@ LOG = logging.getLogger(__name__)
 
 san_opts = [
     cfg.BoolOpt('san_thin_provision',
-                default='true',
+                default=True,
                 help='Use thin provisioning for SAN volumes?'),
     cfg.StrOpt('san_ip',
                default='',
@@ -66,7 +66,7 @@ san_opts = [
                default=22,
                help='SSH port to use with SAN'),
     cfg.BoolOpt('san_is_local',
-                default='false',
+                default=False,
                 help='Execute commands locally instead of over SSH; '
                      'use if the volume service is running on the SAN device'),
     cfg.StrOpt('san_zfs_volume_base',