ubo-dev commented on code in PR #21740:
URL: https://github.com/apache/pulsar/pull/21740#discussion_r1458834212


##########
pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdClusters.java:
##########
@@ -130,9 +132,15 @@ void run() throws PulsarAdminException {
                         getAdmin().namespaces().deleteNamespace(namespace, 
true);
                     }
                     getAdmin().tenants().deleteTenant(tenant);
+                } else {
+                    Set<String> clusters = 
getAdmin().tenants().getTenantInfo(tenant).getAllowedClusters();
+                    clusters.remove(cluster);
+                    getAdmin().tenants().updateTenant(tenant, 
TenantInfo.builder()

Review Comment:
   IMO, we should throw an error since  tenant with empty clusters is not 
allowed. @Technoboy-  @poorbarcode 



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to