zettadb / cluster_mgr

Clust_mgr is an important compnent of KunlunBase. It provides a HTTP API for KunlunBase users to do cluster management, provisioning and monitor work, so that uses can install a cluster, a kunlun-server node, a storage shard or a kunlun-storage node by calling such APIs. Such capability enables users to integrate KunlunBase management and provisioning as part of their existing application or GUIs. Cluster_mgr also provide other important cluster maintenance background work to make sure the KunlunBase clusters it serves can work efficiently and reliably.
http://www.kunlunbase.com
Apache License 2.0
10 stars 2 forks source link

cluster_mgr query failed on server_nodes_stats #29

Open jd-zhang opened 2 years ago

jd-zhang commented 2 years ago

Issue migrated from trac ticket # 733

component: cluster manager | priority: major

2022-05-25 15:10:29: zhangjindong@zettadb.com created the issue


error message:

2022-05-25 11:08:59.152717 <10002> [error] [/home/kunlun/releasebuild/cluster_mgr/src/kl_mentain/shard.cc:503] mysql execute sql failed: execute query failed: Unknown column 'hostaddr' in 'where clause', error number: 1054, sql: select id from server_nodes_stats where hostaddr='192.168.0.148'

server_nodes_stats does not have the column of hostaddr, its id refers to server_nodes.id and the statement here should be a join select like:

select a.id from server_nodes_stats a, server_nodes b where a.id=b.id and b.hostaddr='192.168.0.148'