Red-Night-Aria opened a new issue #344:
URL: https://github.com/apache/pulsar-manager/issues/344


   **To Reproduce**
   1. There is a pulsar instance contains two cluster c1 and c2, a tenant t1 
with allowed_cluster=[c1, c2]. Create namespace t1/ns1 in cluster c1, t1/ns2 in 
cluster c2.
   2. Configure pulsar manager with cluster_url of c1, t1 won't appear in 
pulsar manager's dashboard, since the `Get` request `/admin/v2/t1/ns2/topics` 
sent to cluster c1 would fail.
   
   There is related error log in backend:
   ```
   2020-09-29 17:15:49.617  INFO 109028 --- [http-nio-7750-exec-7] 
o.a.p.manager.zuul.EnvironmentForward    : Forward request to 
http://pulsar-sz-formal-2.local.sng:8080 @ path /admin/v2/tenants/abies
   2020-09-29 17:15:49.680 ERROR 109028 --- [http-nio-7750-exec-9] 
o.a.p.m.service.impl.TopicsServiceImpl   : Failed to get topic list.
   
   
org.apache.pulsar.client.admin.PulsarAdminException$PreconditionFailedException:
 Namespace missing local cluster name in clusters list: 
local_cluster=pulsar-sz-formal-2 ns=abies/shanghai clusters=[pulsar-sh-formal-2]
   ```
   
   **Expected behavior**
   
   t1 and ns1 should be displayed in dashborad for cluster c1 environment
   
   **Related Code**
   main/java/org/apache/pulsar/manager/service/impl/NamespacesServiceImpl.java
   In function `public Map<String, Object> getNamespaceList(Integer pageNum, 
Integer pageSize, String tenant, String requestHost)`,
   there is a loop to query topics list for all namespace
   
   ```
   for (String tenantNamespace : namespacesList) {
     ...
    Map<String, Object> topics = topicsService.getTopicsList(0, 0, tenant, 
namespace, requestHost);
    ...
   }
   ``` 
   
   maybe we should catch expection to tolerate `getTopicsList` fail for some 
namespaces?
   
   


----------------------------------------------------------------
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.

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


Reply via email to