ddragosd closed pull request #2902: make INVOKER_NAME optional
URL: https://github.com/apache/incubator-openwhisk/pull/2902
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
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 aa8d88ff43..0e47bd4883 100644
--- a/core/invoker/src/main/scala/whisk/core/invoker/Invoker.scala
+++ b/core/invoker/src/main/scala/whisk/core/invoker/Invoker.scala
@@ -60,7 +60,7 @@ object Invoker {
invokerContainerDns -> "",
invokerContainerNetwork -> null,
invokerUseRunc -> "true") ++
- Map(invokerName -> null)
+ Map(invokerName -> "")
def main(args: Array[String]): Unit = {
implicit val ec =
ExecutionContextFactory.makeCachedThreadPoolExecutionContext()
@@ -100,6 +100,9 @@ object Invoker {
s"Must provide valid Redis host and port to use dynamicId
assignment (${config.redisHostName}:${config.redisHostPort})")
}
val invokerName = config.invokerName
+ if (invokerName.trim.isEmpty) {
+ abort("Invoker name can't be empty to use dynamicId assignment.")
+ }
val redisClient = new RedisClient(config.redisHostName,
config.redisHostPort.toInt)
val assignedId = redisClient
.hget("controller:registar:idAssignments", invokerName)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services