You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by dr...@apache.org on 2017/10/26 23:05:56 UTC

[incubator-openwhisk] branch master updated: make INVOKER_NAME optional (#2902)

This is an automated email from the ASF dual-hosted git repository.

dragos 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 d02b21d  make INVOKER_NAME optional (#2902)
d02b21d is described below

commit d02b21d2fc8429c0fb65a58e82b37939a301afb8
Author: ddragosd <dd...@gmail.com>
AuthorDate: Thu Oct 26 16:05:54 2017 -0700

    make INVOKER_NAME optional (#2902)
    
    * make INVOKER_NAME optional
    * abort on empty invoker name when redis host is specified
---
 core/invoker/src/main/scala/whisk/core/invoker/Invoker.scala | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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 aa8d88f..0e47bd4 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)

-- 
To stop receiving notification emails like this one, please contact
['"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>'].