Failed to set dashboard-address if TLS certificate is configured and client-urls scheme is set to http
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 783
- Avg merge
- 5d 21h
- Merged PRs (30d)
- 36
Description
## Bug Report
### What did you do?
* Start a cluster with TLS configured, but set the `client-urls` scheme to `http`
* `pd-ctl -u "http://{PD_ADDRESS}" config set "dashboard-address" "{PD_ADDRESS}"`
> PD_ADDRESS only has IP and port, no scheme
### What did you expect to see?
* The `dashboard-address` config is updated successfully.
### What did you see instead?
* The `dashboard-address` config is updated failed.
### What version of PD are you using (`pd-server -V`)?
#2517
### Note
When the `dashboard-address` is set without specifying a scheme, it will be supplemented according to whether or not a TLS certificate is configured, which may not match the address in the `client-urls`.
Maybe we should restrict the scheme of `client-urls` and `peer-urls` to be `https` when the TLS certificate is set.
Contributor guide
Assessment
This issue has not been assessed yet.