pingcap / tiup

A component manager for TiDB
https://tiup.io
Apache License 2.0
427 stars 313 forks source link

TiDB table information_schema.cluster_config cannot show TiProxy configs #2391

Closed djshow832 closed 8 months ago

djshow832 commented 8 months ago

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?

  2. Deploy a TiDB cluster with clusterTLS enabled in k8s

  3. Query information_schema.cluster_config in TiDB

  4. What did you expect to see?

TiDB shows TiProxy configs.

  1. What did you see instead?
mysql> select * from information_schema.cluster_config where type='tiproxy';
Empty set, 1 warning (0.08 sec)

mysql> show warnings;
+---------+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Level   | Code | Message                                                                                                                                                            |
+---------+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Warning | 1105 | Get "https://10.233.115.15:3080/api/admin/config?format=json": tls: failed to verify certificate: x509: certificate is valid for 127.0.0.1, ::1, not 10.233.115.15 |
+---------+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.03 sec)

mysql> select * from information_schema.cluster_info;
+---------+----------------------------------------------------------------+----------------------------------------------------------------+--------------------------+------------------------------------------+---------------------+--------------------+-----------+
| TYPE    | INSTANCE                                                       | STATUS_ADDRESS                                                 | VERSION                  | GIT_HASH                                 | START_TIME          | UPTIME             | SERVER_ID |
+---------+----------------------------------------------------------------+----------------------------------------------------------------+--------------------------+------------------------------------------+---------------------+--------------------+-----------+
| tidb    | tc-tidb-0.tc-tidb-peer.testbed-endless-tiproxy-5gfnf.svc:4000  | tc-tidb-0.tc-tidb-peer.testbed-endless-tiproxy-5gfnf.svc:10080 | 8.0.0-alpha-621-g411e945 | 411e945da33005f40a3e5f2728f11e22fa54f285 | 2024-03-25 10:08:53 | 2h24m40.44659445s  |      1419 |
| pd      | tc-pd-0.tc-pd-peer.testbed-endless-tiproxy-5gfnf.svc:2379      | tc-pd-0.tc-pd-peer.testbed-endless-tiproxy-5gfnf.svc:2379      | 8.0.0-alpha-114-g39108f7 | 39108f7be343368ed7487848d81d4528734dc02a | 2024-03-25 10:06:44 | 2h26m49.446605132s |         0 |
| tikv    | tc-tikv-0.tc-tikv-peer.testbed-endless-tiproxy-5gfnf.svc:20160 | 10.233.126.91:20180                                            | 8.0.0-alpha              | 101b8bc50f40e04412cff74becb9028c1f629a0f | 2024-03-25 10:08:08 | 2h25m25.446606907s |         0 |
| tiproxy | 10.233.115.15:6000                                             | 10.233.115.15:3080                                             | v1.0.0                   | 1c32cf8a936a95f693876dd76395f9fcc4835fdf | 2024-03-25 10:06:36 | 2h26m57.446609635s |         0 |
+---------+----------------------------------------------------------------+----------------------------------------------------------------+--------------------------+------------------------------------------+---------------------+--------------------+-----------+
4 rows in set (0.07 sec)
openssl x509 -noout -text -in /var/lib/tiproxy-http-server-tls/tls.crt

X509v3 Subject Alternative Name:
                DNS:tc-tiproxy, DNS:tc-tiproxy.testbed-endless-tiproxy-5gfnf, DNS:tc-tiproxy.testbed-endless-tiproxy-5gfnf.svc, DNS:tc-tiproxy-peer, DNS:tc-tiproxy-peer.testbed-endless-tiproxy-5gfnf, DNS:tc-tiproxy-peer.testbed-endless-tiproxy-5gfnf.svc, DNS:*.tc-tiproxy-peer, DNS:*.tc-tiproxy-peer.testbed-endless-tiproxy-5gfnf, DNS:*.tc-tiproxy-peer.testbed-endless-tiproxy-5gfnf.svc, DNS:*.tc-tiproxy, DNS:*.tc-tiproxy.testbed-endless-tiproxy-5gfnf, DNS:*.tc-tiproxy.testbed-endless-tiproxy-5gfnf.svc, DNS:tc-scheduling, DNS:tc-scheduling.testbed-endless-tiproxy-5gfnf, DNS:tc-scheduling.testbed-endless-tiproxy-5gfnf.svc, DNS:tc-scheduling-peer, DNS:tc-scheduling-peer.testbed-endless-tiproxy-5gfnf, DNS:tc-scheduling-peer.testbed-endless-tiproxy-5gfnf.svc, DNS:*.tc-scheduling-peer, DNS:*.tc-scheduling-peer.testbed-endless-tiproxy-5gfnf, DNS:*.tc-scheduling-peer.testbed-endless-tiproxy-5gfnf.svc, DNS:tc-tso, DNS:tc-tso.testbed-endless-tiproxy-5gfnf, DNS:tc-tso.testbed-endless-tiproxy-5gfnf.svc, DNS:tc-tso-peer, DNS:tc-tso-peer.testbed-endless-tiproxy-5gfnf, DNS:tc-tso-peer.testbed-endless-tiproxy-5gfnf.svc, DNS:*.tc-tso-peer, DNS:*.tc-tso-peer.testbed-endless-tiproxy-5gfnf, DNS:*.tc-tso-peer.testbed-endless-tiproxy-5gfnf.svc, IP Address:127.0.0.1, IP Address:0:0:0:0:0:0:0:1
  1. What version of TiUP are you using (tiup --version)?

1.14.1