[devel] [PATCH 0/1] Review Request for amf: amfnd should ignore amfd down event during shutting down [#3117]

2019-11-07 Thread thuan.tran
Summary: amf: amfnd should ignore amfd down event during shutting down [#3117]
Review request for Ticket(s): 3117
Peer Reviewer(s): Gary, Minh
Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE ***
Affected branch(es): develop
Development branch: ticket-3117
Base revision: ddb9d7065376df7757716013779755864d53ebe5
Personal repository: git://git.code.sf.net/u/thuantr/review


Impacted area   Impact y/n

 Docsn
 Build systemn
 RPM/packaging   n
 Configuration files n
 Startup scripts n
 SAF servicesy
 OpenSAF servicesn
 Core libraries  n
 Samples n
 Tests   n
 Other   n


Comments (indicate scope for each "y" above):
-
N/A

revision 4dd1508a0b5a6b578f7fa4601d48be6070365cb5
Author: thuan.tran 
Date:   Thu, 7 Nov 2019 16:25:24 +0700

amf: amfnd should ignore amfd down event during shutting down [#3117]

When cluster stop by immadm, amfnd (is shutting down) may see amfd
down event and order node reboot.



Complete diffstat:
--
 src/amf/amfnd/di.cc | 6 ++
 1 file changed, 6 insertions(+)


Testing Commands:
-
N/A

Testing, Expected Results:
--
N/A

Conditions of Submission:
-
ACK by reviewers

Arch  Built StartedLinux distro
---
mipsn  n
mips64  n  n
x86 n  n
x86_64  y  y
powerpc n  n
powerpc64   n  n


Reviewer Checklist:
---
[Submitters: make sure that your review doesn't trigger any checkmarks!]


Your checkin has not passed review because (see checked entries):

___ Your RR template is generally incomplete; it has too many blank entries
that need proper data filled in.

___ You have failed to nominate the proper persons for review and push.

___ Your patches do not have proper short+long header

___ You have grammar/spelling in your header that is unacceptable.

___ You have exceeded a sensible line length in your headers/comments/text.

___ You have failed to put in a proper Trac Ticket # into your commits.

___ You have incorrectly put/left internal data in your comments/files
(i.e. internal bug tracking tool IDs, product names etc)

___ You have not given any evidence of testing beyond basic build tests.
Demonstrate some level of runtime or other sanity testing.

___ You have ^M present in some of your files. These have to be removed.

___ You have needlessly changed whitespace or added whitespace crimes
like trailing spaces, or spaces before tabs.

___ You have mixed real technical changes with whitespace and other
cosmetic code cleanup changes. These have to be separate commits.

___ You need to refactor your submission into logical chunks; there is
too much content into a single commit.

___ You have extraneous garbage in your review (merge commits etc)

___ You have giant attachments which should never have been sent;
Instead you should place your content in a public tree to be pulled.

___ You have too many commits attached to an e-mail; resend as threaded
commits, or place in a public tree for a pull.

___ You have resent this content multiple times without a clear indication
of what has changed between each re-send.

___ You have failed to adequately and individually address all of the
comments and change requests that were proposed in the initial review.

___ You have a misconfigured ~/.gitconfig file (i.e. user.name, user.email etc)

___ Your computer have a badly configured date and time; confusing the
the threaded patch review.

___ Your changes affect IPC mechanism, and you don't present any results
for in-service upgradability test.

___ Your changes affect user manual and documentation, your patch series
do not contain the patch that updates the Doxygen manual.



___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


[devel] [PATCH 1/1] amf: amfnd should ignore amfd down event during shutting down [#3117]

2019-11-07 Thread thuan.tran
When cluster stop by immadm, amfnd (is shutting down) may see amfd
down event and order node reboot.
---
 src/amf/amfnd/di.cc | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/src/amf/amfnd/di.cc b/src/amf/amfnd/di.cc
index 2043c6064..1f310b949 100644
--- a/src/amf/amfnd/di.cc
+++ b/src/amf/amfnd/di.cc
@@ -664,6 +664,12 @@ uint32_t avnd_evt_mds_avd_dn_evh(AVND_CB *cb, AVND_EVT 
*evt) {
 
   LOG_WA("AMF director unexpectedly crashed");
 
+  if (m_AVND_IS_SHUTTING_DOWN(cb)) {
+LOG_WA("Ignore because AMFND is in SHUTDOWN state");
+TRACE_LEAVE();
+return rc;
+  }
+
   // if headless is disabled OR if the amfd down came from the local node, just
   // reboot
   if (cb->scs_absence_max_duration == 0 ||
-- 
2.17.1



___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


Re: [devel] [PATCH 1/1] nid: Change the path of TIPC_MODULE [#3110]

2019-11-07 Thread Tran Thuan
Hi Thien,

ACK with minor comment inline.

Best Regards,
ThuanTr

-Original Message-
From: thien.m.huynh  
Sent: Thursday, November 7, 2019 2:26 PM
To: thuan.t...@dektech.com.au; vu.m.ngu...@dektech.com.au
Cc: opensaf-devel@lists.sourceforge.net; thien.m.huynh 

Subject: [PATCH 1/1] nid: Change the path of TIPC_MODULE [#3110]

---
 src/nid/configure_tipc.in | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/nid/configure_tipc.in b/src/nid/configure_tipc.in
index 73dd1cb..218de65 100644
--- a/src/nid/configure_tipc.in
+++ b/src/nid/configure_tipc.in
@@ -21,7 +21,11 @@
 . $pkgsysconfdir/nid.conf
 
 MANAGE_TIPC=${OPENSAF_MANAGE_TIPC:-"yes"}
-TIPC_MODULE=/lib/modules/$(uname -r)/kernel/net/tipc.ko
+TIPC_MODULE=$(modinfo tipc -n 2> /dev/null)
+ret_val=$?
[Thuan] Not really need ret_val, can use $? In below IF, e.g: if [ $? -ne 0 ]; 
then
+if [ $ret_val -ne 0 ] ; then
+TIPC_MODULE=/lib/modules/$(uname -r)/kernel/net/tipc/tipc.ko
+fi
 CHASSIS_ID_FILE=$pkgsysconfdir/chassis_id
 SLOT_ID_FILE=$pkgsysconfdir/slot_id
 SUBSLOT_ID_FILE=$pkgsysconfdir/subslot_id
-- 
2.7.4




___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


Re: [devel] [PATCH 1/1] nid: Change the path of TIPC_MODULE [#3110]

2019-11-07 Thread Thien Minh Huynh
Hi Thuan,

When i run with "if [ $? -ne 0 ]; then" , the test_shellcheck is failed. So
I use ret_val.

Best Regards,
ThienHuynh

-Original Message-
From: Tran Thuan  
Sent: Friday, November 8, 2019 9:11 AM
To: 'thien.m.huynh' ;
vu.m.ngu...@dektech.com.au
Cc: opensaf-devel@lists.sourceforge.net
Subject: RE: [PATCH 1/1] nid: Change the path of TIPC_MODULE [#3110]

Hi Thien,

ACK with minor comment inline.

Best Regards,
ThuanTr

-Original Message-
From: thien.m.huynh 
Sent: Thursday, November 7, 2019 2:26 PM
To: thuan.t...@dektech.com.au; vu.m.ngu...@dektech.com.au
Cc: opensaf-devel@lists.sourceforge.net; thien.m.huynh

Subject: [PATCH 1/1] nid: Change the path of TIPC_MODULE [#3110]

---
 src/nid/configure_tipc.in | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/nid/configure_tipc.in b/src/nid/configure_tipc.in index
73dd1cb..218de65 100644
--- a/src/nid/configure_tipc.in
+++ b/src/nid/configure_tipc.in
@@ -21,7 +21,11 @@
 . $pkgsysconfdir/nid.conf
 
 MANAGE_TIPC=${OPENSAF_MANAGE_TIPC:-"yes"}
-TIPC_MODULE=/lib/modules/$(uname -r)/kernel/net/tipc.ko
+TIPC_MODULE=$(modinfo tipc -n 2> /dev/null) ret_val=$?
[Thuan] Not really need ret_val, can use $? In below IF, e.g: if [ $? -ne 0
]; then
+if [ $ret_val -ne 0 ] ; then
+TIPC_MODULE=/lib/modules/$(uname -r)/kernel/net/tipc/tipc.ko fi
 CHASSIS_ID_FILE=$pkgsysconfdir/chassis_id
 SLOT_ID_FILE=$pkgsysconfdir/slot_id
 SUBSLOT_ID_FILE=$pkgsysconfdir/subslot_id
--
2.7.4





___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


Re: [devel] [PATCH 1/1] nid: Change the path of TIPC_MODULE [#3110]

2019-11-07 Thread Tran Thuan
Hi Thien,

OK, I see. Code Shellcheck don't allow use it. No more comment from me.

configure_tipc.in:25:6: note: Check exit code directly with e.g. 'if mycmd;', 
not indirectly with $?. [SC2181]

Best Regards,
ThuanTr

-Original Message-
From: Thien Minh Huynh  
Sent: Friday, November 8, 2019 9:28 AM
To: 'Tran Thuan' ; vu.m.ngu...@dektech.com.au
Cc: opensaf-devel@lists.sourceforge.net
Subject: RE: [PATCH 1/1] nid: Change the path of TIPC_MODULE [#3110]

Hi Thuan,

When i run with "if [ $? -ne 0 ]; then" , the test_shellcheck is failed. So
I use ret_val.

Best Regards,
ThienHuynh

-Original Message-
From: Tran Thuan  
Sent: Friday, November 8, 2019 9:11 AM
To: 'thien.m.huynh' ;
vu.m.ngu...@dektech.com.au
Cc: opensaf-devel@lists.sourceforge.net
Subject: RE: [PATCH 1/1] nid: Change the path of TIPC_MODULE [#3110]

Hi Thien,

ACK with minor comment inline.

Best Regards,
ThuanTr

-Original Message-
From: thien.m.huynh 
Sent: Thursday, November 7, 2019 2:26 PM
To: thuan.t...@dektech.com.au; vu.m.ngu...@dektech.com.au
Cc: opensaf-devel@lists.sourceforge.net; thien.m.huynh

Subject: [PATCH 1/1] nid: Change the path of TIPC_MODULE [#3110]

---
 src/nid/configure_tipc.in | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/nid/configure_tipc.in b/src/nid/configure_tipc.in index
73dd1cb..218de65 100644
--- a/src/nid/configure_tipc.in
+++ b/src/nid/configure_tipc.in
@@ -21,7 +21,11 @@
 . $pkgsysconfdir/nid.conf
 
 MANAGE_TIPC=${OPENSAF_MANAGE_TIPC:-"yes"}
-TIPC_MODULE=/lib/modules/$(uname -r)/kernel/net/tipc.ko
+TIPC_MODULE=$(modinfo tipc -n 2> /dev/null) ret_val=$?
[Thuan] Not really need ret_val, can use $? In below IF, e.g: if [ $? -ne 0
]; then
+if [ $ret_val -ne 0 ] ; then
+TIPC_MODULE=/lib/modules/$(uname -r)/kernel/net/tipc/tipc.ko fi
 CHASSIS_ID_FILE=$pkgsysconfdir/chassis_id
 SLOT_ID_FILE=$pkgsysconfdir/slot_id
 SUBSLOT_ID_FILE=$pkgsysconfdir/subslot_id
--
2.7.4






___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


Re: [devel] [PATCH 1/1] nid: Change the path of TIPC_MODULE [#3110]

2019-11-07 Thread Nguyen Minh Vu

Hi Thien,

Ack with comments.

Regards, Vu

On 11/7/19 2:25 PM, thien.m.huynh wrote:

---
  src/nid/configure_tipc.in | 6 +-
  1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/nid/configure_tipc.in b/src/nid/configure_tipc.in
index 73dd1cb..218de65 100644
--- a/src/nid/configure_tipc.in
+++ b/src/nid/configure_tipc.in
@@ -21,7 +21,11 @@
  . $pkgsysconfdir/nid.conf
  
  MANAGE_TIPC=${OPENSAF_MANAGE_TIPC:-"yes"}

-TIPC_MODULE=/lib/modules/$(uname -r)/kernel/net/tipc.ko
+TIPC_MODULE=$(modinfo tipc -n 2> /dev/null)

[Vu] Put option `-n` before tipc.

+ret_val=$?
+if [ $ret_val -ne 0 ] ; then
+TIPC_MODULE=/lib/modules/$(uname -r)/kernel/net/tipc/tipc.ko

[Vu] Add double quotes around the path

+fi

[Vu] Or you can use this below technique and remove above if

+TIPC_MODULE=$(modinfo tipc -n 2> /dev/null) || TIPC_MODULE="/lib/modules/$(uname 
-r)/kernel/net/tipc/tipc.ko"


  CHASSIS_ID_FILE=$pkgsysconfdir/chassis_id
  SLOT_ID_FILE=$pkgsysconfdir/slot_id
  SUBSLOT_ID_FILE=$pkgsysconfdir/subslot_id




___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


Re: [devel] [PATCH 1/1] nid: Change the path of TIPC_MODULE [#3110]

2019-11-07 Thread Thien Minh Huynh
Hi Vu,

Thanks for your comments. 

Best Regards,
ThienHuynh

-Original Message-
From: Nguyen Minh Vu  
Sent: Friday, November 8, 2019 9:53 AM
To: thien.m.huynh ; thuan.t...@dektech.com.au
Cc: opensaf-devel@lists.sourceforge.net
Subject: Re: [PATCH 1/1] nid: Change the path of TIPC_MODULE [#3110]

Hi Thien,

Ack with comments.

Regards, Vu

On 11/7/19 2:25 PM, thien.m.huynh wrote:
> ---
>   src/nid/configure_tipc.in | 6 +-
>   1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/src/nid/configure_tipc.in b/src/nid/configure_tipc.in 
> index 73dd1cb..218de65 100644
> --- a/src/nid/configure_tipc.in
> +++ b/src/nid/configure_tipc.in
> @@ -21,7 +21,11 @@
>   . $pkgsysconfdir/nid.conf
>   
>   MANAGE_TIPC=${OPENSAF_MANAGE_TIPC:-"yes"}
> -TIPC_MODULE=/lib/modules/$(uname -r)/kernel/net/tipc.ko
> +TIPC_MODULE=$(modinfo tipc -n 2> /dev/null)
[Vu] Put option `-n` before tipc.
> +ret_val=$?
> +if [ $ret_val -ne 0 ] ; then
> +TIPC_MODULE=/lib/modules/$(uname -r)/kernel/net/tipc/tipc.ko
[Vu] Add double quotes around the path
> +fi
[Vu] Or you can use this below technique and remove above if

+TIPC_MODULE=$(modinfo tipc -n 2> /dev/null) || 
TIPC_MODULE="/lib/modules/$(uname -r)/kernel/net/tipc/tipc.ko"

>   CHASSIS_ID_FILE=$pkgsysconfdir/chassis_id
>   SLOT_ID_FILE=$pkgsysconfdir/slot_id
>   SUBSLOT_ID_FILE=$pkgsysconfdir/subslot_id




___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


Re: [devel] [PATCH 1/1] amf: amfnd should ignore amfd down event during shutting down [#3117]

2019-11-07 Thread Gary Lee

ack (review only)

On 7/11/19 8:33 pm, thuan.tran wrote:

When cluster stop by immadm, amfnd (is shutting down) may see amfd
down event and order node reboot.
---
  src/amf/amfnd/di.cc | 6 ++
  1 file changed, 6 insertions(+)

diff --git a/src/amf/amfnd/di.cc b/src/amf/amfnd/di.cc
index 2043c6064..1f310b949 100644
--- a/src/amf/amfnd/di.cc
+++ b/src/amf/amfnd/di.cc
@@ -664,6 +664,12 @@ uint32_t avnd_evt_mds_avd_dn_evh(AVND_CB *cb, AVND_EVT 
*evt) {
  
LOG_WA("AMF director unexpectedly crashed");
  
+  if (m_AVND_IS_SHUTTING_DOWN(cb)) {

+LOG_WA("Ignore because AMFND is in SHUTDOWN state");
+TRACE_LEAVE();
+return rc;
+  }
+
// if headless is disabled OR if the amfd down came from the local node, 
just
// reboot
if (cb->scs_absence_max_duration == 0 ||




smime.p7s
Description: S/MIME Cryptographic Signature
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


[devel] [PATCH 0/1] Review Request for nid: Change the path of TIPC_MODULE V2 [#3110]

2019-11-07 Thread thien.m.huynh
Summary: nid: Change the path of TIPC_MODULE [#3110]
Review request for Ticket(s): 3110
Peer Reviewer(s): Thuan, Vu
Pull request to: Vu
Affected branch(es): develop
Development branch: ticket-3110
Base revision: ddb9d7065376df7757716013779755864d53ebe5
Personal repository: git://git.code.sf.net/u/thienhuynh/review


Impacted area   Impact y/n

 Docsn
 Build systemn
 RPM/packaging   n
 Configuration files n
 Startup scripts n
 SAF servicesn
 OpenSAF servicesn
 Core libraries  n
 Samples n
 Tests   n
 Other   y

NOTE: Patch(es) contain lines longer than 80 characers

Comments (indicate scope for each "y" above):
-
*** EXPLAIN/COMMENT THE PATCH SERIES HERE ***

revision 1d6435cbfe9f0473baf82853eb4e2b946873fcb5
Author: thien.m.huynh 
Date:   Fri, 8 Nov 2019 10:39:27 +0700

nid: Change the path of TIPC_MODULE [#3110]



Complete diffstat:
--
 src/nid/configure_tipc.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Testing Commands:
-
N/A

Testing, Expected Results:
--
N/A

Conditions of Submission:
-
ACK from reviewers

Arch  Built StartedLinux distro
---
mipsn  n
mips64  n  n
x86 n  n
x86_64  y  y
powerpc n  n
powerpc64   n  n


Reviewer Checklist:
---
[Submitters: make sure that your review doesn't trigger any checkmarks!]


Your checkin has not passed review because (see checked entries):

___ Your RR template is generally incomplete; it has too many blank entries
that need proper data filled in.

___ You have failed to nominate the proper persons for review and push.

___ Your patches do not have proper short+long header

___ You have grammar/spelling in your header that is unacceptable.

___ You have exceeded a sensible line length in your headers/comments/text.

___ You have failed to put in a proper Trac Ticket # into your commits.

___ You have incorrectly put/left internal data in your comments/files
(i.e. internal bug tracking tool IDs, product names etc)

___ You have not given any evidence of testing beyond basic build tests.
Demonstrate some level of runtime or other sanity testing.

___ You have ^M present in some of your files. These have to be removed.

___ You have needlessly changed whitespace or added whitespace crimes
like trailing spaces, or spaces before tabs.

___ You have mixed real technical changes with whitespace and other
cosmetic code cleanup changes. These have to be separate commits.

___ You need to refactor your submission into logical chunks; there is
too much content into a single commit.

___ You have extraneous garbage in your review (merge commits etc)

___ You have giant attachments which should never have been sent;
Instead you should place your content in a public tree to be pulled.

___ You have too many commits attached to an e-mail; resend as threaded
commits, or place in a public tree for a pull.

___ You have resent this content multiple times without a clear indication
of what has changed between each re-send.

___ You have failed to adequately and individually address all of the
comments and change requests that were proposed in the initial review.

___ You have a misconfigured ~/.gitconfig file (i.e. user.name, user.email etc)

___ Your computer have a badly configured date and time; confusing the
the threaded patch review.

___ Your changes affect IPC mechanism, and you don't present any results
for in-service upgradability test.

___ Your changes affect user manual and documentation, your patch series
do not contain the patch that updates the Doxygen manual.



___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


[devel] [PATCH 1/1] nid: Change the path of TIPC_MODULE [#3110]

2019-11-07 Thread thien.m.huynh
---
 src/nid/configure_tipc.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/nid/configure_tipc.in b/src/nid/configure_tipc.in
index 73dd1cb..a63c970 100644
--- a/src/nid/configure_tipc.in
+++ b/src/nid/configure_tipc.in
@@ -21,7 +21,7 @@
 . $pkgsysconfdir/nid.conf
 
 MANAGE_TIPC=${OPENSAF_MANAGE_TIPC:-"yes"}
-TIPC_MODULE=/lib/modules/$(uname -r)/kernel/net/tipc.ko
+TIPC_MODULE=$(modinfo -n tipc 2> /dev/null) || 
TIPC_MODULE="/lib/modules/$(uname -r)/kernel/net/tipc/tipc.ko"
 CHASSIS_ID_FILE=$pkgsysconfdir/chassis_id
 SLOT_ID_FILE=$pkgsysconfdir/slot_id
 SUBSLOT_ID_FILE=$pkgsysconfdir/subslot_id
-- 
2.7.4



___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel