You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/04/05 16:07:17 UTC

[GitHub] [pulsar] chairmank opened a new issue #3987: 404 response to GET /admin/v2/tenants/{tenant} even though tenant exists

chairmank opened a new issue #3987: 404 response to GET /admin/v2/tenants/{tenant} even though tenant exists
URL: https://github.com/apache/pulsar/issues/3987
 
 
   **Describe the bug**
   
   The admin REST API returns a 404 Not Found response to `GET /admin/v2/tenants/$TENANT` even when `GET /admin/v2/tenants` shows that `$TENANT` exists.
   
   **To Reproduce**
   
   Using Pulsar 2.3.0:
   
   ```
   # Create tenant with an empty request body
   $ curl -X PUT http://host/admin/v2/tenants/foo
   
   # List tenants shows the newly created tenant
   $ curl -X GET http://host/admin/v2/tenants
   ["foo","public"]
   
   # Trying to get the newly created tenant returns 404 Not Found
   $ curl -X GET http://host/admin/v2/tenants/foo
   {"reason":"Tenant does not exist"}
   ```
   
   After I update the tenant so that it has a valid `allowedClusters`, the get request returns a 200 OK response:
   
   ```
   $ curl -X POST -v -H 'Content-Type: application/json' -d '{"adminRoles":[],"allowedClusters":["mycluster"]}' http://host/admin/v2/tenants/foo
   
   $ curl -X GET http://host/admin/v2/tenants/foo
   {"adminRoles":[],"allowedClusters":["mycluster"]}
   
   ```
   
   **Expected behavior**
   
   I expect a 200 OK response with an empty response body, like
   ```
   {"adminRoles":[],"allowedClusters":[]}
   ```
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services