From: Zhiteng Huang <zhithuang@ebaysf.com>
Date: Fri, 27 Jun 2014 19:38:08 +0000 (+0800)
Subject: Restore osapi_volume_workers config option
X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=f50be86330e81cb9dd61b8a2a635fa1a784b702a;p=openstack-build%2Fcinder-build.git

Restore osapi_volume_workers config option

osapi_volume_worker was introduced when enabling multi-process API
support for Cinder. However, this config option was accidentally
dropped in commit 464277220ddb800ac69562649fde62e5ca9358c4
(https://review.openstack.org/#/c/67657/20/cinder/service.py).
As a result, the value in cinder.conf wouldn't be honored.  This
change restore this config option.

Closes-bug: #1335295

Change-Id: Ib2d8532d3e6d0f48da0bc4dd6f6e64bfff8973ea
---

diff --git a/cinder/service.py b/cinder/service.py
index 4b5caa5bf..2c00d5c68 100755
--- a/cinder/service.py
+++ b/cinder/service.py
@@ -57,7 +57,10 @@ service_opts = [
                help='IP address on which OpenStack Volume API listens'),
     cfg.IntOpt('osapi_volume_listen_port',
                default=8776,
-               help='Port on which OpenStack Volume API listens'), ]
+               help='Port on which OpenStack Volume API listens'),
+    cfg.IntOpt('osapi_volume_workers',
+               default=1,
+               help='Number of workers for OpenStack Volume API service'), ]
 
 CONF = cfg.CONF
 CONF.register_opts(service_opts)
diff --git a/etc/cinder/cinder.conf.sample b/etc/cinder/cinder.conf.sample
index 018ea0a19..12cb0dfe0 100644
--- a/etc/cinder/cinder.conf.sample
+++ b/etc/cinder/cinder.conf.sample
@@ -272,6 +272,10 @@
 # Port on which OpenStack Volume API listens (integer value)
 #osapi_volume_listen_port=8776
 
+# Number of workers for OpenStack Volume API service (integer
+# value)
+#osapi_volume_workers=1
+
 
 #
 # Options defined in cinder.test