rabbah commented on a change in pull request #3813: Recover image pulls by
trying to run the container anyways.
URL:
https://github.com/apache/incubator-openwhisk/pull/3813#discussion_r198403279
##########
File path:
core/invoker/src/main/scala/whisk/core/containerpool/docker/DockerContainer.scala
##########
@@ -104,22 +104,29 @@ object DockerContainer {
dnsServers.flatMap(d => Seq("--dns", d)) ++
name.map(n => Seq("--name", n)).getOrElse(Seq.empty) ++
params
+
val pulled = if (userProvidedImage) {
- docker.pull(image).recoverWith {
- case _ =>
Future.failed(BlackboxStartupError(Messages.imagePullError(image)))
- }
- } else Future.successful(())
+ // Always recover the Future so docker run is tried below in any case,
in case we have an image available locally
+ docker.pull(image).map(_ => true).recover { case _ => false }
Review comment:
https://github.com/apache/incubator-openwhisk/pull/2852/files
not sure if this is better but this was an old attempt to skip docker pull
if image is present locally using docker inspect.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services