cxzhao opened a new issue, #1625:
URL: https://github.com/apache/dubbo-admin/issues/1625

   ### Environment
   
   - Deploy env: local Docker on macOS (Apple Silicon), Zookeeper 3.8.4
   - dubbo-admin version: 0.8.0 (same path logic is still present on the 
develop branch)
   - Dubbo application version: dubbo-java 3.3.5
   - Registry: Zookeeper, also used as the config center and metadata center
   
   
   ### Issue description
   
   
   ZooKeeper governance rules are written to `/dubbo/config/{ruleName}` instead 
of `/dubbo/config/dubbo/{ruleName}`.
   
   Dubbo 3.3 reads config-center data from `/dubbo/config/{group}/{dataId}`. 
The default group is `dubbo`, so applications watch 
`/dubbo/config/dubbo/{ruleName}`. dubbo-admin creates, updates, and deletes 
rules with this path in `pkg/governor/zk/governor.go`:
   
   ```go
   path := "/dubbo/config/" + r.ResourceMeta().Name
   ```
   
   The ZK discovery parser in `pkg/discovery/zk/factory.go` only accepts a 
4-segment path (`/dubbo/config/{ruleName}`). A correct 5-segment path 
(`/dubbo/config/dubbo/{ruleName}`) is ignored. The admin UI can read the rule 
back, but Dubbo applications never load it.
   
   The Nacos governor in the same repository publishes rules with group `dubbo` 
(`NacosConfigGroup`). The ZK governor omits that group.
   
   This affects tag routes (`.tag-router`), condition routes 
(`.condition-router`), and the other rules written by the same governor.
   
   Observed nodes after saving a tag route from the console:
   
   - Written and readable: `/dubbo/config/dubbo-demo-api.tag-router`
   - Empty, which is what Dubbo 3.3 watches: `/dubbo/config/dubbo`
   
   Node content at `/dubbo/config/dubbo-demo-api.tag-router`:
   
   ```yaml
   configVersion: v3.0
   enabled: true
   force: true
   key: dubbo-demo-api
   runtime: true
   tags:
   - match:
     - key: env
       value:
         exact: gray
     name: gray
   ```
   
   `ls /dubbo/config/dubbo` returns `[]`. The same wrong path was used for a 
condition route named 
`com.himmel.demo.api.UserCreditService:1.0.0:.condition-router`.
   
   There is no configuration item for this path. `configCenter: 
zookeeper://...` only selects the Zookeeper address. Reproduced with the code 
on GitHub `0.8.0-release`; 
   
   ### Logs
   
   <details><summary>Click me to check logs</summary>
   
   ```
   Copy logs to here.
   ```
   
   </details>


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to