Skip to content

Commit 731eb8b

Browse files
authored
Merge a066119 into 951ce58
2 parents 951ce58 + a066119 commit 731eb8b

File tree

1 file changed

+5
-2
lines changed
  • core/invoker/src/main/scala/org/apache/openwhisk/core/invoker

1 file changed

+5
-2
lines changed

core/invoker/src/main/scala/org/apache/openwhisk/core/invoker/Invoker.scala

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ object Invoker {
9393
kafkaHosts ++
9494
wskApiHost
9595

96+
def optionalProperties = zookeeperHosts.keys.toSet
97+
9698
def initKamon(instance: Int): Unit = {
9799
// Replace the hostname of the invoker to the assigned id of the invoker.
98100
val newKamonConfig = Kamon.config
@@ -128,7 +130,7 @@ object Invoker {
128130
}
129131

130132
// load values for the required properties from the environment
131-
implicit val config = new WhiskConfig(requiredProperties)
133+
implicit val config = new WhiskConfig(requiredProperties, optionalProperties)
132134

133135
def abort(message: String) = {
134136
logger.error(this, message)(TransactionId.invoker)
@@ -186,7 +188,8 @@ object Invoker {
186188

187189
// --uniqueName is defined with a valid value, id is empty, assign an id via zookeeper
188190
case CmdLineArgs(Some(unique), None, _, overwriteId) =>
189-
if (config.zookeeperHosts.startsWith(":") || config.zookeeperHosts.endsWith(":")) {
191+
if (config.zookeeperHosts.startsWith(":") || config.zookeeperHosts.endsWith(":") ||
192+
config.zookeeperHosts.equals("")) {
190193
abort(s"Must provide valid zookeeper host and port to use dynamicId assignment (${config.zookeeperHosts})")
191194
}
192195
new InstanceIdAssigner(config.zookeeperHosts).setAndGetId(unique, overwriteId)

0 commit comments

Comments
 (0)