Skip to content

Support --client-port in release mode #1912

Closed

Description

@AtnNn

Many of our tests use the --client-port option. That option is currently disabled in release mode, causing the tests to fail.

The --client-port option tells rethinkdb what port to initiate connections on, which is used to simulate netsplits.

Activity

  1. coffeemug commented on Jan 27, 2014

    @coffeemug
    Contributor

    Could you explain what --client-port does a bit more? It tells rethinkdb what to port to initiate which connections on?

  2. Tryneus commented on Jan 27, 2014

    @Tryneus
    Member

    This is the option that sets the local port used when connecting to a remote peer. Normally this is assigned by the operating system, and without this option, we can't predict which local port will be used in the tcp connection. We added this option so we could very precisely block certain paths using iptables rules to simulate netsplits for certain tests.

    As for changing this in the server, it's very easy and will actually simplify code. I still think we shouldn't expose this option in help printouts, because it's a fairly confusing behavior unless you know stuff about the IP layer, and I'm not sure many users would actually have a use for it.

  3. ghost assigned on Jan 28, 2014
  4. coffeemug commented on Jan 28, 2014

    @coffeemug
    Contributor

    Ah, got it, thanks!

  5. Tryneus commented on Jan 28, 2014

    @Tryneus
    Member

    I could make this change in a few minutes if everyone agrees we should allow this option in release mode.

  6. AtnNn commented on Jan 28, 2014

    @AtnNn
    MemberAuthor

    I have implemented this already to run tests in release mode. I just have to also remove the help output, which should be easy.

    If there are no objections, I'll put it up in review.

  7. neumino commented on Jan 28, 2014

    @neumino
    Member

    Just for my own curiosity. Don't we use the port 29015 to connect instances together?

  8. Tryneus commented on Jan 28, 2014

    @Tryneus
    Member

    That is the listening port. Each TCP packet contains both a source and destination port:
    http://en.wikipedia.org/wiki/Transmission_Control_Protocol#TCP_segment_structure

    In the default setup, one of those numbers will be 29015, but the --client-port option sets the other one.

  9. coffeemug commented on Jan 28, 2014

    @coffeemug
    Contributor

    No objects, but I do think this option should not show up in help.

  10. neumino commented on Jan 28, 2014

    @neumino
    Member

    Oh, thanks @Tryneus!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions