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

Adjust crawler pvc on exit code 3 (out of storage) #2375

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

ikreymer
Copy link
Member

crawler 1.5.0 now has an exit code 3 for when crawler is actually out of disk space. The operator should handle this by immediately adjusting the PVC size.

Ideally, crawler will be improved to avoid this, but since this can still happen, operator should be able to respond and fix the issue.

Testing:

  • A bit tricky to test, but can be tested by setting small crawler_storage value and crawling a site with lots of large static files.

…t of storage, handle the exit code by increased pvc size
@ikreymer ikreymer force-pushed the adjust-storage-on-exit-3 branch from 04aa08a to 77b6a6f Compare February 18, 2025 21:56
@ikreymer
Copy link
Member Author

@tw4l updated testing instructions. Easiest to test on dev, lets say if storage is initially 11GB, can kubectl exec into a crawler, and then do fallocate -l 11GB ./blank or however space is left to use up all the space. The crawler should then exit with a 3, or if it exits with another code, will restart and then exit with 3.

kubectl get cjs -n crawlers -o yaml for the job, should include newStorage and kubectl get pvc -n crawlers should show the pvc with more storage, eg. 13GB in this case. Operator should have a log of something like: Attempting to adjust storage to 13Gi ...

Copy link
Member

@tw4l tw4l left a comment

Choose a reason for hiding this comment

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

Looks good, and operator and cjs logs in local dev environment looked right even if it wasn't actually resized (because Docker Desktop doesn't support that). To test on dev before merging.

@ikreymer ikreymer merged commit 36e723c into main Feb 20, 2025
25 checks passed
@ikreymer ikreymer deleted the adjust-storage-on-exit-3 branch February 20, 2025 19:03
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

Successfully merging this pull request may close these issues.

None yet

2 participants