You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by gi...@git.apache.org on 2017/09/22 06:26:54 UTC

[GitHub] markusthoemmes commented on a change in pull request #2796: Check if runc exists before using it ( WIP to fix #2788 )

markusthoemmes commented on a change in pull request #2796: Check if runc exists before using it ( WIP to fix #2788  )
URL: https://github.com/apache/incubator-openwhisk/pull/2796#discussion_r140420018
 
 

 ##########
 File path: core/invoker/src/main/scala/whisk/core/containerpool/docker/RuncClient.scala
 ##########
 @@ -37,9 +38,15 @@ import akka.event.Logging.ErrorLevel
 class RuncClient(executionContext: ExecutionContext)(implicit log: Logging) extends RuncApi with ProcessRunner {
   implicit private val ec = executionContext
 
+  protected val runcBinary: String = "/usr/bin/docker-runc"
+
   // Determines how to run docker. Failure to find a Docker binary implies
   // a failure to initialize this instance of DockerClient.
-  protected val runcCmd: Seq[String] = Seq("/usr/bin/docker-runc")
+  protected val runcCmd: Seq[String] = Seq(runcBinary)
+
+  def isInstalled: Boolean = {
+    Files.exists(Paths.get(runcBinary)) // TODO: cache the response
 
 Review comment:
   aka: Use `val` instead of `def` ? 
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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