[devel] [PATCH 0/1] Review Request for osaf: add retry loop to IsWritable [#2774]
Summary: osaf: add retry loop to IsWritable [#2774] Review request for Ticket(s): 2774 Peer Reviewer(s): Anders, Hans, Ravi Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE *** Affected branch(es): develop, release Development branch: ticket-2774 Base revision: b45a9848ea7df8668bc98aca4db8c74c8662b82b Personal repository: git://git.code.sf.net/u/userid-2226215/review Impacted area Impact y/n Docsn Build systemn RPM/packaging n Configuration files n Startup scripts n SAF servicesn OpenSAF servicesn Core libraries y Samples n Tests n Other n Comments (indicate scope for each "y" above): - revision ea6806eee1b1cbd854d5fb64cb668c24d80f743a Author: Gary Lee Date: Wed, 31 Jan 2018 16:42:35 +1100 osaf: add retry loop to IsWritable [#2774] 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. Complete diffstat: -- src/osaf/consensus/consensus.cc | 8 1 file changed, 8 insertions(+) Testing Commands: - 1) start a 5 node cluster with etcd installed on each node 2) isolate SC-1 (active) / PL-3 from the rest of the network 3) SC-2 will become active Testing, Expected Results: -- On step 3, SC-2 does not reboot with patch. Without patch, occasionally SC-2 would reboot because: SC-2 osafamfd[263]: Rebooting OpenSAF NodeId = 0 EE Name = No EE Mapped, Reason: Quorum lost. Conditions of Submission: - Ack from any reviewer, or in 2 weeks 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. -- 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] osaf: add retry loop to IsWritable [#2774]
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 { -- 2.14.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
[devel] [PATCH 1/1] imm: not allow creating reserved IMM class names [#2771]
PBE will be restarted and will not be able to come up if user requests creating IMM object class with same name of reserved ones. This patch adds code to reject such request with SA_AIS_ERR_INVALID_PARAM. --- src/imm/Makefile.am| 2 + src/imm/agent/imma_om_api.cc | 1 - .../apitest/management/test_saImmOmClassCreate_2.c | 48 +++ src/imm/immnd/ImmModel.cc | 55 +--- src/imm/immnd/immnd.conf | 9 ++ src/imm/immnd/immnd_cb.h | 1 + src/imm/immnd/immnd_common.c | 75 src/imm/immnd/immnd_common.h | 32 +++ src/imm/immnd/immnd_evt.c | 17 src/imm/immnd/immnd_main.c | 99 +- 10 files changed, 285 insertions(+), 54 deletions(-) create mode 100644 src/imm/immnd/immnd_common.c create mode 100644 src/imm/immnd/immnd_common.h diff --git a/src/imm/Makefile.am b/src/imm/Makefile.am index b7e4826..099efda 100644 --- a/src/imm/Makefile.am +++ b/src/imm/Makefile.am @@ -163,6 +163,7 @@ noinst_HEADERS += \ src/imm/immnd/immnd.h \ src/imm/immnd/immnd_cb.h \ src/imm/immnd/immnd_init.h \ + src/imm/immnd/immnd_common.h \ src/imm/immpbed/immpbe.h \ src/imm/tools/imm_dumper.h @@ -332,6 +333,7 @@ bin_osafimmnd_CPPFLAGS = \ $(AM_CPPFLAGS) bin_osafimmnd_SOURCES = \ + src/imm/immnd/immnd_common.c \ src/imm/immnd/immnd_amf.c \ src/imm/immnd/immnd_db.c \ src/imm/immnd/immnd_evt.c \ diff --git a/src/imm/agent/imma_om_api.cc b/src/imm/agent/imma_om_api.cc index 7155799..a06f0ea 100644 --- a/src/imm/agent/imma_om_api.cc +++ b/src/imm/agent/imma_om_api.cc @@ -55,7 +55,6 @@ static bool immOmIsLoader = false; static const char *sysaClName = SA_IMM_ATTR_CLASS_NAME; static const char *sysaAdmName = SA_IMM_ATTR_ADMIN_OWNER_NAME; static const char *sysaImplName = SA_IMM_ATTR_IMPLEMENTER_NAME; - static int imma_om_resurrect(IMMA_CB *cb, IMMA_CLIENT_NODE *cl_node, bool *locked); static SaAisErrorT imma_finalizeCcb(SaImmCcbHandleT ccbHandle, diff --git a/src/imm/apitest/management/test_saImmOmClassCreate_2.c b/src/imm/apitest/management/test_saImmOmClassCreate_2.c index 3ae4b0f..967b819 100644 --- a/src/imm/apitest/management/test_saImmOmClassCreate_2.c +++ b/src/imm/apitest/management/test_saImmOmClassCreate_2.c @@ -426,6 +426,46 @@ void saImmOmClassCreate_2_19(void) safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK); } +/* + Verify it is not allowed to create IMM object class with reserved name. + NOTE: As the list of reserved class names is read from the environment + variable IMMSV_RESERVED_CLASS_NAMES which is defined in immnd.conf file, + these 02 below test cases could fail if "objects" or "classes" name do + not exist in the list. + */ +void saImmOmClassCreate_with_reserved_name_01(void) +{ + const SaImmClassNameT className = (SaImmClassNameT) "objects"; + SaImmAttrDefinitionT_2 attr1 = {"rdn", SA_IMM_ATTR_SANAMET, + SA_IMM_ATTR_CONFIG | SA_IMM_ATTR_RDN, + NULL}; + const SaImmAttrDefinitionT_2 *attrDefinitions[] = {&attr1, NULL}; + + safassert(saImmOmInitialize(&immOmHandle, &immOmCallbacks, &immVersion), + SA_AIS_OK); + rc = saImmOmClassCreate_2(immOmHandle, className, SA_IMM_CLASS_CONFIG, + attrDefinitions); + test_validate(rc, SA_AIS_ERR_INVALID_PARAM); + safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK); +} + +void saImmOmClassCreate_with_reserved_name_02(void) +{ + const SaImmClassNameT className = (SaImmClassNameT) "classes"; + SaImmAttrDefinitionT_2 attr1 = { + "rdn", SA_IMM_ATTR_SANAMET, + SA_IMM_ATTR_RUNTIME | SA_IMM_ATTR_RDN | SA_IMM_ATTR_CACHED, + NULL}; + const SaImmAttrDefinitionT_2 *attrDefinitions[] = {&attr1, NULL}; + + safassert(saImmOmInitialize(&immOmHandle, &immOmCallbacks, &immVersion), + SA_AIS_OK); + rc = saImmOmClassCreate_2(immOmHandle, className, SA_IMM_CLASS_RUNTIME, + attrDefinitions); + test_validate(rc, SA_AIS_ERR_INVALID_PARAM); + safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK); +} + #define OPENSAF_IMM_NOSTD_FLAG_PARAM "opensafImmNostdFlags" #define OPENSAF_IMM_NOSTD_FLAG_ON 1 #define OPENSAF_IMM_NOSTD_FLAG_OFF 2 @@ -1457,6 +1497,14 @@ __attribute__((constructor)) static void saImmOmInitialize_constructor(void) test_case_add( 2, saImmOmClassCreate_2_19, "saImmOmClassCreate_2 - SA_AIS_OK, Create a class that has STRONG_DEFAULT flag without having default value"); + test_case_add( + 2, saImmOmClassCreate_with_reserved_name_01, +
[devel] [PATCH 0/1] Review Request for imm: not allow creating reserved IMM class names [#2771] V2
Summary: imm: not allow creating reserved IMM class names [#2771] Review request for Ticket(s): 2771 Peer Reviewer(s): Zoran, Ravi Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE *** Affected branch(es): develop, release Development branch: ticket-2771 Base revision: 81ef74a531f84720fd905d25e3d06b1ff799f83d 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 8be516e90d971b3fc3e100c8f1f45d251e3a8003 Author: Vu Minh Nguyen Date: Tue, 30 Jan 2018 21:11:48 +0700 imm: not allow creating reserved IMM class names [#2771] PBE will be restarted and will not be able to come up if user requests creating IMM object class with same name of reserved ones. This patch adds code to reject such request with SA_AIS_ERR_INVALID_PARAM. Added Files: src/imm/immnd/immnd_common.c src/imm/immnd/immnd_common.h Complete diffstat: -- src/imm/Makefile.am| 2 + src/imm/agent/imma_om_api.cc | 1 - .../apitest/management/test_saImmOmClassCreate_2.c | 48 +++ src/imm/immnd/ImmModel.cc | 55 +--- src/imm/immnd/immnd.conf | 9 ++ src/imm/immnd/immnd_cb.h | 1 + src/imm/immnd/immnd_common.c | 75 src/imm/immnd/immnd_common.h | 32 +++ src/imm/immnd/immnd_evt.c | 17 src/imm/immnd/immnd_main.c | 99 +- 10 files changed, 285 insertions(+), 54 deletions(-) Testing Commands: - Run added tests `immomtest 2 19`, `immomtest 2 20`. Testing, Expected Results: -- Tests PASS 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 manu
Re: [devel] [PATCH 0/1] Review Request for log: update saflogtest to limit timeout when handling try again [#2764]
Hi Canh When I was testing this I saw a lot of options for logtest that are not part of the help (-h) printout. Several of them does not even have a comment in the code telling what they are used f or and how to use them. This must be fixed! For each option it must be documented: - What the option is for - Why this option exist. Is it for example created to enable some specific test? - How to use it e.g. if it some other option also have to be used It must also be documented in two places! 1. In the help (-h) printout. Here a short explanation may be enough 2. Somewhere in the code or README a full explanation including usage must be given. I suggest a "file comment" in the beginning of saflogtest.c. An alternative could be in the switch where each option has a case Thanks Lennart > -Original Message- > From: Lennart Lund > Sent: den 30 januari 2018 12:17 > To: 'Canh Van Truong' ; Vu Minh Nguyen > ; srinivas.mangip...@oracle.com > Cc: opensaf-devel@lists.sourceforge.net; Canh Van Truong > > Subject: RE: [PATCH 0/1] Review Request for log: update saflogtest to limit > timeout when handling try again [#2764] > > Hi Canh > > Ack > Have a very minor comment, see attached .diff > > Thanks > Lennart > > > -Original Message- > > From: Canh Van Truong [mailto:canh.v.tru...@dektech.com.au] > > Sent: den 29 januari 2018 06:06 > > To: Lennart Lund ; Vu Minh Nguyen > > ; srinivas.mangip...@oracle.com > > Cc: opensaf-devel@lists.sourceforge.net; Canh Van Truong > > > > Subject: [PATCH 0/1] Review Request for log: update saflogtest to limit > > timeout when handling try again [#2764] > > > > Summary: log: update saflogtest to limit timeout when handling try again > > [#2764] > > Review request for Ticket(s): 2764 > > Peer Reviewer(s): Lennart, Vu, Srinivas > > Pull request to: Vu > > Affected branch(es): develop, release > > Development branch: ticket-2764 > > Base revision: 6e7d96275a7a9e8566df8552c3e47e4e2e87552b > > Personal repository: git://git.code.sf.net/u/canht32/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 ce7dd74a0de755d7e165818d1d9f7f8e6a075f71 > > Author: Canh Van Truong > > Date: Mon, 29 Jan 2018 11:51:48 +0700 > > > > log: update saflogtest to limit timeout when handling try again [#2764] > > > > when saflogtest write log records and get error TRY_AGAIN in ack message, > it > > will handle to re-write until the error is not TRY_AGAIN. There is no > > limited > > timeout > > to handle try-again. The patch add timeout 10s for handling try-again. > > > > > > > > Complete diffstat: > > -- > > src/log/apitest/saflogtest.c | 86 ++--- > -- > > --- > > src/log/apitest/tet_LogOiOps.c | 48 +++ > > 2 files changed, 82 insertions(+), 52 deletions(-) > > > > > > Testing Commands: > > - > > *** LIST THE COMMAND LINE TOOLS/STEPS TO TEST YOUR CHANGES *** > > > > > > Testing, Expected Results: > > -- > > *** PASTE COMMAND OUTPUTS / TEST RESULTS *** > > > > > > Conditions of Submission: > > - > > Ack from 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 sa
Re: [devel] [PATCH 0/1] Review Request for log: update saflogtest to limit timeout when handling try again [#2764]
Hi Canh Ack Have a very minor comment, see attached .diff Thanks Lennart > -Original Message- > From: Canh Van Truong [mailto:canh.v.tru...@dektech.com.au] > Sent: den 29 januari 2018 06:06 > To: Lennart Lund ; Vu Minh Nguyen > ; srinivas.mangip...@oracle.com > Cc: opensaf-devel@lists.sourceforge.net; Canh Van Truong > > Subject: [PATCH 0/1] Review Request for log: update saflogtest to limit > timeout when handling try again [#2764] > > Summary: log: update saflogtest to limit timeout when handling try again > [#2764] > Review request for Ticket(s): 2764 > Peer Reviewer(s): Lennart, Vu, Srinivas > Pull request to: Vu > Affected branch(es): develop, release > Development branch: ticket-2764 > Base revision: 6e7d96275a7a9e8566df8552c3e47e4e2e87552b > Personal repository: git://git.code.sf.net/u/canht32/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 ce7dd74a0de755d7e165818d1d9f7f8e6a075f71 > Author: Canh Van Truong > Date: Mon, 29 Jan 2018 11:51:48 +0700 > > log: update saflogtest to limit timeout when handling try again [#2764] > > when saflogtest write log records and get error TRY_AGAIN in ack message, it > will handle to re-write until the error is not TRY_AGAIN. There is no limited > timeout > to handle try-again. The patch add timeout 10s for handling try-again. > > > > Complete diffstat: > -- > src/log/apitest/saflogtest.c | 86 ++- > --- > src/log/apitest/tet_LogOiOps.c | 48 +++ > 2 files changed, 82 insertions(+), 52 deletions(-) > > > Testing Commands: > - > *** LIST THE COMMAND LINE TOOLS/STEPS TO TEST YOUR CHANGES *** > > > Testing, Expected Results: > -- > *** PASTE COMMAND OUTPUTS / TEST RESULTS *** > > > Conditions of Submission: > - > Ack from 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 pre
Re: [devel] [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 HYPERLINK "mailto:lennart.l...@ericsson.com";; Srinivas Mangipudy HYPERLINK "mailto:srinivas.mangip...@oracle.com";; Canh Van Truong HYPERLINK "mailto:canh.v.tru...@dektech.com.au"; Cc: HYPERLINK "mailto:opensaf-devel@lists.sourceforge.net"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, HYPERLINK "mailto:minh.c...@dektech.com.au"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 the patches to > work. > > Thanks, > Minh > >> Hi Minh >> >> Ack. I have not tested much >> >> Have you tested using the reader API while running old version on >> standby and new version on active and vice versa (upgrade case)? Limitations? >> PR documentation update? >> >> Thanks >> Lennart >> >>> -Original Message- >>> From: Minh Hon Chau >>> Sent: den 22 januari 2018 05:19 >>> To: Lennart Lund >> "mailto:lennart.l...@ericsson.com"lennart.l...@ericsson.com>; >>> HYPERLINK >>> "mailto:srinivas.mangip...@oracle.com"srinivas.mangip...@oracle.com; Canh >>> Van Truong >>> >> "mailto:canh.v.tru...@dektech.com.au"canh.v.tru...@dektech.com.au> >>> Cc:
Re: [devel] [PATCH 0/1] Review Request for fmd: indent to Google style guide [#2763]
Ack. regards, Anders Widell On 01/29/2018 11:36 PM, Gary Lee wrote: Summary: fmd: indent to Google style guide [#2763] Review request for Ticket(s): 2763 Peer Reviewer(s): Anders, Ravi Pull request to: Affected branch(es): develop Development branch: ticket-2763 Base revision: 81ef74a531f84720fd905d25e3d06b1ff799f83d Personal repository: git://git.code.sf.net/u/userid-2226215/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): - revision a00236279afaa39d041ad8c67ece0abaec2f4005 Author: Gary Lee Date: Tue, 30 Jan 2018 09:30:51 +1100 fmd: indent to Google style guide [#2763] ran 'clang-format -style=Google' on fmd files no other changes made Complete diffstat: -- src/fm/fmd/fm.h | 50 +- src/fm/fmd/fm_amf.cc | 457 src/fm/fmd/fm_amf.h |2 +- src/fm/fmd/fm_cb.h|8 +- src/fm/fmd/fm_main.cc | 1388 +++ src/fm/fmd/fm_mds.cc | 1436 - src/fm/fmd/fm_rda.cc | 115 ++-- 7 files changed, 1667 insertions(+), 1789 deletions(-) Testing Commands: - *** LIST THE COMMAND LINE TOOLS/STEPS TO TEST YOUR CHANGES *** Testing, Expected Results: -- *** PASTE COMMAND OUTPUTS / TEST RESULTS *** Conditions of Submission: - in 2 weeks, or ack from any review Arch Built StartedLinux distro --- mipsn n mips64 n n x86 n n x86_64 y 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 ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
Re: [devel] Review Request for doc: update overview PR for split brain prevention with consensus service [#64]
Ack. regards, Anders Widell On 01/26/2018 06:57 AM, Gary Lee wrote: Hi I have updated the OpenSAF Overview PR document for ticket #64. Please have a look. https://sourceforge.net/p/opensaf/tickets/_discuss/thread/0d47d4b9/5489/attachment/OpenSAF_Overview_PR.odt Thanks Gary -- 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: not allow creating reserved IMM class names [#2771]
PBE will be restarted and will not be able to come up if user requests creating IMM object class with same name of reserved ones. This patch adds code to reject such request with SA_AIS_ERR_INVALID_PARAM. --- src/imm/agent/imma_om_api.cc | 1 - .../apitest/management/test_saImmOmClassCreate_2.c | 48 ++ src/imm/immnd/immnd.conf | 9 ++ src/imm/immnd/immnd_cb.h | 1 + src/imm/immnd/immnd_evt.c | 17 src/imm/immnd/immnd_main.c | 106 + 6 files changed, 181 insertions(+), 1 deletion(-) diff --git a/src/imm/agent/imma_om_api.cc b/src/imm/agent/imma_om_api.cc index 7155799..a06f0ea 100644 --- a/src/imm/agent/imma_om_api.cc +++ b/src/imm/agent/imma_om_api.cc @@ -55,7 +55,6 @@ static bool immOmIsLoader = false; static const char *sysaClName = SA_IMM_ATTR_CLASS_NAME; static const char *sysaAdmName = SA_IMM_ATTR_ADMIN_OWNER_NAME; static const char *sysaImplName = SA_IMM_ATTR_IMPLEMENTER_NAME; - static int imma_om_resurrect(IMMA_CB *cb, IMMA_CLIENT_NODE *cl_node, bool *locked); static SaAisErrorT imma_finalizeCcb(SaImmCcbHandleT ccbHandle, diff --git a/src/imm/apitest/management/test_saImmOmClassCreate_2.c b/src/imm/apitest/management/test_saImmOmClassCreate_2.c index 3ae4b0f..967b819 100644 --- a/src/imm/apitest/management/test_saImmOmClassCreate_2.c +++ b/src/imm/apitest/management/test_saImmOmClassCreate_2.c @@ -426,6 +426,46 @@ void saImmOmClassCreate_2_19(void) safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK); } +/* + Verify it is not allowed to create IMM object class with reserved name. + NOTE: As the list of reserved class names is read from the environment + variable IMMSV_RESERVED_CLASS_NAMES which is defined in immnd.conf file, + these 02 below test cases could fail if "objects" or "classes" name do + not exist in the list. + */ +void saImmOmClassCreate_with_reserved_name_01(void) +{ + const SaImmClassNameT className = (SaImmClassNameT) "objects"; + SaImmAttrDefinitionT_2 attr1 = {"rdn", SA_IMM_ATTR_SANAMET, + SA_IMM_ATTR_CONFIG | SA_IMM_ATTR_RDN, + NULL}; + const SaImmAttrDefinitionT_2 *attrDefinitions[] = {&attr1, NULL}; + + safassert(saImmOmInitialize(&immOmHandle, &immOmCallbacks, &immVersion), + SA_AIS_OK); + rc = saImmOmClassCreate_2(immOmHandle, className, SA_IMM_CLASS_CONFIG, + attrDefinitions); + test_validate(rc, SA_AIS_ERR_INVALID_PARAM); + safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK); +} + +void saImmOmClassCreate_with_reserved_name_02(void) +{ + const SaImmClassNameT className = (SaImmClassNameT) "classes"; + SaImmAttrDefinitionT_2 attr1 = { + "rdn", SA_IMM_ATTR_SANAMET, + SA_IMM_ATTR_RUNTIME | SA_IMM_ATTR_RDN | SA_IMM_ATTR_CACHED, + NULL}; + const SaImmAttrDefinitionT_2 *attrDefinitions[] = {&attr1, NULL}; + + safassert(saImmOmInitialize(&immOmHandle, &immOmCallbacks, &immVersion), + SA_AIS_OK); + rc = saImmOmClassCreate_2(immOmHandle, className, SA_IMM_CLASS_RUNTIME, + attrDefinitions); + test_validate(rc, SA_AIS_ERR_INVALID_PARAM); + safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK); +} + #define OPENSAF_IMM_NOSTD_FLAG_PARAM "opensafImmNostdFlags" #define OPENSAF_IMM_NOSTD_FLAG_ON 1 #define OPENSAF_IMM_NOSTD_FLAG_OFF 2 @@ -1457,6 +1497,14 @@ __attribute__((constructor)) static void saImmOmInitialize_constructor(void) test_case_add( 2, saImmOmClassCreate_2_19, "saImmOmClassCreate_2 - SA_AIS_OK, Create a class that has STRONG_DEFAULT flag without having default value"); + test_case_add( + 2, saImmOmClassCreate_with_reserved_name_01, + "saImmOmClassCreate_2 - SA_AIS_ERR_INVALID_PARAM," + "Create a config class with reserved name"); + test_case_add( + 2, saImmOmClassCreate_with_reserved_name_02, + "saImmOmClassCreate_2 - SA_AIS_ERR_INVALID_PARAM," + " Create a rt class with reserved name"); test_case_add(2, saImmOmClassDescriptionGet_2_01, "saImmOmClassDescriptionGet_2 - SA_AIS_OK"); diff --git a/src/imm/immnd/immnd.conf b/src/imm/immnd/immnd.conf index 97af792..a2c6d85 100644 --- a/src/imm/immnd/immnd.conf +++ b/src/imm/immnd/immnd.conf @@ -71,3 +71,12 @@ export IMMSV_ENV_HEALTHCHECK_KEY="Default" # Uncomment the next line to enable info level logging #args="--loglevel=info" + +# The list of reserved table names. Each table is separated by a comma. +# Any attempt to create IMM object class with one of these names will +# get SA_AIS_ERR_INVALID_PARAM error code. +# The default list is used if this enviroment var
[devel] [PATCH 0/1] Review Request for imm: not allow creating reserved IMM class names [#2771]
Summary: imm: not allow creating reserved IMM class names [#2771] Review request for Ticket(s): 2771 Peer Reviewer(s): Zoran, Ravi Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE *** Affected branch(es): develop, release Development branch: ticket-2771 Base revision: 81ef74a531f84720fd905d25e3d06b1ff799f83d 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 0ab2275cc190d7be107a9294e1b8411e07a4f5b9 Author: Vu Minh Nguyen Date: Tue, 30 Jan 2018 16:19:57 +0700 imm: not allow creating reserved IMM class names [#2771] PBE will be restarted and will not be able to come up if user requests creating IMM object class with same name of reserved ones. This patch adds code to reject such request with SA_AIS_ERR_INVALID_PARAM. Complete diffstat: -- src/imm/agent/imma_om_api.cc | 1 - .../apitest/management/test_saImmOmClassCreate_2.c | 48 ++ src/imm/immnd/immnd.conf | 9 ++ src/imm/immnd/immnd_cb.h | 1 + src/imm/immnd/immnd_evt.c | 17 src/imm/immnd/immnd_main.c | 106 + 6 files changed, 181 insertions(+), 1 deletion(-) Testing Commands: - Run added test cases Testing, Expected Results: -- Test PASS 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. -- 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