Skip to content

Commit eac1c79

Browse files
committed
Fix typo
1 parent a49c0a3 commit eac1c79

File tree

13 files changed

+61
-38
lines changed

13 files changed

+61
-38
lines changed

ansible/roles/controller/tasks/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,8 +384,8 @@
384384
return_content: yes
385385
register: result
386386
until: result.content == '0'
387-
retries: {{ controller.deployment.retries }}
388-
delay: {{ controller.deployment.delay }}
387+
retries: "{{ controller.deployment.retries }}"
388+
delay: "{{ controller.deployment.delay }}"
389389
when: zeroDowntimeDeployment.enabled == true and controllerDeployed.stdout != "0" and (zeroDowntimeDeployment.solution == 'apicall')
390390
ignore_errors: "{{ controller.deployment.ignore_error }}"
391391

ansible/roles/invoker/tasks/clean.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@
4545
return_content: yes
4646
register: result
4747
until: result.content == '0'
48-
retries: {{ invoker.deployment.retries }}
49-
delay: {{ invoker.deployment.delay }}
48+
retries: "{{ invoker.deployment.retries }}"
49+
delay: "{{ invoker.deployment.delay }}"
5050
when: zeroDowntimeDeployment.enabled == true and enable_scheduler
5151
ignore_errors: "{{ invoker.deployment.ignore_error }}"
5252

core/controller/src/main/scala/org/apache/openwhisk/core/controller/Controller.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class Controller(val instance: ControllerInstanceId,
9696
(pathEndOrSingleSlash & get) {
9797
complete(info)
9898
}
99-
} ~ apiV1.routes ~ swagger.swaggerRoutes ~ internalInvokerHealth
99+
} ~ apiV1.routes ~ swagger.swaggerRoutes ~ internalInvokerHealth ~ activationStatus
100100
}
101101

102102
// initialize datastores
@@ -174,7 +174,7 @@ class Controller(val instance: ControllerInstanceId,
174174
*/
175175
protected[controller] val activationStatus = {
176176
implicit val executionContext = actorSystem.dispatcher
177-
(path("activation") & get) {
177+
(pathPrefix("activation") & get) {
178178
pathEndOrSingleSlash {
179179
complete(loadBalancer.activeActivationsByController.map(_.toJson))
180180
} ~ path("count") {

core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/v2/FunctionPullingContainerPool.scala

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -415,18 +415,30 @@ class FunctionPullingContainerPool(
415415
adjustPrewarmedContainer(false, true)
416416

417417
case StatusQuery =>
418-
val result = immutable.Map.empty[String, List[String]]
418+
var result = immutable.Map.empty[String, List[String]]
419419
val pools = busyPool ++ warmedPool ++ inProgressPool
420420
pools.foreach { entry =>
421421
entry._2 match {
422422
case InitializedData(container, _, action, _) =>
423-
result += (action.fullyQualifiedName(true).asString, container.containerId.asString)
423+
val key = action.fullyQualifiedName(true).asString
424+
var list = result.getOrElse(key, List.empty[String])
425+
list = container.containerId.asString :: list
426+
result += (action.fullyQualifiedName(true).asString -> list)
424427
case WarmData(container, _, action, _, _, _) =>
425-
result += (action.fullyQualifiedName(true).asString, container.containerId.asString)
428+
val key = action.fullyQualifiedName(true).asString
429+
var list = result.getOrElse(key, List.empty[String])
430+
list = container.containerId.asString :: list
431+
result += (action.fullyQualifiedName(true).asString -> list)
426432
case ContainerCreatedData(container, _, action) =>
427-
result += (action.fullyQualifiedName(true).asString, container.containerId.asString)
433+
val key = action.fullyQualifiedName(true).asString
434+
var list = result.getOrElse(key, List.empty[String])
435+
list = container.containerId.asString :: list
436+
result += (action.fullyQualifiedName(true).asString -> list)
428437
case ReschedulingData(container, _, action, _, _) =>
429-
result += (action.fullyQualifiedName(true).asString, container.containerId.asString)
438+
val key = action.fullyQualifiedName(true).asString
439+
var list = result.getOrElse(key, List.empty[String])
440+
list = container.containerId.asString :: list
441+
result += (action.fullyQualifiedName(true).asString -> list)
430442
case _ => // do nothing
431443
}
432444
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ class DefaultInvokerServer(val invoker: InvokerCore, systemUsername: String, sys
4646
super.routes ~ extractCredentials {
4747
case Some(BasicHttpCredentials(username, password)) if username == systemUsername && password == systemPassword =>
4848
(path("enable") & post) {
49-
invoker.enable()
49+
complete(invoker.enable())
5050
} ~ (path("disable") & post) {
51-
invoker.disable()
51+
complete(invoker.disable())
5252
} ~ (path("isEnabled") & get) {
53-
invoker.isEnabled()
53+
complete(invoker.isEnabled())
5454
}
5555
case _ => terminate(StatusCodes.Unauthorized)
5656
}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,14 @@ import org.apache.openwhisk.core.connector._
3333
import org.apache.openwhisk.core.containerpool._
3434
import org.apache.openwhisk.core.containerpool.logging.LogStoreProvider
3535
import org.apache.openwhisk.core.containerpool.v2._
36-
import org.apache.openwhisk.core.database.{UserContext, _}
36+
import org.apache.openwhisk.core.database._
3737
import org.apache.openwhisk.core.entity._
3838
import org.apache.openwhisk.core.etcd.EtcdKV.ContainerKeys.containerPrefix
3939
import org.apache.openwhisk.core.etcd.EtcdKV.QueueKeys.queue
4040
import org.apache.openwhisk.core.etcd.EtcdKV.{ContainerKeys, SchedulerKeys}
4141
import org.apache.openwhisk.core.etcd.EtcdType._
4242
import org.apache.openwhisk.core.etcd.{EtcdClient, EtcdConfig, EtcdWorker}
4343
import org.apache.openwhisk.core.invoker.Invoker.InvokerEnabled
44-
import org.apache.openwhisk.core.scheduler.queue.QueueSize
4544
import org.apache.openwhisk.core.scheduler.{SchedulerEndpoints, SchedulerStates}
4645
import org.apache.openwhisk.core.service.{DataManagementService, LeaseKeepAliveService, WatcherService}
4746
import org.apache.openwhisk.core.{ConfigKeys, WarmUp, WhiskConfig}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ package org.apache.openwhisk.core.invoker
2020
import akka.actor.ActorSystem
2121
import akka.http.scaladsl.model.StatusCodes
2222
import akka.http.scaladsl.model.headers.BasicHttpCredentials
23-
import akka.http.scaladsl.server.Directives.complete
2423
import akka.http.scaladsl.server.Route
2524
import org.apache.openwhisk.common.{Logging, TransactionId}
2625
import org.apache.openwhisk.core.ConfigKeys
@@ -52,7 +51,7 @@ class FPCInvokerServer(val invoker: InvokerCore, systemUsername: String, systemP
5251
complete(invoker.disable())
5352
} ~ (path("isEnabled") & get) {
5453
complete(invoker.isEnabled())
55-
} ~ (path("status") & get) {
54+
} ~ (pathPrefix("status") & get) {
5655
pathEndOrSingleSlash {
5756
complete(invoker.status().map(_.toString))
5857
} ~ (path("count") & get) {

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717

1818
package org.apache.openwhisk.core.invoker
1919

20-
import java.nio.charset.StandardCharsets
21-
import java.time.Instant
2220
import akka.Done
2321
import akka.actor.{ActorRef, ActorRefFactory, ActorSystem, CoordinatedShutdown, Props}
2422
import akka.event.Logging.InfoLevel
@@ -30,10 +28,8 @@ import org.apache.openwhisk.core.ack.{MessagingActiveAck, UserEventSender}
3028
import org.apache.openwhisk.core.connector._
3129
import org.apache.openwhisk.core.containerpool._
3230
import org.apache.openwhisk.core.containerpool.logging.LogStoreProvider
33-
import org.apache.openwhisk.core.containerpool.v2.Data
34-
import org.apache.openwhisk.core.database.{UserContext, _}
31+
import org.apache.openwhisk.core.database._
3532
import org.apache.openwhisk.core.entity._
36-
import org.apache.openwhisk.core.entity.size._
3733
import org.apache.openwhisk.core.invoker.Invoker.InvokerEnabled
3834
import org.apache.openwhisk.core.{ConfigKeys, WhiskConfig}
3935
import org.apache.openwhisk.http.Messages
@@ -42,6 +38,8 @@ import pureconfig._
4238
import pureconfig.generic.auto._
4339
import spray.json._
4440

41+
import java.nio.charset.StandardCharsets
42+
import java.time.Instant
4543
import scala.collection.immutable
4644
import scala.concurrent.duration._
4745
import scala.concurrent.{ExecutionContext, Future}

core/scheduler/src/main/scala/org/apache/openwhisk/core/scheduler/FPCSchedulerServer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class FPCSchedulerServer(scheduler: SchedulerCore, systemUsername: String, syste
5959
logger.warn(this, "Scheduler is disabled")
6060
scheduler.disable()
6161
complete("scheduler disabled")
62-
} ~ (path(FPCSchedulerServer.queuePathPrefix) & get) {
62+
} ~ (pathPrefix(FPCSchedulerServer.queuePathPrefix) & get) {
6363
pathEndOrSingleSlash {
6464
complete(scheduler.getQueueStatusData.map(s => s.toJson))
6565
} ~ (path("count") & get) {

tests/src/test/scala/org/apache/openwhisk/core/controller/test/ControllerTestCommon.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ class DegenerateLoadBalancerService(config: WhiskConfig)(implicit ec: ExecutionC
320320
override def totalActiveActivations = Future.successful(0)
321321
override def activeActivationsFor(namespace: UUID) = Future.successful(0)
322322
override def activeActivationsByController(controller: String): Future[Int] = Future.successful(0)
323-
override def activeActivationsByController: Future[List[ActivationId]] = Future.successful(List(ActivationId("id")))
323+
override def activeActivationsByController: Future[List[(String, String)]] = Future.successful(List(("", "")))
324324
override def activeActivationsByInvoker(invoker: String): Future[Int] = Future.successful(0)
325325

326326
override def publish(action: ExecutableWhiskActionMetaData, msg: ActivationMessage)(

0 commit comments

Comments
 (0)