Harbor: Is there a way to force stop the online garbage collection?

Created on 9 Jan 2019  路  6Comments  路  Source: goharbor/harbor

As we all know, In the process of online garbage collection, we can not push image to harbor. If I click the button "gc now", I can not stop the gc task actually, even restart the harbor.
I think it's a important function. In our env , the gc task will take two or three hours. And if I click the button by mistake or other things happen, I want to stop the online gc. Or I must wait a few hours and that's terrible. It will influence all our company's engingeers if it is a working day.

All 6 comments

I have found that there is a button named cancel "read-only" mode. But If the harbor is in the process of gc and I cancel the "read-only" mode , it will be risky.
So I still want to stop the online gc manually.

As the solution of GC, there is no way to cancel it. Even we provide a button to stop it, it actually continues running in the backend, that's because the GC job calls the registry GC command to do the garbage collection, and no way to stop it besides killing the process -- this is more dangerous. For the details, you can refer to the docker official document.

To resolve your issue, you can wait for the cron task in the next release, you can do the GC with high frequency or you can schedule a daily task at your midnight.

@wy65701436 Thanks. I will do some research about it.

And thanks a lot to Harbor group. Online gc saves my life :)

@louyiping I'm closing this issue as once the GC starts theres no way to stop it.

The GC process hasn't ended since 0? Is there a way to cancel it? Looks like restarting the service won't work either

Was this page helpful?
0 / 5 - 0 ratings

Related issues

272909106 picture 272909106  路  4Comments

cten picture cten  路  3Comments

pingcrosby picture pingcrosby  路  3Comments

a-kinder picture a-kinder  路  3Comments

andrewtchin picture andrewtchin  路  3Comments