You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2020/01/28 03:26:09 UTC
[GitHub] [openwhisk] selfxp commented on a change in pull request #4698: Add
healthcheck for Invoker -> Action Container
selfxp commented on a change in pull request #4698: Add healthcheck for Invoker -> Action Container
URL: https://github.com/apache/openwhisk/pull/4698#discussion_r371588351
##########
File path: core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerProxy.scala
##########
@@ -581,6 +636,25 @@ class ContainerProxy(factory: (TransactionId,
}
}
+ private def enableHealthPing(container: Option[Container]) = {
+ container.foreach { c =>
+ val hpa = healthPingActor.getOrElse {
+ logging.info(this, s"creating health ping actor for ${c.addr.asString()}")
+ val hp = context.actorOf(
+ TCPPingClient
+ .props(c.toString(), healtCheckConfig, new InetSocketAddress(c.addr.host, c.addr.port), self))
+ healthPingActor = Some(hp)
+ hp
+ }
+ hpa ! HealthPingEnabled(true)
+ }
+ }
+ private def disableHealthPing() = {
+ if (healtCheckConfig.enabled) {
Review comment:
nit I think we already check for `healtCheckConfig.enabled` when calling this function. It doesn't hurt to have this check here too, but then I would add it to `enableHealthPing` also, for consistency?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services