Skip to content

HDDS-17237. Preserve the owner's volume list on tenant create - #11781

Open
rjgoyln wants to merge 2 commits into
apache:masterfrom
rjgoyln:HDDS-17237
Open

rjgoyln wants to merge 2 commits into
apache:masterfrom
rjgoyln:HDDS-17237

Conversation

@rjgoyln

@rjgoyln rjgoyln commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Under Kerberos, UserInfo.userName contains the full principal (e.g. alice@EXAMPLE.COM), while the user table is keyed by the owner's short name (alice). Tenant create therefore reads an empty volume list and overwrites the owner's existing list with only the tenant volume.

This causes existing volumes to disappear from ozone sh volume list and can make subsequent volume deletion or ownership changes fail with USER_NOT_FOUND.

The fix uses the owner from VolumeInfo, built in preExecute, consistent with OMVolumeCreateRequest.

Existing truncated rows are not repaired. During a rolling upgrade, OMs still running the old version can continue to cause this issue.

What is the link to the Apache JIRA?

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

How was this patch tested?

  • New regression tests for the owner's volume list and volume limit fail on master with a Kerberos principal and pass with a short name.
  • Tenant, multi-tenant manager, S3 secret, and volume request/response suites pass (74 tests).

Generated-by: Claude Code (Opus 5.5)

Under Kerberos the request's UserInfo carries the full principal while the
volume owner and every other user table writer use the short name, so tenant
create read an empty list under the principal and the flush replaced the
owner's real list with just the tenant volume.
Copilot AI balanced review requested due to automatic review settings October 26, 2026 16:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@github-actions github-actions Bot added the om label Oct 26, 2026
@smengcl
smengcl marked this pull request as ready for review October 27, 2026 04:41

@smengcl smengcl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1

@echonesis echonesis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @rjgoyln for the patch.
LGTM +1, just leave a nit.

Reading the owner's list under the principal also undercounted it in the
per-user volume limit check, so a capped owner could still create a tenant.
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.

4 participants