[devel] [PATCH 0/1] Review Request for mds: optimize mdstest suite 27 [#3087] V2

2019-09-23 Thread thuan.tran
Summary: mds: optimize mdstest suite 27 [#3087]
Review request for Ticket(s): 3087
Peer Reviewer(s): Minh, Gary
Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE ***
Affected branch(es): develop
Development branch: ticket-3087
Base revision: 7d6bf312c4a965e12b99c7a784a8e81cc7618a03
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 servicesn
 OpenSAF servicesn
 Core libraries  n
 Samples n
 Tests   y
 Other   n

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

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

revision 22991cd5be7cec3ac568ee49efb4850a9ca6ab8b
Author: thuan.tran 
Date:   Tue, 24 Sep 2019 09:45:47 +0700

mds: optimize mdstest suite 27 [#3087]

- Just allocate a small buffer instead of huge buffer



Complete diffstat:
--
 src/mds/apitest/mdstipc_api.c | 116 +++---
 1 file changed, 52 insertions(+), 64 deletions(-)


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] mds: optimize mdstest suite 27 [#3087]

2019-09-23 Thread thuan.tran
- Just allocate a small buffer instead of huge buffer
---
 src/mds/apitest/mdstipc_api.c | 116 +++---
 1 file changed, 52 insertions(+), 64 deletions(-)

diff --git a/src/mds/apitest/mdstipc_api.c b/src/mds/apitest/mdstipc_api.c
index 805728464..33e7d6c12 100644
--- a/src/mds/apitest/mdstipc_api.c
+++ b/src/mds/apitest/mdstipc_api.c
@@ -13105,10 +13105,14 @@ void tet_create_default_PWE_VDEST_tp()
test_validate(FAIL, 0);
 }
 
-void tet_sender(char *send_buff, uint32_t buff_len, int msg_count)
+void tet_sender(uint32_t msg_count, uint32_t msg_size)
 {
int live = 100; // sender live max 100s
TET_MDS_MSG *mesg;
+   if (msg_size > TET_MSG_SIZE_MIN) {
+   printf("\nSender: msg_size cannot bigger than 
TET_MSG_SIZE_MIN\n");
+   exit(1);
+   }
mesg = (TET_MDS_MSG *)malloc(sizeof(TET_MDS_MSG));
memset(mesg, 0, sizeof(TET_MDS_MSG));
 
@@ -13134,7 +13138,7 @@ void tet_sender(char *send_buff, uint32_t buff_len, int 
msg_count)
exit(1);
}
 
-   while(!gl_tet_adest.svc[0].svcevt[0].dest && live-- > 0) {
+   while (!gl_tet_adest.svc[0].svcevt[0].dest && live-- > 0) {
printf("\nSender is waiting for receiver UP\n");
sleep(1);
}
@@ -13147,11 +13151,11 @@ void tet_sender(char *send_buff, uint32_t buff_len, 
int msg_count)
// otherwise, receiver won't detect loss message
sleep(1);
 
-   uint32_t offset = 0;
-   uint32_t msg_len = buff_len / msg_count;
-   for (int i = 1; i <= msg_count; i++) {
-   memcpy(mesg->send_data, _buff[offset], msg_len);
-   mesg->send_len = msg_len;
+   for (uint32_t i = 1; i <= msg_count; i++) {
+   /* to verify received correct order */
+   memset(mesg->send_data, 'X', msg_size);
+   sprintf(mesg->send_data, "%u", i);
+   mesg->send_len = msg_size;
if (mds_just_send(gl_tet_adest.mds_pwe1_hdl,
  NCSMDS_SVC_ID_INTERNAL_MIN,
  NCSMDS_SVC_ID_EXTERNAL_MIN,
@@ -13163,23 +13167,25 @@ void tet_sender(char *send_buff, uint32_t buff_len, 
int msg_count)
} else {
printf("\nSender SENT message %d successfully\n", i);
}
-   offset += msg_len;
}
free(mesg);
-   while(live-- > 0) {
+   while (live-- > 0) {
// Keep sender alive for retransmission
sleep(1);
}
 }
 
-bool tet_receiver(char *expected_buff, uint32_t buff_len, int msg_count)
+bool tet_receiver(uint32_t msg_count, uint32_t msg_size)
 {
-   int ret = 1;
+   if (msg_size > TET_MSG_SIZE_MIN) {
+   printf("\nReceiver: msg_size cannot bigger than 
TET_MSG_SIZE_MIN\n");
+   return 1;
+   }
printf("\nStarted Receiver (pid:%d) svc_id=%d\n",
(int)getpid(), NCSMDS_SVC_ID_EXTERNAL_MIN);
if (adest_get_handle() != NCSCC_RC_SUCCESS) {
printf("\nReceiver FAIL to get adest handle\n");
-   return ret;
+   return 1;
}
 
sleep(1); //Let sender subscribe before receiver install
@@ -13197,14 +13203,12 @@ bool tet_receiver(char *expected_buff, uint32_t 
buff_len, int msg_count)
exit(1);
}
 
-   char *received_buff = malloc(buff_len);
-   memset(received_buff, 0, buff_len);
-   uint32_t offset = 0;
+   char *expected_buff = malloc(msg_size);
struct pollfd sel;
-   int counter = 0;
+   uint32_t counter = 0;
sel.fd = m_GET_FD_FROM_SEL_OBJ(gl_tet_adest.svc[0].sel_obj);
sel.events = POLLIN;
-   while(counter < msg_count) {
+   while (counter < msg_count) {
int ret = osaf_poll(, 1, 1);
if (ret > 0) {
gl_rcvdmsginfo.msg = NULL;
@@ -13214,11 +13218,23 @@ bool tet_receiver(char *expected_buff, uint32_t 
buff_len, int msg_count)
printf("\nReceiver FAIL to retrieve message\n");
break;
}
-   TET_MDS_MSG *msg = (TET_MDS_MSG*)gl_rcvdmsginfo.msg;
+   TET_MDS_MSG *msg = (TET_MDS_MSG *)gl_rcvdmsginfo.msg;
if (msg != NULL) {
-   memcpy(_buff[offset],msg->recvd_data, 
msg->recvd_len);
-   offset += msg->recvd_len;
counter++;
+   memset(expected_buff, 'X', msg_size);
+   sprintf(expected_buff, "%u", counter);
+   if (memcmp(msg->recvd_data, expected_buff, 
msg_size) != 0) {
+   printf("\nReceiver: Received buffer is 
not as expected\n");
+   

[devel] [PATCH 1/1] dtm: close unused log streams [#2642]

2019-09-23 Thread Vu Minh Nguyen
Providing a new option '--max-idle' to configure the maximum idle time
of logtrace streams. If a stream has not been used for such time, logtrace
server will close the stream from its database.

This patch also corrects wrong indentation in osaflog.cc file.
---
 src/dtm/Makefile  |   2 +-
 src/dtm/common/osaflog_protocol.h |   2 +
 src/dtm/tools/Makefile|  18 
 src/dtm/tools/osaflog.cc  | 132 ++
 src/dtm/transport/log_server.cc   |  57 -
 src/dtm/transport/log_server.h|   7 +-
 src/dtm/transport/transportd.conf |   6 ++
 7 files changed, 168 insertions(+), 56 deletions(-)
 create mode 100644 src/dtm/tools/Makefile

diff --git a/src/dtm/Makefile b/src/dtm/Makefile
index 533b0f273..fb0221075 100644
--- a/src/dtm/Makefile
+++ b/src/dtm/Makefile
@@ -15,7 +15,7 @@
 #
 
 all:
-   $(MAKE) -C ../.. bin/osafdtmd bin/osaftransportd
+   $(MAKE) -C ../.. bin/osafdtmd bin/osaftransportd bin/osaflog
 
 check:
$(MAKE) -C ../.. bin/transport_test
diff --git a/src/dtm/common/osaflog_protocol.h 
b/src/dtm/common/osaflog_protocol.h
index 61e9f6f39..d35e5f345 100644
--- a/src/dtm/common/osaflog_protocol.h
+++ b/src/dtm/common/osaflog_protocol.h
@@ -27,6 +27,8 @@ namespace Osaflog {
 static constexpr const char* kServerSocketPath =
 PKGLOCALSTATEDIR "/osaf_log.sock";
 
+static constexpr const uint64_t kOneDayInMinute = 24*60;
+
 struct __attribute__((__packed__)) ClientAddressConstantPrefix {
   sa_family_t family = AF_UNIX;
   char abstract = '\0';
diff --git a/src/dtm/tools/Makefile b/src/dtm/tools/Makefile
new file mode 100644
index 0..8c48b70a5
--- /dev/null
+++ b/src/dtm/tools/Makefile
@@ -0,0 +1,18 @@
+#  -*- OpenSAF  -*-
+#
+# (C) Copyright 2019 The OpenSAF Foundation
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. This file and program are licensed
+# under the GNU Lesser General Public License Version 2.1, February 1999.
+# The complete license can be accessed from the following location:
+# http://opensource.org/licenses/lgpl-license.php
+# See the Copying file included with the OpenSAF distribution for full
+# licensing terms.
+#
+# Author(s): Ericsson AB
+#
+
+all:
+   $(MAKE) -C ../../.. bin/osaflog
diff --git a/src/dtm/tools/osaflog.cc b/src/dtm/tools/osaflog.cc
index 64be253e9..abbf0b164 100644
--- a/src/dtm/tools/osaflog.cc
+++ b/src/dtm/tools/osaflog.cc
@@ -47,6 +47,7 @@ namespace {
 void PrintUsage(const char* program_name);
 bool SendCommand(const std::string& command);
 bool MaxTraceFileSize(uint64_t max_file_size);
+bool SetMaxIdleTime(uint64_t max_idle);
 bool NoOfBackupFiles(uint64_t number_of_backups);
 bool Flush();
 base::UnixServerSocket* CreateSocket();
@@ -70,10 +71,12 @@ int main(int argc, char** argv) {
   {"print", no_argument, nullptr, 'p'},
   {"delete", no_argument, nullptr, 'd'},
   {"extract-trace", required_argument, 0, 'e'},
+  {"max-idle", required_argument, 0, 'i'},
   {0, 0, 0, 0}};
 
   uint64_t max_file_size = 0;
   uint64_t max_backups = 0;
+  uint64_t max_idle = 0;
   int option = 0;
 
   int long_index = 0;
@@ -82,71 +85,81 @@ int main(int argc, char** argv) {
   bool delete_result =  true;
   bool max_file_size_result = true;
   bool number_of_backups_result = true;
+  bool max_idle_result = true;
   bool flush_set = false;
   bool pretty_print_set = false;
   bool delete_set = false;
   bool max_file_size_set = false;
   bool max_backups_set = false;
+  bool max_idle_set = false;
   bool thread_trace = false;
   std::string input_core = "";
   std::string output_trace = "";
 
   if (argc == 1) {
- PrintUsage(argv[0]);
- exit(EXIT_FAILURE);
+PrintUsage(argv[0]);
+exit(EXIT_FAILURE);
   }
 
   while ((option = getopt_long(argc, argv, "m:b:p:f:e:",
-   long_options, _index)) != -1) {
-switch (option) {
- case 'p':
-   pretty_print_set = true;
-   flush_set = true;
- break;
- case 'd':
-   delete_set = true;
- break;
- case 'f':
-   flush_set = true;
- break;
- case 'm':
-   max_file_size = base::StrToUint64(optarg,
- _file_size_set);
-   if (!max_file_size_set || max_file_size > SIZE_MAX) {
- fprintf(stderr, "Illegal max-file-size argument\n");
- exit(EXIT_FAILURE);
-   }
- break;
- case 'b':
-   max_backups = base::StrToUint64(optarg, _backups_set);
-   if 

[devel] [PATCH 0/1] Review Request for dtm: close unused log streams [#2642]

2019-09-23 Thread Vu Minh Nguyen
Summary: dtm: close unused log streams [#2642]
Review request for Ticket(s): 2642
Peer Reviewer(s): Anders, Gary, Minh
Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE ***
Affected branch(es): develop
Development branch: ticket-2642
Base revision: 7d6bf312c4a965e12b99c7a784a8e81cc7618a03
Personal repository: git://git.code.sf.net/u/winhvu/review


Impacted area   Impact y/n

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


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

revision 7fe52542e82d4e9de969011d48f1c1805cb44f68
Author: Vu Minh Nguyen 
Date:   Tue, 24 Sep 2019 09:47:45 +0700

dtm: close unused log streams [#2642]

Providing a new option '--max-idle' to configure the maximum idle time
of logtrace streams. If a stream has not been used for such time, logtrace
server will close the stream from its database.

This patch also corrects wrong indentation in osaflog.cc file.



Added Files:

 src/dtm/tools/Makefile


Complete diffstat:
--
 src/dtm/Makefile  |   2 +-
 src/dtm/common/osaflog_protocol.h |   2 +
 src/dtm/tools/Makefile|  18 ++
 src/dtm/tools/osaflog.cc  | 132 +++---
 src/dtm/transport/log_server.cc   |  57 +++-
 src/dtm/transport/log_server.h|   7 +-
 src/dtm/transport/transportd.conf |   6 ++
 7 files changed, 168 insertions(+), 56 deletions(-)


Testing Commands:
-
- Enable trace of a service. e.g. pkill -USR2 osafimmnd
- Set a value to maximum idle time. e.g. osaflog --max-idle=1
- Disable trace e.g. pkill -USR2 osafimmnd
- Delete the logtrace stream using `osaflog --delete osafimmnd`


Testing, Expected Results:
--
Expect to get the printout `ERROR: osaftransportd replied 'Stream not found'`


Conditions of Submission:
-
Ack from peer reviewers



Arch  Built StartedLinux distro
---
mipsn  n
mips64  n  n
x86 n  n
x86_64  n  n
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 

[devel] [PATCH 1/1] mds: optimize mdstest suite 27 [#3087]

2019-09-23 Thread thuan.tran
- Just allocate a small buffer instead of huge buffer
---
 src/mds/apitest/mdstipc_api.c | 102 +++---
 1 file changed, 45 insertions(+), 57 deletions(-)

diff --git a/src/mds/apitest/mdstipc_api.c b/src/mds/apitest/mdstipc_api.c
index 805728464..663d70369 100644
--- a/src/mds/apitest/mdstipc_api.c
+++ b/src/mds/apitest/mdstipc_api.c
@@ -13105,10 +13105,14 @@ void tet_create_default_PWE_VDEST_tp()
test_validate(FAIL, 0);
 }
 
-void tet_sender(char *send_buff, uint32_t buff_len, int msg_count)
+void tet_sender(uint32_t msg_count, uint32_t msg_size)
 {
int live = 100; // sender live max 100s
TET_MDS_MSG *mesg;
+   if (msg_size > TET_MSG_SIZE_MIN) {
+   printf("\nSender: msg_size cannot bigger than 
TET_MSG_SIZE_MIN\n");
+   exit(1);
+   }
mesg = (TET_MDS_MSG *)malloc(sizeof(TET_MDS_MSG));
memset(mesg, 0, sizeof(TET_MDS_MSG));
 
@@ -13147,11 +13151,11 @@ void tet_sender(char *send_buff, uint32_t buff_len, 
int msg_count)
// otherwise, receiver won't detect loss message
sleep(1);
 
-   uint32_t offset = 0;
-   uint32_t msg_len = buff_len / msg_count;
for (int i = 1; i <= msg_count; i++) {
-   memcpy(mesg->send_data, _buff[offset], msg_len);
-   mesg->send_len = msg_len;
+   /* to verify received correct order */
+   memset(mesg->send_data, 'X', msg_size);
+   sprintf(mesg->send_data, "%u", i);
+   mesg->send_len = msg_size;
if (mds_just_send(gl_tet_adest.mds_pwe1_hdl,
  NCSMDS_SVC_ID_INTERNAL_MIN,
  NCSMDS_SVC_ID_EXTERNAL_MIN,
@@ -13163,7 +13167,6 @@ void tet_sender(char *send_buff, uint32_t buff_len, int 
msg_count)
} else {
printf("\nSender SENT message %d successfully\n", i);
}
-   offset += msg_len;
}
free(mesg);
while(live-- > 0) {
@@ -13172,14 +13175,17 @@ void tet_sender(char *send_buff, uint32_t buff_len, 
int msg_count)
}
 }
 
-bool tet_receiver(char *expected_buff, uint32_t buff_len, int msg_count)
+bool tet_receiver(uint32_t msg_count, uint32_t msg_size)
 {
-   int ret = 1;
+   if (msg_size > TET_MSG_SIZE_MIN) {
+   printf("\nReceiver: msg_size cannot bigger than 
TET_MSG_SIZE_MIN\n");
+   return 1;
+   }
printf("\nStarted Receiver (pid:%d) svc_id=%d\n",
(int)getpid(), NCSMDS_SVC_ID_EXTERNAL_MIN);
if (adest_get_handle() != NCSCC_RC_SUCCESS) {
printf("\nReceiver FAIL to get adest handle\n");
-   return ret;
+   return 1;
}
 
sleep(1); //Let sender subscribe before receiver install
@@ -13197,11 +13203,9 @@ bool tet_receiver(char *expected_buff, uint32_t 
buff_len, int msg_count)
exit(1);
}
 
-   char *received_buff = malloc(buff_len);
-   memset(received_buff, 0, buff_len);
-   uint32_t offset = 0;
+   char *expected_buff = malloc(msg_size);
struct pollfd sel;
-   int counter = 0;
+   uint32_t counter = 0;
sel.fd = m_GET_FD_FROM_SEL_OBJ(gl_tet_adest.svc[0].sel_obj);
sel.events = POLLIN;
while(counter < msg_count) {
@@ -13216,9 +13220,21 @@ bool tet_receiver(char *expected_buff, uint32_t 
buff_len, int msg_count)
}
TET_MDS_MSG *msg = (TET_MDS_MSG*)gl_rcvdmsginfo.msg;
if (msg != NULL) {
-   memcpy(_buff[offset],msg->recvd_data, 
msg->recvd_len);
-   offset += msg->recvd_len;
counter++;
+   memset(expected_buff, 'X', msg_size);
+   sprintf(expected_buff, "%u", counter);
+   if (memcmp(msg->recvd_data, expected_buff, 
msg_size) != 0) {
+   printf("\nReceiver: Received buffer is 
not as expected\n");
+   printf("\nReceiver: Dump buffer to 
/var/log/opensaf/ \n");
+   FILE *fp = 
fopen("/var/log/opensaf/mdstest_received_buff","wb");
+   fwrite(msg->recvd_data, sizeof(char), 
msg_size, fp);
+   fclose(fp);
+   fp = 
fopen("/var/log/opensaf/mdstest_expect_buff","wb");
+   fwrite(expected_buff, sizeof(char), 
msg_size, fp);
+   fclose(fp);
+   free(expected_buff);
+   return 1;
+   }
}
} else {
printf("\nReceiver got %d messages\n", counter);

[devel] [PATCH 0/1] Review Request for mds: optimize mdstest suite 27 [#3087]

2019-09-23 Thread thuan.tran
Summary: mds: optimize mdstest suite 27 [#3087]
Review request for Ticket(s): 3087
Peer Reviewer(s): Minh, Gary
Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE ***
Affected branch(es): develop
Development branch: ticket-3087
Base revision: 7d6bf312c4a965e12b99c7a784a8e81cc7618a03
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 servicesn
 OpenSAF servicesn
 Core libraries  n
 Samples n
 Tests   y
 Other   n

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

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

revision 0abe23db468440e4b674d2f94196edc626527ac2
Author: thuan.tran 
Date:   Mon, 23 Sep 2019 16:52:22 +0700

mds: optimize mdstest suite 27 [#3087]

- Just allocate a small buffer instead of huge buffer



Complete diffstat:
--
 src/mds/apitest/mdstipc_api.c | 102 +++---
 1 file changed, 45 insertions(+), 57 deletions(-)


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] amfd: ignore amfnd down event if node state is absent [#3015]

2019-09-23 Thread thuan.tran
When the PBE hung, amfd can process the events with
below order when a node was started then stop then started
- clm_track_cb for node down event
- clm_track_cb for second node up event
- avd_mds_avnd_down_evh was called to process amfnd down event

And it cause the node can not join the cluster.
---
 src/amf/amfd/ndfsm.cc | 9 +
 1 file changed, 9 insertions(+)

diff --git a/src/amf/amfd/ndfsm.cc b/src/amf/amfd/ndfsm.cc
index ee47582de..23c516262 100644
--- a/src/amf/amfd/ndfsm.cc
+++ b/src/amf/amfd/ndfsm.cc
@@ -800,6 +800,15 @@ void avd_mds_avnd_down_evh(AVD_CL_CB *cb, AVD_EVT *evt) {
   daemon_exit();
 }
 
+if ((node->node_state == AVD_AVND_STATE_ABSENT) &&
+(node->node_info.member == SA_TRUE)) {
+  // Ignore amfnd down event handle in late after clm cb node joined
+  TRACE("Ignore '%s' amfnd down event since node state absent",
+node->node_name.c_str());
+  TRACE_LEAVE();
+  return;
+}
+
 if (cb->failover_list.find(evt->info.node_id) != cb->failover_list.end()) {
   std::shared_ptr failed_node =
 cb->failover_list.at(evt->info.node_id);
-- 
2.17.1



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


[devel] [PATCH 0/1] Review Request for amfd: ignore amfnd down event if node state is absent [#3015] V3

2019-09-23 Thread thuan.tran
Summary: amfd: ignore amfnd down event if node state is absent [#3015]
Review request for Ticket(s): 3015
Peer Reviewer(s): Gary, Minh, Thang
Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE ***
Affected branch(es): develop
Development branch: ticket-3015
Base revision: 7d6bf312c4a965e12b99c7a784a8e81cc7618a03
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 3edf127a81b0672b4f535e7e729fdc63910848ca
Author: thuan.tran 
Date:   Mon, 23 Sep 2019 16:29:56 +0700

amfd: ignore amfnd down event if node state is absent [#3015]

When the PBE hung, amfd can process the events with
below order when a node was started then stop then started
- clm_track_cb for node down event
- clm_track_cb for second node up event
- avd_mds_avnd_down_evh was called to process amfnd down event

And it cause the node can not join the cluster.



Complete diffstat:
--
 src/amf/amfd/ndfsm.cc | 9 +
 1 file changed, 9 insertions(+)


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