to adjust the worker mutiplier for api service so that not too many 15/18415/1
authorNarinder Gupta <narinder.gupta@canonical.com>
Thu, 11 Aug 2016 10:30:57 +0000 (05:30 -0500)
committerNarinder Gupta <narinder.gupta@canonical.com>
Thu, 11 Aug 2016 10:32:19 +0000 (05:32 -0500)
instance of API service spawned up.

Change-Id: Ia1d5b542c3f97cbdc7b5523fc8d45b90ed836aa2
Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
ci/02-deploybundle.sh
ci/config_tpl/bundle_tpl/ceilometer.yaml
ci/config_tpl/bundle_tpl/cinder.yaml
ci/config_tpl/bundle_tpl/glance.yaml
ci/config_tpl/bundle_tpl/keystone.yaml
ci/config_tpl/bundle_tpl/neutron-api.yaml
ci/config_tpl/bundle_tpl/nova-cloud-controller.yaml
ci/config_tpl/bundle_tpl/openstack-dashboard.yaml
ci/config_tpl/bundle_tpl/phase2-overrides.yaml
ci/default_deployment_config.yaml
ci/deploy.sh

index 12c58fc..22d4497 100755 (executable)
@@ -52,6 +52,24 @@ if [ -e ~/.juju/deployment.yaml ]; then
       cephdisk=`grep "ceph-disk" deployconfig.yaml | cut -d ':' -f 2 | sed -e 's/ //'`
       osdomname=`grep "os-domain-name" deployconfig.yaml | cut -d ':' -f 2 | sed -e 's/ //'`
    fi
+
+    workmutiple=`maas maas nodes list | grep "cpu_count" | cut -d ':' -f 2 | sed -e 's/ //' | tr ',' ' '`
+    max=0
+    for v in ${workmutiple[@]}; do
+        if (( $v > $max )); then max=$v; fi;
+    done
+    echo $max
+
+    if [ "$max" -lt 8 ];then
+        workmutiple=1
+    elif [ "$max" -lt 32 ]; then
+        workmutiple=0.25
+    elif [ "$max" -lt 72 ]; then
+        workmutiple=0.1
+    else
+        workmutiple=0.05
+    fi
+    sed -i "s/worker-multiplier: 2/worker-multiplier: ${workmutiple}/g" default_deployment_config.yaml
 fi
 
 case "$opnfvlab" in
index 66c24c8..031551a 100644 (file)
@@ -7,10 +7,6 @@
       num_units: {{ unit_qty() }}
       options:
 {% if os.ha.mode == 'ha' %}
-        haproxy-server-timeout: 10000
-        haproxy-client-timeout: 10000
-        haproxy-queue-timeout: 10000
-        haproxy-connect-timeout: 10000
         vip: {{ opnfv.vip.ceilometer }}
 {% endif %}
 {% if os.beta.public_api %}
index 175c67e..4c41747 100644 (file)
@@ -3,10 +3,6 @@
       num_units: {{ unit_qty() }}
       options:
 {% if os.ha.mode == 'ha' %}
-        haproxy-server-timeout: 10000
-        haproxy-client-timeout: 10000
-        haproxy-queue-timeout: 10000
-        haproxy-connect-timeout: 10000
         vip: {{ opnfv.vip.cinder }}
 {% endif %}
 {% if os.beta.public_api %}
index 31f9c3b..8499932 100644 (file)
@@ -3,10 +3,6 @@
       num_units: {{ unit_qty() }}
       options:
 {% if os.ha.mode == 'ha' %}
-        haproxy-server-timeout: 10000
-        haproxy-client-timeout: 10000
-        haproxy-queue-timeout: 10000
-        haproxy-connect-timeout: 10000
         vip: {{ opnfv.vip.glance }}
 {% endif %}
 {% if os.beta.public_api %}
index 05df44d..24f5b10 100644 (file)
@@ -5,10 +5,6 @@
         admin-password: {{ opnfv.admin_password | default(os.admin.password) }}
         admin-token: {{ os.admin.name }}
 {% if os.ha.mode == 'ha' %}
-        haproxy-server-timeout: 10000
-        haproxy-client-timeout: 10000
-        haproxy-queue-timeout: 10000
-        haproxy-connect-timeout: 10000
         vip: {{ opnfv.vip.keystone }}
 {% endif %}
 {% if os.beta.public_api %}
index 321c2e8..4de6e07 100644 (file)
@@ -5,10 +5,6 @@
         neutron-security-groups: true
 {% if os.ha.mode == 'ha' %}
         vip: {{ opnfv.vip.neutron }}
-        haproxy-server-timeout: 10000
-        haproxy-client-timeout: 10000
-        haproxy-queue-timeout: 10000
-        haproxy-connect-timeout: 10000
 {% endif %}
 {% if os.network.controller == 'nosdn' %}
         flat-network-providers: "*"
index 497ef29..88e3f73 100644 (file)
@@ -6,10 +6,6 @@
         neutron-external-network: ext-net
         service-guard: true
 {% if os.ha.mode == 'ha' %}
-        haproxy-server-timeout: 10000
-        haproxy-client-timeout: 10000
-        haproxy-queue-timeout: 10000
-        haproxy-connect-timeout: 10000
         vip: {{ opnfv.vip.nova }}
 {% endif %}
 {% if opnfv.domain is defined %}
index 8d60475..83408dc 100644 (file)
@@ -5,10 +5,6 @@
         secret: admin
         webroot: /
 {% if os.ha.mode == 'ha' %}
-        haproxy-server-timeout: 10000
-        haproxy-client-timeout: 10000
-        haproxy-queue-timeout: 10000
-        haproxy-connect-timeout: 10000
         vip: {{ opnfv.vip.dashboard }}
 {% endif %}
 {% if os.beta.public_api %}
index 3335030..ebefeab 100644 (file)
@@ -4,6 +4,17 @@
 {% if os.network.ipv6 %}
     prefer-ipv6: {{ os.network.ipv6 }}
 {% endif %}
+{% if os.ha.mode == 'ha' %}
+{% if os.api.haproxy_timeout %}
+    haproxy-server-timeout: {{ os.api.haproxy_timeout }}
+    haproxy-client-timeout: {{ os.api.haproxy_timeout }}
+    haproxy-queue-timeout: {{ os.api.haproxy_timeout }}
+    haproxy-connect-timeout: {{ os.api.haproxy_timeout }}
+{% endif %}
+{% endif %}
+{% if os.api.worker_multiplier %}
+    worker-multiplier: {{ os.api.worker_multiplier }}
+{% endif %}
 {% if os.network.dvr %}
     enable-dvr: true
 {% endif %}
index fe5b669..4b941a7 100644 (file)
@@ -7,6 +7,9 @@ os:
         cluster_size: 3
     lxd: False
     region: RegionOne
+    api:
+        worker_multiplier: 2
+        haproxy_timeout: 10000
     admin:
         role: admin
         name: admin
index 15aa60e..2e57589 100755 (executable)
@@ -152,7 +152,7 @@ check_status() {
     status=`juju action do heat/0 domain-setup`
     echo $status
     juju expose ceph-radosgw
-    juju ssh ceph/0 \ 'sudo radosgw-admin user create --uid="ubuntu" --display-name="Ubuntu Ceph"'
+    #juju ssh ceph/0 \ 'sudo radosgw-admin user create --uid="ubuntu" --display-name="Ubuntu Ceph"'
 
     echo "...... deployment finishing ......."
 }