Closed TheDarkula closed 1 week ago
Can you try logout from docker and login again? Could you also try to upgrade docker's version?
@lunny This is from a Gitea Actions Runner, so it logs in on every run. Is there some configuration setting that limits/sets the maximum docker image size?
No limitation by default. Can you list the images you try to upload?
Examples that fail:
I cannot reproduce this problem in my local machine with main branch. Can you upgrade to v1.22.2 and try again?
I just upgraded gitea to v1.22.2
and upgraded the act_runner to 0.2.11-dind-rootless
, but the issue is still happening.
I just tried with ollama/ollama:0.3.12
, and I see this in the logs:
2024/10/07 08:20:40 ...eb/routing/logger.go:68:func1() [W] router: slow PATCH /v2/username/ollama/ollama/blobs/uploads/kvr9kfbso38cq77ddkghylcbl for 10.0.0.67:0, elapsed 3088.0ms @ packages/api.go:700(packages.ContainerRoutes.func2.2)
2024/10/07 08:21:37 ...ntainer/container.go:92:apiError() [E] unexpected EOF
2024/10/07 08:21:37 ...eb/routing/logger.go:102:func1() [I] router: completed PATCH /v2/username/ollama/ollama/blobs/uploads/kvr9kfbso38cq77ddkghylcbl for 10.0.0.67:0, 500 Internal Server Error in 60000.5ms @ packages/api.go:700(packages.ContainerRoutes.func2.2)
Can you paste your related workflow file?
Sure thing!
This is the workflow:
name: Push Docker Images
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Login to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: ${{ vars.REGISTRY_URL }}
username: ${{ github.actor }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Run Images Script
env:
REGISTRY_URL: ${{ vars.REGISTRY_URL }}
REGISTRY_OWNER: ${{ vars.REGISTRY_OWNER }}
run: bash download-images-retag-and-push.sh
And here is the respective script
#!/bin/bash
set -eu
cat image_list.conf | while read image_name_and_tag || [ -n "$image_name_and_tag" ];
do
if [[ "$image_name_and_tag" == \#* ]]; then
echo "Skipping comment."
else
FULL_IMAGE_URL="$REGISTRY_URL/$REGISTRY_OWNER/$image_name_and_tag"
set +e
docker manifest inspect "$FULL_IMAGE_URL" > /dev/null
EXIT_CODE=$?
set -e
if [ "$EXIT_CODE" -eq 0 ]; then
echo "$FULL_IMAGE_URL already exists exists in the registry, skipping"
else
echo "$FULL_IMAGE_URL does not exist in the registry."
docker images
echo "Pulling image: $image_name_and_tag"
docker pull "$image_name_and_tag"
echo "Retagging image: $image_name_and_tag to: $FULL_IMAGE_URL"
echo "New image tag: $FULL_IMAGE_URL"
docker tag "$image_name_and_tag" "$FULL_IMAGE_URL"
echo "Removing original image: $image_name_and_tag"
docker rmi "$image_name_and_tag"
echo "Pushing new image: $FULL_IMAGE_URL"
docker push "$FULL_IMAGE_URL"
fi
fi
done
You will need a file called image_list.conf
with an image in it like we discussed:
ollama/ollama:0.3.12
Also, you will need two environment variables set in the repository:
@lunny Here is a current list of images that I have tried, but fail to push:
calcom/cal.com:v4.6.14
libretranslate/libretranslate:v1.6.0-cuda
ollama/ollama:0.3.14
@lunny Here is a current list of images that I have tried, but fail to push:
calcom/cal.com:v4.6.14 libretranslate/libretranslate:v1.6.0-cuda ollama/ollama:0.3.14
Can you try to push them to demo site? https://demo.gitea.com
@lunny Sure! Does the demo site have the ACT runner available?
@lunny Sure! Does the demo site have the ACT runner available?
There are no free runners there, but you can create a runner in your local machine.
@lunny Everything uploaded fine to demo.gitea.com
using the same actions/script.
I did enable debug logging on my instance, and I noticed this:
2024/11/23 04:03:22 ...eb/routing/logger.go:102:func1() [I] router: completed POST /api/actions/runner.v1.RunnerService/UpdateTask for 10.0.0.211:47846, 200 OK in 24.4ms @ <autogenerated>:1(http.Handler.ServeHTTP-fm)
2024/11/23 04:03:22 ...ntainer/container.go:92:apiError() [E] unexpected EOF
2024/11/23 04:03:22 ...eb/routing/logger.go:102:func1() [I] router: completed PATCH /v2/user/calcom/cal.com/blobs/uploads/bgu3qo4wnrexcl6usdodkhunq for 10.0.0.211:0, 500 Internal Server Error in 38543.5ms @ packages/api.go:700(packages.ContainerRoutes.func2.2)
Is there any reverse proxy in front of your Gitea instance?
@lunny Yes, I have traefik in front of it. To my knowledge, traefik does not impose any timeouts by default, though.
Maybe you can try to upload to Gitea directly.
@lunny I figured it out!
As it turns out, traefik has set the readTimeout
to 60 seconds by default as of somewhat recently.
For anyone interested, here are the relevant links:
In case anyone is using the helm chart, there is apparently a bug in it, where the normal block is ignored.
It must be specified as follows:
additionalArguments:
- "--entryPoints.web.transport.respondingTimeouts.readTimeout=3600s"
- "--entryPoints.web.transport.respondingTimeouts.writeTimeout=3600s"
- "--entryPoints.web.transport.respondingTimeouts.idleTimeout=3600s"
- "--entryPoints.websecure.transport.respondingTimeouts.readTimeout=3600s"
- "--entryPoints.websecure.transport.respondingTimeouts.writeTimeout=3600s"
- "--entryPoints.websecure.transport.respondingTimeouts.idleTimeout=3600s"
This website has the solution.
Description
I have a Gitea action that pulls docker images and pushes them to the Gitea registry.
On some images, the push does not succeed.
The actions job shows this:
I also have these errors in the Gitea logs:
Gitea Version
1.22.1
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
Linux
How are you running Gitea?
I have Gitea and the ACT Runner running in kubernetes.
Database
PostgreSQL