@@ -93,6 +93,8 @@ object Invoker {
93
93
kafkaHosts ++
94
94
wskApiHost
95
95
96
+ def optionalProperties = zookeeperHosts.keys.toSet
97
+
96
98
def initKamon (instance : Int ): Unit = {
97
99
// Replace the hostname of the invoker to the assigned id of the invoker.
98
100
val newKamonConfig = Kamon .config
@@ -128,7 +130,7 @@ object Invoker {
128
130
}
129
131
130
132
// load values for the required properties from the environment
131
- implicit val config = new WhiskConfig (requiredProperties)
133
+ implicit val config = new WhiskConfig (requiredProperties, optionalProperties )
132
134
133
135
def abort (message : String ) = {
134
136
logger.error(this , message)(TransactionId .invoker)
@@ -186,7 +188,8 @@ object Invoker {
186
188
187
189
// --uniqueName is defined with a valid value, id is empty, assign an id via zookeeper
188
190
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(" " )) {
190
193
abort(s " Must provide valid zookeeper host and port to use dynamicId assignment ( ${config.zookeeperHosts}) " )
191
194
}
192
195
new InstanceIdAssigner (config.zookeeperHosts).setAndGetId(unique, overwriteId)
0 commit comments