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

HDDS-12229. Remove Incorrect Warning for OBS Bucket in Namespace CLI Commands #7832

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Gargi-jais11
Copy link
Contributor

What changes were proposed in this pull request?

Currently, when running the ozone admin namespace summary command for an OBS bucket, a warning message incorrectly states that the Namespace CLI is not designed for OBS bucket layout, even though Recon does support OBS buckets.

Steps to Reproduce:


sh-4.2$ ozone sh bucket create --layout OBJECT_STORE /volume1/obs-bucket
sh-4.2$ ozone admin namespace summary /volume1/obs-bucket 

Output we need to fix:

Connecting to Recon: http://recon:9888/api/v1/namespace/summary?path=/volume1/obs-bucket ...[Warning] Namespace CLI is not designed for OBS bucket layout.
Bucket being accessed must be of type FILE_SYSTEM_OPTIMIZED bucket layout or 
LEGACY bucket layout with 'ozone.om.enable.filesystem.paths' set to true.Entity Type : "BUCKET"

This warning was misleading because Recon correctly processes OBS buckets in the namespace summary. The same warning message is displayed for the follwing files:

  • FileSizeDistSubCommand

  • QuotaUsageSubCommand

  • SummarySubCommand

Proposed Fix:

  1. Remove or modify the warning message so that it does not appear for OBS buckets.
  2. Ensure that the Namespace CLI properly detects and supports OBS bucket layouts.
  3. Validate that all affected commands (FileSizeDistSubCommand, QuotaUsageSubCommand, SummarySubCommand) do not display this incorrect warning.

Files Fixed:

  • FileSizeDistSubCommand.java
  • QuotaUsageSubCommand.java
  • SummarySubCommand.java
  • NSSummaryCLIUtils.java
  • TestNSSummaryAdmin.java

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-12229

How was this patch tested?

Below is the workflow link which passed successfully:
https://github.com/Gargi-jais11/ozone/actions/runs/13194677618

Copy link
Contributor

@devabhishekpal devabhishekpal left a comment

Choose a reason for hiding this comment

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

Thanks for the changes @Gargi-jais11.
Since we are removing all references to isNotValidBucketOrOBSBucket() I think we can delete the method as well.

  • isNotValidBucketOrOBSBucket()
  • isObjectStoreBucket()

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.

3 participants