Merge "Updates DevStack to match Zaqar's API name change"
diff --git a/files/rpms/keystone b/files/rpms/keystone
index 7182091..e1873b7 100644
--- a/files/rpms/keystone
+++ b/files/rpms/keystone
@@ -1,3 +1,4 @@
+MySQL-python
python-greenlet
libxslt-devel # dist:f20
python-lxml #dist:f19,f20
diff --git a/lib/ceilometer b/lib/ceilometer
index 0449254..242ff6c 100644
--- a/lib/ceilometer
+++ b/lib/ceilometer
@@ -154,7 +154,7 @@
if [ "$CEILOMETER_BACKEND" = 'mysql' ] || [ "$CEILOMETER_BACKEND" = 'postgresql' ] ; then
iniset $CEILOMETER_CONF database connection `database_connection_url ceilometer`
- iniset $CEILOMETER_CONF DEFAULT collector_workers $(( ($(nproc) + 1) / 2 ))
+ iniset $CEILOMETER_CONF DEFAULT collector_workers $API_WORKERS
else
iniset $CEILOMETER_CONF database connection mongodb://localhost:27017/ceilometer
configure_mongodb
diff --git a/lib/cinder b/lib/cinder
index 5c487a2..e767fa8 100644
--- a/lib/cinder
+++ b/lib/cinder
@@ -307,9 +307,7 @@
iniset $CINDER_CONF keystone_authtoken admin_tenant_name $SERVICE_TENANT_NAME
iniset $CINDER_CONF keystone_authtoken admin_password $SERVICE_PASSWORD
- if [ -n "$API_WORKERS" ]; then
- iniset $CINDER_CONF DEFAULT osapi_volume_workers "$API_WORKERS"
- fi
+ iniset $CINDER_CONF DEFAULT osapi_volume_workers "$API_WORKERS"
}
# create_cinder_accounts() - Set up common required cinder accounts
diff --git a/lib/glance b/lib/glance
index d6d12ca..054a7af 100644
--- a/lib/glance
+++ b/lib/glance
@@ -138,9 +138,7 @@
# sections.
iniset $GLANCE_API_CONF glance_store filesystem_store_datadir $GLANCE_IMAGE_DIR/
- if [ -n "$API_WORKERS" ]; then
- iniset $GLANCE_API_CONF DEFAULT workers "$API_WORKERS"
- fi
+ iniset $GLANCE_API_CONF DEFAULT workers "$API_WORKERS"
# Store the images in swift if enabled.
if is_service_enabled s-proxy; then
diff --git a/lib/keystone b/lib/keystone
index be62607..b6a4e10 100644
--- a/lib/keystone
+++ b/lib/keystone
@@ -293,6 +293,9 @@
fi
iniset $KEYSTONE_CONF DEFAULT max_token_size 16384
+
+ iniset $KEYSTONE_CONF DEFAULT admin_workers "$API_WORKERS"
+ # Public workers will use the server default, typically number of CPU.
}
function configure_keystone_extensions {
diff --git a/lib/nova b/lib/nova
index c3558cb..0fed00d 100644
--- a/lib/nova
+++ b/lib/nova
@@ -519,11 +519,9 @@
iniset_rpc_backend nova $NOVA_CONF DEFAULT
iniset $NOVA_CONF glance api_servers "$GLANCE_HOSTPORT"
- if [ -n "$API_WORKERS" ]; then
- iniset $NOVA_CONF DEFAULT osci_compute_workers "$API_WORKERS"
- iniset $NOVA_CONF DEFAULT ec2_workers "$API_WORKERS"
- iniset $NOVA_CONF DEFAULT metadata_workers "$API_WORKERS"
- fi
+ iniset $NOVA_CONF DEFAULT osci_compute_workers "$API_WORKERS"
+ iniset $NOVA_CONF DEFAULT ec2_workers "$API_WORKERS"
+ iniset $NOVA_CONF DEFAULT metadata_workers "$API_WORKERS"
}
function init_nova_cells {
diff --git a/lib/nova_plugins/hypervisor-fake b/lib/nova_plugins/hypervisor-fake
index e7a833f..dc93633 100644
--- a/lib/nova_plugins/hypervisor-fake
+++ b/lib/nova_plugins/hypervisor-fake
@@ -47,7 +47,7 @@
iniset $NOVA_CONF DEFAULT quota_security_groups -1
iniset $NOVA_CONF DEFAULT quota_security_group_rules -1
iniset $NOVA_CONF DEFAULT quota_key_pairs -1
- iniset $NOVA_CONF DEFAULT scheduler_default_filters "RetryFilter,AvailabilityZoneFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter"
+ iniset $NOVA_CONF DEFAULT scheduler_default_filters "RetryFilter,AvailabilityZoneFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,CoreFilter,RamFilter,DiskFilter"
}
# install_nova_hypervisor() - Install external components
diff --git a/lib/swift b/lib/swift
index 50e2482..a8dfe77 100644
--- a/lib/swift
+++ b/lib/swift
@@ -269,7 +269,7 @@
iniset ${swift_node_config} DEFAULT log_facility LOG_LOCAL${log_facility}
iniuncomment ${swift_node_config} DEFAULT workers
- iniset ${swift_node_config} DEFAULT workers 1
+ iniset ${swift_node_config} DEFAULT workers ${API_WORKERS:-1}
iniuncomment ${swift_node_config} DEFAULT disable_fallocate
iniset ${swift_node_config} DEFAULT disable_fallocate true
diff --git a/lib/trove b/lib/trove
index 8628e35..cd2bcb0 100644
--- a/lib/trove
+++ b/lib/trove
@@ -144,6 +144,8 @@
iniset $TROVE_CONF_DIR/trove.conf DEFAULT sql_connection `database_connection_url trove`
iniset $TROVE_CONF_DIR/trove.conf DEFAULT default_datastore $TROVE_DATASTORE_TYPE
setup_trove_logging $TROVE_CONF_DIR/trove.conf
+ iniset $TROVE_CONF_DIR/trove.conf DEFAULT trove_api_workers "$API_WORKERS"
+
# (Re)create trove taskmanager conf file if needed
if is_service_enabled tr-tmgr; then
diff --git a/stackrc b/stackrc
index 936eb9c..580fabf 100644
--- a/stackrc
+++ b/stackrc
@@ -511,10 +511,11 @@
# Allow the use of an alternate protocol (such as https) for service endpoints
SERVICE_PROTOCOL=${SERVICE_PROTOCOL:-http}
-# Sets the maximum number of workers for various services and can restrict
+# Sets the maximum number of workers for most services to reduce
# the memory used where there are a large number of CPUs present
# (the default number of workers for many services is the number of CPUs)
-# API_WORKERS=4
+# Also sets the minimum number of workers to 2.
+API_WORKERS=${API_WORKERS:=$(( ($(nproc)/2)<2 ? 2 : ($(nproc)/2) ))}
# Local variables:
# mode: shell-script