-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check if we can connect to the remote node before doing connect_node #44
Conversation
To avoid asking net_kernel to connect back overlappend nodes
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #44 +/- ##
==========================================
+ Coverage 98.20% 98.25% +0.04%
==========================================
Files 10 10
Lines 726 745 +19
==========================================
+ Hits 713 732 +19
Misses 13 13 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is a bit unexpected, but it makes sense and looks good. I have one concern - see my comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👌
There is a situation during upgrades:
This PR solves node_reconnects warning by ensuring we only call net_kernel:connect_node if still could connect to the node.
Global overlapped warning could still be here, because it is triggered by first disconnect.
Does it increases work we need to do?
lists:member(Node, nodes())
returning true.It also would protect us from trying to connect to the node which is dead, but still in DB.
Initial version of the fix had can_connect in mongoose_epmd. There are things to consider:
This PR fixes
level=warning what=node_reconnects
in logs during upgrade:Compare old build:
With new build:
Test docker build for this PR is in esl/MongooseIM#4180