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

OCPQE-20708 : clean registry when disk util over 50 percent #82

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zniu1011
Copy link
Contributor

@zniu1011 zniu1011 commented Sep 12, 2024

1, Manifest unknown error:
We can find this manifest tag in "repositories" directory, but can't find the data in "blobs", it is probably caused by the data out of sync between the "repositories" and "blobs" when running 'garbage-collect"?

2, When disk util is high, there is more possibility the mirroring fail, so change disk util threshold from 85% to a more suitable value to do "podman garbage-collect".

3, In the latest running, singe arch disconnected case is stable, but multi payload often fail in mirroring with the following error, it may need more investigating why multi payload is more likely to fail.
error: unable to copy layer sha256:93c1c9e1c13bc42cd8e6daee9ff386956ba044fda1d54e36602cae674a8490ef to file://openshift-pipelines/pipelines-nop-rhel8: stream error: stream ID 145; INTERNAL_ERROR; received from peer

Copy link

openshift-ci bot commented Sep 12, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: zniu1011
Once this PR has been reviewed and has the lgtm label, please assign aleskandro for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

openshift-ci bot commented Sep 12, 2024

Hi @zniu1011. Thanks for your PR.

I'm waiting for a openshift-qe member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

sed -i -e '/readonly/{n;s/enabled:.*/enabled: true/;}' /opt/registry-"${port}"/config.yaml
systemctl restart registry@"${port}".service
wait_for_container_running registry-"${port}"
fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i see you're removing the readonly. Is the garbage-collect command concurrent-safe?

Copy link
Contributor Author

@zniu1011 zniu1011 Sep 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I think not... Sorry, I mistook it to be "delete: enabled". We didn't have 'readonly' keyword in config.yaml file, is it really working? Let me add it to gen_registry_file.sh.

@zniu1011 zniu1011 changed the title OCPQE-20708 : clean registry when disk util over 40 percent OCPQE-20708 : clean registry when disk util over 50 percent Sep 13, 2024
@zniu1011
Copy link
Contributor Author

zniu1011 commented Sep 20, 2024

Hi @aleskandro , some updates:
1, Remove all link files before gc, and delete the project directory after gc, I am wondering if it could be safer, or probability it is meaningless here?
2, Cleanup registry data exceed 24 hours, instead of cleanup all.
3, Set the default value "delete: false" in config.yaml file, to avoid the personal cleanup actions without restarting the service /cleaning the cache, which could cause the inconsistency of the data.
4, change the cleanup timer to be 6 hours, it should be sufficient.

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

Successfully merging this pull request may close these issues.

2 participants