Skip to content
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

after GC: unreal project quota is displayed #21227

Open
temirg opened this issue Nov 21, 2024 · 1 comment
Open

after GC: unreal project quota is displayed #21227

temirg opened this issue Nov 21, 2024 · 1 comment

Comments

@temirg
Copy link

temirg commented Nov 21, 2024

Hello Harbor-devs,

we have a strange problem here: after the GC, a project quota is set to about 1 percent of
the space actually occupied by the images in the project.

our environment:
both harbors: standalone server
docker-25.0.6_ce
docker-compose-2.22.0
harbor v2.11.1-6b7ecba1

harbor-1
replica-1-to-harbor-2: push-based, Flatten All Levels, Scheduled
replica-2-to-harbor-2: push-based, Flatten All Levels, Event based

df -h /data
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/harbor-harbor 2.0T 1.3T 733G 64% /data

harbor-2

df -h /data/
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/harbor-harbor 2.0T 1.3T 736G 64% /data


The problem first discovered in Harbor 2.7.4 and tried the following:

  • deleted all images from the project-1 (harbor-1, in harbor-2 automatically deleted by the event based replica)
  • deleted project-1 in harbor-1 and harbor-2
  • run GC in both harbors
  • rm -rf /data/registry/docker/registry/v2/repositories/project-1 on the OS level
  • created project-1 again in both harbors, let the customer push the images in harbor-1/project-1

Interim result: both harbors show about 38 GiB used in the project.
Run GC again in both harbors.

Final result:
harbor-1/project-1 - quota: 398.37MiB of 100GiB
harbor-2/project-1 - quota: 37.99GiB of 100GiB

What I don't understand: after the GC, the "wrong" project quota should be displayed in both harbors.
Why only in harbor-1?

Regards, temirg.

@temirg
Copy link
Author

temirg commented Nov 22, 2024

GC on both: "Allow garbage collection on untagged artifacts" is enabled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant