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

fix grpc missing host #1353

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ node_modules/
*.d
*.a
*.so
.vscode
1 change: 1 addition & 0 deletions source/agent/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ var joinCluster = function (on_ok) {
rpcClient: rpcClient,
purpose: myPurpose,
clusterName: config.cluster.name,
clusterHost: config.cluster.host,
joinRetry: config.cluster.worker.join_retry,
// 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|.
info: {
Expand Down
1 change: 1 addition & 0 deletions source/event_bridge/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ var joinCluster = function (on_ok) {
var spec = {rpcClient: rpcClient,
purpose: 'eventbridge',
clusterName: config.cluster.name,
clusterHost: config.cluster.host,
joinRetry: config.cluster.join_retry,
info: {ip: config.bridge.hostname || ip_address,
port: config.bridge.port,
Expand Down
2 changes: 1 addition & 1 deletion source/management_api/requestHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ var e = require('./errors');

const enableGrpc = global.config?.server?.enable_grpc || false;
if (enableGrpc) {
cluster_name = global.config?.cluster?.grpc_host || 'localhost:10080';
cluster_name = global.config?.cluster?.host || global.config?.cluster?.grpc_host || 'localhost:10080';
}

const scheduleAgent = function(agentName, tokenCode, origin, attempts, callback) {
Expand Down
1 change: 1 addition & 0 deletions source/portal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ var joinCluster = function (on_ok) {
var spec = {rpcClient: rpcClient,
purpose: 'portal',
clusterName: config.cluster.name,
clusterHost: config.cluster.host,
joinRetry: config.cluster.join_retry,
info: {
ip: ip_address,
Expand Down
Loading