[devel] [PATCH 0/1] Review Request for clm: Convert CLM to C++ [#2721]

2018-01-31 Thread Anders Widell
Summary: clm: Convert CLM to C++ [#2721]
Review request for Ticket(s): 2721
Peer Reviewer(s): Ravi
Pull request to: 
Affected branch(es): develop
Development branch: ticket-2721
Base revision: 81ef74a531f84720fd905d25e3d06b1ff799f83d
Personal repository: git://git.code.sf.net/u/anders-w/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

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

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

revision 17c6732f090ce721b596c5e1723392373c3f8954
Author: Anders Widell 
Date:   Tue, 30 Jan 2018 14:26:22 +0100

clm: Convert CLM to C++ [#2721]

To support future implementation of tickets [#2618], [#2693] and [#2694], fully
convert CLM to C++. This will also make it possible to remove the C++ wrappers
in the CLM node agent, which will simplify the code.



Complete diffstat:
--
 src/clm/Makefile.am|  40 +-
 src/clm/agent/clma.h   |  22 +-
 src/clm/agent/{clma_api.c => clma_api.cc}  | 190 
 src/clm/agent/{clma_mds.c => clma_mds.cc}  | 131 +++---
 src/clm/agent/{clma_util.c => clma_util.cc}|  81 ++--
 src/clm/apitest/clmtest.cc |   8 +-
 src/clm/apitest/tet_ClmLongRdn.cc  |  70 +--
 src/clm/apitest/tet_ClmOiOps.cc|  26 +-
 src/clm/apitest/tet_saClmClusterNodeGet.cc |  28 +-
 src/clm/apitest/tet_saClmClusterNodeGetAsync.cc|  28 +-
 .../apitest/tet_saClmClusterNotificationFree.cc|  19 +-
 src/clm/apitest/tet_saClmClusterTrack.cc   | 133 +++---
 src/clm/apitest/tet_saClmClusterTrackStop.cc   |  16 +-
 src/clm/apitest/tet_saClmDispatch.cc   |  12 +-
 src/clm/apitest/tet_saClmFinalize.cc   |  11 +-
 src/clm/apitest/tet_saClmInitialize.cc |  46 +-
 src/clm/apitest/tet_saClmResponse.cc   |  36 +-
 src/clm/apitest/tet_saClmSelectionObjectGet.cc |  14 +-
 src/clm/clmd/clms.h|  72 ++--
 src/clm/clmd/{clms_amf.c => clms_amf.cc}   |  16 +-
 src/clm/clmd/clms_cb.h |  15 +-
 src/clm/clmd/{clms_evt.c => clms_evt.cc}   | 229 +-
 src/clm/clmd/clms_evt.h|   2 +
 src/clm/clmd/{clms_imm.c => clms_imm.cc}   | 478 +++--
 src/clm/clmd/clms_imm.h|  15 +-
 src/clm/clmd/{clms_main.c => clms_main.cc} |  63 +--
 src/clm/clmd/{clms_mbcsv.c => clms_mbcsv.cc}   | 349 +++
 src/clm/clmd/clms_mbcsv.h  |   6 +-
 src/clm/clmd/{clms_mds.c => clms_mds.cc}   | 105 ++---
 src/clm/clmd/{clms_ntf.c => clms_ntf.cc}   |  59 ++-
 src/clm/clmd/{clms_plm.c => clms_plm.cc}   |  42 +-
 src/clm/clmd/{clms_util.c => clms_util.cc} | 158 +++
 src/clm/clmnd/{amf.c => amf.cc}|   8 +-
 src/clm/clmnd/cb.h |   7 +-
 src/clm/clmnd/election_starter.cc  |  14 +-
 src/clm/clmnd/evt.h|   2 -
 src/clm/clmnd/{main.c => main.cc}  | 106 ++---
 .../common/{clmsv_enc_dec.c => clmsv_enc_dec.cc}   |  17 +-
 src/clm/tools/{clm_print.c => clm_print.cc}|  81 ++--
 39 files changed, 1420 insertions(+), 1335 deletions(-)


Testing Commands:
-

Run regression tests.


Testing, Expected Results:
--

Regression tests shall pass.


Conditions of Submission:
-

Ack from reviewer(s), or on 2018-02-06 if no comments have been received.


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 b

[devel] [PATCH 0/1] Review Request for imm: immnd coredump during SYNC finalize [#2775]

2018-01-31 Thread Vu Minh Nguyen
Summary: imm: immnd coredump during SYNC finalize [#2775]
Review request for Ticket(s): 2775
Peer Reviewer(s): Zoran
Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE ***
Affected branch(es): develop, release
Development branch: ticket-2775
Base revision: b45a9848ea7df8668bc98aca4db8c74c8662b82b
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 servicesy
 OpenSAF servicesn
 Core libraries  n
 Samples n
 Tests   n
 Other   n


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

revision c5563224ffe6ff4d5c2184eeff5dbed54113498e
Author: Vu Minh Nguyen 
Date:   Wed, 31 Jan 2018 17:59:17 +0700

imm: immnd coredump during SYNC finalize [#2775]

The call to saImmOiImplementerSet and saImmOiImplementerClear are allowed during
sync.  Therefore, there is possibility the messages of these calls arrived at
veteran nodes after finalizeSync was sent from IMMND coord but before
finalizeSync arrived at the veterans (over fevs).

In that case, the implementer record stored in sImplementerVector database will
then be different with the implementer record in finalizeSync and this mismatch
caused the IMMND veterans aborted with current implementation.

This ticket adds a check to ignore that implementer record in finalizeSync
as it is obsolete instead of terminating the veterans.



Complete diffstat:
--
 src/imm/immnd/ImmModel.cc | 7 +++
 1 file changed, 7 insertions(+)


Testing Commands:
-
*** LIST THE COMMAND LINE TOOLS/STEPS TO TEST YOUR CHANGES ***


Testing, Expected Results:
--
*** PASTE COMMAND OUTPUTS / TEST RESULTS ***


Conditions of Submission:
-
*** HOW MANY DAYS BEFORE PUSHING, CONSENSUS ETC ***


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.


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___

Re: [devel] [PATCH 1/1] osaf: add retry loop to IsWritable [#2774]

2018-01-31 Thread Anders Widell

Ack.

regards,

Anders Widell


On 01/31/2018 07:02 AM, Gary Lee wrote:

Sometimes a set fails if the underlying key-value store
is 'busy', particuarly when there are network topology changes
occurring. We should retry a few times, before returning
not writable.
---
  src/osaf/consensus/consensus.cc | 8 
  1 file changed, 8 insertions(+)

diff --git a/src/osaf/consensus/consensus.cc b/src/osaf/consensus/consensus.cc
index c144a1bed..cc04f3518 100644
--- a/src/osaf/consensus/consensus.cc
+++ b/src/osaf/consensus/consensus.cc
@@ -162,7 +162,15 @@ bool Consensus::IsWritable() const {
}
  
SaAisErrorT rc;

+  uint32_t retries = 0;
+  constexpr uint32_t kMaxTestRetry = 3;
rc = KeyValue::Set(kTestKeyname, base::Conf::NodeName());
+  while (rc != SA_AIS_OK && retries < kMaxTestRetry) {
+++retries;
+std::this_thread::sleep_for(kSleepInterval);
+rc = KeyValue::Set(kTestKeyname, base::Conf::NodeName());
+  }
+
if (rc == SA_AIS_OK) {
  return true;
} else {



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


[devel] [PATCH 1/1] imm: immnd coredump during SYNC finalize [#2775]

2018-01-31 Thread Vu Minh Nguyen
The call to saImmOiImplementerSet and saImmOiImplementerClear are allowed during
sync.  Therefore, there is possibility the messages of these calls arrived at
veteran nodes after finalizeSync was sent from IMMND coord but before
finalizeSync arrived at the veterans (over fevs).

In that case, the implementer record stored in sImplementerVector database will
then be different with the implementer record in finalizeSync and this mismatch
caused the IMMND veterans aborted with current implementation.

This ticket adds a check to ignore that implementer record in finalizeSync
as it is obsolete instead of terminating the veterans.
---
 src/imm/immnd/ImmModel.cc | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/src/imm/immnd/ImmModel.cc b/src/imm/immnd/ImmModel.cc
index 7e27a83..8a9110b 100644
--- a/src/imm/immnd/ImmModel.cc
+++ b/src/imm/immnd/ImmModel.cc
@@ -19963,6 +19963,13 @@ SaAisErrorT 
ImmModel::finalizeSync(ImmsvOmFinalizeSync* req, bool isCoord,
 "according to finalizeSync. Assunimg implSet bypased finSync",
 info->mId, implName.c_str());
 explained = true;
+  } else if (info->mId == 0) {
+LOG_NO(
+"Sync-verify: Veteran node has different "
+"Implementer-id %u for implementer: %s, it is 0 "
+"according to finalizeSync. Assuming implClear bypased 
finSync",
+ii->id, implName.c_str());
+explained = true;
   } else {
 /* Here veteran claims either dead implementer, i.e. (info->mId ==
0), or different implementer, i.e. new and different info->mId,
-- 
1.9.1


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


Re: [devel] [PATCH 1/1] imm: immnd coredump during SYNC finalize [#2775]

2018-01-31 Thread Zoran Milinkovic
Hi Vu,

Reviewed the patch.
Ack from me.

Thanks,
Zoran

-Original Message-
From: Vu Minh Nguyen [mailto:vu.m.ngu...@dektech.com.au] 
Sent: den 31 januari 2018 12:20
To: Zoran Milinkovic 
Cc: opensaf-devel@lists.sourceforge.net; Vu Minh Nguyen 

Subject: [PATCH 1/1] imm: immnd coredump during SYNC finalize [#2775]

The call to saImmOiImplementerSet and saImmOiImplementerClear are allowed 
during sync.  Therefore, there is possibility the messages of these calls 
arrived at veteran nodes after finalizeSync was sent from IMMND coord but 
before finalizeSync arrived at the veterans (over fevs).

In that case, the implementer record stored in sImplementerVector database will 
then be different with the implementer record in finalizeSync and this mismatch 
caused the IMMND veterans aborted with current implementation.

This ticket adds a check to ignore that implementer record in finalizeSync as 
it is obsolete instead of terminating the veterans.
---
 src/imm/immnd/ImmModel.cc | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/src/imm/immnd/ImmModel.cc b/src/imm/immnd/ImmModel.cc index 
7e27a83..8a9110b 100644
--- a/src/imm/immnd/ImmModel.cc
+++ b/src/imm/immnd/ImmModel.cc
@@ -19963,6 +19963,13 @@ SaAisErrorT 
ImmModel::finalizeSync(ImmsvOmFinalizeSync* req, bool isCoord,
 "according to finalizeSync. Assunimg implSet bypased finSync",
 info->mId, implName.c_str());
 explained = true;
+  } else if (info->mId == 0) {
+LOG_NO(
+"Sync-verify: Veteran node has different "
+"Implementer-id %u for implementer: %s, it is 0 "
+"according to finalizeSync. Assuming implClear bypased 
finSync",
+ii->id, implName.c_str());
+explained = true;
   } else {
 /* Here veteran claims either dead implementer, i.e. (info->mId ==
0), or different implementer, i.e. new and different info->mId,
--
1.9.1


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


Re: [devel] [PATCH 0/1] Review Request for msg: implement metadata size and limit fetch operations [#2626]

2018-01-31 Thread Alex Jones


signature.asc
Description: OpenPGP digital signature
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


Re: [devel] [PATCH 0/3] Review Request for ntf: Checkpoint and cold sync reader information [#2757]

2018-01-31 Thread Minh Hon Chau

Hi Srinivas,

Thanks for that, but I don't think we should add libntf_common.la to the 
Makefile.am.


These new reader encode/decode functions are introduced in the same way 
as other existing enc/dec functions, e.g., subscribe_msg, not_msg, and 
we haven't needed the libntf_common.la so far.


Can you try "ldd lib/.libs/libSaNtf.so" to see if it points to correct 
or old libntf_common.so.0 file?


Thanks
Minh
On 30/01/18 22:01, Srinivas Mangipudy wrote:
RE: [PATCH 0/3] Review Request for ntf: Checkpoint and cold sync 
reader information [#2757]


Hi Minh,

The symbols are defined in the libntf_common.so, but ntfread was not 
able to refer to these symbols.


After I added “libntf_common.la” in the lib dependency list of 
ntfread, it worked fine.**


**

I made the below change in**Makefile.am file in 
“/opensaf-code678/src/ntf” (highlighted in *GREEN*)**


bin_ntfread_LDADD = \

lib/libntfclient.la \

*lib/libntf_common.la \***

lib/libSaNtf.la \

lib/libopensaf_core.la

Similar change was required for ntfsend and ntfsubscribe as well.

Thank you

Srinivas

*From:*Minh Hon Chau [mailto:minh.c...@dektech.com.au]
*Sent:* Tuesday, January 30, 2018 4:17 AM
*To:* Srinivas Mangipudy ; Lennart Lund 
; Canh Van Truong 


*Cc:* opensaf-devel@lists.sourceforge.net
*Subject:* Re: [PATCH 0/3] Review Request for ntf: Checkpoint and cold 
sync reader information [#2757]


Hi Srinivas,

Those symbols should be defined in libntf_common.so, which the 
libSaNtf.so depends on


One possible case I try to see your error, is that I remove the 
implementation of ntfsv_enc_read_finalize_msg in ntfsv_enc_dec.c, so I 
got your error:


make -C ../../.. bin/ntfread bin/ntfsend bin/ntfsubscribe
make[1]: Entering directory '/home/minhchau/osaftest/opensaf-code'
  CCLD bin/ntfread
lib/.libs/libSaNtf.so: undefined reference to 
`ntfsv_enc_read_finalize_msg'

collect2: error: ld returned 1 exit status
Makefile:8740: recipe for target 'bin/ntfread' failed
make[1]: *** [bin/ntfread] Error 1

But I suppose those functions should have been in ntfsv_enc_dec.c. Can 
you please try to build again with branch ticket-2757 in my review repo?


Thanks,

Minh

On 30/01/18 00:17, Srinivas Mangipudy wrote:

Hi Minh,

I got a build error. Below is the error;

*CCLD bin/ntfread*

*lib/.libs/libSaNtf.so: undefined reference to
`ntfsv_enc_reader_initialize_2_msg'*

*lib/.libs/libSaNtf.so: undefined reference to
`ntfsv_enc_read_next_msg'*

*lib/.libs/libSaNtf.so: undefined reference to
`ntfsv_enc_read_finalize_msg'*

*collect2: error: ld returned 1 exit status*

*Makefile:8740: recipe for target 'bin/ntfread' failed*

All the above symbols are undefined in the libSaNtf.so.0.1.2
shared library

*/opensaf-code124/lib/.libs# nm libSaNtf.so.0.1.2 | grep
ntfsv_enc_reader_initialize_2_msg*

* U ntfsv_enc_reader_initialize_2_msg*

*opensaf-code124/lib/.libs# nm libSaNtf.so.0.1.2 | grep
ntfsv_enc_read_next_msg*

* U ntfsv_enc_read_next_msg*

*/opensaf-code124/lib/.libs# nm libSaNtf.so.0.1.2 | grep
ntfsv_enc_read_finalize_msg*

* U ntfsv_enc_read_finalize_msg*

Thank you

Srinivas

-Original Message-
From: Minh Hon Chau [mailto:minh.c...@dektech.com.au]
Sent: Monday, January 29, 2018 9:31 AM
To: Lennart Lund 
; Srinivas Mangipudy

; Canh Van Truong
 
Cc: opensaf-devel@lists.sourceforge.net

Subject: Re: [PATCH 0/3] Review Request for ntf: Checkpoint and
cold sync reader information [#2757]

Hi all,

If the patch look ok to you, I would like to push it tomorrow.

I have updated the README and PR doc at the below links, if you
have time please have a look.


https://urldefense.proofpoint.com/v2/url?u=https-3A__sourceforge.net_p_opensaf_tickets_-5Fdiscuss_thread_77619155_0a9b_attachment_2757-5FREADME.diff&d=DwICaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=rU6x356sikQZSi7Ttc2DuiqAgbc0QIeANg72N5AllVc&m=Il9ed4kUdHBl1sTtKy3I0G6rJMuUcnoSKhdIxIWTFfc&s=osczasl2Lxg-StyK-9Qs8XrvtTj1nnJlBEL2dDIxGEA&e=


https://urldefense.proofpoint.com/v2/url?u=https-3A__sourceforge.net_p_opensaf_tickets_-5Fdiscuss_thread_5671255e_16a4_attachment_OpenSAF-5FNTFSv-5FPR-5F2735.odt&d=DwICaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=rU6x356sikQZSi7Ttc2DuiqAgbc0QIeANg72N5AllVc&m=Il9ed4kUdHBl1sTtKy3I0G6rJMuUcnoSKhdIxIWTFfc&s=riEHgZ3x2z9W8UtUxMo2tiD03svlKxireGpdVHRegvw&e=

Thanks,

Minh

On 24/01/18 12:49, minh.c...@dektech.com.au
 wrote:

> Hi Lennart,

>

> I tested the APIs between versions with/without the changes. I will

> send out for review the README and PR change after the code
review is

> done. One limitation is that both active and standby require