]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Set a sane default for state_path
authorMehdi Abaakouk <mehdi.abaakouk@enovance.com>
Thu, 17 Oct 2013 12:41:01 +0000 (14:41 +0200)
committerMehdi Abaakouk <sileht@sileht.net>
Thu, 30 Jan 2014 08:53:51 +0000 (09:53 +0100)
This change set a sane default to state_path, removed no more used cfg
options, and put the previous state_path for tests only.

DocImpact
Closes bug: #1240879

Change-Id: If56b60950d8ebf9111ef99bfbf2cb549bbb6b29b

cinder/common/config.py
cinder/tests/conf_fixture.py
etc/cinder/cinder.conf.sample

index 4b4703673f36068677e2607e97171f080349bec9..969f8c3c1de4629585ef5daf61f25ec38ec5143b 100644 (file)
@@ -25,7 +25,6 @@ stepping stone.
 
 """
 
-import os
 import socket
 
 from oslo.config import cfg
@@ -59,13 +58,9 @@ core_opts = [
     cfg.StrOpt('api_paste_config',
                default="api-paste.ini",
                help='File name for the paste.deploy config for cinder-api'),
-    cfg.StrOpt('pybasedir',
-               default=os.path.abspath(os.path.join(os.path.dirname(__file__),
-                                                    '..',
-                                                    '..')),
-               help='Directory where the cinder python module is installed'),
     cfg.StrOpt('state_path',
-               default='$pybasedir',
+               default='/var/lib/cinder',
+               deprecated_name='pybasedir',
                help="Top-level directory for maintaining cinder's state"), ]
 
 debug_opts = [
index 5f88f6348f9fc3369da70171fcec5391045bca68..35ea037beec174a2d2a4b099e8976e450f7a4ea9 100644 (file)
@@ -14,6 +14,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+import os
 
 from oslo.config import cfg
 
@@ -50,3 +51,5 @@ def set_defaults(conf):
     conf.set_default('fixed_key', default='0' * 64, group='keymgr')
     conf.set_default('scheduler_driver',
                      'cinder.scheduler.filter_scheduler.FilterScheduler')
+    conf.set_default('state_path', os.path.abspath(
+        os.path.join(os.path.dirname(__file__), '..', '..')))
index abd56288f25b8a9438c3a70afe21da8780af7031..0dc38e06192f36ce63bf46ff8f1f2fde0a7fc0b4 100644 (file)
 # value)
 #api_paste_config=api-paste.ini
 
-# Directory where the cinder python module is installed
-# (string value)
-#pybasedir=/usr/lib/python/site-packages
-
 # Top-level directory for maintaining cinder's state (string
 # value)
-#state_path=$pybasedir
+# Deprecated group/name - [DEFAULT]/pybasedir
+#state_path=/var/lib/cinder
 
 # ip address of this host (string value)
 #my_ip=10.0.0.1