-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fixed an issue where the server still started with a wrong ip/host. #3057
Conversation
src/common/network/NetworkUtils.cpp
Outdated
auto result = std::find_if( | ||
ips.begin(), ips.end(), [hostOrIp](const auto& val) { return hostOrIp == val; }); |
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.
auto iter = std::find(ips.begin(), ips.end(), hostOrIp);
src/common/network/NetworkUtils.cpp
Outdated
auto hostStatus = resolveHost(hostOrIp, 0); | ||
if (!hostStatus.ok()) { | ||
return hostStatus.status(); | ||
} |
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.
NG_RETURN_IF_ERROR(resolveHost(hostOrIp, 0));
src/common/network/NetworkUtils.cpp
Outdated
const std::regex ipv4( | ||
"(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\." | ||
"(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\." | ||
"(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\." | ||
"(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)"); |
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.
"((25[0-5]|2[0-4][0-9]|[01]?[0-9]{1,2})\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]{1,2})"
src/common/network/NetworkUtils.cpp
Outdated
"(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)"); | ||
if (std::regex_match(hostOrIp, ipv4)) { | ||
const std::regex loopbackOrAny( | ||
"^127(?:\\.[0-9]+){0,2}\\.[0-9]+$|^(?:0*\\:)*?:?0*1$|0\\.0\\.0\\.0"); |
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.
"^127(?:\\.[0-9]+){0,2}\\.[0-9]+$|^(?:0*\\:)*?:?0*1$|(0\\.){3}0"
Codecov Report
@@ Coverage Diff @@
## master #3057 +/- ##
==========================================
+ Coverage 84.30% 85.06% +0.76%
==========================================
Files 1287 1287
Lines 115636 115720 +84
==========================================
+ Hits 97483 98436 +953
+ Misses 18153 17284 -869
Continue to review full report at Codecov.
|
41b814e
to
1aee757
Compare
…3057) * Fix wrong local ip. * Address comment.
* Fixed an issue where the server still started with a wrong ip/host (#3057) * Fix wrong local ip. * Address comment. * Fix alter drop (#3036) * disable modify same col * add test case * refactor ddl * fix pytest error * address comment Co-authored-by: Yee <2520865+yixinglu@users.noreply.github.com> * fix fetch vertex properties(vertex) bug (#3120) * fix fetch vertex properties(vertex) bug * address comment Co-authored-by: Yee <2520865+yixinglu@users.noreply.github.com> * fix go yield bug (#3128) * fix go yield bug * add test case * Remove unnecessary check (#3112) Co-authored-by: cpw <13495049+CPWstatic@users.noreply.github.com> Co-authored-by: Yee <2520865+yixinglu@users.noreply.github.com> * fix go mTOn filter bug (#3144) * fix go mTOn filter bug * add test case * Geo spatial: 3. geography schema, data, index and optimization (#3043) * Geo spatial: 3. geography data and index Co-authored-by: cpw <13495049+CPWstatic@users.noreply.github.com> Co-authored-by: jimingquan <mingquan.ji@vesoft.com> Co-authored-by: Yee <2520865+yixinglu@users.noreply.github.com> Co-authored-by: Yichen Wang <18348405+Aiee@users.noreply.github.com> Co-authored-by: jie.wang <38901892+jievince@users.noreply.github.com>
Close #2932 first.
graph
,meta
,storage
now bind to0.0.0.0
automatically. The configuration oflocal_ip
is only used as an identifier of local host for graph and meta.I found that issue #2932 has another one problem. Now the meta identify the graph/storage through the
local_ip
we talk above which makes overwritten problem when thelocal_ip
is duplicated.