Skip to content

HDDS-17528. Make CreateBucket and SetBucketProperty ZDU compliant - #12080

Draft
anuragp010 wants to merge 1 commit into
apache:HDDS-11233from
anuragp010:HDDS-17528
Draft

anuragp010 wants to merge 1 commit into
apache:HDDS-11233from
anuragp010:HDDS-17528

Conversation

@anuragp010

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

CreateBucket and SetBucketProperty requests that carry storage policy fields must be rejected on the client side when the omVersion does not support storage policy. The OM already rejects such requests through its request validators, but the client side gate was missing. An OM binary older than the feature ignores the unknown protobuf fields, so the request would succeed with the policy silently dropped.

This PR adds the client side gate in RpcClient: createBucket and both setBucketStoragePolicy overloads now throw IOException("OzoneManager does not support storage policy") when STORAGE_POLICY_SUPPORT.isSupportedBy(omVersion) is false. createBucket is gated only when a policy field is set, so clients that set none keep working.

What is the link to the Apache JIRA

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

How was this patch tested?

  1. Unit Test: TestRpcClient
  2. Integration Test: TestOMStoragePolicyUpgrade

Generated with: Claude Code

@anuragp010

Copy link
Copy Markdown
Contributor Author

Please review @devmadhuu , @ArafatKhan2198 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant