You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by ra...@apache.org on 2017/10/20 17:56:20 UTC
[incubator-openwhisk] branch master updated: Invokers only require
Redis if using dynamic Id assignment (#2871)
This is an automated email from the ASF dual-hosted git repository.
rabbah 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 45e392e Invokers only require Redis if using dynamic Id assignment (#2871)
45e392e is described below
commit 45e392e13fc7cd659e2a29b20ab070288412e200
Author: David Grove <dg...@users.noreply.github.com>
AuthorDate: Fri Oct 20 13:56:18 2017 -0400
Invokers only require Redis if using dynamic Id assignment (#2871)
Make REDIS_HOST_NAME and REDIS_HOST_PORT optional for the invoker
and only trap as a configuration error when the invoker actually
tries to perform dynamicId assignment.
---
common/scala/src/main/scala/whisk/core/WhiskConfig.scala | 1 -
core/invoker/src/main/scala/whisk/core/invoker/Invoker.scala | 8 +++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/common/scala/src/main/scala/whisk/core/WhiskConfig.scala b/common/scala/src/main/scala/whisk/core/WhiskConfig.scala
index e90e627..7e9d7c1 100644
--- a/common/scala/src/main/scala/whisk/core/WhiskConfig.scala
+++ b/common/scala/src/main/scala/whisk/core/WhiskConfig.scala
@@ -221,7 +221,6 @@ object WhiskConfig {
val edgeHost = Map(edgeHostName -> null, edgeHostApiPort -> null)
val invokerHosts = Map(invokerHostsList -> null)
val kafkaHost = Map(kafkaHostName -> null, kafkaHostPort -> null)
- val redisHost = Map(redisHostName -> null, redisHostPort -> null)
val runtimesManifest = "runtimes.manifest"
diff --git a/core/invoker/src/main/scala/whisk/core/invoker/Invoker.scala b/core/invoker/src/main/scala/whisk/core/invoker/Invoker.scala
index bf6bb39..f08b9b4 100644
--- a/core/invoker/src/main/scala/whisk/core/invoker/Invoker.scala
+++ b/core/invoker/src/main/scala/whisk/core/invoker/Invoker.scala
@@ -50,7 +50,7 @@ object Invoker {
WhiskEntityStore.requiredProperties ++
WhiskActivationStore.requiredProperties ++
kafkaHost ++
- redisHost ++
+ Map(redisHostName -> "", redisHostPort -> "") ++
wskApiHost ++ Map(
dockerImageTag -> "latest",
invokerNumCore -> "4",
@@ -94,6 +94,12 @@ object Invoker {
id
}
.getOrElse {
+ if (config.redisHostName.trim.isEmpty || config.redisHostPort.trim.isEmpty) {
+ logger.error(
+ this,
+ s"Must provide valid Redis host and port to use dynamicId assignment (${config.redisHostName}:${config.redisHostPort})")
+ abort()
+ }
val invokerName = config.invokerName
val redisClient = new RedisClient(config.redisHostName, config.redisHostPort.toInt)
val assignedId = redisClient
--
To stop receiving notification emails like this one, please contact
['"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>'].