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

k8s/copy: check file size #2069

Merged
merged 1 commit into from
Nov 8, 2023
Merged

k8s/copy: check file size #2069

merged 1 commit into from
Nov 8, 2023

Conversation

kkourt
Copy link
Contributor

@kkourt kkourt commented Oct 27, 2023

I've encountered an issue in a cluster, where the tetragon bugtool files were not complete. After debugging it seems that not all the files were copied. This patch tries to handle this problem by getting the size of the file before the copy. If it is succesful in doing so, then it checks whether we have read everything and if not it returns an error.

There is already support for handling partial reads in the code, so after this patch I am able to read the full size.

@kkourt kkourt requested a review from a team as a code owner October 27, 2023 07:21
@kkourt kkourt requested a review from christarazi October 27, 2023 07:21
@kkourt kkourt temporarily deployed to ci October 27, 2023 07:21 — with GitHub Actions Inactive
@kkourt kkourt force-pushed the pr/kkourt/copy-retry branch from a542192 to fa1c920 Compare October 27, 2023 07:30
@kkourt kkourt temporarily deployed to ci October 27, 2023 07:30 — with GitHub Actions Inactive
@kkourt kkourt force-pushed the pr/kkourt/copy-retry branch from fa1c920 to 7319cec Compare October 27, 2023 07:35
@kkourt kkourt temporarily deployed to ci October 27, 2023 07:35 — with GitHub Actions Inactive
I've encountered an issue in a cluster, where the tetragon bugtool files
were not complete. After debugging it seems that not all contents of the
files were copied. This patch tries to handle this problem by getting
the size of the file before the copy. If it is succesful in doing so,
then it checks whether we have read everything and if not it returns an
error.

There is already support for handling partial reads in the code, so
after this patch I am able to read the full size of the files.

Signed-off-by: Kornilios Kourtis <[email protected]>
@kkourt kkourt force-pushed the pr/kkourt/copy-retry branch from 7319cec to 1039fec Compare November 7, 2023 13:05
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Nov 8, 2023
@kkourt kkourt merged commit 7946228 into main Nov 8, 2023
19 checks passed
@kkourt kkourt deleted the pr/kkourt/copy-retry branch November 8, 2023 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has passed all tests and received consensus from code owners to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants