Bonding has option "resend_igmp" to control the number of IGMP membership reports announced on an active-backup failover.
Teaming has the equivalent functionality with "mcast_rejoin.count"
bond2team reports "parameter resend_igmp not supported, aborting"
Implement conversion of "resend_igmp" to "mcast_rejoin.count"
Signed-off-by: Jamie Bainbridge jamie.bainbridge@gmail.com --- utils/bond2team | 58 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-)
diff --git a/utils/bond2team b/utils/bond2team index 2aae3f5..a8487b7 100755 --- a/utils/bond2team +++ b/utils/bond2team @@ -552,6 +552,22 @@ team_master_set_config()
fi
+ nr_opt=${#MCAST_OPTS[@]} + if [ $nr_opt -gt 0 ]; then + team_config="${team_config}, "mcast_rejoin" : { " + # add mcast_rejoin_options + for pos in $(seq 0 $((${#MCAST_OPTS[@]} - 1))) + do + if [ $pos -ne 0 ]; then + team_config="${team_config}, " + fi + + team_config="${team_config} ${MCAST_OPTS[$pos]}" + done + + team_config="${team_config} }" + fi + team_config="${team_config} }'" pr_dbg "built team_config=${team_config}" vfile_add_line "TEAM_CONFIG=${team_config}" @@ -679,6 +695,18 @@ teamd_config_create() done fi
+ local mrejoin_nr=${#MCAST_OPTS[@]} + if [ ${mrejoin_nr} -gt 0 ]; then + local last_pos=$((${mrejoin_nr} - 1)) + for pos in $(seq 0 ${last_pos}) + do + if [ $pos -eq ${last_pos} ]; then + vfile_add_line " ${MCAST_OPTS[$pos]}" + else + vfile_add_line " ${MCAST_OPTS[$pos]}," + fi + done + fi vfile_add_line " }," return 0 } @@ -1032,6 +1060,31 @@ lwatch_parse_opt() esac }
+# mcast Functions +mcast_add_opt() +{ + pr_dbg "${FUNCNAME} $*" + local pos=${#MCAST_OPTS[*]} + MCAST_OPTS[${pos}]="$1" +} + +mcast_parse_opt() +{ + pr_dbg "${FUNCNAME} $*" + local param=$1 + local value=$2 + + case $param in + "resend_igmp") + mcast_add_opt ""count" : $value" || return 1 + ;; + *) + pr_error "parameter $param=$value is not supported" + return 1 + ;; + esac +} + port_parse_opt() { pr_dbg "${FUNCNAME} $*" @@ -1079,7 +1132,7 @@ convert_bond_opts() pr_info "parameter $key not supported, ignoring" continue ;; - "all_slaves_active"|"resend_igmp"|"num_grat_arp"|"num_unsol_na") + "all_slaves_active"|"num_grat_arp"|"num_unsol_na") pr_error "parameter $key not supported, aborting" return 1 ;; @@ -1092,6 +1145,9 @@ convert_bond_opts() "primary"|"primary_reselect") port_parse_opt $key $value || return 1 ;; + "resend_igmp") + mcast_parse_opt $key $value || return 1 + ;; *) pr_error "unknown parameter $key=$value, aborting" return 1
Thu, Apr 15, 2021 at 07:41:26AM CEST, jamie.bainbridge@gmail.com wrote:
Bonding has option "resend_igmp" to control the number of IGMP membership reports announced on an active-backup failover.
Teaming has the equivalent functionality with "mcast_rejoin.count"
bond2team reports "parameter resend_igmp not supported, aborting"
Implement conversion of "resend_igmp" to "mcast_rejoin.count"
Signed-off-by: Jamie Bainbridge jamie.bainbridge@gmail.com
Applied. Sorry for delay. Thanks!
libteam@lists.fedorahosted.org