You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/04/01 22:44:24 UTC

[GitHub] [ozone] smengcl commented on a change in pull request #3177: HDDS-6396. [Multi-Tenant] Merge and cleanup tenant group/role/policy tables, refactor protobuf messages and `isTenantAdmin`

smengcl commented on a change in pull request #3177:
URL: https://github.com/apache/ozone/pull/3177#discussion_r840958800



##########
File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/s3/tenant/OMTenantCreateRequest.java
##########
@@ -292,27 +291,27 @@ public OMClientResponse validateAndUpdateCache(
       // Create tenant
       // Add to tenantStateTable. Redundant assignment for clarity
       final String bucketNamespaceName = volumeName;
-      final List<String> policyNamesList = new ArrayList<>();
       // Populate policy ID list
-      // TODO: Check if both policies are actually used. Remove if not
-      policyNamesList.add(tenantDefaultPolicies);
-      final String bucketPolicyGroupName =
-          tenantId + OzoneConsts.DEFAULT_TENANT_BUCKET_POLICY_SUFFIX;
+      final String bucketNamespacePolicyName =
+          OMMultiTenantManager.getDefaultBucketNamespacePolicyName(tenantId);
       final String bucketPolicyName =
-          bucketPolicyGroupName + OzoneConsts.DEFAULT_TENANT_POLICY_NAME_SUFFIX;
-      policyNamesList.add(bucketPolicyName);
-
-      final OmDBTenantState omDBTenantInfo = new OmDBTenantState(
-          tenantId, bucketNamespaceName, policyNamesList);
+          OMMultiTenantManager.getDefaultBucketNamespacePolicyName(tenantId);

Review comment:
       Good catch




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org