Re: [devel] [PATCH 1 of 1] ntfsv: refactor logging long dn notification [#1585]
Hi Why not make this part of the test cases? Change the configuration IMM attributes, run the test case and change back again to clean up Thanks Lennart > -Original Message- > From: praveen malviya [mailto:praveen.malv...@oracle.com] > Sent: den 10 augusti 2016 07:53 > To: Vu Minh Nguyen ; Minh Hon Chau > ; Lennart Lund > Cc: opensaf-devel@lists.sourceforge.net > Subject: Re: [PATCH 1 of 1] ntfsv: refactor logging long dn notification > [#1585] > > Hi Vu, > > Thanks for the information. > I think your suggested information must go in README file. > Ack from me. > > Thanks, > Praveen > > > On 10-Aug-16 8:46 AM, Vu Minh Nguyen wrote: > > Hi Praveen, > > > > The notification and notifying objects are truncated because we did not > > change default attribute values before running test. > > > > Following changes should be done before running test: > > 1) The field size of @No and @Ng tokens in `saLogStreamLogFileFormat` > > In default, the field-size value is 30. Means, the notification and > > notifying objects are limited to 30 characters. > > For long DN test, we should remove the . E.g: change default > > "@No30" to "@No". > > > > 2) The fixed log record size - `saLogStreamFixedLogRecordSize` > > In default, its value is 200. A whole log record is limited to this number > > of characters. > > We should change it to 0, means variable log record size. > > > > 3) Max log record size - `logMaxLogrecsize` in class ` OpenSafLogConfig` > > In default, max log record size is limited to 1024 characters. > > We should change it to a bigger number. Max value is 65535. > > > > Example: > > # immcfg -a saLogStreamFixedLogRecordSize=0 -a > saLogStreamLogFileFormat="@Cr > > @Ct @Nt @Ne6 @No @Ng \"@Cb\"" > safLgStrCfg=saLogAlarm,safApp=safLogService > > # immcfg -a logMaxLogrecsize=65535 logConfig=1,safApp=safLogService > > > > We can consider to put these information into the ~/tests/ntfsv/README > file. > > > > Regards, Vu > > > >> -Original Message- > >> From: praveen malviya [mailto:praveen.malv...@oracle.com] > >> Sent: Tuesday, August 9, 2016 6:46 PM > >> To: Vu Minh Nguyen ; 'minh chau' > >> ; 'Lennart Lund' > > >> Cc: opensaf-devel@lists.sourceforge.net > >> Subject: Re: [PATCH 1 of 1] ntfsv: refactor logging long dn notification > >> [#1585] > >> > >> Hi Vu, > >> > >> This patch is doing that. My question was any truncation being done from > >> log service after taking a long Dn notificaion from NTF. > >> > >> For example: When executed first ntf long dn test: ntftest 36 1 > >> > >> LOG service logs these notification in saLogAlarm_20160809_165614.log > as: > >> 10 0x146920b67187c6f0 0x146920b67187c6f0 0x4001 > >> AA > >> BB "this is > >> additional text info" > >> 11 0x146920b67187c6f0 0x146920b67187c6f0 0x4001 AMF BLABLA > >> Component > >> AMF BLABLA Entity "this is additional text info" > >> > >> In the first notification above, notification and notifying objects are > >> truncated. Do we need to increase the size of log service record? > >> > >> Thanks, > >> Praveen > >> > >> On 05-Aug-16 8:40 AM, Vu Minh Nguyen wrote: > >>> Hi Praveen, > >>> > >>> Truncation is removed as LOG supports Long DN now. Means, NTF would > >> not get > >>> INVALID_PARAM if logging longdn-contained notifications. > >>> > >>> Regards, Vu > >>> > -Original Message- > From: praveen malviya [mailto:praveen.malv...@oracle.com] > Sent: Thursday, August 4, 2016 8:24 PM > To: Vu Minh Nguyen ; minh chau > ; Lennart Lund > >> > Cc: opensaf-devel@lists.sourceforge.net > Subject: Re: [PATCH 1 of 1] ntfsv: refactor logging long dn > > notification > [#1585] > > Hi Vu, > > TWith this patch Ntf will not perform any truncation on long dn while > saflogging alrams.Is it with the log service (after supporting long dn) > also or log service is performing any truncation before logging? > > > Thanks, > Praveen > > On 22-Jul-16 4:46 PM, Vu Minh Nguyen wrote: > > osaf/services/saf/ntfsv/ntfs/NtfLogger.cc | 51 > >>> +++-- > - > > 1 files changed, 13 insertions(+), 38 deletions(-) > > > > > > Remove the part of code that truncates the long DN. > > > > diff --git a/osaf/services/saf/ntfsv/ntfs/NtfLogger.cc > b/osaf/services/saf/ntfsv/ntfs/NtfLogger.cc > > --- a/osaf/services/saf/ntfsv/ntfs/NtfLogger.cc > > +++ b/osaf/services/saf/ntfsv/ntfs/NtfLogger.cc > > @@ -21,6 +21,7 @@ > > */ > > #include > > > > +#include "osaf_utility.h" > > #include "saAis.h" > > #include "saLog.h" > > #include "NtfAdmin.hh" > > @@ -232,48 +233,22 @@ SaAisErrorT NtfLogger::logNotification(N > > notif->getNotificationId(), > > SA_LOG_RECORD_WRITE_ACK, > >
Re: [devel] [PATCH 2 of 4] lgs: director Cluster Membership (CLM) integration [#1638] V4
Hi Mahesh Ok thanks Regards Lennart > -Original Message- > From: A V Mahesh [mailto:mahesh.va...@oracle.com] > Sent: den 10 augusti 2016 08:14 > To: Lennart Lund ; Vu Minh Nguyen > ; Anders Widell > > Cc: opensaf-devel@lists.sourceforge.net > Subject: Re: [PATCH 2 of 4] lgs: director Cluster Membership (CLM) > integration [#1638] V4 > > Hi Lennar, > > On 8/8/2016 7:06 PM, Lennart Lund wrote: > >> +/** > >> >+ * Name : lgs_clm_node_map_init > >> >+ * Description : This routine is used to initialize the clm_node_map > >> >+ * Arguments : lgs_cb - pointer to the lgs Control Block > >> >+ * Return Values : NCSCC_RC_SUCCESS/NCSCC_RC_FAILURE > >> >+ * Notes: None > >> >+ */ > > [Lennart] NOTE: This function is not a NCS function and should therefore > not use NCS error codes. Unfortunate this is commonly done all over the > code but it would be good not to add more of this! > > > [AVM] their is #1607 Ticket which is related ERROR handling related > enhancement, so I just added your comment as well in that tickets #1607 > to replace NCSCC_RC_SUCCESS/NCSCC_RC_FAILURE with alternate macro, > if > we change now with different macros or digit , these change will remain > UN-uniform , > so for now I planing to keep as it is , so that while #1607 > addressing can easily find them . > > -AVM > > On 8/8/2016 7:06 PM, Lennart Lund wrote: > > Hi Mahesh > > > > Ack for this part but with comments I really think should be fixed. See > comments inline [Lennart] > > > > Thanks > > Lennart > > > >> -Original Message- > >> From: mahesh.va...@oracle.com [mailto:mahesh.va...@oracle.com] > >> Sent: den 5 augusti 2016 14:58 > >> To: Lennart Lund ; Vu Minh Nguyen > >> ; Anders Widell > >> > >> Cc: opensaf-devel@lists.sourceforge.net > >> Subject: [PATCH 2 of 4] lgs: director Cluster Membership (CLM) > integration > >> [#1638] V4 > >> > >> osaf/services/saf/logsv/lgs/Makefile.am |7 +- > >> osaf/services/saf/logsv/lgs/lgs_cb.h|4 + > >> osaf/services/saf/logsv/lgs/lgs_clm.cc | 395 > >> > >> osaf/services/saf/logsv/lgs/lgs_clm.h | 39 +++ > >> osaf/services/saf/logsv/lgs/lgs_evt.cc | 15 + > >> osaf/services/saf/logsv/lgs/lgs_main.cc | 28 ++ > >> osaf/services/saf/logsv/lgs/lgs_mds.cc | 38 ++- > >> 7 files changed, 523 insertions(+), 3 deletions(-) > >> > >> > >> diff --git a/osaf/services/saf/logsv/lgs/Makefile.am > >> b/osaf/services/saf/logsv/lgs/Makefile.am > >> --- a/osaf/services/saf/logsv/lgs/Makefile.am > >> +++ b/osaf/services/saf/logsv/lgs/Makefile.am > >> @@ -37,7 +37,8 @@ noinst_HEADERS = \ > >>lgs_mbcsv_v3.h \ > >>lgs_mbcsv_v5.h \ > >>lgs_recov.h \ > >> - lgs_imm_gcfg.h > >> + lgs_imm_gcfg.h \ > >> + lgs_clm.h > >> > >> osaf_execbindir = $(pkglibdir) > >> osaf_execbin_PROGRAMS = osaflogd > >> @@ -68,7 +69,8 @@ osaflogd_SOURCES = \ > >>lgs_mbcsv_v3.cc \ > >>lgs_mbcsv_v5.cc \ > >>lgs_recov.cc \ > >> - lgs_imm_gcfg.cc > >> + lgs_imm_gcfg.cc \ > >> + lgs_clm.cc > >> > >> osaflogd_LDADD = \ > >>$(top_builddir)/osaf/tools/safimm/src/libimmutil.la \ > >> @@ -76,4 +78,5 @@ osaflogd_LDADD = \ > >>$(top_builddir)/osaf/libs/saf/libSaAmf/libSaAmf.la \ > >>$(top_builddir)/osaf/libs/saf/libSaImm/libSaImmOi.la \ > >>$(top_builddir)/osaf/libs/saf/libSaImm/libSaImmOm.la \ > >> + $(top_builddir)/osaf/libs/saf/libSaClm/libSaClm.la \ > >>$(top_builddir)/osaf/libs/agents/infrastructure/rda/librda.la > >> diff --git a/osaf/services/saf/logsv/lgs/lgs_cb.h > >> b/osaf/services/saf/logsv/lgs/lgs_cb.h > >> --- a/osaf/services/saf/logsv/lgs/lgs_cb.h > >> +++ b/osaf/services/saf/logsv/lgs/lgs_cb.h > >> @@ -21,6 +21,7 @@ > >> #include > >> #include > >> #include > >> +#include > >> #include > >> #include > >> > >> @@ -80,6 +81,8 @@ typedef struct lgs_cb { > >>bool is_quiesced_set; > >>SaImmOiHandleT immOiHandle; /* IMM OI handle > >> */ > >>SaSelectionObjectT immSelectionObject; /* Selection Object to > >> wait for IMM events */ > >> + SaSelectionObjectT clmSelectionObject; /* Selection Object to wait > >> for clms events */ > >> + SaClmHandleT clm_hdl; /* CLM handle, obtained through CLM init > >> */ > >>SaAmfHAStateT ha_state; /* present AMF HA state of the > >> component */ > >>uint32_t last_client_id;/* Value of last client_id assigned > >> */ > >>uint32_t async_upd_cnt; /* Async Update Count for Warmsync > >> */ > >> @@ -94,6 +97,7 @@ typedef struct lgs_cb { > >> down events > >> Processing */ > >>LGA_DOWN_LIST *lga_down_list_tail; > >> > >> + NCS_SEL_OBJ clm_init_sel_obj; /* Selection object for CLM > >> initialization.*/ > >>bool nid_started; /**< true if started by NID */ > >>SaUint32T scAbsenceAllowed; /* OpenSAF global configuration for > >> recovery handling */ > >>lgs_state_t lgs_recovery_state; /* Indicate current recove
[devel] [PATCH 0 of 1] Review Request for log: fix failed to recover app streams [#1941]
Summary: log: fix failed to recover app streams [#1941] Review request for Trac Ticket(s): #1941 Peer Reviewer(s): Lennart, Mahesh Pull request to: <> Affected branch(es): Default Development branch: Default 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): - <> changeset 826304b4bd079b1b196d79f008d4cacd46ed06f8 Author: Vu Minh Nguyen Date: Mon, 08 Aug 2016 16:59:05 +0700 log: fix failed to recover app streams [#1941] create_new_app_stream() was changed and introduced new error codes in long DN ticket. One of them is SA_AIS_ERR_EXIST. When SCs restart from headless, create_new_app_stream() returns SA_AIS_ERR_EXIST but this error code was not handled correctly and made recovery functionality fail. lgs_restore_one_app_stream needs to be updated. Complete diffstat: -- osaf/services/saf/logsv/lgs/lgs_recov.cc | 59 --- 1 files changed, 32 insertions(+), 27 deletions(-) Testing Commands: - Run test suite #9 and #10 Testing, Expected Results: -- All test cases 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 ~/.hgrc file (i.e. username, 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. -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. http://sdm.link/zohodev2dev ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 1 of 1] log: fix failed to recover app streams [#1941]
osaf/services/saf/logsv/lgs/lgs_recov.cc | 59 +-- 1 files changed, 32 insertions(+), 27 deletions(-) create_new_app_stream() was changed and introduced new error codes in long DN ticket. One of them is SA_AIS_ERR_EXIST. When SCs restart from headless, create_new_app_stream() returns SA_AIS_ERR_EXIST but this error code was not handled correctly and made recovery functionality fail. lgs_restore_one_app_stream needs to be updated. diff --git a/osaf/services/saf/logsv/lgs/lgs_recov.cc b/osaf/services/saf/logsv/lgs/lgs_recov.cc --- a/osaf/services/saf/logsv/lgs/lgs_recov.cc +++ b/osaf/services/saf/logsv/lgs/lgs_recov.cc @@ -309,24 +309,6 @@ static int lgs_get_file_params_h(gfp_in_ return rc; } -static void lgs_remove_stream(uint32_t client_id, log_stream_t *log_stream) -{ - TRACE_ENTER(); - - /* Remove the stream handle and -* remove the stream resources -*/ - if (lgs_client_stream_rmv(client_id, log_stream->streamId) < 0) { - TRACE("%s lgs_client_stream_rmv Fail", __FUNCTION__); - } - - log_free_stream_resources(log_stream); - - log_stream = NULL; - - TRACE_LEAVE(); -} - /** * Restore parameters for a lost runtime (application) stream, create the * stream in the local stream list and associate with a client. @@ -344,7 +326,6 @@ int lgs_restore_one_app_stream( { int int_rc = 0; int rc_out = 0; - SaAisErrorT ais_rc = SA_AIS_OK; SaImmHandleT immOmHandle; SaImmAttrValuesT_2 *attribute; SaImmAttrValuesT_2 **attributes; @@ -353,7 +334,7 @@ int lgs_restore_one_app_stream( int list_pos; int n; int i = 0; - + SaBoolT twelveHourModeFlag = SA_FALSE; lgsv_stream_open_req_t open_stream_param; log_stream_t *log_stream = NULL; SaTimeT restored_creationTimeStamp = 0; @@ -552,23 +533,46 @@ int lgs_restore_one_app_stream( */ open_stream_param.client_id = client_id; open_stream_param.lstr_open_flags = 0; /* Dummy not used here */ - open_stream_param.logFileName = const_cast(fileName.c_str()); open_stream_param.logFilePathName = const_cast(pathName.c_str()); - ais_rc = create_new_app_stream(&open_stream_param, &log_stream); - if ( ais_rc != SA_AIS_OK) { - TRACE("%s: create_new_app_stream Fail %s", - __FUNCTION__, saf_error(ais_rc)); + log_stream = log_stream_new(stream_name, STREAM_NEW); + if (log_stream == NULL) { rc_out = -1; goto done_free_attr; } + /** +* No need to verify all attributes as +* they have been verified at the time of creation +*/ + + /* Get twelveHourModeFlag from the logFileFmt */ + lgs_is_valid_format_expression(open_stream_param.logFileFmt, + STREAM_TYPE_APPLICATION, + &twelveHourModeFlag); + rc_out = lgs_populate_log_stream( + open_stream_param.logFileName, + open_stream_param.logFilePathName, + open_stream_param.maxLogFileSize, + open_stream_param.maxLogRecordSize, + open_stream_param.logFileFullAction, + open_stream_param.maxFilesRotated, + open_stream_param.logFileFmt, + STREAM_TYPE_APPLICATION, + twelveHourModeFlag, + 0, + log_stream); // output + if (rc_out == -1) { + log_stream_delete(&log_stream); + goto done_free_attr; + } + /* Create an association between this client and the stream */ int_rc = lgs_client_stream_add(client_id, log_stream->streamId); if (int_rc == -1) { TRACE("%s: lgs_client_stream_add Fail", __FUNCTION__); - log_free_stream_resources(log_stream); /* Undo create new stream */ + log_stream_delete(&log_stream); rc_out = -1; goto done_free_attr; } @@ -606,7 +610,8 @@ int lgs_restore_one_app_stream( /* Remove the stream handle and * remove the stream resources */ - lgs_remove_stream(client_id, log_stream); + lgs_client_stream_rmv(client_id, log_stream->streamId); + log_stream_delete(&log_stream); rc_out = -1; goto done_free_attr; } -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. http://sdm.link/zohodev2dev
[devel] [PATCH 1 of 1] amfnd: convert dnd_list from a linked list to vector [#1945]
osaf/services/saf/amf/amfnd/di.cc | 100 +++- osaf/services/saf/amf/amfnd/include/avnd_cb.h |4 +- osaf/services/saf/amf/amfnd/include/avnd_di.h | 37 +- osaf/services/saf/amf/amfnd/include/avnd_mds.h | 11 +-- osaf/services/saf/amf/amfnd/proxy.cc | 15 ++- osaf/services/saf/amf/amfnd/verify.cc | 10 +-- 6 files changed, 64 insertions(+), 113 deletions(-) diff --git a/osaf/services/saf/amf/amfnd/di.cc b/osaf/services/saf/amf/amfnd/di.cc --- a/osaf/services/saf/amf/amfnd/di.cc +++ b/osaf/services/saf/amf/amfnd/di.cc @@ -36,29 +36,7 @@ #include #include "avnd.h" - -/* macro to push the AvD msg parameters (to the end of the list) */ -#define m_AVND_DIQ_REC_PUSH(cb, rec) \ -{ \ - AVND_DND_LIST *list = &((cb)->dnd_list); \ - if (!(list->head)) \ - list->head = (rec); \ - else \ - list->tail->next = (rec); \ - list->tail = (rec); \ -} - -/* macro to pop the record (from the beginning of the list) */ -#define m_AVND_DIQ_REC_POP(cb, o_rec) \ -{ \ - AVND_DND_LIST *list = &((cb)->dnd_list); \ - if (list->head) { \ - (o_rec) = list->head; \ - list->head = (o_rec)->next; \ - (o_rec)->next = 0; \ - if (list->tail == (o_rec)) list->tail = 0; \ - } else (o_rec) = 0; \ -} +#include static uint32_t avnd_node_oper_req(AVND_CB *cb, AVSV_PARAM_INFO *param) { @@ -439,7 +417,6 @@ void avnd_send_node_up_msg(void) { AVND_CB *cb = avnd_cb; AVND_MSG msg = {}; - AVND_DND_MSG_LIST *pending_rec = 0; uint32_t rc; TRACE_ENTER(); @@ -455,7 +432,7 @@ void avnd_send_node_up_msg(void) } // We don't send node_up if it has already been sent and waiting for ACK - for (pending_rec = cb->dnd_list.head; pending_rec != nullptr; pending_rec = pending_rec->next) { + for (auto pending_rec : cb->dnd_list) { if (pending_rec->msg.info.avd->msg_type == AVSV_N2D_NODE_UP_MSG) { TRACE("Don't send another node_up since it has been sent and waiting for ack"); goto done; @@ -626,11 +603,11 @@ uint32_t avnd_evt_mds_avd_dn_evh(AVND_CB if (cb->scs_absence_max_duration == 0) { // check for pending messages TO director - if ((cb->dnd_list.head != nullptr)) { + if ((cb->dnd_list.empty() == false)) { uint32_t no_pending_msg = 0; - AVND_DND_MSG_LIST *rec = 0; - for (rec = cb->dnd_list.head; rec != nullptr; rec = rec->next, no_pending_msg++) { + for (auto rec : cb->dnd_list) { osafassert(rec->msg.type == AVND_MSG_AVD); + no_pending_msg++; } /* Don't issue reboot if it has been already issued.*/ @@ -1042,7 +1019,7 @@ uint32_t avnd_di_msg_send(AVND_CB *cb, A done: if (NCSCC_RC_SUCCESS != rc && rec) { /* pop & delete */ - m_AVND_DIQ_REC_FIND_POP(cb, rec); + dnd_list_remove_msg(cb, rec); avnd_diq_rec_del(cb, rec); } TRACE_LEAVE2("%u", rc); @@ -1149,15 +1126,22 @@ uint32_t avnd_di_reg_su_rsp_snd(AVND_CB **/ void avnd_di_msg_ack_process(AVND_CB *cb, uint32_t mid) { - AVND_DND_MSG_LIST *rec = 0; - - /* find & pop the matching record */ - m_AVND_DIQ_REC_FIND(cb, mid, rec); - if (rec) { - m_AVND_DIQ_REC_FIND_POP(cb, rec); - avnd_diq_rec_del(cb, rec); + TRACE_ENTER2("%u", mid); + for (size_t i = 0; i < cb->dnd_list.size(); i++) { + AVND_DND_MSG_LIST* rec = cb->dnd_list[i]; + osafassert(rec != nullptr); + osafassert(rec->msg.type == AVND_MSG_AVD); + const uint32_t msg_id = *(reinterpret_cast(&(rec->msg.info.avd->msg_info))); + if (msg_id <= mid) { + // these messages have been acked, remove them from queue + dnd_list_remove_msg(cb, rec); + TRACE("remove msg %u from queue", msg_id); + avnd_diq_rec_del(cb, rec); + } else { + break; + } } - + TRACE_LEAVE(); return; } @@ -1174,17 +1158,11 @@ void avnd_di_msg_ack_process(AVND_CB *cb **/ void avnd_diq_del(AVND_CB *cb) { - AVND_DND_MSG_LIST *rec = 0; - - do { - /* pop the record */ - m_AVND_DIQ_REC_POP(cb, rec); - if (!rec) - break; - + for (auto rec : cb->dnd_list) { /* delete the record */ - avnd_diq_rec_del(cb, rec); - } while (1); + avnd_diq_rec_del(c
[devel] [PATCH 0 of 1] Review Request for amfnd: convert dnd_list from a linked list to vector [#1945]
Summary: amfnd: convert dnd_list from a linked list to vector [#1945] Review request for Trac Ticket(s): 1945 Peer Reviewer(s): AMF devs Pull request to: <> Affected branch(es): default Development branch: default 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 n Comments (indicate scope for each "y" above): - changeset 47d2c007f8a151e682c6a61ed314101beb68461d Author: Gary Lee Date: Wed, 10 Aug 2016 16:23:08 +1000 amfnd: convert dnd_list from a linked list to vector [#1945] Complete diffstat: -- osaf/services/saf/amf/amfnd/di.cc | 100 +--- osaf/services/saf/amf/amfnd/include/avnd_cb.h |4 ++-- osaf/services/saf/amf/amfnd/include/avnd_di.h | 37 + osaf/services/saf/amf/amfnd/include/avnd_mds.h | 11 +++ osaf/services/saf/amf/amfnd/proxy.cc | 15 +++ osaf/services/saf/amf/amfnd/verify.cc | 10 ++ 6 files changed, 64 insertions(+), 113 deletions(-) Testing Commands: - <> Testing, Expected Results: -- <> Conditions of Submission: - <> 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 ~/.hgrc file (i.e. username, 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. -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. http://sdm.link/zohodev2dev ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
Re: [devel] [PATCH 2 of 4] lgs: director Cluster Membership (CLM) integration [#1638] V4
Hi Lennar, On 8/8/2016 7:06 PM, Lennart Lund wrote: >> +/** >> >+ * Name : lgs_clm_node_map_init >> >+ * Description : This routine is used to initialize the clm_node_map >> >+ * Arguments : lgs_cb - pointer to the lgs Control Block >> >+ * Return Values : NCSCC_RC_SUCCESS/NCSCC_RC_FAILURE >> >+ * Notes: None >> >+ */ > [Lennart] NOTE: This function is not a NCS function and should therefore not > use NCS error codes. Unfortunate this is commonly done all over the code but > it would be good not to add more of this! > [AVM] their is #1607 Ticket which is related ERROR handling related enhancement, so I just added your comment as well in that tickets #1607 to replace NCSCC_RC_SUCCESS/NCSCC_RC_FAILURE with alternate macro, if we change now with different macros or digit , these change will remain UN-uniform , so for now I planing to keep as it is , so that while #1607 addressing can easily find them . -AVM On 8/8/2016 7:06 PM, Lennart Lund wrote: > Hi Mahesh > > Ack for this part but with comments I really think should be fixed. See > comments inline [Lennart] > > Thanks > Lennart > >> -Original Message- >> From: mahesh.va...@oracle.com [mailto:mahesh.va...@oracle.com] >> Sent: den 5 augusti 2016 14:58 >> To: Lennart Lund ; Vu Minh Nguyen >> ; Anders Widell >> >> Cc: opensaf-devel@lists.sourceforge.net >> Subject: [PATCH 2 of 4] lgs: director Cluster Membership (CLM) integration >> [#1638] V4 >> >> osaf/services/saf/logsv/lgs/Makefile.am |7 +- >> osaf/services/saf/logsv/lgs/lgs_cb.h|4 + >> osaf/services/saf/logsv/lgs/lgs_clm.cc | 395 >> >> osaf/services/saf/logsv/lgs/lgs_clm.h | 39 +++ >> osaf/services/saf/logsv/lgs/lgs_evt.cc | 15 + >> osaf/services/saf/logsv/lgs/lgs_main.cc | 28 ++ >> osaf/services/saf/logsv/lgs/lgs_mds.cc | 38 ++- >> 7 files changed, 523 insertions(+), 3 deletions(-) >> >> >> diff --git a/osaf/services/saf/logsv/lgs/Makefile.am >> b/osaf/services/saf/logsv/lgs/Makefile.am >> --- a/osaf/services/saf/logsv/lgs/Makefile.am >> +++ b/osaf/services/saf/logsv/lgs/Makefile.am >> @@ -37,7 +37,8 @@ noinst_HEADERS = \ >> lgs_mbcsv_v3.h \ >> lgs_mbcsv_v5.h \ >> lgs_recov.h \ >> -lgs_imm_gcfg.h >> +lgs_imm_gcfg.h \ >> +lgs_clm.h >> >> osaf_execbindir = $(pkglibdir) >> osaf_execbin_PROGRAMS = osaflogd >> @@ -68,7 +69,8 @@ osaflogd_SOURCES = \ >> lgs_mbcsv_v3.cc \ >> lgs_mbcsv_v5.cc \ >> lgs_recov.cc \ >> -lgs_imm_gcfg.cc >> +lgs_imm_gcfg.cc \ >> +lgs_clm.cc >> >> osaflogd_LDADD = \ >> $(top_builddir)/osaf/tools/safimm/src/libimmutil.la \ >> @@ -76,4 +78,5 @@ osaflogd_LDADD = \ >> $(top_builddir)/osaf/libs/saf/libSaAmf/libSaAmf.la \ >> $(top_builddir)/osaf/libs/saf/libSaImm/libSaImmOi.la \ >> $(top_builddir)/osaf/libs/saf/libSaImm/libSaImmOm.la \ >> +$(top_builddir)/osaf/libs/saf/libSaClm/libSaClm.la \ >> $(top_builddir)/osaf/libs/agents/infrastructure/rda/librda.la >> diff --git a/osaf/services/saf/logsv/lgs/lgs_cb.h >> b/osaf/services/saf/logsv/lgs/lgs_cb.h >> --- a/osaf/services/saf/logsv/lgs/lgs_cb.h >> +++ b/osaf/services/saf/logsv/lgs/lgs_cb.h >> @@ -21,6 +21,7 @@ >> #include >> #include >> #include >> +#include >> #include >> #include >> >> @@ -80,6 +81,8 @@ typedef struct lgs_cb { >> bool is_quiesced_set; >> SaImmOiHandleT immOiHandle; /* IMM OI handle >> */ >> SaSelectionObjectT immSelectionObject; /* Selection Object to >> wait for IMM events */ >> +SaSelectionObjectT clmSelectionObject; /* Selection Object to wait >> for clms events */ >> +SaClmHandleT clm_hdl; /* CLM handle, obtained through CLM init >> */ >> SaAmfHAStateT ha_state; /* present AMF HA state of the >> component */ >> uint32_t last_client_id;/* Value of last client_id assigned >> */ >> uint32_t async_upd_cnt; /* Async Update Count for Warmsync >> */ >> @@ -94,6 +97,7 @@ typedef struct lgs_cb { >> down events Processing >> */ >> LGA_DOWN_LIST *lga_down_list_tail; >> >> +NCS_SEL_OBJ clm_init_sel_obj; /* Selection object for CLM >> initialization.*/ >> bool nid_started; /**< true if started by NID */ >> SaUint32T scAbsenceAllowed; /* OpenSAF global configuration for >> recovery handling */ >> lgs_state_t lgs_recovery_state; /* Indicate current recovery state for >> the server */ >> diff --git a/osaf/services/saf/logsv/lgs/lgs_clm.cc >> b/osaf/services/saf/logsv/lgs/lgs_clm.cc >> new file mode 100644 >> --- /dev/null >> +++ b/osaf/services/saf/logsv/lgs/lgs_clm.cc >> @@ -0,0 +1,395 @@ >> +/* -*- OpenSAF -*- >> + * >> + * (C) Copyright 2016 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
Re: [devel] [PATCH 1 of 1] ntfsv: refactor logging long dn notification [#1585]
Hi Vu, Thanks for the information. I think your suggested information must go in README file. Ack from me. Thanks, Praveen On 10-Aug-16 8:46 AM, Vu Minh Nguyen wrote: > Hi Praveen, > > The notification and notifying objects are truncated because we did not > change default attribute values before running test. > > Following changes should be done before running test: > 1) The field size of @No and @Ng tokens in `saLogStreamLogFileFormat` > In default, the field-size value is 30. Means, the notification and > notifying objects are limited to 30 characters. > For long DN test, we should remove the . E.g: change default > "@No30" to "@No". > > 2) The fixed log record size - `saLogStreamFixedLogRecordSize` > In default, its value is 200. A whole log record is limited to this number > of characters. > We should change it to 0, means variable log record size. > > 3) Max log record size - `logMaxLogrecsize` in class ` OpenSafLogConfig` > In default, max log record size is limited to 1024 characters. > We should change it to a bigger number. Max value is 65535. > > Example: > # immcfg -a saLogStreamFixedLogRecordSize=0 -a saLogStreamLogFileFormat="@Cr > @Ct @Nt @Ne6 @No @Ng \"@Cb\"" safLgStrCfg=saLogAlarm,safApp=safLogService > # immcfg -a logMaxLogrecsize=65535 logConfig=1,safApp=safLogService > > We can consider to put these information into the ~/tests/ntfsv/README file. > > Regards, Vu > >> -Original Message- >> From: praveen malviya [mailto:praveen.malv...@oracle.com] >> Sent: Tuesday, August 9, 2016 6:46 PM >> To: Vu Minh Nguyen ; 'minh chau' >> ; 'Lennart Lund' >> Cc: opensaf-devel@lists.sourceforge.net >> Subject: Re: [PATCH 1 of 1] ntfsv: refactor logging long dn notification >> [#1585] >> >> Hi Vu, >> >> This patch is doing that. My question was any truncation being done from >> log service after taking a long Dn notificaion from NTF. >> >> For example: When executed first ntf long dn test: ntftest 36 1 >> >> LOG service logs these notification in saLogAlarm_20160809_165614.log as: >> 10 0x146920b67187c6f0 0x146920b67187c6f0 0x4001 >> AA >> BB "this is >> additional text info" >> 11 0x146920b67187c6f0 0x146920b67187c6f0 0x4001 AMF BLABLA >> Component >> AMF BLABLA Entity "this is additional text info" >> >> In the first notification above, notification and notifying objects are >> truncated. Do we need to increase the size of log service record? >> >> Thanks, >> Praveen >> >> On 05-Aug-16 8:40 AM, Vu Minh Nguyen wrote: >>> Hi Praveen, >>> >>> Truncation is removed as LOG supports Long DN now. Means, NTF would >> not get >>> INVALID_PARAM if logging longdn-contained notifications. >>> >>> Regards, Vu >>> -Original Message- From: praveen malviya [mailto:praveen.malv...@oracle.com] Sent: Thursday, August 4, 2016 8:24 PM To: Vu Minh Nguyen ; minh chau ; Lennart Lund >> Cc: opensaf-devel@lists.sourceforge.net Subject: Re: [PATCH 1 of 1] ntfsv: refactor logging long dn > notification [#1585] Hi Vu, TWith this patch Ntf will not perform any truncation on long dn while saflogging alrams.Is it with the log service (after supporting long dn) also or log service is performing any truncation before logging? Thanks, Praveen On 22-Jul-16 4:46 PM, Vu Minh Nguyen wrote: > osaf/services/saf/ntfsv/ntfs/NtfLogger.cc | 51 >>> +++-- - > 1 files changed, 13 insertions(+), 38 deletions(-) > > > Remove the part of code that truncates the long DN. > > diff --git a/osaf/services/saf/ntfsv/ntfs/NtfLogger.cc b/osaf/services/saf/ntfsv/ntfs/NtfLogger.cc > --- a/osaf/services/saf/ntfsv/ntfs/NtfLogger.cc > +++ b/osaf/services/saf/ntfsv/ntfs/NtfLogger.cc > @@ -21,6 +21,7 @@ > */ > #include > > +#include "osaf_utility.h" > #include "saAis.h" > #include "saLog.h" > #include "NtfAdmin.hh" > @@ -232,48 +233,22 @@ SaAisErrorT NtfLogger::logNotification(N > notif->getNotificationId(), > SA_LOG_RECORD_WRITE_ACK, > &logRecord); > -if (SA_AIS_OK != errorCode) { > - LOG_NO("Failed to log an alarm or security alarm notification >>> (%d)", errorCode); > - if (errorCode == SA_AIS_ERR_LIBRARY || errorCode == SA_AIS_ERR_BAD_HANDLE) { > -LOG_ER("Fatal error SA_AIS_ERR_LIBRARY or SA_AIS_ERR_BAD_HANDLE; exiting (%d)...", errorCode); > -exit(EXIT_FAILURE); > - } else if (errorCode == SA_AIS_ERR_INVALID_PARAM) { > -/* Retry to log truncated notificationObject/notifyingObject >>> because > - * LOG Service has not supported long dn in Opensaf 4.5 > - */ > -char short_dn[SA_MAX_UNEXTENDED_NAME_LENGTH];
Re: [devel] [PATCH 1 of 1] ntfsv: refactor logging long dn notification [#1585]
Hi Praveen, The notification and notifying objects are truncated because we did not change default attribute values before running test. Following changes should be done before running test: 1) The field size of @No and @Ng tokens in `saLogStreamLogFileFormat` In default, the field-size value is 30. Means, the notification and notifying objects are limited to 30 characters. For long DN test, we should remove the . E.g: change default "@No30" to "@No". 2) The fixed log record size - `saLogStreamFixedLogRecordSize` In default, its value is 200. A whole log record is limited to this number of characters. We should change it to 0, means variable log record size. 3) Max log record size - `logMaxLogrecsize` in class ` OpenSafLogConfig` In default, max log record size is limited to 1024 characters. We should change it to a bigger number. Max value is 65535. Example: # immcfg -a saLogStreamFixedLogRecordSize=0 -a saLogStreamLogFileFormat="@Cr @Ct @Nt @Ne6 @No @Ng \"@Cb\"" safLgStrCfg=saLogAlarm,safApp=safLogService # immcfg -a logMaxLogrecsize=65535 logConfig=1,safApp=safLogService We can consider to put these information into the ~/tests/ntfsv/README file. Regards, Vu > -Original Message- > From: praveen malviya [mailto:praveen.malv...@oracle.com] > Sent: Tuesday, August 9, 2016 6:46 PM > To: Vu Minh Nguyen ; 'minh chau' > ; 'Lennart Lund' > Cc: opensaf-devel@lists.sourceforge.net > Subject: Re: [PATCH 1 of 1] ntfsv: refactor logging long dn notification > [#1585] > > Hi Vu, > > This patch is doing that. My question was any truncation being done from > log service after taking a long Dn notificaion from NTF. > > For example: When executed first ntf long dn test: ntftest 36 1 > > LOG service logs these notification in saLogAlarm_20160809_165614.log as: > 10 0x146920b67187c6f0 0x146920b67187c6f0 0x4001 > AA > BB "this is > additional text info" > 11 0x146920b67187c6f0 0x146920b67187c6f0 0x4001 AMF BLABLA > Component > AMF BLABLA Entity "this is additional text info" > > In the first notification above, notification and notifying objects are > truncated. Do we need to increase the size of log service record? > > Thanks, > Praveen > > On 05-Aug-16 8:40 AM, Vu Minh Nguyen wrote: > > Hi Praveen, > > > > Truncation is removed as LOG supports Long DN now. Means, NTF would > not get > > INVALID_PARAM if logging longdn-contained notifications. > > > > Regards, Vu > > > >> -Original Message- > >> From: praveen malviya [mailto:praveen.malv...@oracle.com] > >> Sent: Thursday, August 4, 2016 8:24 PM > >> To: Vu Minh Nguyen ; minh chau > >> ; Lennart Lund > > >> Cc: opensaf-devel@lists.sourceforge.net > >> Subject: Re: [PATCH 1 of 1] ntfsv: refactor logging long dn notification > >> [#1585] > >> > >> Hi Vu, > >> > >> TWith this patch Ntf will not perform any truncation on long dn while > >> saflogging alrams.Is it with the log service (after supporting long dn) > >> also or log service is performing any truncation before logging? > >> > >> > >> Thanks, > >> Praveen > >> > >> On 22-Jul-16 4:46 PM, Vu Minh Nguyen wrote: > >>> osaf/services/saf/ntfsv/ntfs/NtfLogger.cc | 51 > > +++-- > >> - > >>> 1 files changed, 13 insertions(+), 38 deletions(-) > >>> > >>> > >>> Remove the part of code that truncates the long DN. > >>> > >>> diff --git a/osaf/services/saf/ntfsv/ntfs/NtfLogger.cc > >> b/osaf/services/saf/ntfsv/ntfs/NtfLogger.cc > >>> --- a/osaf/services/saf/ntfsv/ntfs/NtfLogger.cc > >>> +++ b/osaf/services/saf/ntfsv/ntfs/NtfLogger.cc > >>> @@ -21,6 +21,7 @@ > >>> */ > >>> #include > >>> > >>> +#include "osaf_utility.h" > >>> #include "saAis.h" > >>> #include "saLog.h" > >>> #include "NtfAdmin.hh" > >>> @@ -232,48 +233,22 @@ SaAisErrorT NtfLogger::logNotification(N > >>> notif->getNotificationId(), > >>> SA_LOG_RECORD_WRITE_ACK, > >>> &logRecord); > >>> -if (SA_AIS_OK != errorCode) { > >>> - LOG_NO("Failed to log an alarm or security alarm notification > > (%d)", > >> errorCode); > >>> - if (errorCode == SA_AIS_ERR_LIBRARY || errorCode == > >> SA_AIS_ERR_BAD_HANDLE) { > >>> -LOG_ER("Fatal error SA_AIS_ERR_LIBRARY or > >> SA_AIS_ERR_BAD_HANDLE; exiting (%d)...", errorCode); > >>> -exit(EXIT_FAILURE); > >>> - } else if (errorCode == SA_AIS_ERR_INVALID_PARAM) { > >>> -/* Retry to log truncated notificationObject/notifyingObject > > because > >>> - * LOG Service has not supported long dn in Opensaf 4.5 > >>> - */ > >>> -char short_dn[SA_MAX_UNEXTENDED_NAME_LENGTH]; > >>> -memset(&short_dn, 0, SA_MAX_UNEXTENDED_NAME_LENGTH); > >>> -SaNameT shortdn_notificationObject, shortdn_notifyingObject; > >>> -if (osaf_is_an_extended_name(ntfHeader->notificationObject)) { > >>> - strncpy(short
Re: [devel] [PATCH 1 of 1] imm:send 2PBE preload information for controller IMMND [#1925]
Hi Neelakanta, When IMM is running in 2PBE mode, the slave PBE is running on the standby node (where the standby IMMD is). In the document update you wrote "There is a chance that chosen standby immnd can be from different node than the actual node which got standby role.". A node receives "canBeCoord" with value 2 only if the node is a controller. So, the part with reading "node_type" file can be skipped to determine if the node is a controller or not, and rely on the value from "canBeCoord". In the document update, you wrote that it is not recommended to run 2PBE with spare nodes. It means that it can run with spare nodes. In this case every node will be a controller. "controller" string will be written in node_type file on every node. If IMMND on a controller was introduced earlier (in NCSMDS_RED_UP event) or in node introduce message, node_info->isOnController is set to true. Then in NCSMDS_RED_DOWN event node_info->isOnController should be set to false. Otherwise node_info->isOnController of earlier controllers will remain true value. One more detail that is out of this patch, but can be included in the patch. Shouldn't "cb->immd_remote_id" be set to 0 in NCSMDS_RED_DOWN event when "cb->immd_remote_up" is set to FALSE ? Other minor comments inline. -Original Message- From: reddy.neelaka...@oracle.com [mailto:reddy.neelaka...@oracle.com] Sent: den 26 juli 2016 13:21 To: Zoran Milinkovic; Hung Duc Nguyen Cc: opensaf-devel@lists.sourceforge.net Subject: [PATCH 1 of 1] imm:send 2PBE preload information for controller IMMND [#1925] osaf/services/saf/immsv/README.2PBE| 7 + osaf/services/saf/immsv/immd/immd_evt.c| 38 +++-- osaf/services/saf/immsv/immnd/immnd_cb.h | 1 + osaf/services/saf/immsv/immnd/immnd_evt.c | 2 +- osaf/services/saf/immsv/immnd/immnd_main.c | 22 + 5 files changed, 66 insertions(+), 4 deletions(-) with the #79 patch, the mds_register of standby is delayed until amfd gives role. Because of this the standby IMMND is not able to send pr-load information. The patch sends preload information by checking node_type. If the node_type is controller the preload information is sent. diff --git a/osaf/services/saf/immsv/README.2PBE b/osaf/services/saf/immsv/README.2PBE --- a/osaf/services/saf/immsv/README.2PBE +++ b/osaf/services/saf/immsv/README.2PBE @@ -175,3 +175,10 @@ toggle this flag on. For "normal", but unplanned, processor restarts, we recommend that this flag not be toggled on. This means that for such processor restarts, persistent writes will not be allowed untill both SCs are available again. + +2PBE with spares(#79 & #1925) + +From OpenSAG 5.0 the mds_register for IMMD is delayed until amfd comes up and gives role. [Zoran] Typo. OpenSAF instead of OpenSAG +Because of this the standby role is delayed. There is a chance that chosen standby immnd +can be from different node than the actual node which got standby role. It is not +recommended to configure 2PBE with spares. diff --git a/osaf/services/saf/immsv/immd/immd_evt.c b/osaf/services/saf/immsv/immd/immd_evt.c --- a/osaf/services/saf/immsv/immd/immd_evt.c +++ b/osaf/services/saf/immsv/immd/immd_evt.c @@ -732,7 +732,11 @@ static void immd_accept_node(IMMD_CB *cb cb->immnd_coord = node_info->immnd_key; cb->payload_coord_dest = node_info->immnd_dest; node_info->isCoord = true; - } + } else if(cb->immnd_coord == 0 && cb->mIs2Pbe){ + LOG_NO("IMMND found at %x Cluster is loading. 2PBE configured => Wait.", node_info->immnd_key); + accept_evt.info.immnd.info.ctrl.canBeCoord = 2; /* 2PBE => order preload. */ +} [Zoran] The block above is not needed. "canBeCoord" has value 2 only if the node is a controller. + if (node_info->isCoord) { accept_evt.info.immnd.info.ctrl.isCoord = true; @@ -1979,8 +1983,18 @@ static uint32_t immd_evt_proc_2pbe_prelo evt->info.pbe2.epoch, evt->info.pbe2.maxCcbId, evt->info.pbe2.maxCommitTime); cb->remPbe = evt->info.pbe2; + } else if (!cb->is_rem_immnd_up && !cb->immd_remote_up) { + LOG_NO("2PBE preload info from first remote SC can be standby Epoch: %u MaxCcb:%u MaxTime%u", + evt->info.pbe2.epoch, evt->info.pbe2.maxCcbId, + evt->info.pbe2.maxCommitTime); + cb->is_rem_immnd_up = true; + cb->rem_immnd_dest = sinfo->dest; + cb->remPbe = evt->info.pbe2; + } else if (cb->is_rem_immnd_up){ + LOG_NO("2PBE preload info from remote SC may be from spare will be discarded"); } + if(cb->m2PbeCanLoad) { LOG_NO("m2PbeCanLoad already set (timeout ?)"); } else { @@ -2632,6 +2646,7 @@ static uint32_t immd_evt_proc_mds_
Re: [devel] [PATCH 1 of 1] ntfsv: refactor logging long dn notification [#1585]
Hi Vu, This patch is doing that. My question was any truncation being done from log service after taking a long Dn notificaion from NTF. For example: When executed first ntf long dn test: ntftest 36 1 LOG service logs these notification in saLogAlarm_20160809_165614.log as: 10 0x146920b67187c6f0 0x146920b67187c6f0 0x4001 AA BB "this is additional text info" 11 0x146920b67187c6f0 0x146920b67187c6f0 0x4001 AMF BLABLA Component AMF BLABLA Entity "this is additional text info" In the first notification above, notification and notifying objects are truncated. Do we need to increase the size of log service record? Thanks, Praveen On 05-Aug-16 8:40 AM, Vu Minh Nguyen wrote: > Hi Praveen, > > Truncation is removed as LOG supports Long DN now. Means, NTF would not get > INVALID_PARAM if logging longdn-contained notifications. > > Regards, Vu > >> -Original Message- >> From: praveen malviya [mailto:praveen.malv...@oracle.com] >> Sent: Thursday, August 4, 2016 8:24 PM >> To: Vu Minh Nguyen ; minh chau >> ; Lennart Lund >> Cc: opensaf-devel@lists.sourceforge.net >> Subject: Re: [PATCH 1 of 1] ntfsv: refactor logging long dn notification >> [#1585] >> >> Hi Vu, >> >> TWith this patch Ntf will not perform any truncation on long dn while >> saflogging alrams.Is it with the log service (after supporting long dn) >> also or log service is performing any truncation before logging? >> >> >> Thanks, >> Praveen >> >> On 22-Jul-16 4:46 PM, Vu Minh Nguyen wrote: >>> osaf/services/saf/ntfsv/ntfs/NtfLogger.cc | 51 > +++-- >> - >>> 1 files changed, 13 insertions(+), 38 deletions(-) >>> >>> >>> Remove the part of code that truncates the long DN. >>> >>> diff --git a/osaf/services/saf/ntfsv/ntfs/NtfLogger.cc >> b/osaf/services/saf/ntfsv/ntfs/NtfLogger.cc >>> --- a/osaf/services/saf/ntfsv/ntfs/NtfLogger.cc >>> +++ b/osaf/services/saf/ntfsv/ntfs/NtfLogger.cc >>> @@ -21,6 +21,7 @@ >>> */ >>> #include >>> >>> +#include "osaf_utility.h" >>> #include "saAis.h" >>> #include "saLog.h" >>> #include "NtfAdmin.hh" >>> @@ -232,48 +233,22 @@ SaAisErrorT NtfLogger::logNotification(N >>> notif->getNotificationId(), >>> SA_LOG_RECORD_WRITE_ACK, >>> &logRecord); >>> -if (SA_AIS_OK != errorCode) { >>> - LOG_NO("Failed to log an alarm or security alarm notification > (%d)", >> errorCode); >>> - if (errorCode == SA_AIS_ERR_LIBRARY || errorCode == >> SA_AIS_ERR_BAD_HANDLE) { >>> -LOG_ER("Fatal error SA_AIS_ERR_LIBRARY or >> SA_AIS_ERR_BAD_HANDLE; exiting (%d)...", errorCode); >>> -exit(EXIT_FAILURE); >>> - } else if (errorCode == SA_AIS_ERR_INVALID_PARAM) { >>> -/* Retry to log truncated notificationObject/notifyingObject > because >>> - * LOG Service has not supported long dn in Opensaf 4.5 >>> - */ >>> -char short_dn[SA_MAX_UNEXTENDED_NAME_LENGTH]; >>> -memset(&short_dn, 0, SA_MAX_UNEXTENDED_NAME_LENGTH); >>> -SaNameT shortdn_notificationObject, shortdn_notifyingObject; >>> -if (osaf_is_an_extended_name(ntfHeader->notificationObject)) { >>> - strncpy(short_dn, osaf_extended_name_borrow(ntfHeader- >>> notificationObject) >>> - , SA_MAX_UNEXTENDED_NAME_LENGTH - 1); >>> - osaf_extended_name_lend(short_dn, > &shortdn_notificationObject); >>> - logRecord.logHeader.ntfHdr.notificationObject = >> &shortdn_notificationObject; >>> -} >>> -if (osaf_is_an_extended_name(ntfHeader->notifyingObject)) { >>> - strncpy(short_dn, osaf_extended_name_borrow(ntfHeader- >>> notifyingObject) >>> - , SA_MAX_UNEXTENDED_NAME_LENGTH - 1); >>> - osaf_extended_name_lend(short_dn, &shortdn_notifyingObject); >>> - logRecord.logHeader.ntfHdr.notifyingObject = >> &shortdn_notifyingObject; >>> -} >>> -if (short_dn[0] != '\0') { >>> - LOG_NO("Retry to log the truncated >> notificationObject/notifyingObject"); >>> - if ((errorCode = saLogWriteLogAsync(alarmStreamHandle, >>> - > notif->getNotificationId(), >>> - SA_LOG_RECORD_WRITE_ACK, >>> - &logRecord)) != > SA_AIS_OK) { >>> -LOG_ER("Failed to log the truncated >> notificationObject/notifyingObject (%d)" >>> - , errorCode); >>> - } >>> -} >>> - } >>> - goto end; >>> +switch (errorCode) { >>> +case SA_AIS_OK: >>> + break; >>> + >>> +/* LOGsv is busy. Put the notification to queue and re-send next > time */ >>> +case SA_AIS_ERR_TRY_AGAIN: >>> +case SA_AIS_ERR_TIMEOUT: >>> + TRACE("Failed to log notification (ret: %d). Try next time.", >> errorCode); >>> + break; >>> + >>> +default: >>> +
Re: [devel] [PATCH 1 of 1] cpsv: To update checkpoint user number for each node [#1669] V4
Hi Hoang, The new messages between old cpd to new cpd (A to S) was not handled , please refer `osaf/libs/common/cpsv/cpsv_edu.c ` file for MSG_FORMAT_VER handling or any old patches -AVM On 8/9/2016 3:05 PM, A V Mahesh wrote: > Hi Hoang , > > Please hold on pushing. > > On new node we have see some issue please check CPD enode and decode > once ( new patch node ) . > > Aug 9 14:23:01 SC-1 osafckptd[20478]: hj_enc.c:311: > decode_flatten_space: Assertion 'p8' failed. > Aug 9 14:23:01 SC-1 osafamfnd[20439]: NO > 'safComp=CPD,safSu=SC-1,safSg=2N,safApp=OpenSAF' faulted due to > 'avaDown' : Recovery is 'nodeFailfast' > > -AVM > > > > On 8/9/2016 2:09 PM, A V Mahesh wrote: >> ACK, >> >> -AVM >> >> >> On 8/3/2016 4:02 PM, Hoang Vo wrote: >>> osaf/libs/common/cpsv/include/cpd_cb.h |2 + >>> osaf/libs/common/cpsv/include/cpd_proc.h |3 + >>> osaf/libs/common/cpsv/include/cpd_red.h | 13 ++ >>> osaf/libs/common/cpsv/include/cpsv_evt.h |8 + >>> osaf/services/saf/cpsv/cpd/cpd_db.c | 14 ++- >>> osaf/services/saf/cpsv/cpd/cpd_evt.c |8 + >>> osaf/services/saf/cpsv/cpd/cpd_mbcsv.c | 96 --- >>> osaf/services/saf/cpsv/cpd/cpd_proc.c| 148 >>> +++ >>> osaf/services/saf/cpsv/cpd/cpd_red.c | 30 - >>> osaf/services/saf/cpsv/cpd/cpd_sbevt.c | 57 +-- >>> 10 files changed, 344 insertions(+), 35 deletions(-) >>> >>> >>> Problem: >>> --- >>> The saCkptCheckpointNumOpeners is not updated when a node which has >>> a checkpoint client restarts. >>> >>> Solution: >>> >>> Currently CPD doesn't store number of user on each node. This patch >>> updates CPD to update information >>> about users on each node for each checkpoint. When a node restarts, >>> the CPD update the total number of >>> users for a checkpoint accordingly. This is reflected on >>> saCkptCheckpointNumOpeners attribute correctly. >>> >>> diff --git a/osaf/libs/common/cpsv/include/cpd_cb.h >>> b/osaf/libs/common/cpsv/include/cpd_cb.h >>> --- a/osaf/libs/common/cpsv/include/cpd_cb.h >>> +++ b/osaf/libs/common/cpsv/include/cpd_cb.h >>> @@ -92,6 +92,8 @@ typedef struct cpd_ckpt_info_node { >>> uint32_t num_users; >>> uint32_t num_readers; >>> uint32_t num_writers; >>> +uint32_t node_users_cnt; >>> +CPD_NODE_USER_INFO *node_users; >>> /* for imm */ >>> SaUint32T ckpt_used_size; >>> diff --git a/osaf/libs/common/cpsv/include/cpd_proc.h >>> b/osaf/libs/common/cpsv/include/cpd_proc.h >>> --- a/osaf/libs/common/cpsv/include/cpd_proc.h >>> +++ b/osaf/libs/common/cpsv/include/cpd_proc.h >>> @@ -108,5 +108,8 @@ uint32_t cpd_mbcsv_enc_async_update(CPD_ >>> uint32_t cpd_mbcsv_close(CPD_CB *cb); >>> bool cpd_is_noncollocated_replica_present_on_payload(CPD_CB *cb, >>> CPD_CKPT_INFO_NODE *ckpt_node); >>> uint32_t cpd_ckpt_reploc_imm_object_delete(CPD_CB *cb, >>> CPD_CKPT_REPLOC_INFO *ckpt_reploc_node ,bool is_unlink_set); >>> +void cpd_proc_increase_node_user_info(CPD_CKPT_INFO_NODE >>> *ckpt_node, MDS_DEST cpnd_dest, SaCkptCheckpointOpenFlagsT open_flags); >>> +void cpd_proc_decrease_node_user_info(CPD_CKPT_INFO_NODE >>> *ckpt_node, MDS_DEST cpnd_dest, SaCkptCheckpointOpenFlagsT open_flags); >>> +void cpd_proc_update_user_info_when_node_down(CPD_CB *cb, NODE_ID >>> node_id); >>> uint32_t cpd_proc_ckpt_update_post(CPD_CB *cb); >>> #endif >>> diff --git a/osaf/libs/common/cpsv/include/cpd_red.h >>> b/osaf/libs/common/cpsv/include/cpd_red.h >>> --- a/osaf/libs/common/cpsv/include/cpd_red.h >>> +++ b/osaf/libs/common/cpsv/include/cpd_red.h >>> @@ -64,6 +64,18 @@ typedef struct cpd_a2s_ckpt_usr_info { >>> } CPD_A2S_CKPT_USR_INFO; >>> +typedef struct cpd_a2s_ckpt_usr_info_2 { >>> +SaCkptCheckpointHandleT ckpt_id; >>> +uint32_t num_user; >>> +uint32_t num_writer; >>> +uint32_t num_reader; >>> +uint32_t num_sections; >>> +uint32_t ckpt_on_scxb1; >>> +uint32_t ckpt_on_scxb2; >>> +uint32_t node_users_cnt; >>> +CPD_NODE_USER_INFO *node_list; >>> +} CPD_A2S_CKPT_USR_INFO_2; >>> + >>> typedef struct cpd_mbcsv_msg { >>> CPD_MBCSV_MSG_TYPE type; >>> union { >>> @@ -76,6 +88,7 @@ typedef struct cpd_mbcsv_msg { >>> CPD_A2S_CKPT_UNLINK ckpt_ulink; >>> CPD_A2S_CKPT_USR_INFO usr_info; >>> CPSV_CKPT_DEST_INFO dest_down; >>> +CPD_A2S_CKPT_USR_INFO_2 usr_info_2; >>> } info; >>> } CPD_MBCSV_MSG; >>> diff --git a/osaf/libs/common/cpsv/include/cpsv_evt.h >>> b/osaf/libs/common/cpsv/include/cpsv_evt.h >>> --- a/osaf/libs/common/cpsv/include/cpsv_evt.h >>> +++ b/osaf/libs/common/cpsv/include/cpsv_evt.h >>> @@ -840,6 +840,14 @@ typedef struct cpd_tmr_info { >>> } info; >>> } CPD_TMR_INFO; >>> +typedef struct cpd_node_user_info { >>> +MDS_DEST dest; >>> +uint32_t num_users; >>> +uint32_t num_writers; >>> +uint32_t num_readers; >>> +struct cpd_node_user_info *next; >>> +} CPD
Re: [devel] [PATCH 1 of 1] cpsv: To update checkpoint user number for each node [#1669] V4
Hi Hoang , Please hold on pushing. On new node we have see some issue please check CPD enode and decode once ( new patch node ) . Aug 9 14:23:01 SC-1 osafckptd[20478]: hj_enc.c:311: decode_flatten_space: Assertion 'p8' failed. Aug 9 14:23:01 SC-1 osafamfnd[20439]: NO 'safComp=CPD,safSu=SC-1,safSg=2N,safApp=OpenSAF' faulted due to 'avaDown' : Recovery is 'nodeFailfast' -AVM On 8/9/2016 2:09 PM, A V Mahesh wrote: > ACK, > > -AVM > > > On 8/3/2016 4:02 PM, Hoang Vo wrote: >> osaf/libs/common/cpsv/include/cpd_cb.h |2 + >> osaf/libs/common/cpsv/include/cpd_proc.h |3 + >> osaf/libs/common/cpsv/include/cpd_red.h | 13 ++ >> osaf/libs/common/cpsv/include/cpsv_evt.h |8 + >> osaf/services/saf/cpsv/cpd/cpd_db.c | 14 ++- >> osaf/services/saf/cpsv/cpd/cpd_evt.c |8 + >> osaf/services/saf/cpsv/cpd/cpd_mbcsv.c | 96 --- >> osaf/services/saf/cpsv/cpd/cpd_proc.c| 148 >> +++ >> osaf/services/saf/cpsv/cpd/cpd_red.c | 30 - >> osaf/services/saf/cpsv/cpd/cpd_sbevt.c | 57 +-- >> 10 files changed, 344 insertions(+), 35 deletions(-) >> >> >> Problem: >> --- >> The saCkptCheckpointNumOpeners is not updated when a node which has a >> checkpoint client restarts. >> >> Solution: >> >> Currently CPD doesn't store number of user on each node. This patch >> updates CPD to update information >> about users on each node for each checkpoint. When a node restarts, >> the CPD update the total number of >> users for a checkpoint accordingly. This is reflected on >> saCkptCheckpointNumOpeners attribute correctly. >> >> diff --git a/osaf/libs/common/cpsv/include/cpd_cb.h >> b/osaf/libs/common/cpsv/include/cpd_cb.h >> --- a/osaf/libs/common/cpsv/include/cpd_cb.h >> +++ b/osaf/libs/common/cpsv/include/cpd_cb.h >> @@ -92,6 +92,8 @@ typedef struct cpd_ckpt_info_node { >> uint32_t num_users; >> uint32_t num_readers; >> uint32_t num_writers; >> +uint32_t node_users_cnt; >> +CPD_NODE_USER_INFO *node_users; >> /* for imm */ >> SaUint32T ckpt_used_size; >> diff --git a/osaf/libs/common/cpsv/include/cpd_proc.h >> b/osaf/libs/common/cpsv/include/cpd_proc.h >> --- a/osaf/libs/common/cpsv/include/cpd_proc.h >> +++ b/osaf/libs/common/cpsv/include/cpd_proc.h >> @@ -108,5 +108,8 @@ uint32_t cpd_mbcsv_enc_async_update(CPD_ >> uint32_t cpd_mbcsv_close(CPD_CB *cb); >> bool cpd_is_noncollocated_replica_present_on_payload(CPD_CB *cb, >> CPD_CKPT_INFO_NODE *ckpt_node); >> uint32_t cpd_ckpt_reploc_imm_object_delete(CPD_CB *cb, >> CPD_CKPT_REPLOC_INFO *ckpt_reploc_node ,bool is_unlink_set); >> +void cpd_proc_increase_node_user_info(CPD_CKPT_INFO_NODE *ckpt_node, >> MDS_DEST cpnd_dest, SaCkptCheckpointOpenFlagsT open_flags); >> +void cpd_proc_decrease_node_user_info(CPD_CKPT_INFO_NODE *ckpt_node, >> MDS_DEST cpnd_dest, SaCkptCheckpointOpenFlagsT open_flags); >> +void cpd_proc_update_user_info_when_node_down(CPD_CB *cb, NODE_ID >> node_id); >> uint32_t cpd_proc_ckpt_update_post(CPD_CB *cb); >> #endif >> diff --git a/osaf/libs/common/cpsv/include/cpd_red.h >> b/osaf/libs/common/cpsv/include/cpd_red.h >> --- a/osaf/libs/common/cpsv/include/cpd_red.h >> +++ b/osaf/libs/common/cpsv/include/cpd_red.h >> @@ -64,6 +64,18 @@ typedef struct cpd_a2s_ckpt_usr_info { >> } CPD_A2S_CKPT_USR_INFO; >> +typedef struct cpd_a2s_ckpt_usr_info_2 { >> +SaCkptCheckpointHandleT ckpt_id; >> +uint32_t num_user; >> +uint32_t num_writer; >> +uint32_t num_reader; >> +uint32_t num_sections; >> +uint32_t ckpt_on_scxb1; >> +uint32_t ckpt_on_scxb2; >> +uint32_t node_users_cnt; >> +CPD_NODE_USER_INFO *node_list; >> +} CPD_A2S_CKPT_USR_INFO_2; >> + >> typedef struct cpd_mbcsv_msg { >> CPD_MBCSV_MSG_TYPE type; >> union { >> @@ -76,6 +88,7 @@ typedef struct cpd_mbcsv_msg { >> CPD_A2S_CKPT_UNLINK ckpt_ulink; >> CPD_A2S_CKPT_USR_INFO usr_info; >> CPSV_CKPT_DEST_INFO dest_down; >> +CPD_A2S_CKPT_USR_INFO_2 usr_info_2; >> } info; >> } CPD_MBCSV_MSG; >> diff --git a/osaf/libs/common/cpsv/include/cpsv_evt.h >> b/osaf/libs/common/cpsv/include/cpsv_evt.h >> --- a/osaf/libs/common/cpsv/include/cpsv_evt.h >> +++ b/osaf/libs/common/cpsv/include/cpsv_evt.h >> @@ -840,6 +840,14 @@ typedef struct cpd_tmr_info { >> } info; >> } CPD_TMR_INFO; >> +typedef struct cpd_node_user_info { >> +MDS_DEST dest; >> +uint32_t num_users; >> +uint32_t num_writers; >> +uint32_t num_readers; >> +struct cpd_node_user_info *next; >> +} CPD_NODE_USER_INFO; >> + >> /** >>CPD Event Data Structures >> **/ >> diff --git a/osaf/services/saf/cpsv/cpd/cpd_db.c >> b/osaf/services/saf/cpsv/cpd/cpd_db.c >> --- a/osaf/services/saf/cpsv/cpd/cpd_db.c >> +++ b/o
Re: [devel] [PATCH 1 of 1] cpsv: To update checkpoint user number for each node [#1669] V4
ACK, -AVM On 8/3/2016 4:02 PM, Hoang Vo wrote: > osaf/libs/common/cpsv/include/cpd_cb.h |2 + > osaf/libs/common/cpsv/include/cpd_proc.h |3 + > osaf/libs/common/cpsv/include/cpd_red.h | 13 ++ > osaf/libs/common/cpsv/include/cpsv_evt.h |8 + > osaf/services/saf/cpsv/cpd/cpd_db.c | 14 ++- > osaf/services/saf/cpsv/cpd/cpd_evt.c |8 + > osaf/services/saf/cpsv/cpd/cpd_mbcsv.c | 96 --- > osaf/services/saf/cpsv/cpd/cpd_proc.c| 148 > +++ > osaf/services/saf/cpsv/cpd/cpd_red.c | 30 - > osaf/services/saf/cpsv/cpd/cpd_sbevt.c | 57 +-- > 10 files changed, 344 insertions(+), 35 deletions(-) > > > Problem: > --- > The saCkptCheckpointNumOpeners is not updated when a node which has a > checkpoint client restarts. > > Solution: > > Currently CPD doesn't store number of user on each node. This patch updates > CPD to update information > about users on each node for each checkpoint. When a node restarts, the CPD > update the total number of > users for a checkpoint accordingly. This is reflected on > saCkptCheckpointNumOpeners attribute correctly. > > diff --git a/osaf/libs/common/cpsv/include/cpd_cb.h > b/osaf/libs/common/cpsv/include/cpd_cb.h > --- a/osaf/libs/common/cpsv/include/cpd_cb.h > +++ b/osaf/libs/common/cpsv/include/cpd_cb.h > @@ -92,6 +92,8 @@ typedef struct cpd_ckpt_info_node { > uint32_t num_users; > uint32_t num_readers; > uint32_t num_writers; > + uint32_t node_users_cnt; > + CPD_NODE_USER_INFO *node_users; > > /* for imm */ > SaUint32T ckpt_used_size; > diff --git a/osaf/libs/common/cpsv/include/cpd_proc.h > b/osaf/libs/common/cpsv/include/cpd_proc.h > --- a/osaf/libs/common/cpsv/include/cpd_proc.h > +++ b/osaf/libs/common/cpsv/include/cpd_proc.h > @@ -108,5 +108,8 @@ uint32_t cpd_mbcsv_enc_async_update(CPD_ > uint32_t cpd_mbcsv_close(CPD_CB *cb); > bool cpd_is_noncollocated_replica_present_on_payload(CPD_CB *cb, > CPD_CKPT_INFO_NODE *ckpt_node); > uint32_t cpd_ckpt_reploc_imm_object_delete(CPD_CB *cb, > CPD_CKPT_REPLOC_INFO *ckpt_reploc_node ,bool is_unlink_set); > +void cpd_proc_increase_node_user_info(CPD_CKPT_INFO_NODE *ckpt_node, > MDS_DEST cpnd_dest, SaCkptCheckpointOpenFlagsT open_flags); > +void cpd_proc_decrease_node_user_info(CPD_CKPT_INFO_NODE *ckpt_node, > MDS_DEST cpnd_dest, SaCkptCheckpointOpenFlagsT open_flags); > +void cpd_proc_update_user_info_when_node_down(CPD_CB *cb, NODE_ID node_id); > uint32_t cpd_proc_ckpt_update_post(CPD_CB *cb); > #endif > diff --git a/osaf/libs/common/cpsv/include/cpd_red.h > b/osaf/libs/common/cpsv/include/cpd_red.h > --- a/osaf/libs/common/cpsv/include/cpd_red.h > +++ b/osaf/libs/common/cpsv/include/cpd_red.h > @@ -64,6 +64,18 @@ typedef struct cpd_a2s_ckpt_usr_info { > > } CPD_A2S_CKPT_USR_INFO; > > +typedef struct cpd_a2s_ckpt_usr_info_2 { > + SaCkptCheckpointHandleT ckpt_id; > + uint32_t num_user; > + uint32_t num_writer; > + uint32_t num_reader; > + uint32_t num_sections; > + uint32_t ckpt_on_scxb1; > + uint32_t ckpt_on_scxb2; > + uint32_t node_users_cnt; > + CPD_NODE_USER_INFO *node_list; > +} CPD_A2S_CKPT_USR_INFO_2; > + > typedef struct cpd_mbcsv_msg { > CPD_MBCSV_MSG_TYPE type; > union { > @@ -76,6 +88,7 @@ typedef struct cpd_mbcsv_msg { > CPD_A2S_CKPT_UNLINK ckpt_ulink; > CPD_A2S_CKPT_USR_INFO usr_info; > CPSV_CKPT_DEST_INFO dest_down; > + CPD_A2S_CKPT_USR_INFO_2 usr_info_2; > } info; > } CPD_MBCSV_MSG; > > diff --git a/osaf/libs/common/cpsv/include/cpsv_evt.h > b/osaf/libs/common/cpsv/include/cpsv_evt.h > --- a/osaf/libs/common/cpsv/include/cpsv_evt.h > +++ b/osaf/libs/common/cpsv/include/cpsv_evt.h > @@ -840,6 +840,14 @@ typedef struct cpd_tmr_info { > } info; > } CPD_TMR_INFO; > > +typedef struct cpd_node_user_info { > + MDS_DEST dest; > + uint32_t num_users; > + uint32_t num_writers; > + uint32_t num_readers; > + struct cpd_node_user_info *next; > +} CPD_NODE_USER_INFO; > + > > /** >CPD Event Data Structures > > **/ > diff --git a/osaf/services/saf/cpsv/cpd/cpd_db.c > b/osaf/services/saf/cpsv/cpd/cpd_db.c > --- a/osaf/services/saf/cpsv/cpd/cpd_db.c > +++ b/osaf/services/saf/cpsv/cpd/cpd_db.c > @@ -137,6 +137,7 @@ uint32_t cpd_ckpt_node_delete(CPD_CB *cb > { > uint32_t rc = NCSCC_RC_SUCCESS; > CPD_NODE_REF_INFO *nref_info, *next_info; > + CPD_NODE_USER_INFO *node_user, *next_node_user; > > TRACE_ENTER(); > > @@ -153,6 +154,13 @@ uint32_t cpd_ckpt_node_delete(CPD_CB *cb > nref_info = next_info; > } > > + node_user = ckpt_node->node_users; > + while (node_user) { > +
Re: [devel] [PATCH 1 of 1] cpsv: To update checkpoint user number for each node [#1669] V3
Hi Hoang, This patch looks more stable , I haven t found any issue in basic in service upgrade testing testing . I am going to ACK the patch. -AVM On 8/3/2016 4:11 PM, Vo Minh Hoang wrote: > Dear Mahesh, > > I have just submit a V4 patch that try to eliminate the possible error in > communicating between old and new version. > > My testing shows OK result but when I cannot reproduce the problem exactly, > I do not have high confident about it. > > Would you please help me review and check the result of this patch. > > Thank you and best regards, > Hoang > > -Original Message- > From: A V Mahesh [mailto:mahesh.va...@oracle.com] > Sent: Wednesday, July 27, 2016 4:53 PM > To: Vo Minh Hoang ; 'Nhat Pham' > ; anders.wid...@ericsson.com > Cc: opensaf-devel@lists.sourceforge.net > Subject: Re: [PATCH 1 of 1] cpsv: To update checkpoint user number for each > node [#1669] V3 > > Hi Hoang, > > I still able to reproduce the problem , some time it increments two time of > current readers , > > some time it is getting decremented to less then zero ( variable are set > (0xfff6) ) > > Unfortunately I don't have any specific steps order , but this issue occurs > in cluster setup with 1new controller & 1 old controller and 2 old > payloads > > when tow application opened & holded on old payloads ( don't exist) , and > try to do fail-overs of controllers and then exit the applications on both > payloads, > > you will end up with error. > > I broad , I suggest you look at the new messages that are getting introduced > in this patch are prevented with version check > > > === > > PL-3:~ # immlist safCkpt=checkpoint_test77 > Name Type Value(s) > > safCkptSA_STRING_T > safCkpt=checkpoint_test77 > saCkptCheckpointUsedSize SA_UINT64_T 110 (0x6e) > saCkptCheckpointSize SA_UINT64_T 2097152 > (0x20) > saCkptCheckpointRetDurationSA_TIME_T > 9223372036854775807 (0x7fff, Sat Apr 12 05:17:16 2262) > saCkptCheckpointNumWriters SA_UINT32_T > 4294967286 (0xfff6) > saCkptCheckpointNumSectionsSA_UINT32_T 1 (0x1) > saCkptCheckpointNumReplicasSA_UINT32_T 2 (0x2) > saCkptCheckpointNumReaders SA_UINT32_T > 4294967286 (0xfff6) > saCkptCheckpointNumOpeners SA_UINT32_T 0 (0x0) > saCkptCheckpointNumCorruptSections SA_UINT32_T 0 (0x0) > saCkptCheckpointMaxSectionsSA_UINT32_T 1 (0x1) > saCkptCheckpointMaxSectionSize SA_UINT64_T 2097152 > (0x20) > saCkptCheckpointMaxSectionIdSize SA_UINT64_T 256 (0x100) > *saCkptCheckpointCreationTimestamp SA_TIME_T > 14696097540 (0x14651a48f19e8400, Wed Jul 27 14:25:54 2016)* > saCkptCheckpointCreationFlags SA_UINT32_T 2 (0x2) > SaImmAttrImplementerName SA_STRING_T > safCheckPointService > SaImmAttrClassName SA_STRING_T > SaCkptCheckpoint > SaImmAttrAdminOwnerNameSA_STRING_T > > > > SC-2:~ # immlist safCkpt=checkpoint_test77 > Name Type Value(s) > > safCkptSA_STRING_T > safCkpt=checkpoint_test77 > saCkptCheckpointUsedSize SA_UINT64_T 110 (0x6e) > saCkptCheckpointSize SA_UINT64_T 2097152 > (0x20) > saCkptCheckpointRetDurationSA_TIME_T > 9223372036854775807 (0x7fff, Sat Apr 12 05:17:16 2262) > saCkptCheckpointNumWriters SA_UINT32_T 20 (0x14) > saCkptCheckpointNumSectionsSA_UINT32_T 1 (0x1) > saCkptCheckpointNumReplicasSA_UINT32_T 2 (0x2) > saCkptCheckpointNumReaders SA_UINT32_T 20 (0x14) > saCkptCheckpointNumOpeners SA_UINT32_T 20 (0x14) > saCkptCheckpointNumCorruptSections SA_UINT32_T 0 (0x0) > saCkptCheckpointMaxSectionsSA_UINT32_T 1 (0x1) > saCkptCheckpointMaxSectionSize SA_UINT64_T 2097152 > (0x20) > saCkptCheckpointMaxSectionIdSize SA_UINT64_T 256 (0x100) > *saCkptCheckpointCreationTimestamp SA_TIME_T > 14696106140 (0x14651b112d9d1c00, Wed Jul 27 14:40:14 2016)* > saCkptCheckpointCreationFlags SA_UINT32_T 2 (0x2) > SaImmAttrImplementerName SA_STRING_T
[devel] [PATCH 1 of 1] immtools: Allow immadm to explicitly set ReleaseOnFinalize [#1937]
osaf/tools/safimm/immadm/imm_admin.c | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) Allow immadm to explicitly set ReleaseOnFinalize. diff --git a/osaf/tools/safimm/immadm/imm_admin.c b/osaf/tools/safimm/immadm/imm_admin.c --- a/osaf/tools/safimm/immadm/imm_admin.c +++ b/osaf/tools/safimm/immadm/imm_admin.c @@ -70,6 +70,7 @@ static void usage(const char *progname) printf("\t-O, --operation-name \n"); printf("\t\toperation name (mandatory)\n"); printf("\t-a, --admin-owner \n"); + printf("\t-r, --release-on-finalize\n"); printf("\t-p, --parameter \n"); printf("\t\tparameter(s) to admin op\n"); printf("\t\tParameter syntax: ::\n"); @@ -246,6 +247,7 @@ int main(int argc, char *argv[]) {"operation-id", required_argument, 0, 'o'}, {"operation-name", required_argument, 0, 'O'}, {"admin-owner", required_argument, 0, 'a'}, + {"release-on-finalize", no_argument, 0, 'r'}, {"help", no_argument, 0, 'h'}, {"timeout", required_argument, 0, 't'}, {"verbose", no_argument, 0, 'v'}, @@ -254,6 +256,7 @@ int main(int argc, char *argv[]) SaAisErrorT error; SaImmHandleT immHandle; SaImmAdminOwnerNameT adminOwnerName = basename(argv[0]); + bool explicitRof = false; bool releaseAdmo=true; bool explicitAdmo=false; SaImmAdminOwnerHandleT ownerHandle; @@ -282,7 +285,7 @@ int main(int argc, char *argv[]) SaStringT opName = NULL; while (1) { - c = getopt_long(argc, argv, "dp:o:O:a:t:hv", long_options, NULL); + c = getopt_long(argc, argv, "dp:o:O:a:rt:hv", long_options, NULL); if (c == -1)/* have all command-line options have been parsed? */ break; @@ -344,6 +347,9 @@ int main(int argc, char *argv[]) releaseAdmo=false; explicitAdmo=true; break; + case 'r': + explicitRof = true; + break; case 'h': usage(basename(argv[0])); exit(EXIT_SUCCESS); @@ -358,6 +364,10 @@ int main(int argc, char *argv[]) } } + if (explicitRof) { + releaseAdmo = true; + } + if (operationId == -1) { fprintf(stderr, "error - must specify admin operation ID %llx\n", operationId); exit(EXIT_FAILURE); -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. http://sdm.link/zohodev2dev ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 0 of 1] Review Request for immtools: Allow immadm to explicitly set ReleaseOnFinalize [#1937]
Summary: immtools: Allow immadm to explicitly set ReleaseOnFinalize [#1937] Review request for Trac Ticket(s): 1937 Peer Reviewer(s): Zoran, Neel Pull request to: Affected branch(es): 5.1 Development branch: 5.1 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): - changeset 5f4c240db01c21b9cccf3ba9e906b5fd2e465d91 Author: Hung Nguyen Date: Tue, 09 Aug 2016 14:59:42 +0700 immtools: Allow immadm to explicitly set ReleaseOnFinalize [#1937] Allow immadm to explicitly set ReleaseOnFinalize. Complete diffstat: -- osaf/tools/safimm/immadm/imm_admin.c | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) Testing Commands: - # immadm -a abc -r -o 1 test=1 # immadm -a abc --release-on-finalize -o 1 test=1 Testing, Expected Results: -- # immlist -a SaImmAttrAdminOwnerName test=1 SaImmAttrAdminOwnerName= 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 ~/.hgrc file (i.e. username, 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. -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. http://sdm.link/zohodev2dev ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel