This is an automated email from the ASF dual-hosted git repository. markusthoemmes pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git
The following commit(s) were added to refs/heads/master by this push: new cdb4be7 Make blackbox invoker fraction configurable via Ansible (#2773) cdb4be7 is described below commit cdb4be70e0c47019e75e8d3fad5308f6f4251ea7 Author: Sven Lange-Last <sven.lange-l...@de.ibm.com> AuthorDate: Tue Sep 19 18:03:11 2017 +0200 Make blackbox invoker fraction configurable via Ansible (#2773) Extend Ansible deploy playbook for controller role such that it passes the blackbox fraction setting as environment variable when running the controller container. Make the blackbox fraction a required property of the LoadBalancerService such that the setting is read from the environment. Allow overriding of the default blackbox fraction in Ansible. All this is needed to vary the proportion between managed and blackbox invokers to accomodate usage in production. --- ansible/group_vars/all | 2 +- ansible/roles/controller/tasks/deploy.yml | 1 + common/scala/src/main/scala/whisk/core/WhiskConfig.scala | 2 +- .../src/main/scala/whisk/core/loadBalancer/LoadBalancerService.scala | 3 ++- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ansible/group_vars/all b/ansible/group_vars/all index d5d6a0f..317ebb7 100644 --- a/ansible/group_vars/all +++ b/ansible/group_vars/all @@ -106,7 +106,7 @@ controller: basePort: 10001 heap: "{{ controller_heap | default('2g') }}" arguments: "{{ controller_arguments | default('') }}" - blackboxFraction: 0.10 + blackboxFraction: "{{ controller_blackbox_fraction | default(0.10) }}" instances: "{{ groups['controllers'] | length }}" registry: diff --git a/ansible/roles/controller/tasks/deploy.yml b/ansible/roles/controller/tasks/deploy.yml index b055a63..1b791ef 100644 --- a/ansible/roles/controller/tasks/deploy.yml +++ b/ansible/roles/controller/tasks/deploy.yml @@ -54,6 +54,7 @@ "LIMITS_ACTIONS_INVOKES_CONCURRENTINSYSTEM": "{{ limits.concurrentInvocationsSystem }}" "LIMITS_TRIGGERS_FIRES_PERMINUTE": "{{ limits.firesPerMinute }}" "LIMITS_ACTIONS_SEQUENCE_MAXLENGTH": "{{ limits.sequenceMaxLength }}" + "CONTROLLER_BLACKBOXFRACTION": "{{ controller.blackboxFraction }}" "LOADBALANCER_INVOKERBUSYTHRESHOLD": "{{ invoker.busyThreshold }}" "RUNTIMES_MANIFEST": "{{ runtimesManifest | to_json }}" diff --git a/common/scala/src/main/scala/whisk/core/WhiskConfig.scala b/common/scala/src/main/scala/whisk/core/WhiskConfig.scala index 2429e44..051c883 100644 --- a/common/scala/src/main/scala/whisk/core/WhiskConfig.scala +++ b/common/scala/src/main/scala/whisk/core/WhiskConfig.scala @@ -196,7 +196,7 @@ object WhiskConfig { val mainDockerEndpoint = "main.docker.endpoint" - private val controllerBlackboxFraction = "controller.blackboxFraction" + val controllerBlackboxFraction = "controller.blackboxFraction" val controllerInstances = "controller.instances" val loadbalancerInvokerBusyThreshold = "loadbalancer.invokerBusyThreshold" diff --git a/core/controller/src/main/scala/whisk/core/loadBalancer/LoadBalancerService.scala b/core/controller/src/main/scala/whisk/core/loadBalancer/LoadBalancerService.scala index 4efbad6..b7ee0dd 100644 --- a/core/controller/src/main/scala/whisk/core/loadBalancer/LoadBalancerService.scala +++ b/core/controller/src/main/scala/whisk/core/loadBalancer/LoadBalancerService.scala @@ -313,7 +313,8 @@ class LoadBalancerService(config: WhiskConfig, instance: InstanceId, entityStore } object LoadBalancerService { - def requiredProperties = kafkaHost ++ Map(loadbalancerInvokerBusyThreshold -> null) + def requiredProperties = + kafkaHost ++ Map(loadbalancerInvokerBusyThreshold -> null, controllerBlackboxFraction -> null) /** Memoizes the result of `f` for later use. */ def memoize[I, O](f: I => O): I => O = new scala.collection.mutable.HashMap[I, O]() { -- To stop receiving notification emails like this one, please contact ['"commits@openwhisk.apache.org" <commits@openwhisk.apache.org>'].