mirror of
https://github.com/floci-io/floci.git
synced 2026-12-04 18:48:00 -05:00
feat(core): make the image pull timeout configurable (#6521)
ImageCacheService gave each attempt at pulling an image a hard-coded five minutes, and a pull three attempts. An EMR Serverless runtime is 3.5 to 4.3 GB, so on an ordinary connection the first run of a release Docker did not have yet failed with "Could not pull image" before the pull could finish. floci.docker.image-pull-timeout-seconds, or FLOCI_DOCKER_IMAGE_PULL_TIMEOUT_SECONDS, now sets the limit for each attempt. Its default, 300, keeps today's five minutes, and it must be at least 1, checked with the other Docker timeouts in DockerClientProducer. Follow-up to #6469.
This commit is contained in:
1 parent
1ea49d9432
commit
b66ee9ecf0
8 files changed
+89
-8
No files matched your search
@@ -92,6 +92,16 @@ floci:
|
||||
|
||||
Environment variable: `FLOCI_DOCKER_API_TIMEOUT_SECONDS`
|
||||
|
||||
An image pull has a limit of its own: each attempt may take up to `image-pull-timeout-seconds`, 300 seconds (5 minutes) by default. A pull still downloading when the limit passes fails that attempt with "Could not pull image: Downloading" and is tried again, three attempts in all, so a launch that needs an image Docker does not have yet can wait up to about three times the limit before it fails; a pull that has reported no progress at all within the limit fails at once with "Timed out pulling image". A large image, such as an EMR Serverless runtime of 3.5 to 4.3 GB, can need longer on a slow connection: raise the limit, or pull the image with `docker pull` before the first launch. It must be at least 1:
|
||||
|
||||
```yaml
|
||||
floci:
|
||||
docker:
|
||||
image-pull-timeout-seconds: 300
|
||||
```
|
||||
|
||||
Environment variable: `FLOCI_DOCKER_IMAGE_PULL_TIMEOUT_SECONDS`
|
||||
|
||||
## Private Registry Authentication
|
||||
|
||||
Any service that pulls a container image from a private registry (Lambda image functions, custom OpenSearch images, private Postgres images, etc.) needs Docker credentials. Two approaches are supported and can be combined.
|
||||
|
||||
@@ -107,9 +107,10 @@ publishes for customizing EMR Serverless images (`public.ecr.aws/emr-serverless/
|
||||
`spark-submit` in local mode in it: the container holds the driver and its executors.
|
||||
|
||||
* **States**: a run is `SCHEDULED` while its image is pulled and its container starts (the first run
|
||||
of a release pulls its image, 3.5 to 4.3 GB unpacked; Floci gives a pull three attempts of five
|
||||
minutes, so on a slow connection run `docker pull` on the image first, or the run is `FAILED` with
|
||||
"Could not pull image"), and `RUNNING` once the Spark driver runs, which sets `startedAt`. It
|
||||
of a release pulls its image, 3.5 to 4.3 GB unpacked; a pull still downloading after
|
||||
[`floci.docker.image-pull-timeout-seconds`](../configuration/docker.md), five minutes by default,
|
||||
is tried again, three attempts in all, so on a slow connection raise it or run `docker pull` on the
|
||||
image first, or the run is `FAILED` with "Could not pull image"), and `RUNNING` once the Spark driver runs, which sets `startedAt`. It
|
||||
is `SUCCESS` when the driver exits with code 0 and `FAILED` otherwise, with the exit code in
|
||||
`stateDetails`. `CancelJobRun`, or a `BATCH` run passing its `executionTimeoutMinutes`, makes it
|
||||
`CANCELLING` until the driver is stopped, then `CANCELLED`, as the job run states describe. A run
|
||||
|
||||
Reference in new issue
Block a user