Skip to content

chore(BA-2789): Add warning logs in storage implementations when used, limit bytes are under 0#6359

Merged
HyeockJinKim merged 7 commits into
mainfrom
feat/BA-2789
Oct 24, 2025
Merged

chore(BA-2789): Add warning logs in storage implementations when used, limit bytes are under 0#6359
HyeockJinKim merged 7 commits into
mainfrom
feat/BA-2789

Conversation

@seedspirit
Copy link
Copy Markdown
Contributor

resolves #6355 (BA-2789)

Checklist: (if applicable)

  • Milestone metadata specifying the target backport version
  • Mention to the original issue
  • Installer updates including:
    • Fixtures for db schema changes
    • New mandatory config options
  • Update of end-to-end CLI integration tests in ai.backend.test
  • API server-client counterparts (e.g., manager API -> client SDK)
  • Test case(s) to:
    • Demonstrate the difference of before/after
    • Demonstrate the flow of abstract/conceptual models with a concrete implementation
  • Documentation
    • Contents in the docs directory
    • docstrings in public interfaces and type annotations

@github-actions github-actions Bot added size:L 100~500 LoC comp:storage-proxy Related to Storage proxy component labels Oct 23, 2025
@seedspirit seedspirit marked this pull request as ready for review October 23, 2025 09:23
Copilot AI review requested due to automatic review settings October 23, 2025 09:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment thread src/ai/backend/storage/volumes/dellemc/__init__.py Outdated
Comment thread changes/6359.misc.md Outdated
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,
)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think you should log report to check original response.

Comment thread src/ai/backend/storage/volumes/ddn/__init__.py
@HyeockJinKim HyeockJinKim added this pull request to the merge queue Oct 24, 2025
Merged via the queue into main with commit 89438a2 Oct 24, 2025
28 checks passed
@HyeockJinKim HyeockJinKim deleted the feat/BA-2789 branch October 24, 2025 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:storage-proxy Related to Storage proxy component size:L 100~500 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add log for storage usage request

3 participants