osaf/services/infrastructure/nid/scripts/configure_tipc.in | 38 ++++++++----- 1 files changed, 23 insertions(+), 15 deletions(-)
Issue: In some OS like Montavista, TIPC is built in kernel module, the default node address will be <0.0.0>. Fix : This patch determines such OS which has TIPC is built in kernel module and configures the TIPC node address to OpenSAF requirements. Note: In OS like Montavista where TIPC is built in kernel module, once TIPC has joined a network with a network id & address it cannot change node address once assigned, until node reboots, in other words opensafd stop will not Reset tipc link/link Lost. the only way to get Reset tipc link/link Lost is rebooting node. diff --git a/osaf/services/infrastructure/nid/scripts/configure_tipc.in b/osaf/services/infrastructure/nid/scripts/configure_tipc.in --- a/osaf/services/infrastructure/nid/scripts/configure_tipc.in +++ b/osaf/services/infrastructure/nid/scripts/configure_tipc.in @@ -266,22 +266,30 @@ else configured_tipc_addr=`tipc-config -addr | tr -s '<>' % | cut -d% -f2` opensaf_tipc_addr=1.1.$TIPC_NODEID if [ $configured_tipc_addr != $opensaf_tipc_addr ]; then - logger -t opensaf -s "TIPC node address not configured to OpenSAF requirements, exiting..." - exit 1 - fi + if [ "$configured_tipc_addr" == "0.0.0" ]; then + logger -t opensaf -s "TIPC node address not yet configured , Configuring..." + if [ "$DUPLICATE_NODE_DETECT" = "YES" ]; then + tipc_duplicate_node_detect + fi + tipc_configure + else + logger -t opensaf -s "TIPC node address not configured to OpenSAF requirements, Exiting..." + exit 1 + fi + else + configured_net_id=`tipc-config -netid | cut -d: -f2` + opensaf_net_id=$TIPC_NETID + if [ $configured_net_id != $opensaf_net_id ]; then + logger -t opensaf -s "TIPC network ID not configured to OpenSAF requirements, exiting..." + exit 1 + fi - configured_net_id=`tipc-config -netid | cut -d: -f2` - opensaf_net_id=$TIPC_NETID - if [ $configured_net_id != $opensaf_net_id ]; then - logger -t opensaf -s "TIPC network ID not configured to OpenSAF requirements, exiting..." - exit 1 - fi - - configured_bearers=$(${tipc_config} -b | grep -v Bearer | cut -d: -f2 | sort) - opensaf_bearers=$(echo "$ETH_NAME" | tr "," "\n" | sort) - if [ "$configured_bearers" != "$opensaf_bearers" ]; then - logger -t opensaf -s "TIPC bearer not configured to OpenSAF requirements, exiting..." - exit 1 + configured_bearers=$(${tipc_config} -b | grep -v Bearer | cut -d: -f2 | sort) + opensaf_bearers=$(echo "$ETH_NAME" | tr "," "\n" | sort) + if [ "$configured_bearers" != "$opensaf_bearers" ]; then + logger -t opensaf -s "TIPC bearer not configured to OpenSAF requirements, exiting..." + exit 1 + fi fi fi ------------------------------------------------------------------------------ _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel