-
Notifications
You must be signed in to change notification settings - Fork 757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow disabling redis in registry #1707
base: main
Are you sure you want to change the base?
Conversation
d29d0fa
to
4ab1cb4
Compare
@roblabla, this seems like a serious bug in Distribution. I approve this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@roblabla did open an issue in harbor, so we can track that issue in parallel. If not, can you do that. |
Done: goharbor/harbor#19988
As far as I can tell, harbor reuses distribution's garbage collector logic: https://github.com/goharbor/harbor/blob/main/src/registryctl/api/registry/manifest/manifest.go#L86 Anyways, I haven't validated this exact patch, but I did validate that purging the redis cache fixed the problem and allowed to reupload the image in harbor. So disabling redis was the obvious next step. I'll look into the CI failure tomorrow (I'm not super familiar with helm ^^). |
btw there is a patch in distribution addressing this, distribution/distribution#3323 you might give it a try. |
Hi @roblabla , in this issue distribution/distribution#4269, to reproduce it by essentially running the following command:
Is it possible due to the implementation of
|
@zyyw here is the related issue on harbor side, with reproducible steps. Related goharbor/harbor#19988 |
There are bugs in the registry with regards to cache invalidation when deleting an image that can lead to some really problematic issues. See distribution/distribution#4269. To work around that problem, add a new field to allow disabling redis in the registry. Signed-off-by: roblabla <[email protected]>
4ab1cb4
to
b805ea5
Compare
Finally got around to getting this done. I can now confirm that this version works - I have it deployed and running. |
discussing it here. closing it now. |
I'm... confused by this comment. Redis is an optional component of distribution, it's solely used as a cache to avoid S3 latency, and can be disabled in the config, as evidenced by this PR working... In my use-case, the performance hit of disabling redis is negligible. And on the distribution side, GC does not rely on redis - in fact that's the whole issue, distribution's GC ignores the redis, causing these issues. So I'm not sure I understand the rationale here? |
I would like to reopen this PR.
|
This PR is being marked stale due to a period of inactivty. If this PR is still relevant, please comment or remove the stale label. Otherwise, this PR will close in 30 days. |
Still relevant. |
It's been a while, and the issue is still not fixed upstream. Could this get merged in the interim so a workaround is at least available? |
Bump? |
This PR is being marked stale due to a period of inactivty. If this PR is still relevant, please comment or remove the stale label. Otherwise, this PR will close in 30 days. |
This is the last time I will bump this PR for the stalebot's sake. It's been half a year since I submitted this simple 10-line change. The upstream bug is still present, with no fix in sight. This PR provides a working and simple workaround to the problem. I do not understand what could be controversial about it. I'll put it frankly: it feels insulting to have a bot claim my PR is "stale" and auto-close while it's waiting for review by the repo maintainers. I understand wanting to get rid of old PRs whose authors have disappeared, but this is just not a good solution to this problem. If this PR gets closed by stalebot in whatever the timespan is, then so be it, I'll assume Harbor does not care about external contributions, and move on. |
Hi! I got the exact same issue and the workaround mentioned here is working perfectly. Could consider to merge this PR please? |
There are bugs in the registry with regards to cache invalidation when deleting an image that can lead to some really problematic issues. See distribution/distribution#4269.
To work around that problem, add a new field to allow disabling redis in the registry.