Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Commit c2862be

Browse files
committed
fix missing or wrong cluster host
1 parent f92c5a0 commit c2862be

File tree

4 files changed

+4
-1
lines changed

4 files changed

+4
-1
lines changed

source/agent/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ var joinCluster = function (on_ok) {
8787
rpcClient: rpcClient,
8888
purpose: myPurpose,
8989
clusterName: config.cluster.name,
90+
clusterHost: config.cluster.host,
9091
joinRetry: config.cluster.worker.join_retry,
9192
// Cannot find a defination about |info|. It looks like it will be used by cluster manager, but agents and portal may have different properties of |info|.
9293
info: {

source/event_bridge/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ var joinCluster = function (on_ok) {
100100
var spec = {rpcClient: rpcClient,
101101
purpose: 'eventbridge',
102102
clusterName: config.cluster.name,
103+
clusterHost: config.cluster.host,
103104
joinRetry: config.cluster.join_retry,
104105
info: {ip: config.bridge.hostname || ip_address,
105106
port: config.bridge.port,

source/management_api/requestHandler.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ var e = require('./errors');
3535

3636
const enableGrpc = global.config?.server?.enable_grpc || false;
3737
if (enableGrpc) {
38-
cluster_name = global.config?.cluster?.grpc_host || 'localhost:10080';
38+
cluster_name = global.config?.cluster?.host || global.config?.cluster?.grpc_host || 'localhost:10080';
3939
}
4040

4141
const scheduleAgent = function(agentName, tokenCode, origin, attempts, callback) {

source/portal/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ var joinCluster = function (on_ok) {
139139
var spec = {rpcClient: rpcClient,
140140
purpose: 'portal',
141141
clusterName: config.cluster.name,
142+
clusterHost: config.cluster.host,
142143
joinRetry: config.cluster.join_retry,
143144
info: {
144145
ip: ip_address,

0 commit comments

Comments
 (0)