loki icon indicating copy to clipboard operation
loki copied to clipboard

CI: plugins/manifest is flaking

Open rfratto opened this issue 6 years ago • 19 comments

Our manifest job on Drone seems to fail unpredictably with the following message:

2020/02/07 19:46:14 pushing by spec
time="2020-02-07T19:46:15Z" level=error msg="Error trying v2 registry: http: unexpected EOF reading trailer" 
time="2020-02-07T19:46:15Z" level=fatal msg="Inspect of image \"grafana/loki:master-675a5f3-amd64\" failed with error: http: unexpected EOF reading trailer" 
2020/02/07 19:46:15 exit status 1

Some research of the problem suggested that primary issue is a large number of image tags. We've added a pruning stage to remove master build images after 90 days, but the error is still happening. Help figuring this out would be appreciated!

rfratto avatar Feb 08 '20 17:02 rfratto

Do we need to delete old manifests too?

slim-bean avatar Feb 08 '20 21:02 slim-bean

I don't think so? If the error really is about too many tags, we're deleting both image and manifest tags with the new prune job. We still have ~800 tags for Loki right now based on the last time the prune job ran. It could be that that's still too many or it could also mean the error has nothing to do with the amount of tags. 🤷‍♂

rfratto avatar Feb 08 '20 21:02 rfratto

This is where the first error comes from and the second one is coming from here.

I was looking into this a few days ago but nothing stood out at me for explaining why we're getting EOFs.

rfratto avatar Feb 08 '20 21:02 rfratto

We've added a pruning stage to remove master build images after 90 days

Are we deleting them from the CI machine or are we deleting them from dockerhub? If its dockerhub then it's setting people up for outages, as if we delete the image and if the pod is rescheduled it'll cause an outage. What is the reasoning behind choosing to remove the tags?

gouthamve avatar Feb 11 '20 04:02 gouthamve

@gouthamve They're being deleted from Docker Hub. The reasoning to delete them so far has been to try to get the manifest job to not flake, since some results online implied the number of tags would cause manifest-tool to have issues. We've since deleted more extremely old non-release tags from Loki (which were non-release tags from a non-master branch) and manifest-tool seems to be working consistently again, at least for now, so it does seem like the problems are related to the number of published tags.

On it causing outages, we (Ed and I) agreed to treat non-release tags as ephemeral, and recommend that users don't pin their cluster to using them.

rfratto avatar Feb 11 '20 05:02 rfratto

On it causing outages, we (Ed and I) agreed to treat non-release tags as ephemeral, and recommend that users don't pin their cluster to using them.

Hrm, but what I am afraid is that people will end up pinning the cluster to get a new shiny unreleased feature and will complain after it causes an outage. I don't know of any other project that nukes docker images and this is a very unique case. Can we rather fix the manifest-tool rather than work around the bug by nuking the tags?

gouthamve avatar Feb 11 '20 06:02 gouthamve

This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Mar 12 '20 07:03 stale[bot]

This happened again recently, going to mark this as keepalive.

rfratto avatar Mar 13 '20 16:03 rfratto

@rfratto I think you mentioned there may be a fix for this soon?

slim-bean avatar Apr 02 '20 13:04 slim-bean

Not sure if my problem is directly related to this but that's my hunch. We are using Weaveworks Flux as a Gitops operator on our K8s cluster. We have helm release deployments via their HelmRelease Custom Resource to deploy a promtail, loki and Grafana stack. Whenever flux attempts to refresh the promtail and loki images it floods the logs with errors like:

manifest for tag master-993044e missing in repository grafana/loki" impact="flux will fail to auto-release workloads with matching images, ask the repository administrator to fix the inconsistency"

This, it does for numerous tags on both the promtail and loki repos. I'm attaching two lists with all the tags I found raising this warning. Could it be a product of the same issue?

Missing manifests - loki.txt Missing manifests - promtail.txt

christopher-grech avatar Apr 15 '20 13:04 christopher-grech

I'm having same issue as @christopher-grech.

Any solutions for it please?

karlmuscat avatar May 15 '20 10:05 karlmuscat

The error messages is likely correct, we prune old master-***** image from dockerhub after 60 days, they are meant to be ephemeral.

Are you deploying with master-***** images? Or does this just create a noisy log? I'm afraid I don't really have any suggestions/solutions.

slim-bean avatar May 15 '20 10:05 slim-bean

@slim-bean in our case, no we're not using the master-* images. The issue is that the automated orchestrator monitors the entire grafana/loki and grafana/promtail repos and finds this "incorrect" images, which results in the mentioned logs. Since there are a couple of hundred images (for both promtail and loki) at a time, we are being flooded with logs every few minutes.

Running docker manifest returns nothing for the said images, which seems to correlate with the errors we're seeing.

> docker manifest inspect grafana/loki:master-fc6c5c0
no such manifest: docker.io/grafana/loki:master-fc6c5c0

Is it possible that you start pushing the manifest for these images?

karlmuscat avatar May 15 '20 11:05 karlmuscat

Any comment on my suggestion please?

karlmuscat avatar Jun 05 '20 09:06 karlmuscat

Having the exact same issue as @christopher-grech

Shazzberry avatar Sep 18 '20 15:09 Shazzberry

Same issue as @christopher-grech

eremid avatar Oct 13 '20 14:10 eremid

Also having the same as @christopher-grech

borisputerka-zz avatar Oct 26 '20 21:10 borisputerka-zz

This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 26 '20 21:11 stale[bot]

Also having the same as @christopher-grech

arrase avatar Dec 09 '20 15:12 arrase