Open tburt11 opened 7 years ago
The leading "/" appears to have some effect.
The keys in this example were created with a leading slash. This appears to be permissible in consul. Perhaps the leading slash is interpreted as the first char of key?
If a key of "/xxx" and a key of "xxx" are created, the second will appear in UI, the former appears as a blank box in UI.
If api is queried with: curl -s -curl http://172.20.47.166:8500/v1/kv/?recurse | jq '.' then both keys "/xxx" and "xxx" are defined, but only the latter is viewable in UI.
Hi @tburt11 there are provisions to prevent adding a leading slash in the /v1/kv API, but the txn allows it through. It's interfering with how the UI asks for the keys by effectively creating another slash at the top - we should probably modify the /v1/txn endpoint to fail if you add the leading slash (or strip it) because you never want that as part of the key.
Submitted a pull request which will fail with status code 400, if there is a leading slash in one of the passed keys. Other options
consul version
for both Client and ServerConsul v0.7.0 Protocol 2 spoken by default, understands 2 to 3 (agent will automatically use protocol >2 when speaking to compatible agents)
consul version
for both Client and ServerServer single dev mode or multi-server cluster.
consul info
for both Client and ServerServer:
Operating system and Environment details
AWS amazon linux stock
Description of the Issue (and unexpected/desired result)
If a new KV is created with the /v1/txn api call, the key can be examined and recalled via the API, but the UI displays only one blank key.
Clicking the blank key causes the blank key to disappear, leaving the UI without an entry for the KV created via the API
Reproduction steps
Install and configure consul 0.7.0 configured with UI.
Add a key and value using the /v1/txn curl command.
View the created KV using a curl command.
View the UI and see only a single blank box where the key value should be.
Log Fragments or Link to gist
Include appropriate Client or Server log fragments. If the log is longer than a few dozen lines, please include the URL to the gist.
TIP: Use
-log-level=TRACE
on the client and server to capture the maximum log detail.