mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-30 14:13:43 +01:00
1.8 KiB
1.8 KiB
Test 5-03 - OVA Garbage Collection
Purpose:
To verify that an OVA version of Harbor can perform garbage collection to release unused space of deleted images.
References:
User guide, installation guide of Harbor OVA version.
Environment:
- This test requires an OVA binary of Harbor.
- A vCenter, at least an ESX host, and a network that supports DHCP.
- A linux host with Docker CLI installed (Docker client).
Test Steps:
- Deploy an OVA version of Harbor, with "Garbage Collection" set to false.
- Create a project in Harbor.
- On a Docker client host, use
docker login <harbor_host>
command to log in as the admin user. - Run some
docker push
to push some images to the project. The size of the images should be at least 500MB. - In Harbor's UI, delete the newly pushed images.
- On vSphere, open the console of Harbor's VM, log in as root user, type
df -h /data
command to get the space usage of the /data volume. Take a note of the Used space. - Power off the VM.
- Right click on the VM and select "Edit Settings".
- Set "Garbage Collection" to true.
- Power on the VM.
- Wait for a while until Harbor service is available (check by a browser)
- On vSphere, open the console of Harbor's VM, log in as root user, type
df -h /data
command to get the space usage of the /data volume and compare with previous number. - Check the log file of garbage collection under /data to see if there was any error.
- Repeat Step 3-7, to create some deleted images.
- Repeat Step 10-13, to see the garbage collection works on the second reboot.
Expected Outcome:
- Step 12, the used space should be reduced. The space of deleted images should be recycled.
- Step 13, log file should contain no errors.
- Step 15, verify garbage collection works for the second time.
Possible Problems:
None