Hi Vu, ACK from me.
Best Regards, ThuanTr -----Original Message----- From: Nguyen Minh Vu <vu.m.ngu...@dektech.com.au> Sent: Monday, November 25, 2019 3:04 PM To: Tran Thuan <thuan.t...@dektech.com.au>; thien.m.hu...@dektech.com.au Cc: opensaf-devel@lists.sourceforge.net Subject: Re: [PATCH 1/1] nid: fix unable to start UML cluster with tipc transport [#3122] Hi Thuan, Thanks. Here is a new version. Please help to review this one. diff --git a/src/nid/configure_tipc.in b/src/nid/configure_tipc.in index a63c97046..4573389d5 100644 --- a/src/nid/configure_tipc.in +++ b/src/nid/configure_tipc.in @@ -221,19 +221,17 @@ function tipc_duplicate_node_detect () function tipc_configure () { echo "Inserting TIPC mdoule..." - - if ! test -f "$TIPC_MODULE" ; then - modprobe tipc + + # Prefer using modprobe to insmod as modprobe takes care of + # loading all dependencies if any. If any dependent module + # has not yet loaded, insmod will get failed. + if modprobe tipc ; then RM_TIPC_MODULE="modprobe -r tipc" - else - insmod "$TIPC_MODULE" + elif insmod "$TIPC_MODULE" ; then RM_TIPC_MODULE="rmmod $TIPC_MODULE" - fi - - ret_val=$? - if [ $ret_val -ne 0 ] ; then - logger -p user.err " TIPC Module could not be loaded " - exit 1 + else + logger -p user.err " TIPC Module could not be loaded " + exit 1 fi # max_nodes is not supported in TIPC 2.0 Regards, Vu On 11/25/19 2:30 PM, Tran Thuan wrote: > Hi Vu, > > Sorry, I have comments inline. > > Best Regards, > ThuanTr > > -----Original Message----- > From: Tran Thuan <thuan.t...@dektech.com.au> > Sent: Monday, November 25, 2019 2:27 PM > To: 'Vu Minh Nguyen' <vu.m.ngu...@dektech.com.au>; > 'thien.m.hu...@dektech.com.au' <thien.m.hu...@dektech.com.au> > Cc: 'opensaf-devel@lists.sourceforge.net' > <opensaf-devel@lists.sourceforge.net> > Subject: RE: [PATCH 1/1] nid: fix unable to start UML cluster with tipc > transport [#3122] > > Hi Vu, > > ACK from me (code review). > > Best Regards, > ThuanTr > > -----Original Message----- > From: Vu Minh Nguyen <vu.m.ngu...@dektech.com.au> > Sent: Monday, November 25, 2019 1:45 PM > To: thuan.t...@dektech.com.au; thien.m.hu...@dektech.com.au > Cc: opensaf-devel@lists.sourceforge.net; Vu Minh Nguyen > <vu.m.ngu...@dektech.com.au> > Subject: [PATCH 1/1] nid: fix unable to start UML cluster with tipc transport > [#3122] > > --- > src/nid/configure_tipc.in | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/src/nid/configure_tipc.in b/src/nid/configure_tipc.in > index a63c97046..43ddb06e1 100644 > --- a/src/nid/configure_tipc.in > +++ b/src/nid/configure_tipc.in > @@ -221,11 +221,13 @@ function tipc_duplicate_node_detect () > function tipc_configure () > { > echo "Inserting TIPC mdoule..." > - > - if ! test -f "$TIPC_MODULE" ; then > - modprobe tipc > + > + # Prefer using modprobe to insmod as modprobe takes care of > + # loading all dependencies if any. If any dependent module > + # has not yet loaded, insmod will get failed. > + if modprobe tipc ; then > [Thuan] ret_val=$? > RM_TIPC_MODULE="modprobe -r tipc" > - else > + else > insmod "$TIPC_MODULE" > [Thuan] ret_val=$? > RM_TIPC_MODULE="rmmod $TIPC_MODULE" > fi > ret_val=$? > [Thuan] Remove ret_val=$? here > if [ $ret_val -ne 0 ] ; then > logger -p user.err " TIPC Module could not be loaded " > exit 1 > fi _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel