-
Notifications
You must be signed in to change notification settings - Fork 758
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
Garbage collector not clean redis keys #1605
Comments
the error points the auth info is incorrect, can you check that at your end? |
password correct
|
garbage service used |
Hi @nevlkv
|
i can auth with via redis-cli and flushdb |
Seeing same error:
I've no password for my external redis, i'm using network policies to limit redis access to harbor. _REDIS_URL_CORE: redis://keydb:6379/0?idle_timeout_seconds=30
_REDIS_URL_REG: redis://keydb:6379/2?idle_timeout_seconds=30 Harbor version: v2.9.0 |
We probably need to set ? _REDIS_URL_REG: "{{ template "harbor.redis.urlForRegistry" . }}"
|
error stable
|
Current state
|
Hi @nevlkv , |
Sometimes on pull 404
|
If default user in URI undefined rise error
define user in values
and
became
and GC success !!! |
Interestingly a manual run works, but the sheduled runs are always failing. 😕 |
This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days. |
not stale 😞 |
If GC scheduled and settings of harbor changed after, job became failed: registry=# select * from schedule where callback_func_name='GARBAGE_COLLECTION'
registry-# ;
id | creation_time | update_time | vendor_type | vendor_id | cron | callback_func_name | callback_func_param | cron_type | extra_attrs | revision
------+----------------------------+----------------------------+--------------------+-----------+-------------+--------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+--------------------------+------------
1009 | 2022-07-21 10:09:37.790778 | 2022-07-21 10:09:37.790778 | GARBAGE_COLLECTION | -1 | 0 0 0 * * * | GARBAGE_COLLECTION | {"trigger":null,"deleteuntagged":true,"dryrun":false,"extra_attrs":{"delete_untagged":true,"dry_run":false,"redis_url_reg":"redis://redis:<any_password>@harbor-redis-master:6379/2?idle_timeout_seconds=30","time_window":2}} | Daily | {"delete_untagged":true} | 1717372800
(1 row)
redis_url_reg static and not changes! |
This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days. |
@nevlkv can you share your settings when installing your harbor? You are seeing the error only happen at the scheduled GC, right? |
I've run into this issue as well (upgraded Harbor from 2.6.3 to 2.10.1) where scheduled GC runs fail to clear the redis cache due to an auth issue. I noticed in the harbor execution table, that the redis_url_reg field is different between a manual and scheduled run:
Failed: "redis+sentinel://172.19.6.10:26379,172.19.6.30:26379,172.19.6.50:26379/redismaster/2?idle_timeout_seconds=30" Note the successful one has a username|password AND there is different database reference (redismaster/1|2). Also note that I have not changed the Harbor redis configuration since the initial installation. |
Expected behavior and actual behavior:
Garbage collector not cleanup redis keys, and failed with message
Steps to reproduce the problem:
Starts registry cleanup
Versions:
Additional context:
external redis with default user
The text was updated successfully, but these errors were encountered: