Skip to content
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

Assign default port to [ips_fixed] and [ips] if unspecified #2931

Closed
wants to merge 2 commits into from
Closed

Assign default port to [ips_fixed] and [ips] if unspecified #2931

wants to merge 2 commits into from

Conversation

movitto
Copy link
Contributor

@movitto movitto commented May 11, 2019

Replaces previous behaviour where error was thrown.

Fixes issue #2861

Replaces previous behaviour where error was thrown
@ripplelabs-jenkins
Copy link
Collaborator

Thank you for your submission. It will be reviewed soon and submitted for processing in CI.

1 similar comment
@ripplelabs-jenkins
Copy link
Collaborator

Thank you for your submission. It will be reviewed soon and submitted for processing in CI.

@@ -534,11 +534,12 @@ OverlayImpl::onPrepare()
{
if (addr.port () == 0)
{
Throw<std::runtime_error> ("Port not specified for "
"address:" + addr.to_string ());
ips.push_back (to_string (addr.at_port(51235)));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please don't make a port in the dynamic/private ports range the default.

Copy link
Contributor Author

@movitto movitto May 11, 2019

Choose a reason for hiding this comment

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

@MarkusTeufelberger 51235 is already the default port (see existing instances a few lines above). This patch is just to automatically set it on ips & fixed ips when not specified in the config.

Copy link
Collaborator

Choose a reason for hiding this comment

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

There currently is no default port in rippled, this is just the one these instances use.

You are suggesting to make a port from a port range that is supposed to be dynamic/private to be the default port of rippled.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK I see what you're saying, though I would argue that 51235 is currently the default port in all but name, afterall it is the default port set in the config & used by most instances (that I know of).

What do you suggest as far as default port assignment, or are you saying that #2861 is a non-issue?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd recommend just grabbing an unassigned port from the proper range and maybe in parallel also asking officially for an assigned port - it is actually not that difficult or impossible to get that: https://tools.ietf.org/html/rfc6335#page-16

Copy link
Contributor

Choose a reason for hiding this comment

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

I am supportive of registering a port. Give me a day, I have a plan 😈

Copy link
Contributor

Choose a reason for hiding this comment

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

Update on the plan I hinted at above:

There already is a port (2459) that @JoelKatz has registered; we could repurpose it for this, and make it the new default for rippled. We'll follow-up with IANA about this.

@movitto, it may be a good idea to hold off on this PR so that we don't add an "implicit default" that people end up relying on only to then change it. Let's wait and see whether we'll go with 2459 or register something else.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@movitto, it may be a good idea to hold off on this PR so that we don't add an "implicit default" that people end up relying on only to then change it. Let's wait and see whether we'll go with 2459 or register something else.

Sounds good @nbougalis, let us know how the IANA follow-up goes and I can update this PR from there.

@ripplelabs-jenkins
Copy link
Collaborator

ripplelabs-jenkins commented May 16, 2019

Jenkins Build Summary

Built from this commit

Built at 20190813 - 16:25:54

Test Results

Build Type Log Result Status
msvc.Debug console no test results, t: n/a [BAD EXIT] FAIL 🔴
rpm logfile no test results, t: n/a [BAD EXIT] FAIL 🔴
msvc.Debug,
NINJA_BUILD=true
console no test results, t: n/a [BAD EXIT] FAIL 🔴
gcc.Release
-Dassert=ON,
MANUAL_TESTS=true
logfile no test results, t: 8s [BAD EXIT] FAIL 🔴
gcc.Debug
-Dcoverage=ON,
TARGET=coverage_report,
SKIP_TESTS=true
logfile no test results, t: 8s [BAD EXIT] FAIL 🔴
msvc.Debug
-Dunity=OFF
console no test results, t: n/a [BAD EXIT] FAIL 🔴
docs,
TARGET=docs
logfile no test results, t: 8s [BAD EXIT] FAIL 🔴
clang.Debug logfile no test results, t: 9s [BAD EXIT] FAIL 🔴
msvc.Release console no test results, t: n/a [BAD EXIT] FAIL 🔴
clang.Debug
-Dunity=OFF
logfile no test results, t: 9s [BAD EXIT] FAIL 🔴
gcc.Debug logfile no test results, t: 8s [BAD EXIT] FAIL 🔴
gcc.Debug
-Dunity=OFF
logfile no test results, t: 8s [BAD EXIT] FAIL 🔴
clang.Release
-Dassert=ON
logfile no test results, t: 9s [BAD EXIT] FAIL 🔴
gcc.Release
-Dassert=ON
logfile no test results, t: 8s [BAD EXIT] FAIL 🔴
gcc.Debug
-Dstatic=OFF
logfile no test results, t: 8s [BAD EXIT] FAIL 🔴
gcc.Debug
-Dstatic=OFF -DBUILD_SHARED_LIBS=ON
logfile no test results, t: 8s [BAD EXIT] FAIL 🔴
gcc.Debug,
NINJA_BUILD=true
logfile no test results, t: 9s [BAD EXIT] FAIL 🔴
clang.Debug
-Dunity=OFF -Dsan=address,
PARALLEL_TESTS=false,
DEBUGGER=false
logfile no test results, t: 9s [BAD EXIT] FAIL 🔴
clang.Debug
-Dunity=OFF -Dsan=undefined,
PARALLEL_TESTS=false
logfile no test results, t: 9s [BAD EXIT] FAIL 🔴

@codecov-io
Copy link

Codecov Report

Merging #2931 into develop will decrease coverage by <.01%.
The diff coverage is 50%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2931      +/-   ##
===========================================
- Coverage    69.38%   69.37%   -0.01%     
===========================================
  Files          708      708              
  Lines        56426    56425       -1     
===========================================
- Hits         39152    39147       -5     
- Misses       17274    17278       +4
Impacted Files Coverage Δ
src/ripple/peerfinder/impl/Logic.h 43% <50%> (ø) ⬆️
src/ripple/overlay/impl/OverlayImpl.cpp 29% <50%> (+0.04%) ⬆️
src/ripple/ledger/impl/ApplyView.cpp 80% <0%> (-2.61%) ⬇️
src/ripple/core/impl/Workers.cpp 98.94% <0%> (-1.06%) ⬇️
src/ripple/app/main/Application.cpp 57.87% <0%> (-0.11%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5214b3c...43d0507. Read the comment docs.

@ripplelabs-jenkins
Copy link
Collaborator

Thank you for your submission. It will be reviewed soon and submitted for processing in CI.

@ripplelabs-jenkins
Copy link
Collaborator

Thank you for your submission. It will be reviewed soon and submitted for processing in CI.

@movitto
Copy link
Contributor Author

movitto commented Aug 13, 2019

@nbougalis @MarkusTeufelberger @alloyxrp @mDuo13 updated the default port to reflect #3037. This patch just affects the port assigned to ips and ips_fixed entries if not specified, it does not change the default ports listened on in rippled.cfg. After this any configurations w/ unspecified ports may result in connection errors if peers are still listening on the legacy port 51235

@ripplelabs-jenkins
Copy link
Collaborator

Thank you for your submission. It will be reviewed soon and submitted for processing in CI.

@nbougalis
Copy link
Contributor

This has been superseded by #3235.

@nbougalis nbougalis closed this May 29, 2020
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