mongos should allow --port 0

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor - P4
    • 7.1.0-rc0, 5.0.22, 7.0.3, 4.4.26, 6.0.12
    • Affects Version/s: None
    • Component/s: None
    • None
    • Service Arch
    • Fully Compatible
    • ALL
    • v7.0, v6.0, v5.0, v4.4
    • Hide

      mongos --port 0

      Show
      mongos --port 0
    • Service Arch 2023-07-10
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      mongos, unlike mongod, does not allow listening on an arbitrary OS-assigned port by specifying --port 0.

      In ancient times (2010), validation for --port was added to the server.

      Then, in slightly less ancient times (2013), this validation was split into separate validation code for mongod and mongos.

      And then, in not-even-all-that-long-ago times (2017), the validation for mongod was updated to allow port 0, but no such update was done for the corresponding mongos argument validation.

      We should apply that update there as well.

            Assignee:
            Amirsaman Memaripour
            Reporter:
            Anna Henningsen
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: