Skip to content

Fix cluster error message#1900

Merged
vikman90 merged 6 commits into3.7from
fix-cluster-error-message
Nov 21, 2018
Merged

Fix cluster error message#1900
vikman90 merged 6 commits into3.7from
fix-cluster-error-message

Conversation

@DaveVG1
Copy link
Contributor

@DaveVG1 DaveVG1 commented Nov 19, 2018

This pull request fixes #1854
The error message that was displaying when cluster configuration is disabled or non-existent is no longer displayed.
The cluster error message will only appear when a bad node type is configured in the cluster configuration (different from client/worker/master).

@vikman90 vikman90 force-pushed the fix-cluster-error-message branch from 32794d7 to 093fa2b Compare November 20, 2018 14:41
}
} else if (strcmp(cl_status, "yes")){
is_worker = -1;
is_worker = 2;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this value should be 0, meaning that this node is not a worker (false).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the other case (cluster configuration not found) have also a value of 0? This could also mean that this node is not a worker (or that the user unintentionally erased the cluster config)

merror("Cluster node type is not valid [worker/master]. Cluster not configured. %s (%d)", strerror(errno), errno);
break;
case 1:
mdebug1("Cluster client node: Disabling the merged.mg creation");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

client keyword still present in line 142. Change it to worker please.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please avoid mixing whitespaces and tabulations.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add also a changelog entry.

Thanks!

DaveVG1 and others added 6 commits November 21, 2018 19:52
Not showing error message when cluster configuration is diabled or
non-existent. Change in error message when there's a real error (node
type not valid).
Now only returns 0 or 1 values (not worker or worker)
@vikman90 vikman90 force-pushed the fix-cluster-error-message branch from ecdb7c1 to 7275ba2 Compare November 21, 2018 18:53
@vikman90
Copy link
Member

LGTM!

@vikman90 vikman90 merged commit 7eaf54d into 3.7 Nov 21, 2018
@vikman90 vikman90 deleted the fix-cluster-error-message branch November 21, 2018 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants