chore(BA-2789): Add warning logs in storage implementations when used, limit bytes are under 0#6359
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds warning logs across multiple storage implementation modules to detect and report negative quota values (used_bytes or limit_bytes). The purpose is to improve observability and debugging when quota APIs return unexpected negative values.
Key changes:
- Added warning log statements when used_bytes or limit_bytes are negative in quota scope descriptions
- Refactored code to extract quota values into variables before creating QuotaUsage objects for cleaner logging
- Added necessary logging imports and logger initialization where missing
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/ai/backend/storage/volumes/xfs/init.py | Added warning log for negative quota values in XFS implementation |
| src/ai/backend/storage/volumes/weka/init.py | Added warning log and refactored quota value extraction for Weka implementation |
| src/ai/backend/storage/volumes/vast/init.py | Added warning log for negative quota values in VAST implementation |
| src/ai/backend/storage/volumes/netapp/netappclient.py | Added logging imports, logger initialization, and warning log for NetApp ONTAP implementation |
| src/ai/backend/storage/volumes/gpfs/init.py | Added warning logs for both missing quotas and negative quota values in GPFS implementation |
| src/ai/backend/storage/volumes/dellemc/init.py | Added logging imports, logger initialization, and warning log for DellEMC OneFS implementation |
| src/ai/backend/storage/volumes/ddn/init.py | Added logging imports, logger initialization, and warning log for EXAScaler implementation |
| src/ai/backend/storage/volumes/cephfs/init.py | Added logging imports, logger initialization, and warning log for CephFS implementation |
| changes/6359.misc.md | Added changelog entry documenting the addition of warning logs |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment on lines
+220
to
+226
| if used_bytes < 0 or hard_limit_bytes < 0: | ||
| log.warning( | ||
| "Used bytes < 0 ({}) or limit bytes < 0 ({}) for quota scope {} in XFS", | ||
| used_bytes, | ||
| hard_limit_bytes, | ||
| quota_scope_id, | ||
| ) |
Collaborator
There was a problem hiding this comment.
I think you should log report to check original response.
HyeockJinKim
approved these changes
Oct 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
resolves #6355 (BA-2789)
Checklist: (if applicable)
ai.backend.testdocsdirectory