rabbah commented on a change in pull request #2205: Add ability to deploy a 
"hot-standby" controller
URL: 
https://github.com/apache/incubator-openwhisk/pull/2205#discussion_r121169200
 
 

 ##########
 File path: 
core/controller/src/main/scala/whisk/core/controller/Controller.scala
 ##########
 @@ -177,13 +181,13 @@ object Controller {
         val config = new WhiskConfig(requiredProperties, optionalProperties)
 
         // if deploying multiple instances (scale out), must pass the instance 
number as the
-        // second argument.  (TODO .. seems fragile)
-        val instance = if (args.length > 0) args(1).toInt else 0
+        require(args.length >= 1, "controller instance required")
+        val instance = args(0).toInt
 
         // initialize the runtimes manifest
         if (config.isValid && ExecManifest.initialize(config)) {
             val port = config.servicePort.toInt
-            BasicHttpService.startService(actorSystem, "controller", 
"0.0.0.0", port, new ServiceBuilder(config, instance, logger))
+            BasicHttpService.startService(actorSystem, "controller", 
"0.0.0.0", port, new ServiceBuilder(config, instance, logger), 30.seconds)
 
 Review comment:
   this will delay the server bringup by 30 seconds - and creates a phase 
ordering with the invoker deployment.
   if the invokers are not yet up, waiting 30 seconds is of no use and only 
delays deployment since it will take 30s for the controller to respond to the 
health ping.
   
   so this is highly nuanced for the case of a restart in the presence of a hot 
standby on an existing deployed system.
   
   
 
----------------------------------------------------------------
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

Reply via email to