We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a834a66 commit 2a842b6Copy full SHA for 2a842b6
src/elasticsearch/elasticsearch.ts
@@ -37,7 +37,7 @@ export class Elasticsearch {
37
return this.execute(`/_nodes/${instance.privateIp}`).then((json: any) => {
38
if (json._nodes.total === 1) {
39
const nodeId: string = Object.keys(json.nodes)[0];
40
- const isMasterEligible: boolean = json.nodes[nodeId].settings.node.master == 'true';
+ const isMasterEligible: boolean = json.nodes[nodeId].settings.node.master == 'true' || json.nodes[nodeId].settings.node.roles.includes('master');
41
return new ElasticsearchNode(instance, nodeId, isMasterEligible);
42
} else {
43
throw `expected information about a single node, but got: ${JSON.stringify(json)}`;
0 commit comments