bdoyle0182 commented on code in PR #5338:
URL: https://github.com/apache/openwhisk/pull/5338#discussion_r1005921460


##########
core/invoker/src/main/scala/org/apache/openwhisk/core/invoker/FPCInvokerServer.scala:
##########
@@ -53,11 +53,25 @@ class FPCInvokerServer(val invoker: InvokerCore, 
systemUsername: String, systemP
           complete(invoker.disable())
         } ~ (path("isEnabled") & get) {
           complete(invoker.isEnabled())
-        } ~ (pathPrefix("status") & get) {
+        } ~ (pathPrefix("pool") & get) {
           pathEndOrSingleSlash {
-            complete(invoker.status().map(_.toJson.compactPrint))
+            complete {
+              invoker.getPoolState().map {
+                case Right(poolState) =>
+                  poolState.serialize()
+                case Left(value) =>
+                  value.serialize()
+              }
+            }
           } ~ (path("count") & get) {
-            complete(invoker.status().map(_.size.toJson.compactPrint))
+            complete {
+              invoker.getPoolState().map {
+                case Right(poolState) =>
+                  poolState.totalContainers.toJson.compactPrint

Review Comment:
   the total containers in the container pool state object includes prewarm 
containers so not sure if you want that included in this route when determining 
if the invoker is cleared unless disabling immediately tears down prewarms than 
it's probably fine. If that isn't adequate, I think what you want for 
determining if the invoker is safe to shut down is summing the 
`totalContainers` values of the `busyPool` and `warmedPool`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to