You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by gi...@git.apache.org on 2017/05/31 05:34:06 UTC
[GitHub] markusthoemmes commented on a change in pull request #2256: surface errors in runtimes.manifest configuration in the controller logs
markusthoemmes commented on a change in pull request #2256: surface errors in runtimes.manifest configuration in the controller logs
URL: https://github.com/apache/incubator-openwhisk/pull/2256#discussion_r119273673
##########
File path: core/controller/src/main/scala/whisk/core/controller/Controller.scala
##########
@@ -180,14 +180,24 @@ object Controller {
// second argument. (TODO .. seems fragile)
val instance = if (args.length > 0) args(1).toInt else 0
- // 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))
- } else {
+ def abort() = {
logger.error(this, "Bad configuration, cannot start.")
actorSystem.terminate()
Await.result(actorSystem.whenTerminated, 30.seconds)
}
+
+ if (!config.isValid) {
+ abort()
+ return
+ }
+
Review comment:
I dunno if I can live with the `return` though ? . Should we just wrap the below inside the `if` for the sake of not using `return` in our codebase?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services