On 01/18/2012 12:19 AM, Jan Friesse wrote: > Steve, > it's automatic ring number. With rrp, it will work without any problem IF: > - user uses cluster_name, because then every ring has it's own mcast > address > - user use mcastaddr, but they are different for each ring > - user uses same mcastaddr for each ring, but must specify port > > One of TODO is to "reuse" little more code from cman, and this time it > should be collision detection part (2 rings with same > mcastaddr:port(port-1), broadcast with same port, ...) > Does this change the default behavior of existing configuration files (its not immediately obvious to me by looking at the patch). If original config files are can run unalatered by this change, then Reviewed-by: Steven Dake <sdake@xxxxxxxxxx>. We don't want to break original config files if at all possible (We already decided we are breaking udpu, which is a relatively new feature, rather not break others). Regards -steve > Honza > > Steven Dake napsal(a): >> This seems dubious - shouldn't port be specified per ring? >> >> On 01/16/2012 08:01 AM, Jan Friesse wrote: >>> Signed-off-by: Jan Friesse <jfriesse@xxxxxxxxxx> >>> --- >>> exec/totemconfig.c | 11 +++++++++-- >>> 1 files changed, 9 insertions(+), 2 deletions(-) >>> >>> diff --git a/exec/totemconfig.c b/exec/totemconfig.c >>> index 1f76413..83c1eb2 100644 >>> --- a/exec/totemconfig.c >>> +++ b/exec/totemconfig.c >>> @@ -86,6 +86,8 @@ >>> #define RRP_PROBLEM_COUNT_THRESHOLD_MIN 2 >>> #define RRP_AUTORECOVERY_CHECK_TIMEOUT 1000 >>> >>> +#define DEFAULT_PORT 5405 >>> + >>> static char error_string_response[512]; >>> >>> static void add_totem_config_notification(struct totem_config >>> *totem_config); >>> @@ -296,7 +298,6 @@ extern int totem_config_read ( >>> member_count = 0; >>> >>> ringnumber = atoi(ringnumber_key); >>> - >>> /* >>> * Get the bind net address >>> */ >>> @@ -340,7 +341,13 @@ extern int totem_config_read ( >>> * Get mcast port >>> */ >>> snprintf(tmp_key, ICMAP_KEYNAME_MAXLEN, >>> "totem.interface.%u.mcastport", ringnumber); >>> - icmap_get_uint16(tmp_key, >>> &totem_config->interfaces[ringnumber].ip_port); >>> + if (icmap_get_uint16(tmp_key, >>> &totem_config->interfaces[ringnumber].ip_port) != CS_OK) { >>> + if (totem_config->broadcast_use) { >>> + totem_config->interfaces[ringnumber].ip_port = >>> DEFAULT_PORT + (2 * ringnumber); >>> + } else { >>> + totem_config->interfaces[ringnumber].ip_port = >>> DEFAULT_PORT; >>> + } >>> + } >>> >>> /* >>> * Get the TTL >> > _______________________________________________ discuss mailing list discuss@xxxxxxxxxxxx http://lists.corosync.org/mailman/listinfo/discuss