Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: a3584877e3d136637b358947a67a7e89657f0981
      
https://github.com/OpenSIPS/opensips/commit/a3584877e3d136637b358947a67a7e89657f0981
  Author: Liviu Chircu <li...@opensips.org>
  Date:   2021-09-15 (Wed, 15 Sep 2021)

  Changed paths:
    M modules/clusterer/node_info.c
    M net/trans.c
    M socket_info.c

  Log Message:
  -----------
  clusterer/core: Make a node's URL port optional in db_mode 0

This patch directly improves the "my_node_info" and "neighbor_node_info"
modparams, which are used to provision cluster nodes without a DB.

Specifically, due to modparams being parsed very early in the startup
phase before proto_bin is loaded so PROTO_BIN 5555 is defined, when the
BIN port was missing from either BIN socket or above modparam node URLs,
the following errors would be thrown:

ERROR:clusterer:msg_send: send() to 10.0.0.210:0 for proto bin/7 failed

... or:

ERROR:clusterer:add_node_info: non-local socket <10.0.0.212> for ...

The solution involves two changes:
    1.  always define the PROTO_BIN 5555 port, so a missing node port
        can be filled in as early as needed with the default 5555.  The
        loading of proto_bin can later fill in the other proto fields.

    2.  when a socket has an undefined port, use the .default_port of
        the protocol when comparing it against an input node:port



_______________________________________________
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel

Reply via email to