[devel] [PATCH 0 of 1] Review Request for imm: retry ccbabort when failed with TRY_AGAIN and TIMEOUT[#2398]

2017-03-27 Thread reddy . neelakanta
Summary: imm: retry ccbabort when failed with TRY_AGAIN and TIMEOUT[#2398]
Review request for Trac Ticket(s): 2398
Peer Reviewer(s):zoran, Hung
Affected branch(es): 5.0.x, 5.1.x, 5.2.x(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 e908820ae914f0905faf5825241551d44950b9b8
Author: Neelakanta Reddy 
Date:   Mon, 27 Mar 2017 12:35:42 +0530

imm: retry ccbabort when failed with TRY_AGAIN and TIMEOUT[#2398]


Complete diffstat:
--
 src/imm/agent/imma_om_api.cc |  1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


Testing Commands:
-
make saImmOmCcbAbort return TRY_AGAIN or TIMEOUT

Testing, Expected Results:
--
IF saImmOmCcbAbort is failed with TRY_AGAIN or TIMEOUT
the newccbid should not be called and allow to re-try
saImmOmCcbAbort

Conditions of Submission:
-
Ack from Reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


--
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 0 of 1] Review Request for imm:unregister local implementers when clm node is locked [#2391]

2017-03-26 Thread reddy . neelakanta
Summary:imm:unregister local implementers when clm node is locked[#2391] 
Review request for Trac Ticket(s): 2391
Peer Reviewer(s): Zoran, Hung
Affected branch(es): default(5.2.x)
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 94ea8abcf74eefa15a7f32a5278069e1abddc2d1
Author: Neelakanta Reddy 
Date:   Mon, 27 Mar 2017 10:20:14 +0530

imm:unregister local implementers when clm node is locked[#2391]


Complete diffstat:
--
 src/imm/immnd/ImmModel.cc  |  39 +++
 src/imm/immnd/ImmModel.h   |   6 +-
 src/imm/immnd/immnd_clm.c  |   7 ---
 src/imm/immnd/immnd_init.h |   3 +++
 src/imm/immnd/immnd_proc.c |  47 
+++
 5 files changed, 98 insertions(+), 4 deletions(-)


Testing Commands:
-
As explained in description of the ticket

Testing, Expected Results:
--
when clm node is locked, implementers registered with A.02.18 version
will be unregistered

Conditions of Submission:
-
Ack from Reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


--
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 of 1] imm:unregister local implementers when clm node is locked

2017-03-26 Thread reddy . neelakanta
 src/imm/immnd/ImmModel.cc  |  39 ++
 src/imm/immnd/ImmModel.h   |   6 -
 src/imm/immnd/immnd_clm.c  |   7 +++--
 src/imm/immnd/immnd_init.h |   3 ++
 src/imm/immnd/immnd_proc.c |  47 ++
 5 files changed, 98 insertions(+), 4 deletions(-)


diff --git a/src/imm/immnd/ImmModel.cc b/src/imm/immnd/ImmModel.cc
--- a/src/imm/immnd/ImmModel.cc
+++ b/src/imm/immnd/ImmModel.cc
@@ -1091,6 +1091,30 @@ immModel_getOldCriticalCcbs(IMMND_CB *cb
 }
 }
 
+void 
+immmModel_getLocalImplementers(IMMND_CB * cb, 
+SaUint32T* arrSize, 
+SaUint32T** implIdArr,
+SaUint32T**  implConnArr)
+{
+ConnVector cv;
+ConnVector::iterator cvi;
+IdVector idv;
+IdVector::iterator idv_it;
+unsigned int ix=0;
+
+ImmModel::instance(>immModel)->getLocalImplementers(cv, idv);
+if(cv.size()){
+*arrSize = cv.size();
+*implIdArr = (SaUint32T *) malloc((*arrSize)* sizeof(SaUint32T));
+*implConnArr = (SaUint32T *) malloc((*arrSize)* sizeof(SaUint32T));
+for(cvi = cv.begin(), idv_it = idv.begin(); cvi!=cv.end(); ix++, 
cvi++, idv_it++){
+   (*implIdArr)[ix] = (*idv_it);
+(*implConnArr)[ix] = (*cvi);
+}
+}
+
+}
 unsigned int
 immModel_pbeOiExists(IMMND_CB *cb)
 {
@@ -3086,6 +3110,21 @@ ImmModel::getMaxSyncBatchSize()
 return mbSize;
 }
 
+void
+ImmModel::getLocalImplementers(ConnVector & cv, IdVector )
+{
+TRACE_ENTER();
+ImplementerVector::iterator i;
+for(i = sImplementerVector.begin(); i != sImplementerVector.end(); ++i) {
+ImplementerInfo* info = (*i);
+if(info->mConn) {
+cv.push_back(info->mConn);
+idv.push_back(info->mId);
+   }
+}
+TRACE_LEAVE();
+}
+
 bool
 ImmModel::getLongDnsAllowed(ObjectInfo* immObject)
 {
diff --git a/src/imm/immnd/ImmModel.h b/src/imm/immnd/ImmModel.h
--- a/src/imm/immnd/ImmModel.h
+++ b/src/imm/immnd/ImmModel.h
@@ -670,7 +670,11 @@ public:
SaAisErrorT  verifyImmLimits(
  ObjectInfo* object,
  std::string objectName); 
-
+
+   voidgetLocalImplementers( 
+  ConnVector & cv,
+  IdVector );
+
 private:
 bool   checkSubLevel(
  const std::string& objectName, 
diff --git a/src/imm/immnd/immnd_clm.c b/src/imm/immnd/immnd_clm.c
--- a/src/imm/immnd/immnd_clm.c
+++ b/src/imm/immnd/immnd_clm.c
@@ -38,6 +38,7 @@ uint32_t immnd_clm_node_change(bool left
if(left){
immnd_cb->isClmNodeJoined = false;
TRACE("isClmNodeJoined is set to false");
+   immnd_proc_unregister_local_implemeters(immnd_cb);
} else {
immnd_cb->isClmNodeJoined = true;
TRACE("isClmNodeJoined is set to true");
@@ -67,9 +68,9 @@ uint32_t immnd_clm_node_change(bool left
TRACE("immnd_mds_msg_send success");
}
}
-   clientHdl = client_node->imm_app_hdl;
-   immnd_client_node_getnext(immnd_cb, clientHdl, 
_node);
-   }
+   clientHdl = client_node->imm_app_hdl;
+   immnd_client_node_getnext(immnd_cb, clientHdl, _node);
+   }
TRACE_LEAVE();
return rc;
 }
diff --git a/src/imm/immnd/immnd_init.h b/src/imm/immnd/immnd_init.h
--- a/src/imm/immnd/immnd_init.h
+++ b/src/imm/immnd/immnd_init.h
@@ -454,6 +454,8 @@ extern "C" {
...);
 
void immModel_setScAbsenceAllowed(IMMND_CB *cb);
+   
+   void immmModel_getLocalImplementers(IMMND_CB * cb, SaUint32T* arrSize, 
SaUint32T** implIdArr, SaUint32T**  implConnArr);
 
 #ifdef __cplusplus
 }
@@ -501,6 +503,7 @@ void freeSearchNext(IMMSV_OM_RSP_SEARCH_
 
 /* File :   immnd_proc.c */
 uint32_t immnd_proc_server(uint32_t *timeout);
+void immnd_proc_unregister_local_implemeters(IMMND_CB *cb);
 /* End :   immnd_proc.c  */
 
 /* File :   immnd_clm.c */
diff --git a/src/imm/immnd/immnd_proc.c b/src/imm/immnd/immnd_proc.c
--- a/src/imm/immnd/immnd_proc.c
+++ b/src/imm/immnd/immnd_proc.c
@@ -369,6 +369,53 @@ void immnd_proc_imma_discard_stales(IMMN
TRACE_LEAVE();
 }
 
+
+/
+ * Name  : immnd_proc_unregister_local_implemeters
+ *
+ * Description   : Function to unregister local implementers 
+ * when node leaves CLM membership( CLM node lock).
+ *
+ * Arguments : IMMND_CB *cb - IMMND CB pointer
+ *
+ * Notes : None.
+ */
+void immnd_proc_unregister_local_implemeters(IMMND_CB *cb)
+{
+   SaUint32T *implIdArr = NULL, * implConnArr = NULL;
+SaUint32T 

[devel] [PATCH 1 of 1] smf: retry of ccb operations when failed with resouce abort[#2389]

2017-03-21 Thread reddy . neelakanta
 src/smf/smfd/SmfImmOperation.cc|  37 -
 src/smf/smfd/SmfUpgradeCampaign.cc |   3 +--
 src/smf/smfd/SmfUtils.cc   |  17 -
 3 files changed, 53 insertions(+), 4 deletions(-)


diff --git a/src/smf/smfd/SmfImmOperation.cc b/src/smf/smfd/SmfImmOperation.cc
--- a/src/smf/smfd/SmfImmOperation.cc
+++ b/src/smf/smfd/SmfImmOperation.cc
@@ -434,6 +434,7 @@ SmfImmCreateOperation::execute(SmfRollba
 
SaNameT objectName;
 osaf_extended_name_lend(m_parentDn.c_str(), );
+   const SaStringT * errStrings = NULL;
 
 //Set IMM ownership.
 //When creating objects at top level the parent name is empty and the 
ownership shall not be set
@@ -470,6 +471,22 @@ SmfImmCreateOperation::execute(SmfRollba
//Create CCB
result = immutil_saImmOmCcbObjectCreate_2(m_ccbHandle, 
(SaImmClassNameT)className, 
  , (const 
SaImmAttrValuesT_2 **)m_immAttrValues);
+   if (result != SA_AIS_OK && result == SA_AIS_ERR_FAILED_OPERATION) {
+   result = saImmOmCcbGetErrorStrings(m_ccbHandle, );
+   if (errStrings){
+   TRACE("Received error string is %s", errStrings[0]);
+   char * type = NULL;
+   type = strstr(errStrings[0], "IMM: Resource abort: ");
+   if(type != NULL) {
+   TRACE("SA_AIS_ERR_FAILED_OPERATION is modified 
to SA_AIS_ERR_TRY_AGAIN because of "
+   "ccb resourse abort in 
saImmOmCcbObjectCreate" );
+   result = SA_AIS_ERR_TRY_AGAIN;
+   TRACE_LEAVE();
+   return result;
+   }
+   }
+   }
+
if (result != SA_AIS_OK) {
if (result == SA_AIS_ERR_EXIST) {
TRACE("SmfImmCreateOperation::execute: object already 
exists");
@@ -694,7 +711,24 @@ SmfImmDeleteOperation::execute(SmfRollba
 }
 }
 
+   const SaStringT * errStrings = NULL;
result = immutil_saImmOmCcbObjectDelete(m_ccbHandle, );
+   if (result != SA_AIS_OK && result == SA_AIS_ERR_FAILED_OPERATION) {
+   result = saImmOmCcbGetErrorStrings(m_ccbHandle, );
+   if (errStrings){
+   TRACE("Received error string is %s", errStrings[0]);
+   char * type = NULL;
+   type = strstr(errStrings[0], "IMM: Resource abort: ");
+   if(type != NULL) {
+   TRACE("SA_AIS_ERR_FAILED_OPERATION is modified 
to SA_AIS_ERR_TRY_AGAIN because of "
+   "ccb resourse abort in 
saImmOmCcbObjectDelete" );
+   result = SA_AIS_ERR_TRY_AGAIN;
+   TRACE_LEAVE();
+   return result;
+   }
+   }
+   }
+
if (result != SA_AIS_OK) {
LOG_NO("SmfImmDeleteOperation::execute, 
immutil_saImmOmCcbObjectDelete failed rc=%s (child objects maybe exists)", 
saf_error(result));
 TRACE_LEAVE();
@@ -1076,7 +1110,8 @@ SmfImmModifyOperation::execute(SmfRollba
char * type = NULL;
type = strstr(errStrings[0], "IMM: Resource abort: ");
if(type != NULL) {
-   TRACE("SA_AIS_ERR_FAILED_OPERATION is modified 
to SA_AIS_ERR_TRY_AGAIN because of ccb resourse abort" );
+   TRACE("SA_AIS_ERR_FAILED_OPERATION is modified 
to SA_AIS_ERR_TRY_AGAIN because of "
+   "ccb resourse abort in 
saImmOmCcbObjectModify" );
result = SA_AIS_ERR_TRY_AGAIN;
TRACE_LEAVE();
return result;
diff --git a/src/smf/smfd/SmfUpgradeCampaign.cc 
b/src/smf/smfd/SmfUpgradeCampaign.cc
--- a/src/smf/smfd/SmfUpgradeCampaign.cc
+++ b/src/smf/smfd/SmfUpgradeCampaign.cc
@@ -1121,8 +1121,7 @@ SmfUpgradeCampaign::resetMaintenanceStat
if (rc != SA_AIS_OK && rc == SA_AIS_ERR_TRY_AGAIN) {
/*
 * TRY_AGAIN is returned only when ccb is aborted 
-*  with Resource abort in error string. Resource abort 
in
-*  error string is checked presently for modify 
operation.
+* with Resource abort in error string. 
 */
continue;
}
diff --git a/src/smf/smfd/SmfUtils.cc b/src/smf/smfd/SmfUtils.cc
--- a/src/smf/smfd/SmfUtils.cc
+++ b/src/smf/smfd/SmfUtils.cc
@@ -684,9 +684,24 @@ SmfImmUtils::doImmOperations(std::list <
 

[devel] [PATCH 0 of 1] Review Request for smf: retry of ccb operations when failed with resouce abort[#2389]

2017-03-21 Thread reddy . neelakanta
Summary:smf: retry of ccb operations when failed with resouce abort[#2389] 
Review request for Trac Ticket(s): 2389
Peer Reviewer(s): Rafael, Leenart
Affected branch(es): 5.0.x, 5.1.x,default
Development branch: defult


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 6ffd3463b3f705e334e39ce8584006c7811f37f1
Author: Neelakanta Reddy 
Date:   Tue, 21 Mar 2017 18:00:36 +0530

smf: retry of ccb operations when failed with resouce abort[#2389]


Complete diffstat:
--
 src/smf/smfd/SmfImmOperation.cc|  37 -
 src/smf/smfd/SmfUpgradeCampaign.cc |   3 +--
 src/smf/smfd/SmfUtils.cc   |  17 -
 3 files changed, 53 insertions(+), 4 deletions(-)


Testing Commands:
-
when the SMF upgrade is running, kill the IMMND in any node of the cluster
which will lead to sync and aborts the ccb

Testing, Expected Results:
--
SMF should TRY_AGAIN the ccb operation, if the ccb operation
is failed/aborted with RESOUCE ABORT

Conditions of Submission:
-
Ack from reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


--
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 0 of 1] Review Request for imm :decrement the pending reply when error is other than SA_AIS_OK when newCcbId is called [#2386] V2

2017-03-21 Thread reddy . neelakanta
Summary: imm :decrement the pending reply when error is other than SA_AIS_OK 
when newCcbId is called [#2386] V2
Review request for Trac Ticket(s): 2386
Peer Reviewer(s): Zoran, Hung
Affected branch(es): 5.0.x, 5.1.x, 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 0fdeb41004c9105d91b9b7167be6ec3cc3dcb825
Author: Neelakanta Reddy 
Date:   Tue, 21 Mar 2017 16:42:11 +0530

imm :decrement the pending reply when error is other than SA_AIS_OK when
newCcbId is called [#2386] V2


Complete diffstat:
--
 src/imm/agent/imma_om_api.cc |  8 ++--
 1 files changed, 2 insertions(+), 6 deletions(-)


Testing Commands:
-
CCB has to be aborted
call ccbFinalize, and there must be "Too many pending incoming fevs messages (> 
16)"

Testing, Expected Results:
--
After "Too many pending incoming fevs messages (> 16)" becaome less ccbFinalize 
must succeed.

Conditions of Submission:
-
Ack from reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


--
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 of 1] imm :decrement the pending reply when error is other than SA_AIS_OK when newCcbId is called [#2386] V2

2017-03-21 Thread reddy . neelakanta
 src/imm/agent/imma_om_api.cc |  8 ++--
 1 files changed, 2 insertions(+), 6 deletions(-)


diff --git a/src/imm/agent/imma_om_api.cc b/src/imm/agent/imma_om_api.cc
--- a/src/imm/agent/imma_om_api.cc
+++ b/src/imm/agent/imma_om_api.cc
@@ -1528,7 +1528,6 @@ SaAisErrorT saImmOmCcbInitialize(SaImmAd
 
rc = imma_newCcbId(cb, ccb_node, adminOwnerId, , 
cl_node->syncr_timeout);
cl_node=NULL;
-   if(rc == SA_AIS_ERR_LIBRARY) {goto done;}
/* ccb_node still valid if rc == SA_AIS_OK. */
if(rc == SA_AIS_OK) {
osafassert(!(ccb_node->mExclusive));
@@ -1554,6 +1553,7 @@ SaAisErrorT saImmOmCcbInitialize(SaImmAd
} 
 
imma_proc_decrement_pending_reply(cl_node, true);
+   if(rc == SA_AIS_ERR_LIBRARY) {goto done;}
 
if (cl_node->stale) {
if (isExposed(cb, cl_node)) {
@@ -1817,7 +1817,6 @@ static SaAisErrorT ccb_object_create_com
}
rc = imma_newCcbId(cb, ccb_node, adminOwnerId, , 
cl_node->syncr_timeout);
cl_node = NULL;
-   if(rc == SA_AIS_ERR_LIBRARY) {goto done;}
/* ccb_node still valid if rc == SA_AIS_OK. */
if(rc == SA_AIS_OK) {
osafassert(!(ccb_node->mExclusive));
@@ -2412,7 +2411,6 @@ static SaAisErrorT ccb_object_modify_com
}
rc = imma_newCcbId(cb, ccb_node, adminOwnerId, , 
cl_node->syncr_timeout);
cl_node = NULL;
-   if(rc == SA_AIS_ERR_LIBRARY) {goto done;}
/* ccb_node still valid if rc == SA_AIS_OK. */
if(rc == SA_AIS_OK) {
osafassert(!(ccb_node->mExclusive));
@@ -2895,7 +2893,6 @@ static SaAisErrorT ccb_object_delete_com
}
rc = imma_newCcbId(cb, ccb_node, adminOwnerId, , 
cl_node->syncr_timeout);
cl_node = NULL;
-   if(rc == SA_AIS_ERR_LIBRARY) {goto done;}
/* ccb_node still valid if rc == SA_AIS_OK. */
if(rc == SA_AIS_OK) {
osafassert(!(ccb_node->mExclusive));
@@ -6521,7 +6518,6 @@ SaAisErrorT saImmOmCcbObjectRead(SaImmCc
}
rc = imma_newCcbId(cb, ccb_node, adminOwnerId, , 
cl_node->syncr_timeout);
cl_node = NULL;
-   if(rc == SA_AIS_ERR_LIBRARY) {goto done;}
/* ccb_node still valid if rc == SA_AIS_OK. */
if(rc == SA_AIS_OK) {
osafassert(!(ccb_node->mExclusive));
@@ -9191,7 +9187,6 @@ static SaAisErrorT imma_finalizeCcb(SaIm
 
rc = imma_newCcbId(cb, ccb_node, adminOwnerId, , 
cl_node->syncr_timeout);
cl_node=NULL;
-   if(rc != SA_AIS_OK) {goto done;}
/* ccb_node still valid if rc == SA_AIS_OK. */
if(rc == SA_AIS_OK) {
osafassert(!(ccb_node->mExclusive));
@@ -9212,6 +9207,7 @@ static SaAisErrorT imma_finalizeCcb(SaIm
/* Dont care if cl_node is stale here. This will be 
caught
   in the next attempt to use the related handle(s).
 */
+   if(rc != SA_AIS_OK) {goto done;}
}
}
  

--
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 0 of 1] Review Request for imm: return ERR_UNAVAILABLE when CLM node is locked, for OiObjectimplementerSet/Release[#2373]

2017-03-20 Thread reddy . neelakanta
Summary:  imm: return ERR_UNAVAILABLE when CLM node is locked, for 
OiObjectimplementerSet/Release[#2373]
Review request for Trac Ticket(s): 2373
Peer Reviewer(s): Zoran, Hung
Affected branch(es): default(5.2)
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 f4582eb1bdb2992c5a33d9e982704351c05c802b
Author: Neelakanta Reddy 
Date:   Mon, 20 Mar 2017 14:59:35 +0530

imm: return ERR_UNAVAILABLE when CLM node is locked, for
OiObjectimplementerSet/Release[#2373]


Complete diffstat:
--
 src/imm/agent/imma_oi_api.cc |  14 ++
 1 files changed, 14 insertions(+), 0 deletions(-)


Testing Commands:
-


Testing, Expected Results:
--
saImmOiObjectImplementerSet()/saImmOiObjectImplementerRelease() must 
return ERR_UNAVAILABLE

Conditions of Submission:
-
Ack from Reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


--
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 of 1] imm: return ERR_UNAVAILABLE when CLM node is locked, for OiObjectimplementerSet/Release[#2373]

2017-03-20 Thread reddy . neelakanta
 src/imm/agent/imma_oi_api.cc |  14 ++
 1 files changed, 14 insertions(+), 0 deletions(-)


diff --git a/src/imm/agent/imma_oi_api.cc b/src/imm/agent/imma_oi_api.cc
--- a/src/imm/agent/imma_oi_api.cc
+++ b/src/imm/agent/imma_oi_api.cc
@@ -2120,6 +2120,12 @@ static SaAisErrorT object_implementer_se
goto bad_handle;
}
 
+   if(cl_node->isImmA2x12 && cl_node->clmExposed){
+   TRACE_2("SA_AIS_ERR_UNAVAILABLE: imma CLM node left the 
cluster");
+   rc = SA_AIS_ERR_UNAVAILABLE;
+   goto clm_left;
+   }
+
if (cl_node->stale) {
TRACE_1("Handle %llx is stale", immOiHandle);
bool resurrected = imma_oi_resurrect(cb, cl_node, , );
@@ -2216,6 +,7 @@ static SaAisErrorT object_implementer_se
osafassert(out_evt->info.imma.type == IMMA_EVT_ND2A_IMM_ERROR);
rc = out_evt->info.imma.info.errRsp.error;
 
+ clm_left:
  fevs_error:
  bad_handle:
if (locked)
@@ -2339,6 +2346,12 @@ static SaAisErrorT object_implementer_re
goto bad_handle;
}
 
+   if(cl_node->isImmA2x12 && cl_node->clmExposed){
+   TRACE_2("SA_AIS_ERR_UNAVAILABLE: imma CLM node left the 
cluster");
+   rc = SA_AIS_ERR_UNAVAILABLE;
+   goto clm_left;
+   }
+
if (cl_node->stale) {
TRACE_1("Handle %llx is stale", immOiHandle);
bool resurrected = imma_oi_resurrect(cb, cl_node, , );
@@ -2433,6 +2446,7 @@ static SaAisErrorT object_implementer_re
osafassert(out_evt->info.imma.type == IMMA_EVT_ND2A_IMM_ERROR);
rc = out_evt->info.imma.info.errRsp.error;
 
+ clm_left:
  fevs_error:
  bad_handle:
if (locked)

--
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 0 of 1] Review Request for imm :decrement the pending reply when error is other than SA_AIS_OK when newCcbId is called [#2386]

2017-03-17 Thread reddy . neelakanta
Summary:imm :decrement the pending reply when error is other than SA_AIS_OK 
when newCcbId is called [#2386] 
Review request for Trac Ticket(s): 2386
Peer Reviewer(s): Zoran, Hung
Affected branch(es):5.0.x,5.1.x,deault(5.2)
Development branch: 5.2


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 eb6d8bb799c775d7b4cf5caaa9019bebd722ceb3
Author: Neelakanta Reddy 
Date:   Fri, 17 Mar 2017 14:52:57 +0530

imm :decrement the pending reply when error is other than SA_AIS_OK when
newCcbId is called [#2386]


Complete diffstat:
--
 src/imm/agent/imma_om_api.cc |  25 -
 1 files changed, 20 insertions(+), 5 deletions(-)


Testing Commands:
-
CCB has to be aborted
call ccbFinalize, and there must be "Too many pending incoming fevs messages (> 
16)"

Testing, Expected Results:
--
After "Too many pending incoming fevs messages (> 16)" becaome less ccbFinalize 
must succeed.

Conditions of Submission:
-
Ack from Reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


--
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 of 1] imm :decrement the pending reply when error is other than SA_AIS_OK when newCcbId is called [#2386]

2017-03-17 Thread reddy . neelakanta
 src/imm/agent/imma_om_api.cc |  25 -
 1 files changed, 20 insertions(+), 5 deletions(-)


diff --git a/src/imm/agent/imma_om_api.cc b/src/imm/agent/imma_om_api.cc
--- a/src/imm/agent/imma_om_api.cc
+++ b/src/imm/agent/imma_om_api.cc
@@ -1817,7 +1817,10 @@ static SaAisErrorT ccb_object_create_com
}
rc = imma_newCcbId(cb, ccb_node, adminOwnerId, , 
cl_node->syncr_timeout);
cl_node = NULL;
-   if(rc == SA_AIS_ERR_LIBRARY) {goto done;}
+   if(rc == SA_AIS_ERR_LIBRARY) {
+   imma_proc_decrement_pending_reply(cl_node, true);
+   goto done;
+   }
/* ccb_node still valid if rc == SA_AIS_OK. */
if(rc == SA_AIS_OK) {
osafassert(!(ccb_node->mExclusive));
@@ -2412,7 +2415,10 @@ static SaAisErrorT ccb_object_modify_com
}
rc = imma_newCcbId(cb, ccb_node, adminOwnerId, , 
cl_node->syncr_timeout);
cl_node = NULL;
-   if(rc == SA_AIS_ERR_LIBRARY) {goto done;}
+   if(rc == SA_AIS_ERR_LIBRARY) {
+   imma_proc_decrement_pending_reply(cl_node, true);
+   goto done;
+   }
/* ccb_node still valid if rc == SA_AIS_OK. */
if(rc == SA_AIS_OK) {
osafassert(!(ccb_node->mExclusive));
@@ -2895,7 +2901,10 @@ static SaAisErrorT ccb_object_delete_com
}
rc = imma_newCcbId(cb, ccb_node, adminOwnerId, , 
cl_node->syncr_timeout);
cl_node = NULL;
-   if(rc == SA_AIS_ERR_LIBRARY) {goto done;}
+   if(rc == SA_AIS_ERR_LIBRARY) {
+   imma_proc_decrement_pending_reply(cl_node, true);
+   goto done;
+   }
/* ccb_node still valid if rc == SA_AIS_OK. */
if(rc == SA_AIS_OK) {
osafassert(!(ccb_node->mExclusive));
@@ -6521,7 +6530,10 @@ SaAisErrorT saImmOmCcbObjectRead(SaImmCc
}
rc = imma_newCcbId(cb, ccb_node, adminOwnerId, , 
cl_node->syncr_timeout);
cl_node = NULL;
-   if(rc == SA_AIS_ERR_LIBRARY) {goto done;}
+   if(rc == SA_AIS_ERR_LIBRARY) {
+   imma_proc_decrement_pending_reply(cl_node, true);
+   goto done;
+   }
/* ccb_node still valid if rc == SA_AIS_OK. */
if(rc == SA_AIS_OK) {
osafassert(!(ccb_node->mExclusive));
@@ -9191,7 +9203,10 @@ static SaAisErrorT imma_finalizeCcb(SaIm
 
rc = imma_newCcbId(cb, ccb_node, adminOwnerId, , 
cl_node->syncr_timeout);
cl_node=NULL;
-   if(rc != SA_AIS_OK) {goto done;}
+   if(rc != SA_AIS_OK) {
+   imma_proc_decrement_pending_reply(cl_node, 
true);
+   goto done;
+   }
/* ccb_node still valid if rc == SA_AIS_OK. */
if(rc == SA_AIS_OK) {
osafassert(!(ccb_node->mExclusive));

--
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 0 of 1] Review Request for imm:reduce log level for ccb-committed messages[#2382]

2017-03-16 Thread reddy . neelakanta
Summary:imm:reduce log level for ccb-committed messages[#2382] 
Review request for Trac Ticket(s):2382
Peer Reviewer(s): Zoran, Hung
Affected branch(es): 5.0.x, 5.1.x, default(5.2)
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 d2a6971d156bd95dbdfae796ee5aac0f2e117027
Author: Neelakanta Reddy 
Date:   Thu, 16 Mar 2017 14:23:06 +0530

imm:reduce log level for ccb-committed messages[#2382]


Complete diffstat:
--
 src/imm/immnd/ImmModel.cc |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Testing Commands:
-
commit the Ccb

Testing, Expected Results:
--
Ccb COMMITTED messages should not appear in syslog

Conditions of Submission:
-
Ack from reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


--
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 of 1] imm:reduce log level for ccb-committed messages[#2382]

2017-03-16 Thread reddy . neelakanta
 src/imm/immnd/ImmModel.cc |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


diff --git a/src/imm/immnd/ImmModel.cc b/src/imm/immnd/ImmModel.cc
--- a/src/imm/immnd/ImmModel.cc
+++ b/src/imm/immnd/ImmModel.cc
@@ -6230,9 +6230,9 @@ ImmModel::ccbCommit(SaUint32T ccbId, Con
 i = std::find_if(sOwnerVector.begin(), sOwnerVector.end(),
 IdIs(ccb->mAdminOwnerId));
 if(i != sOwnerVector.end()) {
-LOG_NO("Ccb %u COMMITTED (%s)", ccb->mId, 
(*i)->mAdminOwnerName.c_str());
-} else {
-LOG_NO("Ccb %u COMMITTED (%s)", ccb->mId, "");
+TRACE("Ccb %u COMMITTED (%s)", ccb->mId, 
(*i)->mAdminOwnerName.c_str());
+} else {
+TRACE("Ccb %u COMMITTED (%s)", ccb->mId, "");
 }
 
 }

--
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 of 1] imm: updated the agent version to latest supported agent version [#2329]

2017-03-06 Thread reddy . neelakanta
 src/imm/agent/imma_def.h |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/src/imm/agent/imma_def.h b/src/imm/agent/imma_def.h
--- a/src/imm/agent/imma_def.h
+++ b/src/imm/agent/imma_def.h
@@ -22,7 +22,7 @@
 /* Macros for Validating Version */
 #define IMMA_RELEASE_CODE 'A'
 #define IMMA_MAJOR_VERSION 0x02
-#define IMMA_MINOR_VERSION 0x11
+#define IMMA_MINOR_VERSION 0x12
 
 #define IMMSV_WAIT_TIME  1000 /* Default MDS wait time in 10ms units =>10 sec*/
 

--
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 0 of 1] Review Request for imm: updated the agent version to latest supported agent version [#2329]

2017-03-06 Thread reddy . neelakanta
Summary:imm: updated the agent version to latest supported agent version 
[#2329] 
Review request for Trac Ticket(s): 2329
Peer Reviewer(s): Zoran, Hung
Affected branch(es): default(5.2)
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 6a7576f0c463aca91f1b44a3961456da731ecac5
Author: Neelakanta Reddy 
Date:   Mon, 06 Mar 2017 15:58:01 +0530

imm: updated the agent version to latest supported agent version [#2329]


Complete diffstat:
--
 src/imm/agent/imma_def.h |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Testing Commands:
-
for OM/OI intialize donot specify inout parameter 

Testing, Expected Results:
--
version is not specified the inout parameter 
will be latest supported A.02.18 

Conditions of Submission:
-
Ack from Reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


--
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 0 of 1] Review Request for imm:changing clm indicating object to CLMS node up [#2330]

2017-03-02 Thread reddy . neelakanta
Summary:imm:changing clm indication object to CLMS node up [#2330] 
Review request for Trac Ticket(s):2330
Peer Reviewer(s): Zoran, Hung
Affected branch(es): default(5.2)
Development branch: 5.2


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 e0c77e1b2daaad0acd7a4ccd4401f9dfa143212c
Author: Neelakanta Reddy 
Date:   Thu, 02 Mar 2017 16:31:25 +0530

imm:changing clm indication object to CLMS node up [#2330]


Complete diffstat:
--
 src/imm/agent/imma_om_api.cc |   2 --
 src/imm/immnd/immnd_evt.c|   8 
 src/imm/immnd/immnd_mds.c|  26 --
 3 files changed, 24 insertions(+), 12 deletions(-)


Testing Commands:
-
Start the nodes parallely, so that payload will load instead of sync

Testing, Expected Results:
--
with this patch, payload IMMND must intialize with CLM

Conditions of Submission:
-
Ack from reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


--
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 0 of 1] Review Request for imm: init CLM in seperate thread to avoid deadlock [#2327] V2

2017-03-02 Thread reddy . neelakanta
Summary:imm: init CLM in seperate thread to avoid deadlock [#2327] V2 
Review request for Trac Ticket(s):2327
Peer Reviewer(s):Zoran, Hung
Affected branch(es):default(5.2)
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 bf155e3e16bb0e741fac455f746d6cb3a980fda1
Author: Neelakanta Reddy 
Date:   Thu, 02 Mar 2017 12:56:41 +0530

imm: init CLM in seperate thread to avoid deadlock [#2327] V2


Complete diffstat:
--
 src/imm/immnd/immnd_clm.c  |  30 +++---
 src/imm/immnd/immnd_main.c |   2 ++
 2 files changed, 29 insertions(+), 3 deletions(-)


Testing Commands:
-
without this patch deadlock between IMM and CLM can 
be observed in UML environment

Testing, Expected Results:
--
with this patch deadlock should not be observed

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.


--
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 0 of 1] Review Request for imm: init CLM in seperate thread to avoid deadlock [#2327]

2017-03-01 Thread reddy . neelakanta
Summary: imm: init CLM in seperate thread to avoid deadlock [#2327]
Review request for Trac Ticket(s):2327
Peer Reviewer(s): Zoran, Hung
Affected branch(es):default(5.2)
Development branch:default(5.2)


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 bc53d5cb47b67c434c8cbb7d6b1c7e0f878f993f
Author: Neelakanta Reddy 
Date:   Wed, 01 Mar 2017 13:50:50 +0530

imm: init CLM in seperate thread to avoid deadlock [#2327]


Complete diffstat:
--
 src/imm/immnd/immnd_clm.c |  30 +++---
 1 files changed, 27 insertions(+), 3 deletions(-)


Testing Commands:
-
without this patch deadlock between IMM and CLM can 
be observed in UML environment

Testing, Expected Results:
--
with this patch deadlock should not be observed

Conditions of Submission:
-
Ack from reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


--
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 of 3] imm : README changes for integrating IMM with CLMS [#1640] v3

2017-02-27 Thread reddy . neelakanta
 src/imm/README |  21 -
 1 files changed, 20 insertions(+), 1 deletions(-)


diff --git a/src/imm/README b/src/imm/README
--- a/src/imm/README
+++ b/src/imm/README
@@ -2934,7 +2934,26 @@ Operation-id '1' invoked on the object:
 
  'opensafImm=opensafImm,safApp=safImmService'
 
-
+Integrate IMM service with CLM (5.2)
+===
+https://sourceforge.net/p/opensaf/tickets/1640/
+
+with this enhancement IMM is integrated with CLM.
+
+The IMM agent has to register with A.02.18 to integrate with CLM and receive 
+CLM memebership information of the node. 
+
+The IMMND registers with CLMS and receives notification about the node leaves 
+and joins the CLM membership. The CLM membership information will be sent to 
+IMM agents which registers with A.02.18.
+
+IMMD is not yet integrated, as the IMMND has to services to clients with 
lesser versions.
+IMMND has to be UP even if the CLM node is down. The IMMD integration has to 
be done along 
+with Enhanced cluster management(#439).
+
+In case of CLM node lock, and HEADLESS is triggered after CLM node lock, then 
CLM locked 
+node is nullified. The node is considered as HEADLESS and all other agent 
functions 
+supported in HEADLESS are supported.
 
 
 DEPENDENCIES

--
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 3 of 3] imm: immnd changes for integrating IMM with CLMS [#1640] v3

2017-02-27 Thread reddy . neelakanta
 src/imm/Makefile.am   |5 +-
 src/imm/immnd/ImmModel.cc |   10 +-
 src/imm/immnd/ImmModel.h  |1 +
 src/imm/immnd/immnd_cb.h  |   17 +++
 src/imm/immnd/immnd_clm.c |  198 ++
 src/imm/immnd/immnd_db.c  |  125 ++
 src/imm/immnd/immnd_evt.c |   31 +-
 src/imm/immnd/immnd_init.h|6 +
 src/imm/immnd/immnd_main.c|   47 +-
 src/imm/immnd/immnd_mds.c |   30 ++-
 src/nid/nodeinit.conf.payload |2 +-
 11 files changed, 456 insertions(+), 16 deletions(-)


diff --git a/src/imm/Makefile.am b/src/imm/Makefile.am
--- a/src/imm/Makefile.am
+++ b/src/imm/Makefile.am
@@ -2,6 +2,7 @@
 #
 # (C) Copyright 2016 The OpenSAF Foundation
 # Copyright Ericsson AB 2017 - All Rights Reserved.
+# Copyright (C) 2017, Oracle and/or its affiliates. All rights reserved.
 #
 # This program is distributed in the hope that it will be useful, but
 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -352,6 +353,7 @@ bin_osafimmnd_SOURCES = \
src/imm/immnd/immnd_main.c \
src/imm/immnd/immnd_mds.c \
src/imm/immnd/immnd_proc.c \
+   src/imm/immnd/immnd_clm.c \
src/imm/immnd/ImmAttrValue.cc \
src/imm/immnd/ImmSearchOp.cc \
src/imm/immnd/ImmModel.cc
@@ -359,7 +361,8 @@ bin_osafimmnd_SOURCES = \
 bin_osafimmnd_LDADD = \
lib/libimm_common.la \
lib/libSaAmf.la \
-   lib/libopensaf_core.la
+   lib/libopensaf_core.la \
+   lib/libSaClm.la
 
 bin_osafimmpbed_CXXFLAGS = $(AM_CXXFLAGS)
 
diff --git a/src/imm/immnd/ImmModel.cc b/src/imm/immnd/ImmModel.cc
--- a/src/imm/immnd/ImmModel.cc
+++ b/src/imm/immnd/ImmModel.cc
@@ -2,6 +2,7 @@
  *
  * (C) Copyright 2008 The OpenSAF Foundation
  * Copyright Ericsson AB 2009, 2017 - All Rights Reserved.
+ * Copyright (C) 2017, Oracle and/or its affiliates. All rights reserved.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -673,10 +674,10 @@ immModel_pbePrtoPurgeMutations(IMMND_CB 
 ImmModel::instance(>immModel)->pbePrtoPurgeMutations(nodeId, cv);
 *reqArrSize = (SaUint32T) cv.size();
 if(*reqArrSize) {
-*reqConnArr = (SaUint32T *) malloc((*reqArrSize)* 
sizeof(SaUint32T));
- for(cvi = cv.begin(); cvi!= cv.end();++cvi,++ix) {
- (*reqConnArr)[ix] = (*cvi);
- }
+*reqConnArr = (SaUint32T *) malloc((*reqArrSize)* sizeof(SaUint32T));
+for(cvi = cv.begin(); cvi!= cv.end();++cvi,++ix) {
+(*reqConnArr)[ix] = (*cvi);
+}
 }
 }
 
@@ -4056,7 +4057,6 @@ ImmModel::protocol51Allowed()
 return noStdFlags & OPENSAF_IMM_FLAG_PRT51_ALLOW;
 }
 
-
 bool
 ImmModel::protocol41Allowed()
 {
diff --git a/src/imm/immnd/ImmModel.h b/src/imm/immnd/ImmModel.h
--- a/src/imm/immnd/ImmModel.h
+++ b/src/imm/immnd/ImmModel.h
@@ -1,6 +1,7 @@
 /*  -*- OpenSAF  -*-
  *
  * (C) Copyright 2008 The OpenSAF Foundation
+ * Copyright (C) 2017, Oracle and/or its affiliates. All rights reserved.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
diff --git a/src/imm/immnd/immnd_cb.h b/src/imm/immnd/immnd_cb.h
--- a/src/imm/immnd/immnd_cb.h
+++ b/src/imm/immnd/immnd_cb.h
@@ -1,6 +1,7 @@
 /*  -*- OpenSAF  -*-
  *
  * (C) Copyright 2008 The OpenSAF Foundation
+ * Copyright (C) 2017, Oracle and/or its affiliates. All rights reserved.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -43,6 +44,11 @@ typedef struct immnd_om_search_node {
struct immnd_om_search_node *next;
 } IMMND_OM_SEARCH_NODE;
 
+typedef struct immnd_clm_node_list {
+   NCS_PATRICIA_NODE patnode;
+   NCS_NODE_ID node_id;
+} IMMND_CLM_NODE_LIST;
+
 typedef struct immnd_immom_client_node {
NCS_PATRICIA_NODE patnode;
SaImmHandleT imm_app_hdl;   /* index for the client tree */
@@ -181,6 +187,10 @@ typedef struct immnd_cb_tag {
SaSelectionObjectT amf_sel_obj; /* Selection Object for AMF events */
int nid_started;/* true if started by NID */
bool isNodeTypeController; // true node type is controller
+   SaSelectionObjectT clmSelectionObject; /* Selection object to wait for 
clms events*/
+NCS_SEL_OBJ clm_init_sel_obj; /* Selection object wait for  clms 
intialization*/
+bool isClmNodeJoined; /* True => If clm joined the cluster*/
+   NCS_PATRICIA_TREE immnd_clm_list;   /* IMMND_IMM_CLIENT_NODE - node 
*/
 } IMMND_CB;
 
 /* CB prototypes */
@@ -200,6 +210,13 @@ uint32_t immnd_client_node_tree_init(IMM
 void immnd_client_node_tree_cleanup(IMMND_CB *cb);
 void immnd_client_node_tree_destroy(IMMND_CB *cb);
 
+uint32_t 

[devel] [PATCH 2 of 3] imm: imm agent changes for integrating IMM with CLMS [#1640] v3

2017-02-27 Thread reddy . neelakanta
 src/imm/agent/imma_cb.h  |   11 +-
 src/imm/agent/imma_db.cc |   37 +++-
 src/imm/agent/imma_init.cc   |2 +
 src/imm/agent/imma_oi_api.cc |   96 ++-
 src/imm/agent/imma_om_api.cc |  211 +++---
 src/imm/agent/imma_proc.cc   |   31 ++
 src/imm/common/immsv_api.h   |2 +-
 src/imm/common/immsv_evt.c   |   15 +++
 src/imm/common/immsv_evt.h   |2 +
 9 files changed, 382 insertions(+), 25 deletions(-)


diff --git a/src/imm/agent/imma_cb.h b/src/imm/agent/imma_cb.h
--- a/src/imm/agent/imma_cb.h
+++ b/src/imm/agent/imma_cb.h
@@ -1,6 +1,7 @@
 /*  -*- OpenSAF  -*-
  *
  * (C) Copyright 2008 The OpenSAF Foundation
+ * Copyright (C) 2017, Oracle and/or its affiliates. All rights reserved.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -60,6 +61,7 @@ typedef struct imma_client_node {
  will set this to true for the 
  connection. A resurrect can remove 
it.*/
bool exposed;/* Exposed => stale is irreversible */
+   bool clmExposed; /* True ==> then handle is unavailable, due to clm 
leaving the cluster*/
bool selObjUsable; /* Active resurrect possible for this client */
bool isPbe;  /* True => This is the PBE-OI */
bool isImmA2b;   /* Version A.02.11 */
@@ -70,6 +72,7 @@ typedef struct imma_client_node {
bool isImmA2fCbk;/* Version A.02.15 callback*/
bool isImmA2x10; /* Version A.02.16 */
bool isImmA2x11; /* Version A.02.17 */
+   bool isImmA2x12; /* Version A.02.18 */
bool isApplier; /* True => This is an Applier-OI */
bool isAug; /* True => handle internal to OI augmented CCB */
bool isBusy;/* True => handle is locked by a thread until a 
function execution is done */
@@ -170,9 +173,10 @@ typedef struct imma_cb {
IMMA_CONTINUATION_RECORD *imma_continuations;
 
/* Sync up with IMMND ( MDS ) see imma_sync_with_immnd() in imma_init.c 
*/
-NCS_LOCK immnd_sync_lock;
-bool immnd_sync_awaited;
-NCS_SEL_OBJ  immnd_sync_sel; 
+   NCS_LOCK immnd_sync_lock;
+   bool immnd_sync_awaited;
+   NCS_SEL_OBJ  immnd_sync_sel; 
+   bool  clmMemberNode; /* True if the node is CLM Member node */
 } IMMA_CB;
 
 #define m_IMMSV_SET_SANAMET(name) \
@@ -248,6 +252,7 @@ void imma_process_stale_clients(IMMA_CB 
 void imma_free_errorStrings(SaStringT* errorStrings);
 SaStringT* imma_getErrorStrings(IMMSV_SAERR_INFO* errRsp);
 
+void imma_client_tree_mark_clmexposed(IMMA_CB *cb);
 
 /*30B Versioning Changes */
 #define IMMA_MDS_PVT_SUBPART_VERSION 1
diff --git a/src/imm/agent/imma_db.cc b/src/imm/agent/imma_db.cc
--- a/src/imm/agent/imma_db.cc
+++ b/src/imm/agent/imma_db.cc
@@ -1,6 +1,7 @@
 /*  -*- OpenSAF  -*-
  *
  * (C) Copyright 2008 The OpenSAF Foundation
+ * Copyright (C) 2017, Oracle and/or its affiliates. All rights reserved.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -120,6 +121,37 @@ uint32_t imma_client_node_delete(IMMA_CB
 }
 
 /
+Name  : imma_client_tree_mark_clmexposed
+Description   : This routine marks the clmexposed in IMMA client tree.
+Arguments : IMMA_CB *cb - IMMA Control Block.
+Return Values : None
+Notes : None
+**/
+void imma_client_tree_mark_clmexposed(IMMA_CB *cb)
+{
+   IMMA_CLIENT_NODE *clnode;
+   SaImmHandleT *temp_ptr = 0;
+   SaImmHandleT temp_hdl = 0;
+   TRACE_ENTER();
+
+   /* scan the entire handle and mark clmexposed in each record */
+   while ((clnode = (IMMA_CLIENT_NODE *)
+   ncs_patricia_tree_getnext(>client_tree, 
(uint8_t *)temp_ptr))) {
+   /* mark the client info as clmexposed*/
+   if (clnode->isImmA2x12 && !cb->clmMemberNode){
+   clnode->clmExposed = true;
+   TRACE(" Marking clinet %llx as clmExposed", 
clnode->handle);
+   }
+   temp_hdl = clnode->handle;
+   temp_ptr = _hdl;
+   }
+
+   TRACE_LEAVE();
+   return;
+}
+
+
+/
   Name  : imma_client_tree_destroy
   Description   : This routine destroys the IMMA client tree.
   Arguments : IMMA_CB *cb - IMMA Control Block.
@@ -681,7 +713,10 @@ void imma_mark_clients_stale(IMMA_CB *cb
if(mark_exposed) {
clnode->exposed = true;
LOG_WA("marking handle as 

[devel] [PATCH 3 of 3] imm: immnd changes for integrating IMM with CLMS [#1640] v2

2017-02-20 Thread reddy . neelakanta
 src/imm/Makefile.am   |5 +-
 src/imm/immnd/ImmModel.cc |   44 +++-
 src/imm/immnd/ImmModel.h  |2 +
 src/imm/immnd/immnd_cb.h  |   18 +++
 src/imm/immnd/immnd_clm.c |  200 ++
 src/imm/immnd/immnd_db.c  |  125 ++
 src/imm/immnd/immnd_evt.c |   31 +-
 src/imm/immnd/immnd_init.h|7 +
 src/imm/immnd/immnd_main.c|   42 -
 src/imm/immnd/immnd_mds.c |   30 ++-
 src/nid/nodeinit.conf.payload |2 +-
 11 files changed, 489 insertions(+), 17 deletions(-)


diff --git a/src/imm/Makefile.am b/src/imm/Makefile.am
--- a/src/imm/Makefile.am
+++ b/src/imm/Makefile.am
@@ -2,6 +2,7 @@
 #
 # (C) Copyright 2016 The OpenSAF Foundation
 # Copyright Ericsson AB 2017 - All Rights Reserved.
+# Copyright (C) 2017, Oracle and/or its affiliates. All rights reserved.
 #
 # This program is distributed in the hope that it will be useful, but
 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -352,6 +353,7 @@ bin_osafimmnd_SOURCES = \
src/imm/immnd/immnd_main.c \
src/imm/immnd/immnd_mds.c \
src/imm/immnd/immnd_proc.c \
+   src/imm/immnd/immnd_clm.c \
src/imm/immnd/ImmAttrValue.cc \
src/imm/immnd/ImmSearchOp.cc \
src/imm/immnd/ImmModel.cc
@@ -359,7 +361,8 @@ bin_osafimmnd_SOURCES = \
 bin_osafimmnd_LDADD = \
lib/libimm_common.la \
lib/libSaAmf.la \
-   lib/libopensaf_core.la
+   lib/libopensaf_core.la \
+   lib/libSaClm.la
 
 bin_osafimmpbed_CXXFLAGS = $(AM_CXXFLAGS)
 
diff --git a/src/imm/immnd/ImmModel.cc b/src/imm/immnd/ImmModel.cc
--- a/src/imm/immnd/ImmModel.cc
+++ b/src/imm/immnd/ImmModel.cc
@@ -2,6 +2,7 @@
  *
  * (C) Copyright 2008 The OpenSAF Foundation
  * Copyright Ericsson AB 2009, 2017 - All Rights Reserved.
+ * Copyright (C) 2017, Oracle and/or its affiliates. All rights reserved.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -671,12 +672,12 @@ immModel_pbePrtoPurgeMutations(IMMND_CB 
 ConnVector::iterator cvi;
 unsigned int ix = 0;
 ImmModel::instance(>immModel)->pbePrtoPurgeMutations(nodeId, cv);
-*reqArrSize = (SaUint32T) cv.size();
-if(*reqArrSize) {
-*reqConnArr = (SaUint32T *) malloc((*reqArrSize)* 
sizeof(SaUint32T));
- for(cvi = cv.begin(); cvi!= cv.end();++cvi,++ix) {
- (*reqConnArr)[ix] = (*cvi);
- }
+if(reqArrSize && reqConnArr && cv.size()){
+*reqArrSize = (SaUint32T) cv.size();
+*reqConnArr = (SaUint32T *) malloc((*reqArrSize)* sizeof(SaUint32T));
+for(cvi = cv.begin(); cvi!= cv.end();++cvi,++ix) {
+(*reqConnArr)[ix] = (*cvi);
+}
 }
 }
 
@@ -1162,6 +1163,12 @@ immModel_protocol51Allowed(IMMND_CB *cb)
 return ImmModel::instance(>immModel)->protocol51Allowed();
 }
 
+bool
+immModel_protocol52Allowed(IMMND_CB *cb)
+{
+return ImmModel::instance(>immModel)->protocol52Allowed();
+}
+
 OsafImmAccessControlModeT
 immModel_accessControlMode(IMMND_CB *cb)
 {
@@ -4056,6 +4063,30 @@ ImmModel::protocol51Allowed()
 return noStdFlags & OPENSAF_IMM_FLAG_PRT51_ALLOW;
 }
 
+bool
+ImmModel::protocol52Allowed()
+{
+//TRACE_ENTER();
+/* Assume that all nodes are running the same version when loading
+if (sImmNodeState == IMM_NODE_LOADING) {
+return true;
+}*/
+ObjectMap::iterator oi = sObjectMap.find(immObjectDn);
+if(oi == sObjectMap.end()) {
+return false;
+}
+
+ObjectInfo* immObject =  oi->second;
+ImmAttrValueMap::iterator avi =
+   immObject->mAttrValueMap.find(immAttrNostFlags);
+osafassert(avi != immObject->mAttrValueMap.end());
+osafassert(!(avi->second->isMultiValued()));
+ImmAttrValue* valuep = avi->second;
+unsigned int noStdFlags = valuep->getValue_int();
+
+//TRACE_LEAVE();
+return noStdFlags & OPENSAF_IMM_FLAG_PRT52_ALLOW;
+}
 
 bool
 ImmModel::protocol41Allowed()
@@ -5077,6 +5108,7 @@ ImmModel::adminOwnerDelete(SaUint32T own
 
 noStdFlags |= OPENSAF_IMM_FLAG_PRT51_ALLOW;
 }
+noStdFlags |= OPENSAF_IMM_FLAG_PRT52_ALLOW;
 valuep->setValue_int(noStdFlags);
 LOG_NO("%s changed to: 0x%x", immAttrNostFlags.c_str(), 
noStdFlags);
 /* END Temporary code. */
diff --git a/src/imm/immnd/ImmModel.h b/src/imm/immnd/ImmModel.h
--- a/src/imm/immnd/ImmModel.h
+++ b/src/imm/immnd/ImmModel.h
@@ -1,6 +1,7 @@
 /*  -*- OpenSAF  -*-
  *
  * (C) Copyright 2008 The OpenSAF Foundation
+ * Copyright (C) 2017, Oracle and/or its affiliates. All rights reserved.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -117,6 +118,7 @@ public:
 bool   

[devel] [PATCH 2 of 3] imm: imm agent changes for integrating IMM with CLMS [#1640] v2

2017-02-20 Thread reddy . neelakanta
 src/imm/agent/imma_cb.h  |   11 +-
 src/imm/agent/imma_db.cc |   37 +++-
 src/imm/agent/imma_init.cc   |2 +
 src/imm/agent/imma_oi_api.cc |   96 ++-
 src/imm/agent/imma_om_api.cc |  211 +++---
 src/imm/agent/imma_proc.cc   |   31 ++
 src/imm/common/immsv_api.h   |3 +-
 src/imm/common/immsv_evt.c   |   15 +++
 src/imm/common/immsv_evt.h   |2 +
 9 files changed, 383 insertions(+), 25 deletions(-)


diff --git a/src/imm/agent/imma_cb.h b/src/imm/agent/imma_cb.h
--- a/src/imm/agent/imma_cb.h
+++ b/src/imm/agent/imma_cb.h
@@ -1,6 +1,7 @@
 /*  -*- OpenSAF  -*-
  *
  * (C) Copyright 2008 The OpenSAF Foundation
+ * Copyright (C) 2017, Oracle and/or its affiliates. All rights reserved.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -60,6 +61,7 @@ typedef struct imma_client_node {
  will set this to true for the 
  connection. A resurrect can remove 
it.*/
bool exposed;/* Exposed => stale is irreversible */
+   bool clmExposed; /* True ==> then handle is unavailable, due to clm 
leaving the cluster*/
bool selObjUsable; /* Active resurrect possible for this client */
bool isPbe;  /* True => This is the PBE-OI */
bool isImmA2b;   /* Version A.02.11 */
@@ -70,6 +72,7 @@ typedef struct imma_client_node {
bool isImmA2fCbk;/* Version A.02.15 callback*/
bool isImmA2x10; /* Version A.02.16 */
bool isImmA2x11; /* Version A.02.17 */
+   bool isImmA2x12; /* Version A.02.18 */
bool isApplier; /* True => This is an Applier-OI */
bool isAug; /* True => handle internal to OI augmented CCB */
bool isBusy;/* True => handle is locked by a thread until a 
function execution is done */
@@ -170,9 +173,10 @@ typedef struct imma_cb {
IMMA_CONTINUATION_RECORD *imma_continuations;
 
/* Sync up with IMMND ( MDS ) see imma_sync_with_immnd() in imma_init.c 
*/
-NCS_LOCK immnd_sync_lock;
-bool immnd_sync_awaited;
-NCS_SEL_OBJ  immnd_sync_sel; 
+   NCS_LOCK immnd_sync_lock;
+   bool immnd_sync_awaited;
+   NCS_SEL_OBJ  immnd_sync_sel; 
+   bool  clmMemberNode; /* True if the node is CLM Member node */
 } IMMA_CB;
 
 #define m_IMMSV_SET_SANAMET(name) \
@@ -248,6 +252,7 @@ void imma_process_stale_clients(IMMA_CB 
 void imma_free_errorStrings(SaStringT* errorStrings);
 SaStringT* imma_getErrorStrings(IMMSV_SAERR_INFO* errRsp);
 
+void imma_client_tree_mark_clmexposed(IMMA_CB *cb);
 
 /*30B Versioning Changes */
 #define IMMA_MDS_PVT_SUBPART_VERSION 1
diff --git a/src/imm/agent/imma_db.cc b/src/imm/agent/imma_db.cc
--- a/src/imm/agent/imma_db.cc
+++ b/src/imm/agent/imma_db.cc
@@ -1,6 +1,7 @@
 /*  -*- OpenSAF  -*-
  *
  * (C) Copyright 2008 The OpenSAF Foundation
+ * Copyright (C) 2017, Oracle and/or its affiliates. All rights reserved.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -120,6 +121,37 @@ uint32_t imma_client_node_delete(IMMA_CB
 }
 
 /
+Name  : imma_client_tree_mark_clmexposed
+Description   : This routine marks the clmexposed in IMMA client tree.
+Arguments : IMMA_CB *cb - IMMA Control Block.
+Return Values : None
+Notes : None
+**/
+void imma_client_tree_mark_clmexposed(IMMA_CB *cb)
+{
+   IMMA_CLIENT_NODE *clnode;
+   SaImmHandleT *temp_ptr = 0;
+   SaImmHandleT temp_hdl = 0;
+   TRACE_ENTER();
+
+   /* scan the entire handle and mark clmexposed in each record */
+   while ((clnode = (IMMA_CLIENT_NODE *)
+   ncs_patricia_tree_getnext(>client_tree, 
(uint8_t *)temp_ptr))) {
+   /* mark the client info as clmexposed*/
+   if (clnode->isImmA2x12 && !cb->clmMemberNode){
+   clnode->clmExposed = true;
+   TRACE(" Marking clinet %llx as clmExposed", 
clnode->handle);
+   }
+   temp_hdl = clnode->handle;
+   temp_ptr = _hdl;
+   }
+
+   TRACE_LEAVE();
+   return;
+}
+
+
+/
   Name  : imma_client_tree_destroy
   Description   : This routine destroys the IMMA client tree.
   Arguments : IMMA_CB *cb - IMMA Control Block.
@@ -681,7 +713,10 @@ void imma_mark_clients_stale(IMMA_CB *cb
if(mark_exposed) {
clnode->exposed = true;
LOG_WA("marking handle as 

[devel] [PATCH 1 of 3] imm: README changes for integrating IMM with CLMS [#1640] v2

2017-02-20 Thread reddy . neelakanta
 src/imm/README |  44 +++-
 1 files changed, 43 insertions(+), 1 deletions(-)


diff --git a/src/imm/README b/src/imm/README
--- a/src/imm/README
+++ b/src/imm/README
@@ -2934,7 +2934,49 @@ Operation-id '1' invoked on the object:
 
  'opensafImm=opensafImm,safApp=safImmService'
 
-
+Integrate IMM service with CLM (5.2)
+===
+https://sourceforge.net/p/opensaf/tickets/1640/
+
+with this enhancement IMM is integrated with CLM.
+
+The IMM agent has to register with A.02.18 to integrate with CLM and receive 
+CLM memebership information of the node. 
+
+The IMMND registers with CLMS and receives notification about the node leaves 
+and joins the CLM membership. The CLM membership information will be sent to 
+IMM agents which registers with A.02.18.
+
+IMMD is not yet integrated, as the IMMND has to services to clients with 
lesser versions.
+IMMND has to be UP even if the CLM node is down. The IMMD integration has to 
be done along 
+with Enhanced cluster management(#439).
+
+In case of CLM node lock, and HEADLESS is triggered after CLM node lock, then 
CLM locked 
+node is nullified. The node is considered as HEADLESS and all other agent 
functions 
+supported in HEADLESS are supported.
+
+Notes on upgrading to OpenSAF 5.2
+
+OpenSAF5.2 makes the IMM integration with CLM service (#1640).
+During a rolling upgrade from an earlier OpenSAF release to the 5.2
+release there will be nodes executing the older release concurrently.
+Nodes executing the earlier release will not recognize the CLMS integration.
+
+Because of this upgrade issue, the CLMS integration added in OpenSAF 5.2 is
+not allowed unless a flag is toggled on in the opensafImmNostdFlags runtime
+attribute in the object:
+
+   opensafImm=opensafImm,safApp=safImmService.
+
+The following shell command must be used once all nodes are upgraded :
+
+immadm -o 1 -p opensafImmNostdFlags:SA_UINT32_T:512\
+   opensafImm=opensafImm,safApp=safImmService
+
+This will set bit 10 of the 'opensafImmNostdFlags' runtime attribute inside 
the immsv.
+Operation-id '1' invoked on the object:
+
+ 'opensafImm=opensafImm,safApp=safImmService'
 
 
 DEPENDENCIES

--
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 0 of 3] Review Request for Integrate IMM service with CLM [#1640] V2

2017-02-20 Thread reddy . neelakanta
Summary:  Integrate IMM service with CLM [#1640] V2
Review request for Trac Ticket(s): 1640
Peer Reviewer(s): Zoran, Hung
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 17c5dbee7223bec6224b4c794707991873ff587f
Author: Neelakanta Reddy 
Date:   Tue, 21 Feb 2017 11:27:05 +0530

imm: README changes for integrating IMM with CLMS [#1640] v2

changeset dcb83cc5f1e6f9e9962a3cf8f99e9d725f39d6dd
Author: Neelakanta Reddy 
Date:   Tue, 21 Feb 2017 11:27:19 +0530

imm: imm agent changes for integrating IMM with CLMS [#1640] v2

changeset 77282cbc92dedf8afc85da0a365bb83743dfbf89
Author: Neelakanta Reddy 
Date:   Tue, 21 Feb 2017 11:28:08 +0530

imm: immnd changes for integrating IMM with CLMS [#1640] v2


Complete diffstat:
--
 src/imm/Makefile.am   |5 +++-
 src/imm/README|   44 ++-
 src/imm/agent/imma_cb.h   |   11 ++--
 src/imm/agent/imma_db.cc  |   37 -
 src/imm/agent/imma_init.cc|2 +
 src/imm/agent/imma_oi_api.cc  |   96 
+---
 src/imm/agent/imma_om_api.cc  |  211 
+++
 src/imm/agent/imma_proc.cc|   31 
 src/imm/common/immsv_api.h|3 +-
 src/imm/common/immsv_evt.c|   15 +++
 src/imm/common/immsv_evt.h|2 +
 src/imm/immnd/ImmModel.cc |   44 ++
 src/imm/immnd/ImmModel.h  |2 +
 src/imm/immnd/immnd_cb.h  |   18 ++
 src/imm/immnd/immnd_clm.c |  200 
+++
 src/imm/immnd/immnd_db.c  |  125 
+++
 src/imm/immnd/immnd_evt.c |   31 ---
 src/imm/immnd/immnd_init.h|7 +
 src/imm/immnd/immnd_main.c|   42 +++--
 src/imm/immnd/immnd_mds.c |   30 +++-
 src/nid/nodeinit.conf.payload |2 +-
 21 files changed, 915 insertions(+), 43 deletions(-)


Testing Commands:
-
Test new IMM agent version A.02.18.
CLM membership status (when CLM is locked/unlocked) will be sent to agent, only 
when agent is registered with A.02.18.

old agent versions must work as it is.

check the upgrade path from 5.1 to default(5.2)

In case of CLM node lock, and HEADLESS is triggered after CLM node lock, then 
CLM locked node
is nullified. The node is considered as HEADLESS and all other agent functions 
supported in HEADLESS
are supported.

Testing, Expected Results:
--
when agent is connected with version A.02.18 CLM membership status will be 
reflected at agent
when agent is connected with older versions, no CLM status will be sent to 
agent.

Conditions of Submission:
-
Ack from Reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

[devel] [PATCH 2 of 3] imm: imm agent changes for integrating IMM with CLMS [#1640]

2017-02-20 Thread reddy . neelakanta
 src/imm/agent/imma_cb.h  |   11 +-
 src/imm/agent/imma_db.cc |   37 +++-
 src/imm/agent/imma_init.cc   |2 +
 src/imm/agent/imma_oi_api.cc |   96 ++-
 src/imm/agent/imma_om_api.cc |  211 +++---
 src/imm/agent/imma_proc.cc   |   31 ++
 src/imm/common/immsv_api.h   |3 +-
 src/imm/common/immsv_evt.c   |   15 +++
 src/imm/common/immsv_evt.h   |2 +
 9 files changed, 383 insertions(+), 25 deletions(-)


diff --git a/src/imm/agent/imma_cb.h b/src/imm/agent/imma_cb.h
--- a/src/imm/agent/imma_cb.h
+++ b/src/imm/agent/imma_cb.h
@@ -1,6 +1,7 @@
 /*  -*- OpenSAF  -*-
  *
  * (C) Copyright 2008 The OpenSAF Foundation
+ * Copyright (C) 2017, Oracle and/or its affiliates. All rights reserved.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -60,6 +61,7 @@ typedef struct imma_client_node {
  will set this to true for the 
  connection. A resurrect can remove 
it.*/
bool exposed;/* Exposed => stale is irreversible */
+   bool clmExposed; /* True ==> then handle is unavailable, due to clm 
leaving the cluster*/
bool selObjUsable; /* Active resurrect possible for this client */
bool isPbe;  /* True => This is the PBE-OI */
bool isImmA2b;   /* Version A.02.11 */
@@ -70,6 +72,7 @@ typedef struct imma_client_node {
bool isImmA2fCbk;/* Version A.02.15 callback*/
bool isImmA2x10; /* Version A.02.16 */
bool isImmA2x11; /* Version A.02.17 */
+   bool isImmA2x12; /* Version A.02.18 */
bool isApplier; /* True => This is an Applier-OI */
bool isAug; /* True => handle internal to OI augmented CCB */
bool isBusy;/* True => handle is locked by a thread until a 
function execution is done */
@@ -170,9 +173,10 @@ typedef struct imma_cb {
IMMA_CONTINUATION_RECORD *imma_continuations;
 
/* Sync up with IMMND ( MDS ) see imma_sync_with_immnd() in imma_init.c 
*/
-NCS_LOCK immnd_sync_lock;
-bool immnd_sync_awaited;
-NCS_SEL_OBJ  immnd_sync_sel; 
+   NCS_LOCK immnd_sync_lock;
+   bool immnd_sync_awaited;
+   NCS_SEL_OBJ  immnd_sync_sel; 
+   bool  clmMemberNode; /* True if the node is CLM Member node */
 } IMMA_CB;
 
 #define m_IMMSV_SET_SANAMET(name) \
@@ -248,6 +252,7 @@ void imma_process_stale_clients(IMMA_CB 
 void imma_free_errorStrings(SaStringT* errorStrings);
 SaStringT* imma_getErrorStrings(IMMSV_SAERR_INFO* errRsp);
 
+void imma_client_tree_mark_clmexposed(IMMA_CB *cb);
 
 /*30B Versioning Changes */
 #define IMMA_MDS_PVT_SUBPART_VERSION 1
diff --git a/src/imm/agent/imma_db.cc b/src/imm/agent/imma_db.cc
--- a/src/imm/agent/imma_db.cc
+++ b/src/imm/agent/imma_db.cc
@@ -1,6 +1,7 @@
 /*  -*- OpenSAF  -*-
  *
  * (C) Copyright 2008 The OpenSAF Foundation
+ * Copyright (C) 2017, Oracle and/or its affiliates. All rights reserved.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -120,6 +121,37 @@ uint32_t imma_client_node_delete(IMMA_CB
 }
 
 /
+Name  : imma_client_tree_mark_clmexposed
+Description   : This routine marks the clmexposed in IMMA client tree.
+Arguments : IMMA_CB *cb - IMMA Control Block.
+Return Values : None
+Notes : None
+**/
+void imma_client_tree_mark_clmexposed(IMMA_CB *cb)
+{
+   IMMA_CLIENT_NODE *clnode;
+   SaImmHandleT *temp_ptr = 0;
+   SaImmHandleT temp_hdl = 0;
+   TRACE_ENTER();
+
+   /* scan the entire handle and mark clmexposed in each record */
+   while ((clnode = (IMMA_CLIENT_NODE *)
+   ncs_patricia_tree_getnext(>client_tree, 
(uint8_t *)temp_ptr))) {
+   /* mark the client info as clmexposed*/
+   if (clnode->isImmA2x12 && !cb->clmMemberNode){
+   clnode->clmExposed = true;
+   TRACE(" Marking clinet %llx as clmExposed", 
clnode->handle);
+   }
+   temp_hdl = clnode->handle;
+   temp_ptr = _hdl;
+   }
+
+   TRACE_LEAVE();
+   return;
+}
+
+
+/
   Name  : imma_client_tree_destroy
   Description   : This routine destroys the IMMA client tree.
   Arguments : IMMA_CB *cb - IMMA Control Block.
@@ -681,7 +713,10 @@ void imma_mark_clients_stale(IMMA_CB *cb
if(mark_exposed) {
clnode->exposed = true;
LOG_WA("marking handle as 

[devel] [PATCH 3 of 3] imm: immnd changes for integrating IMM with CLMS [#1640]

2017-02-20 Thread reddy . neelakanta
 src/imm/Makefile.am   |5 +-
 src/imm/immnd/ImmModel.cc |   44 --
 src/imm/immnd/ImmModel.h  |2 +
 src/imm/immnd/immnd_cb.h  |   18 ++
 src/imm/immnd/immnd_db.c  |  125 ++
 src/imm/immnd/immnd_evt.c |   31 -
 src/imm/immnd/immnd_init.h|7 ++
 src/imm/immnd/immnd_main.c|   42 +-
 src/imm/immnd/immnd_mds.c |   30 +-
 src/nid/nodeinit.conf.payload |2 +-
 10 files changed, 289 insertions(+), 17 deletions(-)


diff --git a/src/imm/Makefile.am b/src/imm/Makefile.am
--- a/src/imm/Makefile.am
+++ b/src/imm/Makefile.am
@@ -2,6 +2,7 @@
 #
 # (C) Copyright 2016 The OpenSAF Foundation
 # Copyright Ericsson AB 2017 - All Rights Reserved.
+# Copyright (C) 2017, Oracle and/or its affiliates. All rights reserved.
 #
 # This program is distributed in the hope that it will be useful, but
 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -352,6 +353,7 @@ bin_osafimmnd_SOURCES = \
src/imm/immnd/immnd_main.c \
src/imm/immnd/immnd_mds.c \
src/imm/immnd/immnd_proc.c \
+   src/imm/immnd/immnd_clm.c \
src/imm/immnd/ImmAttrValue.cc \
src/imm/immnd/ImmSearchOp.cc \
src/imm/immnd/ImmModel.cc
@@ -359,7 +361,8 @@ bin_osafimmnd_SOURCES = \
 bin_osafimmnd_LDADD = \
lib/libimm_common.la \
lib/libSaAmf.la \
-   lib/libopensaf_core.la
+   lib/libopensaf_core.la \
+   lib/libSaClm.la
 
 bin_osafimmpbed_CXXFLAGS = $(AM_CXXFLAGS)
 
diff --git a/src/imm/immnd/ImmModel.cc b/src/imm/immnd/ImmModel.cc
--- a/src/imm/immnd/ImmModel.cc
+++ b/src/imm/immnd/ImmModel.cc
@@ -2,6 +2,7 @@
  *
  * (C) Copyright 2008 The OpenSAF Foundation
  * Copyright Ericsson AB 2009, 2017 - All Rights Reserved.
+ * Copyright (C) 2017, Oracle and/or its affiliates. All rights reserved.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -671,12 +672,12 @@ immModel_pbePrtoPurgeMutations(IMMND_CB 
 ConnVector::iterator cvi;
 unsigned int ix = 0;
 ImmModel::instance(>immModel)->pbePrtoPurgeMutations(nodeId, cv);
-*reqArrSize = (SaUint32T) cv.size();
-if(*reqArrSize) {
-*reqConnArr = (SaUint32T *) malloc((*reqArrSize)* 
sizeof(SaUint32T));
- for(cvi = cv.begin(); cvi!= cv.end();++cvi,++ix) {
- (*reqConnArr)[ix] = (*cvi);
- }
+if(reqArrSize && reqConnArr && cv.size()){
+*reqArrSize = (SaUint32T) cv.size();
+*reqConnArr = (SaUint32T *) malloc((*reqArrSize)* sizeof(SaUint32T));
+for(cvi = cv.begin(); cvi!= cv.end();++cvi,++ix) {
+(*reqConnArr)[ix] = (*cvi);
+}
 }
 }
 
@@ -1162,6 +1163,12 @@ immModel_protocol51Allowed(IMMND_CB *cb)
 return ImmModel::instance(>immModel)->protocol51Allowed();
 }
 
+bool
+immModel_protocol52Allowed(IMMND_CB *cb)
+{
+return ImmModel::instance(>immModel)->protocol52Allowed();
+}
+
 OsafImmAccessControlModeT
 immModel_accessControlMode(IMMND_CB *cb)
 {
@@ -4056,6 +4063,30 @@ ImmModel::protocol51Allowed()
 return noStdFlags & OPENSAF_IMM_FLAG_PRT51_ALLOW;
 }
 
+bool
+ImmModel::protocol52Allowed()
+{
+//TRACE_ENTER();
+/* Assume that all nodes are running the same version when loading
+if (sImmNodeState == IMM_NODE_LOADING) {
+return true;
+}*/
+ObjectMap::iterator oi = sObjectMap.find(immObjectDn);
+if(oi == sObjectMap.end()) {
+return false;
+}
+
+ObjectInfo* immObject =  oi->second;
+ImmAttrValueMap::iterator avi =
+   immObject->mAttrValueMap.find(immAttrNostFlags);
+osafassert(avi != immObject->mAttrValueMap.end());
+osafassert(!(avi->second->isMultiValued()));
+ImmAttrValue* valuep = avi->second;
+unsigned int noStdFlags = valuep->getValue_int();
+
+//TRACE_LEAVE();
+return noStdFlags & OPENSAF_IMM_FLAG_PRT52_ALLOW;
+}
 
 bool
 ImmModel::protocol41Allowed()
@@ -5077,6 +5108,7 @@ ImmModel::adminOwnerDelete(SaUint32T own
 
 noStdFlags |= OPENSAF_IMM_FLAG_PRT51_ALLOW;
 }
+noStdFlags |= OPENSAF_IMM_FLAG_PRT52_ALLOW;
 valuep->setValue_int(noStdFlags);
 LOG_NO("%s changed to: 0x%x", immAttrNostFlags.c_str(), 
noStdFlags);
 /* END Temporary code. */
diff --git a/src/imm/immnd/ImmModel.h b/src/imm/immnd/ImmModel.h
--- a/src/imm/immnd/ImmModel.h
+++ b/src/imm/immnd/ImmModel.h
@@ -1,6 +1,7 @@
 /*  -*- OpenSAF  -*-
  *
  * (C) Copyright 2008 The OpenSAF Foundation
+ * Copyright (C) 2017, Oracle and/or its affiliates. All rights reserved.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -117,6 +118,7 @@ public:
 boolprotocol47Allowed();
 bool 

[devel] [PATCH 1 of 3] imm: README changes for integrating IMM with CLMS [#1640]

2017-02-20 Thread reddy . neelakanta
 src/imm/README |  40 +++-
 1 files changed, 39 insertions(+), 1 deletions(-)


diff --git a/src/imm/README b/src/imm/README
--- a/src/imm/README
+++ b/src/imm/README
@@ -2934,7 +2934,45 @@ Operation-id '1' invoked on the object:
 
  'opensafImm=opensafImm,safApp=safImmService'
 
-
+Integrate IMM service with CLM (5.2)
+===
+https://sourceforge.net/p/opensaf/tickets/1640/
+
+with this enhancement IMM is integrated with CLM.
+
+The IMM agent has to register with A.02.18 to integrate with CLM and receive 
+CLM memebership information of the node. 
+
+The IMMND registers with CLMS and receives notification about the node leaves 
+and joins the CLM membership. The CLM membership information will be sent to 
+IMM agents which registers with A.02.18.
+
+IMMD is not yet integrated, as the IMMND has to services to clients with 
lesser versions.
+IMMND has to be UP even if the CLM node is down. The IMMD integration has to 
be done along 
+with Enhanced cluster management(#439).
+
+Notes on upgrading to OpenSAF 5.2
+
+OpenSAF5.2 makes the IMM integration with CLM service (#1640).
+During a rolling upgrade from an earlier OpenSAF release to the 5.2
+release there will be nodes executing the older release concurrently.
+Nodes executing the earlier release will not recognize the CLMS integration.
+
+Because of this upgrade issue, the CLMS integration added in OpenSAF 5.2 is
+not allowed unless a flag is toggled on in the opensafImmNostdFlags runtime
+attribute in the object:
+
+   opensafImm=opensafImm,safApp=safImmService.
+
+The following shell command must be used once all nodes are upgraded :
+
+immadm -o 1 -p opensafImmNostdFlags:SA_UINT32_T:512\
+   opensafImm=opensafImm,safApp=safImmService
+
+This will set bit 10 of the 'opensafImmNostdFlags' runtime attribute inside 
the immsv.
+Operation-id '1' invoked on the object:
+
+ 'opensafImm=opensafImm,safApp=safImmService'
 
 
 DEPENDENCIES

--
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 0 of 1] Review Request for smf: retry the ccb modify operation when the ccb is aborted with resource abort [#2277]

2017-01-30 Thread reddy . neelakanta
Summary: smf: retry the ccb modify operation when the ccb is aborted with 
resource abort [#2277] 
Review request for Trac Ticket(s): 2277
Peer Reviewer(s): Lennart, Rafael
Affected branch(es):default, 5.1.x, 5.0.x 
Development branch: 5.1.x


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 776935ce9bbc597aee266968c8b7a55f1e9a8782
Author: Neelakanta Reddy 
Date:   Mon, 30 Jan 2017 18:50:31 +0530

smf: retry the ccb modify operation when the ccb is aborted with 
resource
abort [#2277]

When the campaign is commited, while modifying 
saAmfSUMaintenanceCampaign
flags, if any of the IMMND restarts or new node joins the cluster, then 
the
non-commited ccbs will be aborted.

This is a rare case, when saAmfSUMaintenanceCampaign will fail due to 
IMMND
sync, and and the next campaign will fails with ER Failed to set 
maintenance
state in step=safSmfStep=0001


Complete diffstat:
--
 osaf/services/saf/smfsv/smfd/SmfImmOperation.cc|  21 ++---
 osaf/services/saf/smfsv/smfd/SmfUpgradeCampaign.cc |  16 ++--
 2 files changed, 32 insertions(+), 5 deletions(-)


Testing Commands:
-
when campaign is commited, do an IMMND restart 

Testing, Expected Results:
--
With this patch, saAmfSUMaintenanceCampaign flags will be cleared at the time 
of campaign commit

Conditions of Submission:
-
Ack from reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


--
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 of 1] smf: retry the ccb modify operation when the ccb is aborted with resource abort [#2277]

2017-01-30 Thread reddy . neelakanta
 osaf/services/saf/smfsv/smfd/SmfImmOperation.cc|  21 ++---
 osaf/services/saf/smfsv/smfd/SmfUpgradeCampaign.cc |  16 ++--
 2 files changed, 32 insertions(+), 5 deletions(-)


When the campaign is commited, while modifying saAmfSUMaintenanceCampaign  
flags, if any of the IMMND restarts or
new node joins the cluster, then the non-commited ccbs will be aborted.

This is a rare case, when saAmfSUMaintenanceCampaign will fail due to IMMND 
sync, and and the next campaign will fails with
ER Failed to set maintenance state in step=safSmfStep=0001

diff --git a/osaf/services/saf/smfsv/smfd/SmfImmOperation.cc 
b/osaf/services/saf/smfsv/smfd/SmfImmOperation.cc
--- a/osaf/services/saf/smfsv/smfd/SmfImmOperation.cc
+++ b/osaf/services/saf/smfsv/smfd/SmfImmOperation.cc
@@ -1033,11 +1033,26 @@ SmfImmModifyOperation::execute(SmfRollba
 //   objectName.length = (SaUint16T) objectLen;
 //   memcpy(objectName.value, object, objectLen);
 
+   const SaStringT * errStrings = NULL;
result = immutil_saImmOmCcbObjectModify_2(m_ccbHandle, , 
(const SaImmAttrModificationT_2 **)
- m_immAttrMods);
-   if (result != SA_AIS_OK) {
+   m_immAttrMods);
+   if (result != SA_AIS_OK && result == SA_AIS_ERR_FAILED_OPERATION) {
+   result = saImmOmCcbGetErrorStrings(m_ccbHandle, );
+   if (errStrings){
+   TRACE("Received error string is %s", errStrings[0]);
+   char * type = NULL;
+   type = strstr(errStrings[0], "IMM: Resource abort: ");
+   if(type != NULL) {
+   TRACE("SA_AIS_ERR_FAILED_OPERATION is modified 
to SA_AIS_ERR_TRY_AGAIN because of ccb resourse abort" );
+   result = SA_AIS_ERR_TRY_AGAIN;
+   TRACE_LEAVE();
+   return result;
+   }
+   }
+   } 
+   if (result != SA_AIS_OK){
LOG_NO("SmfImmModifyOperation::execute, saImmOmCcbObjectModify 
failed %s", saf_error(result));
-TRACE_LEAVE();
+   TRACE_LEAVE();
return result;
}
 
diff --git a/osaf/services/saf/smfsv/smfd/SmfUpgradeCampaign.cc 
b/osaf/services/saf/smfsv/smfd/SmfUpgradeCampaign.cc
--- a/osaf/services/saf/smfsv/smfd/SmfUpgradeCampaign.cc
+++ b/osaf/services/saf/smfsv/smfd/SmfUpgradeCampaign.cc
@@ -1063,6 +1063,7 @@ SmfUpgradeCampaign::resetMaintenanceStat
 std::list < std::string > objectList;
SmfImmUtils immUtil;
 (void)immUtil.getChildren("", objectList, SA_IMM_SUBTREE, "SaAmfSU");
+   SaAisErrorT rc = SA_AIS_OK;
 
 //Reset saAmfSUMaintenanceCampaign for all found SUs
 const std::string campDn = 
SmfCampaignThread::instance()->campaign()->getDn();
@@ -1093,9 +1094,20 @@ SmfUpgradeCampaign::resetMaintenanceStat
}
 }
 
-if (immUtil.doImmOperations(operations) != SA_AIS_OK) {
-LOG_NO("SmfUpgradeStep::setMaintenanceState(), fails to reset 
all saAmfSUMaintenanceCampaign attr");
+   const uint32_t MAX_NO_RETRIES = 2;
+   uint32_t retry_cnt = 0;
+   while (++retry_cnt <= MAX_NO_RETRIES) {
+   rc = immUtil.doImmOperations(operations); 
+   if (rc != SA_AIS_OK && rc == SA_AIS_ERR_TRY_AGAIN) {
+   /* TRY_AGAIN is returned only when ccb is aborted 
+  with Resource abort in error string. Resurce abort in
+  error string is checked presently for modify 
operation */
+   continue;
+   }
 }
+   if (rc != SA_AIS_OK){
+   LOG_NO("SmfUpgradeStep::setMaintenanceState(), fails to reset 
all saAmfSUMaintenanceCampaign attr");
+   }
 
 //Delete the created SmfImmModifyOperation instances
 std::list < SmfImmOperation * > ::iterator operIter;

--
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 0 of 1] Review Request for imm: return TRY_AGAIN when RepositoryInit mode is chaged to file, during the CCB PBE disable processing [#2229] V2

2016-12-29 Thread reddy . neelakanta
Summary: imm: return TRY_AGAIN when RepositoryInit mode is chaged to file, 
during the CCB PBE disable processing [#2229]
Review request for Trac Ticket(s): 2229
Peer Reviewer(s): Zoran, Hung
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 d6a42bbb10f23efae896d8fce15ce8292d2c
Author: Neelakanta Reddy 
Date:   Fri, 30 Dec 2016 12:28:11 +0530

imm: return TRY_AGAIN when RepositoryInit mode is chaged to file, 
during the
CCB PBE di^Cble processing [#2229] V2 TRY_AGAIN will be returned to the
ccbApply when the saImmRepositoryInit is changed from 
SA_IMM_KEEP_REPOSITORY
to SA_IMM_INIT_FROM_FILE. The duration of the TRY_AGAIN is from the 
time ccb
upcall is sent to PBE to receiving ACK from the PBE for the repository
change CCB


Complete diffstat:
--
 osaf/services/saf/immsv/immnd/ImmModel.cc |  29 -
 osaf/services/saf/immsv/immnd/ImmModel.hh |   6 --
 osaf/services/saf/immsv/immnd/immnd_cb.h  |   3 +++
 osaf/services/saf/immsv/immnd/immnd_evt.c |  23 +++
 4 files changed, 54 insertions(+), 7 deletions(-)


Testing Commands:
-
As explained in decription of ticket

Testing, Expected Results:
--
TRY_AGAIN will be returned during the CCB PBE disable processing.

Conditions of Submission:
-
Ack from Reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


--
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 of 1] imm: return TRY_AGAIN when RepositoryInit mode is chaged to file, during the CCB PBE di^Cble processing [#2229] V2

2016-12-29 Thread reddy . neelakanta
 osaf/services/saf/immsv/immnd/ImmModel.cc |  29 -
 osaf/services/saf/immsv/immnd/ImmModel.hh |   6 --
 osaf/services/saf/immsv/immnd/immnd_cb.h  |   3 +++
 osaf/services/saf/immsv/immnd/immnd_evt.c |  23 +++
 4 files changed, 54 insertions(+), 7 deletions(-)


TRY_AGAIN will be returned to the ccbApply when the saImmRepositoryInit is 
changed from
SA_IMM_KEEP_REPOSITORY to SA_IMM_INIT_FROM_FILE. The duration of the TRY_AGAIN 
is from
the time ccb upcall is sent to PBE to receiving ACK from the PBE for the 
repository change CCB

diff --git a/osaf/services/saf/immsv/immnd/ImmModel.cc 
b/osaf/services/saf/immsv/immnd/ImmModel.cc
--- a/osaf/services/saf/immsv/immnd/ImmModel.cc
+++ b/osaf/services/saf/immsv/immnd/ImmModel.cc
@@ -962,14 +962,19 @@ immModel_ccbObjectModify(IMMND_CB *cb,
 {
 std::string objectName;
 bool pbeFile = (cb->mPbeFile != NULL);
+bool changeRim = false;
 SaAisErrorT err = ImmModel::instance(>immModel)->
 ccbObjectModify(req, implConn, implNodeId, continuationId,
-pbeConn, pbeNodeId, objectName, hasLongDns, pbeFile);
+pbeConn, pbeNodeId, objectName, hasLongDns, pbeFile, );
 
 if(err == SA_AIS_OK) {
 osaf_extended_name_alloc(objectName.c_str(), objName);
 }
 
+if (err == SA_AIS_OK && changeRim){
+cb->mPbeDisableCcbId = req->ccbId;
+   TRACE("The mPbeDisableCcbId is set to ccbid:%u", cb->mPbeDisableCcbId);
+}
 return err;
 }
 
@@ -1361,6 +1366,12 @@ immModel_ccbAbort(IMMND_CB *cb,
 unsigned int ix=0;
 
 bool aborted = ImmModel::instance(>immModel)->ccbAbort(ccbId, cv, cl, 
nodeId, pbeNodeId);
+
+if ( aborted && (cb->mPbeDisableCcbId == ccbId)){
+TRACE("PbeDisableCcbId %u has been aborted", ccbId);
+cb->mPbeDisableCcbId = 0;
+cb->mPbeDisableCritical = false;
+}
 
 *arrSize = (SaUint32T) cv.size();
 if(*arrSize) {
@@ -1530,7 +1541,7 @@ immModel_ccbWaitForCompletedAck(IMMND_CB
 SaUint32T* pbeCtn)
 {
 return ImmModel::instance(>immModel)->
-ccbWaitForCompletedAck(ccbId, err, pbeConn, pbeNodeId, pbeId, pbeCtn);
+ccbWaitForCompletedAck(ccbId, err, pbeConn, pbeNodeId, pbeId, pbeCtn, 
cb->mPbeDisableCritical);
 }
 
 bool
@@ -8860,7 +8871,8 @@ ImmModel::ccbObjectModify(const ImmsvOmC
 unsigned int* pbeNodeIdPtr,
 std::string& objectName,
 bool* hasLongDns,
-bool pbeFile)
+bool pbeFile,
+bool * changeRim)
 {
 TRACE_ENTER();
 osafassert(hasLongDns);
@@ -9342,6 +9354,7 @@ ImmModel::ccbObjectModify(const ImmsvOmC
 }
 
 if (modifiedRim) {
+SaImmRepositoryInitModeT oldRim = getRepositoryInitMode();
 SaImmRepositoryInitModeT newRim = 
(SaImmRepositoryInitModeT) attrValue->getValue_int();
 if((newRim != SA_IMM_INIT_FROM_FILE) && (newRim != 
SA_IMM_KEEP_REPOSITORY)) {
 TRACE_7("ERR_BAD_OPERATION: attr '%s' in IMM object %s 
can not have value %u",
@@ -9352,6 +9365,11 @@ ImmModel::ccbObjectModify(const ImmsvOmC
 err = SA_AIS_ERR_BAD_OPERATION;
 break;
 }
+
+if((oldRim == SA_IMM_KEEP_REPOSITORY) && (newRim == 
SA_IMM_INIT_FROM_FILE)){
+   LOG_NO("Request for rim change is arrived in ccb%u", 
ccbId);
+* changeRim = true;
+}
 }
 
 
@@ -10680,7 +10698,8 @@ ImmModel::ccbWaitForDeleteImplAck(SaUint
 bool
 ImmModel::ccbWaitForCompletedAck(SaUint32T ccbId, SaAisErrorT* err,
  SaUint32T* pbeConnPtr, unsigned int* 
pbeNodeIdPtr,
- SaUint32T* pbeIdPtr, SaUint32T* pbeCtnPtr)
+ SaUint32T* pbeIdPtr, SaUint32T* pbeCtnPtr,
+ bool mPbeDisableCritical)
 {
 TRACE_ENTER();
 if(pbeNodeIdPtr) {
@@ -10768,7 +10787,7 @@ ImmModel::ccbWaitForCompletedAck(SaUint3
 if(((*err) == SA_AIS_OK) && pbeNodeIdPtr) {
 /* There should be a PBE */
 ImplementerInfo* pbeImpl = (ImplementerInfo *) getPbeOi(pbeConnPtr, 
pbeNodeIdPtr);
-if(pbeImpl) {
+if(pbeImpl && !mPbeDisableCritical) {
 /* There is in fact a PBE (up) */
 osafassert(ccb->mState == IMM_CCB_PREPARE);
 LOG_IN("GOING FROM IMM_CCB_PREPARE to IMM_CCB_CRITICAL Ccb:%u", 
ccbId);
diff --git a/osaf/services/saf/immsv/immnd/ImmModel.hh 
b/osaf/services/saf/immsv/immnd/ImmModel.hh
--- a/osaf/services/saf/immsv/immnd/ImmModel.hh
+++ b/osaf/services/saf/immsv/immnd/ImmModel.hh
@@ -254,7 +254,8 @@ public:
 unsigned int* pbeNodeId,
 std::string& objectName,
 bool* hasLongDns,
-bool pbeFile);
+   

[devel] [PATCH 1 of 1] imm: return TRY_AGAIN when RepositoryInit mode is chaged to file, during the CCB PBE disable processing [#2229]

2016-12-22 Thread reddy . neelakanta
 osaf/services/saf/immsv/immnd/ImmModel.cc |  22 --
 osaf/services/saf/immsv/immnd/ImmModel.hh |   3 ++-
 osaf/services/saf/immsv/immnd/immnd_cb.h  |   3 +++
 osaf/services/saf/immsv/immnd/immnd_evt.c |  24 
 4 files changed, 49 insertions(+), 3 deletions(-)


TRY_AGAIN will be returned to the ccbApply when the saImmRepositoryInit is 
changed from
SA_IMM_KEEP_REPOSITORY to SA_IMM_INIT_FROM_FILE. The duration of the TRY_AGAIN 
is from
the time ccb upcall is sent to PBE to receiving ACK from the PBE for the 
repository change CCB.

diff --git a/osaf/services/saf/immsv/immnd/ImmModel.cc 
b/osaf/services/saf/immsv/immnd/ImmModel.cc
--- a/osaf/services/saf/immsv/immnd/ImmModel.cc
+++ b/osaf/services/saf/immsv/immnd/ImmModel.cc
@@ -962,14 +962,19 @@ immModel_ccbObjectModify(IMMND_CB *cb,
 {
 std::string objectName;
 bool pbeFile = (cb->mPbeFile != NULL);
+bool changeRim = false;
 SaAisErrorT err = ImmModel::instance(>immModel)->
 ccbObjectModify(req, implConn, implNodeId, continuationId,
-pbeConn, pbeNodeId, objectName, hasLongDns, pbeFile);
+pbeConn, pbeNodeId, objectName, hasLongDns, pbeFile, );
 
 if(err == SA_AIS_OK) {
 osaf_extended_name_alloc(objectName.c_str(), objName);
 }
 
+if (err == SA_AIS_OK && changeRim){
+cb->mPbeDisableCcbId = req->ccbId;
+   TRACE("The mPbeDisableCcbId is set to ccbid:%u", cb->mPbeDisableCcbId);
+}
 return err;
 }
 
@@ -1361,6 +1366,12 @@ immModel_ccbAbort(IMMND_CB *cb,
 unsigned int ix=0;
 
 bool aborted = ImmModel::instance(>immModel)->ccbAbort(ccbId, cv, cl, 
nodeId, pbeNodeId);
+
+if ( aborted && (cb->mPbeDisableCcbId == ccbId)){
+TRACE("PbeDisableCcbId %u has been aborted", ccbId);
+cb->mPbeDisableCcbId = 0;
+cb->mPbeDisableCritical = false;
+}
 
 *arrSize = (SaUint32T) cv.size();
 if(*arrSize) {
@@ -8860,7 +8871,8 @@ ImmModel::ccbObjectModify(const ImmsvOmC
 unsigned int* pbeNodeIdPtr,
 std::string& objectName,
 bool* hasLongDns,
-bool pbeFile)
+bool pbeFile,
+bool * changeRim)
 {
 TRACE_ENTER();
 osafassert(hasLongDns);
@@ -9342,6 +9354,7 @@ ImmModel::ccbObjectModify(const ImmsvOmC
 }
 
 if (modifiedRim) {
+SaImmRepositoryInitModeT oldRim = getRepositoryInitMode();
 SaImmRepositoryInitModeT newRim = 
(SaImmRepositoryInitModeT) attrValue->getValue_int();
 if((newRim != SA_IMM_INIT_FROM_FILE) && (newRim != 
SA_IMM_KEEP_REPOSITORY)) {
 TRACE_7("ERR_BAD_OPERATION: attr '%s' in IMM object %s 
can not have value %u",
@@ -9352,6 +9365,11 @@ ImmModel::ccbObjectModify(const ImmsvOmC
 err = SA_AIS_ERR_BAD_OPERATION;
 break;
 }
+
+if((oldRim == SA_IMM_KEEP_REPOSITORY) && (newRim == 
SA_IMM_INIT_FROM_FILE)){
+   LOG_NO("Request for rim change is arrived in ccb%u", 
ccbId);
+* changeRim = true;
+}
 }
 
 
diff --git a/osaf/services/saf/immsv/immnd/ImmModel.hh 
b/osaf/services/saf/immsv/immnd/ImmModel.hh
--- a/osaf/services/saf/immsv/immnd/ImmModel.hh
+++ b/osaf/services/saf/immsv/immnd/ImmModel.hh
@@ -254,7 +254,8 @@ public:
 unsigned int* pbeNodeId,
 std::string& objectName,
 bool* hasLongDns,
-bool pbeFile);
+bool pbeFile,
+bool* changeRim);
 
 SaAisErrorT ccbObjectDelete(
 const ImmsvOmCcbObjectDelete* req,
diff --git a/osaf/services/saf/immsv/immnd/immnd_cb.h 
b/osaf/services/saf/immsv/immnd/immnd_cb.h
--- a/osaf/services/saf/immsv/immnd/immnd_cb.h
+++ b/osaf/services/saf/immsv/immnd/immnd_cb.h
@@ -129,6 +129,9 @@ typedef struct immnd_cb_tag {
uint8_t mBlockPbeEnable;  //Current PBE has not completed shutdown yet.
uint8_t mPbeKills;//If != 0 then immnd has tried to kill Pbe.
uint8_t m2Pbe;//If!=0 => 2PBE, 2 => fetch PBE file info.
+   SaUint32T mPbeDisableCcbId; // CcbId, operation of the Disable PBE.
+   bool mPbeDisableCritical; //If true then PBE disable is sent to PBE for 
ACK.
+
bool mIsOtherScUp; //If set & this is an SC then other SC is up(2pbe).
   //False=> *allow* 1safe 2pbe. May err conservatively (true) 
bool mForceClean; //true => Force cleanTheHouse to run once *now*.
diff --git a/osaf/services/saf/immsv/immnd/immnd_evt.c 
b/osaf/services/saf/immsv/immnd/immnd_evt.c
--- a/osaf/services/saf/immsv/immnd/immnd_evt.c
+++ b/osaf/services/saf/immsv/immnd/immnd_evt.c
@@ -3323,6 +3323,11 @@ static SaAisErrorT 

[devel] [PATCH 0 of 1] Review Request for imm: return TRY_AGAIN when RepositoryInit mode is chaged to file, during the CCB PBE disable processing [#2229]

2016-12-22 Thread reddy . neelakanta
Summary:imm: return TRY_AGAIN when RepositoryInit mode is chaged to file, 
during the CCB PBE disable processing [#2229] 
Review request for Trac Ticket(s): 2229
Peer Reviewer(s): Zoran, Hung
Affected branch(es):5.2
Development branch: 5.2


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 77ba54f970f32adaaf724d978f86dc870fa446d8
Author: Neelakanta Reddy 
Date:   Thu, 22 Dec 2016 14:56:33 +0530

imm: return TRY_AGAIN when RepositoryInit mode is chaged to file, 
during the
CCB PBE disable processing [#2229] TRY_AGAIN will be returned to the
ccbApply when the saImmRepositoryInit is changed from 
SA_IMM_KEEP_REPOSITORY
to SA_IMM_INIT_FROM_FILE. The duration of the TRY_AGAIN is from the 
time ccb
upcall is sent to PBE to receiving ACK from the PBE for the repository
change CCB.


Complete diffstat:
--
 osaf/services/saf/immsv/immnd/ImmModel.cc |  22 --
 osaf/services/saf/immsv/immnd/ImmModel.hh |   3 ++-
 osaf/services/saf/immsv/immnd/immnd_cb.h  |   3 +++
 osaf/services/saf/immsv/immnd/immnd_evt.c |  24 
 4 files changed, 49 insertions(+), 3 deletions(-)


Testing Commands:
-
As explained in decription of ticket

Testing, Expected Results:
--
TRY_AGAIN will be returned during the CCB PBE disable processing.

Conditions of Submission:
-
Ack from Reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net

[devel] [PATCH 0 of 1] Review Request for imm: disable pbe should honor critical ccbs[#2229]

2016-12-14 Thread reddy . neelakanta
Summary:imm: disable pbe should honor critical ccbs[#2229]
Review request for Trac Ticket(s): 2229
Peer Reviewer(s): Zoran, Hung
Affected branch(es): 5.0.x, 5.1.x, default
Development branch: default


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):
-

changeset 746391e40adb8d58badb0f3b80c0ee08fcd23c5e
Author: Neelakanta Reddy 
Date:   Wed, 14 Dec 2016 15:11:13 +0530

imm: disable pbe should honor critical ccbs[#2229]


Complete diffstat:
--
 osaf/services/saf/immsv/immnd/immnd_cb.h   |   1 +
 osaf/services/saf/immsv/immnd/immnd_proc.c |  30 +++---
 2 files changed, 24 insertions(+), 7 deletions(-)


Testing Commands:
-
As explained in description of the ticket.

Testing, Expected Results:
--
IMMND nust be able to sync, after diabling PBE if critical ccbs are present

Conditions of Submission:
-
Ack from Reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


--
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 of 1] imm: disable pbe should honor critical ccbs[#2229]

2016-12-14 Thread reddy . neelakanta
 osaf/services/saf/immsv/immnd/immnd_cb.h   |   1 +
 osaf/services/saf/immsv/immnd/immnd_proc.c |  30 +++---
 2 files changed, 24 insertions(+), 7 deletions(-)


diff --git a/osaf/services/saf/immsv/immnd/immnd_cb.h 
b/osaf/services/saf/immsv/immnd/immnd_cb.h
--- a/osaf/services/saf/immsv/immnd/immnd_cb.h
+++ b/osaf/services/saf/immsv/immnd/immnd_cb.h
@@ -128,6 +128,7 @@ typedef struct immnd_cb_tag {
uint8_t mLostNodes;   //Detached & not syncreq => delay sync start
uint8_t mBlockPbeEnable;  //Current PBE has not completed shutdown yet.
uint8_t mPbeKills;//If != 0 then immnd has tried to kill Pbe.
+   uint8_t mPbeCritical;//if != 0 then pbe is disabled, but critical 
ccbs are still present.
uint8_t m2Pbe;//If!=0 => 2PBE, 2 => fetch PBE file info.
bool mIsOtherScUp; //If set & this is an SC then other SC is up(2pbe).
   //False=> *allow* 1safe 2pbe. May err conservatively (true) 
diff --git a/osaf/services/saf/immsv/immnd/immnd_proc.c 
b/osaf/services/saf/immsv/immnd/immnd_proc.c
--- a/osaf/services/saf/immsv/immnd/immnd_proc.c
+++ b/osaf/services/saf/immsv/immnd/immnd_proc.c
@@ -1631,6 +1631,7 @@ static int immnd_forkPbe(IMMND_CB *cb)
}
TRACE_5("Parent %s, successfully forked %s, pid:%d", base, dbFilePath, 
pid);
cb->mPbeKills = 0; /* Rest kill count when we just created a new PBE. */
+   cb->mPbeCritical = 0;
if(cb->mIsCoord && cb->mPbeVeteran) {
cb->mPbeVeteran = SA_FALSE;
/* If pbe crashes again before succeeding to attach as PBE 
implementer
@@ -2004,6 +2005,7 @@ uint32_t immnd_proc_server(uint32_t *tim
}
cb->pbePid = 0;
cb->mPbeKills = 0;
+   cb->mPbeCritical = 0;
if(!immModel_pbeIsInSync(cb, false)) {
TRACE_5("Sync-server/coord 
invoking "

"immnd_pbePrtoPurgeMutations");
@@ -2112,6 +2114,7 @@ uint32_t immnd_proc_server(uint32_t *tim
}
cb->pbePid = 0;
cb->mPbeKills = 0;
+   cb->mPbeCritical = 0;
osafassert(coord);
if(!immModel_pbeIsInSync(cb, false)) {
TRACE_5("Server-ready/coord invoking "
@@ -2211,13 +2214,26 @@ uint32_t immnd_proc_server(uint32_t *tim
} else { /* Pbe is running. */
osafassert(cb->pbePid > 0);
if (cb->mRim == SA_IMM_INIT_FROM_FILE 
|| cb->mBlockPbeEnable) {
-   /* Pbe should NOT run.*/
-   if((cb->mPbeKills++)==0) { /* 
Send SIGTERM only once.*/
-   LOG_NO("STOPPING PBE 
process.");
-   kill(cb->pbePid, 
SIGTERM);
-   } else if(cb->mPbeKills > 20) {
-   LOG_WA("PBE process 
appears hung, sending SIGKILL");
-   kill(cb->pbePid, 
SIGKILL);
+   /* If the PBE is terminated 
without checking critical CCBs, then 
+   the PBE is not turned on, then 
new/restared IMMND can not be synced.
+   In the case of Upgrade the 
campaign will fail. Max of 20 seconds 
+   will be waited, for critical 
ccbs to send Ack, After that the PBE will be 
+   terminated. This check is 
required for 1PBE. */ 
+   if(immModel_pbeIsInSync(cb, 
true)|| (cb->mPbeCritical > 20)|| cb->m2Pbe ){
+   if(cb->mPbeCritical)
+   
cb->mPbeCritical = 0;
+   /* Pbe should NOT run.*/
+   
if((cb->mPbeKills++)==0) { /* Send SIGTERM only once.*/
+   
LOG_NO("STOPPING PBE process.");
+   
kill(cb->pbePid, SIGTERM);
+   } else if(cb->mPbeKills 
> 20) {
+   LOG_WA("PBE 
process appears hung, 

[devel] [PATCH 1 of 1] imm:allow augumentCcbInit with ROF as false in completed callback[#1956] V4

2016-12-06 Thread reddy . neelakanta
 osaf/libs/agents/saf/imma/imma_cb.h |5 +
 osaf/libs/agents/saf/imma/imma_db.c |   41 +
 osaf/libs/agents/saf/imma/imma_oi_api.c |  102 ++-
 osaf/libs/agents/saf/imma/imma_om_api.c |   11 +-
 osaf/libs/agents/saf/imma/imma_proc.c   |  134 ++-
 5 files changed, 172 insertions(+), 121 deletions(-)


diff --git a/osaf/libs/agents/saf/imma/imma_cb.h 
b/osaf/libs/agents/saf/imma/imma_cb.h
--- a/osaf/libs/agents/saf/imma/imma_cb.h
+++ b/osaf/libs/agents/saf/imma/imma_cb.h
@@ -36,6 +36,10 @@ struct imma_oi_ccb_record {
struct imma_callback_info* ccbCallback;
SaImmHandleT privateAugOmHandle; 
SaImmAdminOwnerHandleT privateAoHandle;
+   SaStringT object;/* The  Object string from the modify/delete ccb 
operation. The object is used to obtain
+   adminOwner when saImmOiAugmentCcbInitialize is called 
in completed-callback*/
+   SaStringT adminOwner; /* adminowner of the ccb id, assigned at 
ccb-create-callback. The adminOwner used in 
+saImmOiAugmentCcbInitialize is called in 
completed-callback*/
 };
 
 typedef struct imma_client_node {
@@ -197,6 +201,7 @@ int imma_oi_ccb_record_set_critical(IMMA
 int imma_oi_ccb_record_terminate(IMMA_CLIENT_NODE *cl_node, SaImmOiCcbIdT 
ccbId);
 int imma_oi_ccb_record_abort(IMMA_CLIENT_NODE *cl_node, SaImmOiCcbIdT ccbId);
 int imma_oi_ccb_record_exists(IMMA_CLIENT_NODE *cl_node, SaImmOiCcbIdT ccbId);
+struct imma_oi_ccb_record * imma_oi_ccb_record_find(IMMA_CLIENT_NODE *cl_node, 
SaImmOiCcbIdT ccbId);
 int imma_oi_ccb_record_set_error(IMMA_CLIENT_NODE *cl_node, SaImmOiCcbIdT 
ccbId, const SaStringT errorString);
 SaStringT imma_oi_ccb_record_get_error(IMMA_CLIENT_NODE *cl_node, 
SaImmOiCcbIdT ccbId);
 void imma_oi_ccb_allow_error_string(IMMA_CLIENT_NODE *cl_node, SaImmOiCcbIdT 
ccbId);
diff --git a/osaf/libs/agents/saf/imma/imma_db.c 
b/osaf/libs/agents/saf/imma/imma_db.c
--- a/osaf/libs/agents/saf/imma/imma_db.c
+++ b/osaf/libs/agents/saf/imma/imma_db.c
@@ -24,6 +24,8 @@
 */
 
 #include "imma.h"
+#include "osaf_extended_name.h"
+
 /
   Name  : imma_client_tree_init
   Description   : This routine is used to initialize the client tree
@@ -273,6 +275,15 @@ int imma_oi_ccb_record_delete(IMMA_CLIEN
to_delete->mCcbErrorString = NULL;
}
 
+   if(to_delete->object){
+   free(to_delete->object);
+   to_delete->object = NULL;
+   }
+   if(to_delete->adminOwner){
+   free(to_delete->adminOwner);
+   to_delete->adminOwner = NULL;
+   }
+
free(to_delete);
TRACE_LEAVE();
return 1;
@@ -541,6 +552,9 @@ int imma_oi_ccb_record_note_callback(IMM
 */
 
int rs = 0;
+   const SaImmAttrNameT admoNameAttr = SA_IMM_ATTR_ADMIN_OWNER_NAME;
+   SaImmAttrValuesT_2 *attrVal = NULL;
+
struct imma_oi_ccb_record *tmp = imma_oi_ccb_record_find(cl_node, 
ccbId);
 
if(tmp && !(tmp->isAborted)) {
@@ -553,7 +567,34 @@ int imma_oi_ccb_record_note_callback(IMM
rs = 1;
}
}
+   if(callback){
+   if(callback->type == IMMA_CALLBACK_OI_CCB_CREATE && 
!(tmp->adminOwner)) {   
+   SaImmAttrValuesT_2 **attributes = NULL;
+   attributes = (SaImmAttrValuesT_2 **) 
callback->attrValsForCreateUc;
+   int i=0;
+   while((attrVal = attributes[i++]) != NULL) {
+   if(strcmp(admoNameAttr, attrVal->attrName)==0) {
+   TRACE("Found %s attribute in object 
create upcall", admoNameAttr);
+   break;
+   }
+   }
 
+   if(!attrVal || strcmp(attrVal->attrName, admoNameAttr) 
|| (attrVal->attrValuesNumber!=1) ||
+   (attrVal->attrValueType != 
SA_IMM_ATTR_SASTRINGT)) {
+   
LOG_ER("imma_oi_ccb_record_note_callback:Missmatch on attribute %s", 
admoNameAttr);
+   abort();
+   }
+   tmp->adminOwner = (SaStringT) 
malloc(strlen(*(SaConstStringT*) attrVal->attrValues[0])+1); 
+   strcpy(tmp->adminOwner, *(SaConstStringT*) 
attrVal->attrValues[0]);
+
+   } else if (((callback->type == IMMA_CALLBACK_OI_CCB_DELETE) || 
(callback->type == IMMA_CALLBACK_OI_CCB_MODIFY)) 
+   && !(tmp->object) && !(tmp->adminOwner)){
+   SaConstStringT tmpStr = 

[devel] [PATCH 0 of 1] Review Request for imm:allow augumentCcbInit with ROF as false in completed callback[#1956] V4

2016-12-06 Thread reddy . neelakanta
Summary:imm:allow augumentCcbInit with ROF as false in completed 
callback[#1956] V4 
Review request for Trac Ticket(s): 1956
Peer Reviewer(s): Hung, Zoran
Affected branch(es): 5.0.x, 5.1.x, 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 7a411d8aaa2a93c4649bb0cfa1f99916bb7e0f57
Author: Neelakanta Reddy 
Date:   Tue, 06 Dec 2016 16:38:00 +0530

imm:allow augumentCcbInit with ROF as false in completed 
callback[#1956] V4


Complete diffstat:
--
 osaf/libs/agents/saf/imma/imma_cb.h |5 +
 osaf/libs/agents/saf/imma/imma_db.c |   41 
+
 osaf/libs/agents/saf/imma/imma_oi_api.c |  102 
+-
 osaf/libs/agents/saf/imma/imma_om_api.c |   11 +--
 osaf/libs/agents/saf/imma/imma_proc.c   |  134 
--
 5 files changed, 172 insertions(+), 121 deletions(-)


Testing Commands:
-
call saImmOiAugmentCcbInitialize in completed callback.

Testing, Expected Results:
--
imm agent should not abort when saImmOiAugmentCcbInitialize is called in 
completed callback.

Conditions of Submission:
-
Ack from Reviewers

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


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net

[devel] [PATCH 1 of 1] imm:allow augumentCcbInit with ROF as false in completed callback[#1956] V3

2016-12-05 Thread reddy . neelakanta
 osaf/libs/agents/saf/imma/imma_cb.h |5 +
 osaf/libs/agents/saf/imma/imma_db.c |  107 
 osaf/libs/agents/saf/imma/imma_oi_api.c |  102 +-
 osaf/libs/agents/saf/imma/imma_om_api.c |   11 +-
 osaf/libs/agents/saf/imma/imma_proc.c   |   64 +-
 5 files changed, 168 insertions(+), 121 deletions(-)


diff --git a/osaf/libs/agents/saf/imma/imma_cb.h 
b/osaf/libs/agents/saf/imma/imma_cb.h
--- a/osaf/libs/agents/saf/imma/imma_cb.h
+++ b/osaf/libs/agents/saf/imma/imma_cb.h
@@ -36,6 +36,10 @@ struct imma_oi_ccb_record {
struct imma_callback_info* ccbCallback;
SaImmHandleT privateAugOmHandle; 
SaImmAdminOwnerHandleT privateAoHandle;
+   SaStringT object;/* The  Object string from the modify/delete ccb 
operation. The object is used to obtain
+   adminOwner when saImmOiAugmentCcbInitialize is called 
in completed-callback*/
+   SaStringT adminOwner; /* adminowner of the ccb id, assigned at 
ccb-create-callback. The adminOwner used in 
+saImmOiAugmentCcbInitialize is called in 
completed-callback*/
 };
 
 typedef struct imma_client_node {
@@ -197,6 +201,7 @@ int imma_oi_ccb_record_set_critical(IMMA
 int imma_oi_ccb_record_terminate(IMMA_CLIENT_NODE *cl_node, SaImmOiCcbIdT 
ccbId);
 int imma_oi_ccb_record_abort(IMMA_CLIENT_NODE *cl_node, SaImmOiCcbIdT ccbId);
 int imma_oi_ccb_record_exists(IMMA_CLIENT_NODE *cl_node, SaImmOiCcbIdT ccbId);
+struct imma_oi_ccb_record * imma_oi_ccb_record_find(IMMA_CLIENT_NODE *cl_node, 
SaImmOiCcbIdT ccbId);
 int imma_oi_ccb_record_set_error(IMMA_CLIENT_NODE *cl_node, SaImmOiCcbIdT 
ccbId, const SaStringT errorString);
 SaStringT imma_oi_ccb_record_get_error(IMMA_CLIENT_NODE *cl_node, 
SaImmOiCcbIdT ccbId);
 void imma_oi_ccb_allow_error_string(IMMA_CLIENT_NODE *cl_node, SaImmOiCcbIdT 
ccbId);
diff --git a/osaf/libs/agents/saf/imma/imma_db.c 
b/osaf/libs/agents/saf/imma/imma_db.c
--- a/osaf/libs/agents/saf/imma/imma_db.c
+++ b/osaf/libs/agents/saf/imma/imma_db.c
@@ -24,6 +24,8 @@
 */
 
 #include "imma.h"
+#include "osaf_extended_name.h"
+
 /
   Name  : imma_client_tree_init
   Description   : This routine is used to initialize the client tree
@@ -273,6 +275,15 @@ int imma_oi_ccb_record_delete(IMMA_CLIEN
to_delete->mCcbErrorString = NULL;
}
 
+   if(to_delete->object){
+   free(to_delete->object);
+   to_delete->object = NULL;
+   }
+   if(to_delete->adminOwner){
+   free(to_delete->adminOwner);
+   to_delete->adminOwner = NULL;
+   }
+
free(to_delete);
TRACE_LEAVE();
return 1;
@@ -541,6 +552,11 @@ int imma_oi_ccb_record_note_callback(IMM
 */
 
int rs = 0;
+   const SaImmAttrNameT admoNameAttr = SA_IMM_ATTR_ADMIN_OWNER_NAME;
+   SaImmAttrValuesT_2 **attr, **attributes = NULL;
+   SaImmAttrValuesT_2 *attrVal = NULL;
+   size_t attrDataSize = 0;
+
struct imma_oi_ccb_record *tmp = imma_oi_ccb_record_find(cl_node, 
ccbId);
 
if(tmp && !(tmp->isAborted)) {
@@ -553,7 +569,98 @@ int imma_oi_ccb_record_note_callback(IMM
rs = 1;
}
}
+   if(callback){
+   if(callback->type == IMMA_CALLBACK_OI_CCB_CREATE){
+   int noOfAttributes = 0;
 
+   /* NOTE: The code below is practically a copy of the 
code
+  in immOm searchNext, for serving the attrValues 
structure.
+  This code should be factored out into some common 
function.
+*/
+   IMMSV_ATTR_VALUES_LIST *p = callback->attrValues;
+   int i = 0;
+   while (p) {
+   ++noOfAttributes;
+   p = p->next;
+   }
+
+   p = callback->attrValues;
+
+
+   if(cl_node->isImmA2fCbk) {
+   if(noOfAttributes) {
+   p = p->next;  // Skip RDN. RDN is the 
first attribute
+   noOfAttributes--;
+   }
+   }
+
+   attrDataSize = sizeof(SaImmAttrValuesT_2 *) * 
(noOfAttributes + 1);
+   attr = calloc(1, attrDataSize); /*alloc-1 */
+   for (; i < noOfAttributes && p; i++, p = p->next) {
+   IMMSV_ATTR_VALUES *q = &(p->n);
+   attr[i] = calloc(1, 
sizeof(SaImmAttrValuesT_2));/*alloc-2 */
+  

[devel] [PATCH 0 of 1] Review Request for imm:allow augumentCcbInit with ROF as false in completed callback[#1956] V3

2016-12-05 Thread reddy . neelakanta
Summary: imm:allow augumentCcbInit with ROF as false in completed 
callback[#1956] V3 
Review request for Trac Ticket(s): 1956
Peer Reviewer(s): Zoran, Hung
Affected branch(es): 5.0.x, 5.1.x, default
Development branch: default


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):
-

changeset a4e4248b9a2690c8a089004ca73951657e404b0b
Author: Neelakanta Reddy 
Date:   Mon, 05 Dec 2016 16:04:35 +0530

imm:allow augumentCcbInit with ROF as false in completed 
callback[#1956] V3


Complete diffstat:
--
 osaf/libs/agents/saf/imma/imma_cb.h |5 +
 osaf/libs/agents/saf/imma/imma_db.c |  107 
+++
 osaf/libs/agents/saf/imma/imma_oi_api.c |  102 
+-
 osaf/libs/agents/saf/imma/imma_om_api.c |   11 +--
 osaf/libs/agents/saf/imma/imma_proc.c   |   64 
++--
 5 files changed, 168 insertions(+), 121 deletions(-)


Testing Commands:
-
call saImmOiAugmentCcbInitialize in completed callback.

Testing, Expected Results:
--
imm agent should not abort when saImmOiAugmentCcbInitialize is called in 
completed callback.

Conditions of Submission:
-
Ack from Reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


--
___
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 smf:Allow optimization at node level forAddRemove in mergeStepIntoSingle[#2214]

2016-12-02 Thread reddy . neelakanta
Summary: smf:Allow optimization at node level forAddRemove in 
mergeStepIntoSingle[#2214] 
Review request for Trac Ticket(s): 2214
Peer Reviewer(s): Rafael, Lennart, tai
Affected branch(es): 5.0.x, 5.1.x, 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 2becbe07a7f92d70f928e23dcd6b0a6576c8e22a
Author: Neelakanta Reddy 
Date:   Fri, 02 Dec 2016 16:16:33 +0530

smf:Allow optimization at node level forAddRemove in
mergeStepIntoSingle[#2214]


Complete diffstat:
--
 osaf/services/saf/smfsv/smfd/SmfUpgradeProcedure.cc |  40 
+++-
 1 files changed, 39 insertions(+), 1 deletions(-)


Testing Commands:
-
campaign must contain rolling and singlestep upgrade with AU/SU node level

Testing, Expected Results:
--
Campaign should not fail

Conditions of Submission:
-
Ack from Reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


--
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 of 1] smf: Avoid unconditional sleep when calling adminoperation[#2211] V1

2016-11-30 Thread reddy . neelakanta
 osaf/services/saf/smfsv/smfd/SmfUtils.cc |  26 +++---
 1 files changed, 15 insertions(+), 11 deletions(-)


diff --git a/osaf/services/saf/smfsv/smfd/SmfUtils.cc 
b/osaf/services/saf/smfsv/smfd/SmfUtils.cc
--- a/osaf/services/saf/smfsv/smfd/SmfUtils.cc
+++ b/osaf/services/saf/smfsv/smfd/SmfUtils.cc
@@ -583,19 +583,23 @@ SmfImmUtils::callAdminOperation(const st
}
 
/* Call the admin operation */
-   do {
-   TRACE("call immutil_saImmOmAdminOperationInvoke_2");
+   
+   TRACE("call immutil_saImmOmAdminOperationInvoke_2");
+   rc = immutil_saImmOmAdminOperationInvoke_2(m_ownerHandle, , 
0, i_operationId, i_params,
+   , i_timeout);
+   while ((rc == SA_AIS_OK) && (returnValue == SA_AIS_ERR_TRY_AGAIN) && 
(retry > 0) ){
+   sleep(2);
rc = immutil_saImmOmAdminOperationInvoke_2(m_ownerHandle, 
, 0, i_operationId, i_params,
-  , 
i_timeout);
-   if (retry <= 0) {
-   LOG_NO("Fail to invoke admin operation, too many 
SA_AIS_ERR_TRY_AGAIN, giving up. dn=[%s], opId=[%u]",
-  i_dn.c_str(), i_operationId);
-   rc = SA_AIS_ERR_TRY_AGAIN;
-   goto done;
-   }
-   sleep(2);
+   , i_timeout);
retry--;
-   } while ((rc == SA_AIS_OK) && (returnValue == SA_AIS_ERR_TRY_AGAIN));
+   } 
+   
+   if (retry <= 0) {
+   LOG_NO("Fail to invoke admin operation, too many 
SA_AIS_ERR_TRY_AGAIN, giving up. dn=[%s], opId=[%u]",
+   i_dn.c_str(), i_operationId);
+   rc = SA_AIS_ERR_TRY_AGAIN;
+   goto done;
+   }
 
if ( rc != SA_AIS_OK) {
LOG_NO("Fail to invoke admin operation, rc=%s. dn=[%s], 
opId=[%u]",saf_error(rc), i_dn.c_str(), i_operationId);

--
___
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 smf: Avoid unconditional sleep when calling adminoperation[#2211] V1

2016-11-30 Thread reddy . neelakanta
Summary:smf: Avoid unconditional sleep when calling adminoperation[#2211] V1 
Review request for Trac Ticket(s): 2211
Peer Reviewer(s): Rafael, Lennart, Tai
Affected branch(es): 5.0.x, 5.1.x, 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 e2caf94233ab292190c7efe6623a845d58f798d5
Author: Neelakanta Reddy 
Date:   Wed, 30 Nov 2016 14:13:54 +0530

smf: Avoid unconditional sleep when calling adminoperation[#2211] V1


Complete diffstat:
--
 osaf/services/saf/smfsv/smfd/SmfUtils.cc |  26 +++---
 1 files changed, 15 insertions(+), 11 deletions(-)


Testing Commands:
-
Campaign should involve admin operation

Testing, Expected Results:
--
with this patch unconditional sleep of 2 seconds should not happen

Conditions of Submission:
-
Ack from Reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


--
___
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 smf: Avoid unconditional sleep when calling adminoperation[#2211]

2016-11-29 Thread reddy . neelakanta
Summary: smf: Avoid uncditional sleep when calling adminoperation[#2211]
Review request for Trac Ticket(s): 2211
Peer Reviewer(s): Rafael, Lennart, Tai
Affected branch(es): 5.0.x, 5.1.x, default
Development branch: default


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):
-

changeset 52dae367297705b032ac284246737c55bd13c045
Author: Neelakanta Reddy 
Date:   Wed, 30 Nov 2016 13:16:33 +0530

smf: Avoid unconditional sleep when calling adminoperation[#2211]


Complete diffstat:
--
 osaf/services/saf/smfsv/smfd/SmfUtils.cc |  26 +++---
 1 files changed, 15 insertions(+), 11 deletions(-)


Testing Commands:
-
Campaign should involve admin operation 

Testing, Expected Results:
--
with this patch unconditional sleep of 2 seconds should not happen

Conditions of Submission:
-
Ack from reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


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


[devel] [PATCH 1 of 1] imm:allow augumentCcbInit with ROF as false in completed callback[#1956] V2

2016-11-29 Thread reddy . neelakanta
 osaf/libs/agents/saf/imma/imma_cb.h |   5 +
 osaf/libs/agents/saf/imma/imma_db.c |  99 +
 osaf/libs/agents/saf/imma/imma_oi_api.c |  60 +++
 osaf/libs/agents/saf/imma/imma_proc.c   |  64 ++---
 4 files changed, 133 insertions(+), 95 deletions(-)


Two new variables objectName and adminOwnerName added to imma_oi_ccb_record. 
For CCB create operation adminOwnerName will be added.
For CCB delete/modify operation objectName will be added

diff --git a/osaf/libs/agents/saf/imma/imma_cb.h 
b/osaf/libs/agents/saf/imma/imma_cb.h
--- a/osaf/libs/agents/saf/imma/imma_cb.h
+++ b/osaf/libs/agents/saf/imma/imma_cb.h
@@ -36,6 +36,10 @@ struct imma_oi_ccb_record {
struct imma_callback_info* ccbCallback;
SaImmHandleT privateAugOmHandle; 
SaImmAdminOwnerHandleT privateAoHandle;
+   SaNameT objectName;/* The  Object name from the modif/delete ccb 
operationi. The objectName is used to obtain
+   adminOnerName when saImmOiAugmentCcbInitialize is 
called in completed-callback*/
+   SaNameT adminOwnerName; /* adminowner name of the ccb id, assigned at 
ccb-create-callback.The adminOwnerName is used 
+saImmOiAugmentCcbInitialize is called in 
completed-callback*/
 };
 
 typedef struct imma_client_node {
@@ -197,6 +201,7 @@ int imma_oi_ccb_record_set_critical(IMMA
 int imma_oi_ccb_record_terminate(IMMA_CLIENT_NODE *cl_node, SaImmOiCcbIdT 
ccbId);
 int imma_oi_ccb_record_abort(IMMA_CLIENT_NODE *cl_node, SaImmOiCcbIdT ccbId);
 int imma_oi_ccb_record_exists(IMMA_CLIENT_NODE *cl_node, SaImmOiCcbIdT ccbId);
+struct imma_oi_ccb_record * imma_oi_ccb_record_find(IMMA_CLIENT_NODE *cl_node, 
SaImmOiCcbIdT ccbId);
 int imma_oi_ccb_record_set_error(IMMA_CLIENT_NODE *cl_node, SaImmOiCcbIdT 
ccbId, const SaStringT errorString);
 SaStringT imma_oi_ccb_record_get_error(IMMA_CLIENT_NODE *cl_node, 
SaImmOiCcbIdT ccbId);
 void imma_oi_ccb_allow_error_string(IMMA_CLIENT_NODE *cl_node, SaImmOiCcbIdT 
ccbId);
diff --git a/osaf/libs/agents/saf/imma/imma_db.c 
b/osaf/libs/agents/saf/imma/imma_db.c
--- a/osaf/libs/agents/saf/imma/imma_db.c
+++ b/osaf/libs/agents/saf/imma/imma_db.c
@@ -24,6 +24,8 @@
 */
 
 #include "imma.h"
+#include "osaf_extended_name.h"
+
 /
   Name  : imma_client_tree_init
   Description   : This routine is used to initialize the client tree
@@ -273,6 +275,9 @@ int imma_oi_ccb_record_delete(IMMA_CLIEN
to_delete->mCcbErrorString = NULL;
}
 
+   osaf_extended_name_free(&(to_delete->objectName));
+   osaf_extended_name_free(&(to_delete->adminOwnerName));
+
free(to_delete);
TRACE_LEAVE();
return 1;
@@ -541,6 +546,11 @@ int imma_oi_ccb_record_note_callback(IMM
 */
 
int rs = 0;
+   const SaImmAttrNameT admoNameAttr = SA_IMM_ATTR_ADMIN_OWNER_NAME;
+   SaImmAttrValuesT_2 **attr, **attributes = NULL;
+   SaImmAttrValuesT_2 *attrVal = NULL;
+   size_t attrDataSize = 0;
+
struct imma_oi_ccb_record *tmp = imma_oi_ccb_record_find(cl_node, 
ccbId);
 
if(tmp && !(tmp->isAborted)) {
@@ -553,7 +563,96 @@ int imma_oi_ccb_record_note_callback(IMM
rs = 1;
}
}
+   if(callback){
 
+
+   int noOfAttributes = 0;
+
+   /* NOTE: The code below is practically a copy of the code
+  in immOm searchNext, for serving the attrValues structure.
+  This code should be factored out into some common function.
+*/
+   IMMSV_ATTR_VALUES_LIST *p = callback->attrValues;
+   int i = 0;
+   while (p) {
+   ++noOfAttributes;
+   p = p->next;
+   }
+
+   p = callback->attrValues;
+
+
+   if(cl_node->isImmA2fCbk) {
+   if(noOfAttributes) {
+   p = p->next;  // Skip RDN. RDN is the first 
attribute
+   noOfAttributes--;
+   }
+   }
+
+   attrDataSize = sizeof(SaImmAttrValuesT_2 *) * (noOfAttributes + 
1);
+   attr = calloc(1, attrDataSize); /*alloc-1 */
+   for (; i < noOfAttributes && p; i++, p = p->next) {
+   IMMSV_ATTR_VALUES *q = &(p->n);
+   attr[i] = calloc(1, sizeof(SaImmAttrValuesT_2));
/*alloc-2 */
+   attr[i]->attrName = malloc(q->attrName.size + 1);   
/*alloc-3 */
+   strncpy(attr[i]->attrName, (const char 
*)q->attrName.buf, q->attrName.size + 1);
+   attr[i]->attrName[q->attrName.size] = 0;
/*redundant. */
+ 

[devel] [PATCH 0 of 1] Review Request for imm:allow augumentCcbInit with ROF as false in completed callback[#1956] V2

2016-11-29 Thread reddy . neelakanta
Summary: imm:allow augumentCcbInit with ROF as false in completed 
callback[#1956] V2
Review request for Trac Ticket(s): 1956
Peer Reviewer(s): Hung, Zoran
Affected branch(es): 5.0.x, 5.1.x, default
Development branch: default


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):
-

changeset 18a3680050fd52194f627bb0444988ce0cac00b5
Author: Neelakanta Reddy 
Date:   Wed, 30 Nov 2016 11:05:08 +0530

imm:allow augumentCcbInit with ROF as false in completed 
callback[#1956] V2

Two new variables objectName and adminOwnerName added to 
imma_oi_ccb_record.
For CCB create operation adminOwnerName will be added. For CCB 
delete/modify
operation objectName will be added


Complete diffstat:
--
 osaf/libs/agents/saf/imma/imma_cb.h |   5 +
 osaf/libs/agents/saf/imma/imma_db.c |  99 
+++
 osaf/libs/agents/saf/imma/imma_oi_api.c |  60 
+++-
 osaf/libs/agents/saf/imma/imma_proc.c   |  64 
++--
 4 files changed, 133 insertions(+), 95 deletions(-)


Testing Commands:
-
AugumentInit in createcallback with ROF false

Testing, Expected Results:
--
AugumentInit in createcallback with ROF false must succeed.

Conditions of Submission:
-
Ack from Reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


--
___
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 imm:converted notice to trace at the time of loading when default_removed flag is set[#2195]

2016-11-22 Thread reddy . neelakanta
Summary:imm:converted notice to trace at the time of loading when 
default_removed flag is set[#2195] 
Review request for Trac Ticket(s): 2195
Peer Reviewer(s): Zoran, Hung
Affected branch(es): 5.0.x, 5.1.x, 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 b6c5583ce393b5f8960361c5310047a1aa57d794
Author: Neelakanta Reddy 
Date:   Tue, 22 Nov 2016 15:29:25 +0530

imm:converted notice to trace at the time of loading when 
default_removed
flag is set[#2195]


Complete diffstat:
--
 osaf/services/saf/immsv/immnd/ImmModel.cc |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Testing Commands:
-
Load the objects with SA_IMM_ATTR_DEFAULT_REMOVED flag.

Testing, Expected Results:
--
The logging information has been moved to trace

Conditions of Submission:
-
Ack from Reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


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


[devel] [PATCH 1 of 1] imm:allow augumentCcbInit with ROF as false in completed callback[#1956]

2016-11-18 Thread reddy . neelakanta
 osaf/libs/agents/saf/imma/imma_oi_api.c|  156 +---
 osaf/libs/common/immsv/immsv_evt.c |   49 ++--
 osaf/libs/common/immsv/include/immsv_evt.h |2 +
 osaf/services/saf/immsv/immnd/ImmModel.cc  |   39 +++
 osaf/services/saf/immsv/immnd/ImmModel.hh  |3 +
 osaf/services/saf/immsv/immnd/immnd_evt.c  |   65 
 osaf/services/saf/immsv/immnd/immnd_init.h |3 +
 7 files changed, 284 insertions(+), 33 deletions(-)


with saImmOmCcbObjectRead, completed callback is also allowed to call 
saImmOiAugmentCcbInitialize.
 When ROF is false the augumentInit will get new adminowner with same name as 
old adminowner name with ROF as true.

Since, object name is not set for completed callback, a new event from OI to 
IMMND is required to get adminownername from ccbID
The patch inroduces new event by sending ccbID and response of the event will 
be the adminname of the corresponding ccbId.

diff --git a/osaf/libs/agents/saf/imma/imma_oi_api.c 
b/osaf/libs/agents/saf/imma/imma_oi_api.c
--- a/osaf/libs/agents/saf/imma/imma_oi_api.c
+++ b/osaf/libs/agents/saf/imma/imma_oi_api.c
@@ -3617,6 +3617,97 @@ getAdmoName(SaImmHandleT privateOmHandle
 }
 
 /
+  Name  : immsv_oi_augment_ccb_get_admo_name 
+
+  Description   : The function gets adminoperation name from the CcbID.
+ For the saImmOiAugmentCcbInitialize when the ROF flag is false
+ for the original adminOperation name(#1956).
+
+  Arguments :  privateOmHandle - IMM OM handle
+   ccbId  -  The ccbId from the completed callback .
+   admoNameOut - The AdminOperation name of the ccbId
+  timeout - synchronous timeout
+
+  Return Values :  SA_AIS_OK
+   SA_AIS_ERR_BAD_HANDLE
+   
+**/
+
+SaAisErrorT immsv_oi_augment_ccb_get_admo_name(
+   SaImmHandleT privateOmHandle,
+  SaUint32T ccbId,
+   SaStringT  *admoNameOut,
+  SaTimeT timeout)
+
+{
+SaAisErrorT rc = SA_AIS_OK;
+   IMMA_CB *cb = _cb;
+   uint32_t proc_rc;
+   IMMSV_EVT evt;
+   IMMSV_EVT *out_evt = NULL;
+   SaStringT * admtmp;
+TRACE_ENTER();
+
+   memset(, 0, sizeof(IMMSV_EVT));
+evt.type = IMMSV_EVT_TYPE_IMMND;
+evt.info.immnd.type = IMMND_EVT_A2ND_OI_AUG_CCB_GET_ADMO;
+   evt.info.immnd.info.ccbId = ccbId;
+
+   proc_rc = imma_mds_msg_sync_send(cb->imma_mds_hdl, >immnd_mds_dest, 
, _evt, timeout);
+   switch(proc_rc) {
+case NCSCC_RC_SUCCESS:
+break;
+
+case NCSCC_RC_REQ_TIMOUT:
+rc = imma_proc_check_stale(cb, privateOmHandle, 
SA_AIS_ERR_TIMEOUT);
+goto mds_send_fail;
+
+default:
+rc = SA_AIS_ERR_LIBRARY;
+TRACE_4("ERR_LIBRARY: MDS returned unexpected error 
code %u", proc_rc);
+goto mds_send_fail;
+}
+
+   if(out_evt) {
+osafassert(out_evt->type == IMMSV_EVT_TYPE_IMMA);
+if (out_evt->info.imma.type == IMMA_EVT_ND2A_IMM_ERROR) {
+rc = out_evt->info.imma.info.errRsp.error;
+osafassert(rc && (rc != SA_AIS_OK));
+free(out_evt);  /*BUGFIX (leak) 090506 */
+out_evt = NULL;
+goto mds_send_fail;
+}
+
+osafassert(out_evt->info.imma.type == 
IMMND_EVT_A2ND_OI_AUG_CCB_GET_ADMO_RSP);
+   IMMSV_ATTR_VALUES_LIST *p;
+
+   osafassert(out_evt->info.imma.info.searchNextRsp);
+   p = out_evt->info.imma.info.searchNextRsp->attrValuesList;
+   IMMSV_ATTR_VALUES *q = &(p->n);
+   osafassert(!(strncmp(q->attrName.buf, 
"SaImmAttrAdminOwnerName", strlen("SaImmAttrAdminOwnerName";
+   osafassert(q->attrValuesNumber == 1);
+   admtmp = (SaStringT *) imma_copyAttrValue3(q->attrValueType, 
&(q->attrValue));
+   *admoNameOut = *admtmp; 
+   TRACE("The admin operation Name %s ", *admoNameOut); 
+
+   if(out_evt) {
+   if(out_evt->info.imma.info.searchNextRsp) {
+   
if(out_evt->info.imma.info.searchNextRsp->attrValuesList) {
+   
immsv_free_attrvalues_list(out_evt->info.imma.info.searchNextRsp->attrValuesList);
+   }
+   free(out_evt->info.imma.info.searchNextRsp);
+   out_evt->info.imma.info.searchNextRsp = NULL;
+   }
+   

[devel] [PATCH 0 of 1] Review Request for imm:allow augumentCcbInit with ROF as false in completed callback[#1956]

2016-11-18 Thread reddy . neelakanta
Summary:imm:allow augumentCcbInit with ROF as false in completed 
callback[#1956] 
Review request for Trac Ticket(s): 1956
Peer Reviewer(s): Zoran, Hung
Affected branch(es): 5.0.x,5.1.x,default
Development branch: default


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):
-

changeset c6ad76040dba1de447d7f8b5f8c45562a8c3ec15
Author: Neelakanta Reddy 
Date:   Fri, 18 Nov 2016 20:20:46 +0530

imm:allow augumentCcbInit with ROF as false in completed callback[#1956]

with saImmOmCcbObjectRead, completed callback is also allowed to call
saImmOiAugmentCcbInitialize. When ROF is false the augumentInit will 
get new
adminowner with same name as old adminowner name with ROF as true.

Since, object name is not set for completed callback, a new event from 
OI to
IMMND is required to get adminownername from ccbID The patch inroduces 
new
event by sending ccbID and response of the event will be the adminname 
of
the corresponding ccbId.


Complete diffstat:
--
 osaf/libs/agents/saf/imma/imma_oi_api.c|  156 
+++---
 osaf/libs/common/immsv/immsv_evt.c |   49 
+++
 osaf/libs/common/immsv/include/immsv_evt.h |2 +
 osaf/services/saf/immsv/immnd/ImmModel.cc  |   39 
++
 osaf/services/saf/immsv/immnd/ImmModel.hh  |3 ++
 osaf/services/saf/immsv/immnd/immnd_evt.c  |   65 

 osaf/services/saf/immsv/immnd/immnd_init.h |3 ++
 7 files changed, 284 insertions(+), 33 deletions(-)


Testing Commands:
-
call saImmOiAugmentCcbInitialize with ROF as false.

Testing, Expected Results:
--
call to saImmOiAugmentCcbInitialize must succeed 

Conditions of Submission:
-
Ack from reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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 

[devel] [PATCH 1 of 1] base: Using TRACE log priority when real-time scheduling policy is not supported [#1923]

2016-10-25 Thread reddy . neelakanta
 osaf/libs/core/leap/os_defs.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/osaf/libs/core/leap/os_defs.c b/osaf/libs/core/leap/os_defs.c
--- a/osaf/libs/core/leap/os_defs.c
+++ b/osaf/libs/core/leap/os_defs.c
@@ -224,7 +224,7 @@ unsigned int ncs_os_task(NCS_OS_TASK *ta
(void *(*)(void 
*))task->info.create.i_entry_point,
task->info.create.i_ep_arg);
if (rc == EPERM && policy != SCHED_OTHER) {
-   LOG_IN("pthread_create failed with EPERM, "
+   TRACE("pthread_create failed with EPERM, "
"falling back to SCHED_OTHER policy "
"for %s", task->info.create.i_name);
policy = SCHED_OTHER;

--
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive. 
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
___
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 base: Using TRACE log priority when creation of real-time scheduling policy is not supported [#1923]

2016-10-25 Thread reddy . neelakanta
Summary: base: Using TRACE log priority when real-time scheduling policy is not 
supported [#1923]
Review request for Trac Ticket(s):1923 
Peer Reviewer(s): Ramesh, Anders
Affected branch(es):5.0.x,5.1.x,default 
Development branch: default


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):
-

changeset f1759c2a6d0d503eb6690cf1352527ad7df9e342
Author: Neelakanta Reddy 
Date:   Tue, 25 Oct 2016 14:54:24 +0530

base: Using TRACE log priority when real-time scheduling policy is not
supported [#1923]


Complete diffstat:
--
 osaf/libs/core/leap/os_defs.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Testing Commands:
-
Run imm commands where system does not support real-time scheduling policy for 
threads


Testing, Expected Results:
--
No syslog message must be observed.

Conditions of Submission:
-
Ack from reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


--
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive. 
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


[devel] [PATCH 1 of 1] smf:read imm longdn attribute at campaigninit [#2119]

2016-10-21 Thread reddy . neelakanta
 osaf/services/saf/smfsv/smfd/SmfCampaignInit.cc |  17 +++--
 1 files changed, 15 insertions(+), 2 deletions(-)


diff --git a/osaf/services/saf/smfsv/smfd/SmfCampaignInit.cc 
b/osaf/services/saf/smfsv/smfd/SmfCampaignInit.cc
--- a/osaf/services/saf/smfsv/smfd/SmfCampaignInit.cc
+++ b/osaf/services/saf/smfsv/smfd/SmfCampaignInit.cc
@@ -225,11 +225,24 @@ SmfCampaignInit::execute()
 return false;
 }
 
+   TRACE("3. Read_IMM_long_DN_config_and_set_control_block()");
+   if (!immUtil.read_IMM_long_DN_config_and_set_control_block(smfd_cb)) {
+   LOG_ER("SmfCampaignInit: reading long DN config from IMM 
FAILED");
+   TRACE_LEAVE();
+   return false;
+   }
+
std::list < SmfUpgradeAction * >::iterator upActiter;
upActiter = m_campInitAction.begin();
while (upActiter != m_campInitAction.end()) {
-   SaAisErrorT rc = 
(*upActiter)->execute(SmfCampaignThread::instance()->getImmHandle(),
-   );
+   TRACE("4. %s: 
read_IMM_long_DN_config_and_set_control_block()",__FUNCTION__);
+   if 
(!immUtil.read_IMM_long_DN_config_and_set_control_block(smfd_cb)) {
+   LOG_ER("SmfCampaignInit: reading long DN config from 
IMM FAILED");
+   TRACE_LEAVE();
+   return false;
+   }
+   SaAisErrorT rc = 
(*upActiter)->execute(SmfCampaignThread::instance()->getImmHandle(),
+   );
if (rc != SA_AIS_OK) {
LOG_ER("SmfCampaignInit init action %d failed, rc=%s", 
(*upActiter)->getId(), saf_error(rc));
TRACE_LEAVE();

--
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 0 of 1] Review Request for smf:read imm longdn attribute at campaigninit [#2119]

2016-10-21 Thread reddy . neelakanta
Summary:smf:read imm longdn attribute at campaigninit [#2119] 
Review request for Trac Ticket(s): 2119
Peer Reviewer(s): Rafel, Lennart
Affected branch(es): 5.0.x, 5.1.x, default
Development branch: default


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):
-

changeset 531170ed9bfc285dae61cc9b50465b0a790a59c1
Author: Neelakanta Reddy 
Date:   Fri, 21 Oct 2016 16:55:04 +0530

smf:read imm longdn attribute at campaigninit [#2119]


Complete diffstat:
--
 osaf/services/saf/smfsv/smfd/SmfCampaignInit.cc |  17 +++--
 1 files changed, 15 insertions(+), 2 deletions(-)


Testing Commands:
-
As explained in decription of ticket

Testing, Expected Results:
--
with this patch the longdn campaign must be executed, without any error.

Conditions of Submission:
-
Ack from Reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


--
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 0 of 1] Review Request for smf: reading of IMM longdn attribute at the camapign admin operation [#2087]

2016-10-05 Thread reddy . neelakanta
Summary:smf: reading of IMM longdn attribute at the camapign admin operation 
[#2087] 
Review request for Trac Ticket(s): 2087
Peer Reviewer(s): Lenart, Rafel
Affected branch(es): 5.0.x, 5.1.x, default
Development branch: default


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):
-

changeset b167c499b5fbfa9160f94810bcc6e7611ba73648
Author: Neelakanta Reddy 
Date:   Wed, 05 Oct 2016 17:58:44 +0530

smf: reading of IMM longdn attribute at the camapign admin operation 
[#2087]
Reading of IMM longdn atribute is changed from camapaign init to oi 
admin
operation. with this each admin-operation of smf will check if londn 
flag is
update in smf


Complete diffstat:
--
 osaf/services/saf/smfsv/smfd/SmfCampaignInit.cc  |  14 +-
 osaf/services/saf/smfsv/smfd/smfd_campaign_oi.cc |  13 -
 2 files changed, 13 insertions(+), 14 deletions(-)


Testing Commands:
-
camapaign with long dn objects

Testing, Expected Results:
--
with this patch campaign should not fail.

Conditions of Submission:
-
Ack from Reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


--
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 of 1] smf: reading of IMM longdn attribute at the camapign admin operation [#2087]

2016-10-05 Thread reddy . neelakanta
 osaf/services/saf/smfsv/smfd/SmfCampaignInit.cc  |  14 +-
 osaf/services/saf/smfsv/smfd/smfd_campaign_oi.cc |  13 -
 2 files changed, 13 insertions(+), 14 deletions(-)


Reading of IMM longdn atribute is changed from camapaign init to oi admin 
operation.
with this each admin-operation of smf will check if londn flag is update in smf

diff --git a/osaf/services/saf/smfsv/smfd/SmfCampaignInit.cc 
b/osaf/services/saf/smfsv/smfd/SmfCampaignInit.cc
--- a/osaf/services/saf/smfsv/smfd/SmfCampaignInit.cc
+++ b/osaf/services/saf/smfsv/smfd/SmfCampaignInit.cc
@@ -225,22 +225,10 @@ SmfCampaignInit::execute()
 return false;
 }
 
-TRACE("1. Read_IMM_long_DN_config_and_set_control_block()");
-if (!immUtil.read_IMM_long_DN_config_and_set_control_block(smfd_cb)) {
-   LOG_ER("SmfCampaignInit: reading long DN config from IMM 
FAILED");
-   TRACE_LEAVE();
-   return false;
-}
std::list < SmfUpgradeAction * >::iterator upActiter;
upActiter = m_campInitAction.begin();
while (upActiter != m_campInitAction.end()) {
-TRACE("2. %s: 
read_IMM_long_DN_config_and_set_control_block()",__FUNCTION__);
-   if 
(!immUtil.read_IMM_long_DN_config_and_set_control_block(smfd_cb)) {
-   LOG_ER("SmfCampaignInit: reading long DN config from 
IMM FAILED");
-   TRACE_LEAVE();
-   return false;
-   }
-   SaAisErrorT rc = 
(*upActiter)->execute(SmfCampaignThread::instance()->getImmHandle(),
+   SaAisErrorT rc = 
(*upActiter)->execute(SmfCampaignThread::instance()->getImmHandle(),
);
if (rc != SA_AIS_OK) {
LOG_ER("SmfCampaignInit init action %d failed, rc=%s", 
(*upActiter)->getId(), saf_error(rc));
diff --git a/osaf/services/saf/smfsv/smfd/smfd_campaign_oi.cc 
b/osaf/services/saf/smfsv/smfd/smfd_campaign_oi.cc
--- a/osaf/services/saf/smfsv/smfd/smfd_campaign_oi.cc
+++ b/osaf/services/saf/smfsv/smfd/smfd_campaign_oi.cc
@@ -72,6 +72,7 @@ static void saImmOiAdminOperationCallbac
  const SaImmAdminOperationParamsT_2 ** 
params)
 {
SaAisErrorT rc = SA_AIS_OK;
+   SmfImmUtils immutil;
 
TRACE_ENTER();
 
@@ -83,6 +84,16 @@ static void saImmOiAdminOperationCallbac
goto done;
}
 
+   //Read IMM configuration for long DNs and set cb data structure
+   //There is chance that long DN is configured in IMM not in SMF config 
object
+TRACE("2. %s: 
read_IMM_long_DN_config_and_set_control_block()",__FUNCTION__);
+if (!immutil.read_IMM_long_DN_config_and_set_control_block(smfd_cb)) {
+LOG_ER("read_IMM_long_DN_config_and_set_control_block FAIL");
+   (void)immutil_saImmOiAdminOperationResult(immOiHandle, 
invocation, SA_AIS_ERR_INVALID_PARAM);
+   goto done;
+}
+
+
/* Call admin operation and return result */
rc = campaign->adminOperation(opId, params);
 
@@ -898,7 +909,7 @@ uint32_t read_config_and_set_control_blo
 
//Read IMM configuration for long DNs and set cb data structure
 //The long DN info is configured in IMM not in SMF config object
-TRACE("3. %s: 
read_IMM_long_DN_config_and_set_control_block()",__FUNCTION__);
+TRACE("1. %s: 
read_IMM_long_DN_config_and_set_control_block()",__FUNCTION__);
if (!immutil.read_IMM_long_DN_config_and_set_control_block(cb)) {
LOG_ER("read_IMM_long_DN_config_and_set_control_block FAIL");
return NCSCC_RC_FAILURE;

--
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 of 1] smf:retry of Admin operation for TIMEOUT in si-swap to be avoided [#2069]

2016-09-28 Thread reddy . neelakanta
 osaf/services/saf/smfsv/smfd/SmfUpgradeProcedure.cc |  11 ++-
 1 files changed, 6 insertions(+), 5 deletions(-)


For the si-swap operation if TIMEOUT occurs the and the node is active the 
campaign will fail.
If the node is standby SmfCampaignThread::instance() will be terminated at 
Quiesced state, and nothing will be done.

diff --git a/osaf/services/saf/smfsv/smfd/SmfUpgradeProcedure.cc 
b/osaf/services/saf/smfsv/smfd/SmfUpgradeProcedure.cc
--- a/osaf/services/saf/smfsv/smfd/SmfUpgradeProcedure.cc
+++ b/osaf/services/saf/smfsv/smfd/SmfUpgradeProcedure.cc
@@ -4247,7 +4247,6 @@ SmfSwapThread::main(void)
int rc = admOp.execute(0);
while ((rc == SA_AIS_ERR_TRY_AGAIN) ||
   (rc == SA_AIS_ERR_BUSY) ||
-  (rc == SA_AIS_ERR_TIMEOUT) ||
   (rc == SA_AIS_ERR_FAILED_OPERATION)) {
 
 if (retryCnt > max_swap_retry) {
@@ -4255,12 +4254,11 @@ SmfSwapThread::main(void)
 goto exit_error;
 }
 
-if ((rc == SA_AIS_ERR_TIMEOUT) ||
-(rc == SA_AIS_ERR_FAILED_OPERATION)) {
-//A timeout or failed operation occur. It is undefined 
if the operation was successful or not.
+if (rc == SA_AIS_ERR_FAILED_OPERATION) {
+//A failed operation occur. It is undefined if the 
operation was successful or not.
 //We wait for maximum two minutes to see if the 
campaign thread is terminated (which it is in a successful swap)
 //If not terminated, retry the SWAP operation.
-LOG_NO("SA_AMF_ADMIN_SI_SWAP return SA_AIS_ERR_TIMEOUT 
or SA_AIS_ERR_FAILED_OPERATION [%d]. Wait for SmfCampaignThread to die, if not 
retry", rc);
+LOG_NO("SA_AMF_ADMIN_SI_SWAP return  
SA_AIS_ERR_FAILED_OPERATION [%d]. Wait for SmfCampaignThread to die, if not 
retry", rc);
 termCnt = 0;
 while (SmfCampaignThread::instance() != NULL) {
 if(termCnt >= 60) { //Wait for max 2 minutes 
(60 * 2 sec)
@@ -4271,6 +4269,8 @@ SmfSwapThread::main(void)
 osaf_nanosleep();
 termCnt++;
 }
+   goto exit_error;
+   
 } else { //SA_AIS_ERR_TRY_AGAIN or SA_AIS_ERR_BUSY
 LOG_NO("SA_AMF_ADMIN_SI_SWAP return 
SA_AIS_ERR_TRY_AGAIN or SA_AIS_ERR_BUSY [%d], wait 2 seconds and retry", rc);
 struct timespec sleepTime = { 2, 0 };
@@ -4284,6 +4284,7 @@ SmfSwapThread::main(void)
 if (rc != SA_AIS_OK) {
 //SA_AIS_ERR_LIBRARY, SA_AIS_ERR_BAD,_HANDLE SA_AIS_ERR_INIT, 
SA_AIS_ERR,_INVALID_PARAM, SA_AIS_ERR_NO_MEMORY
 //SA_AIS_ERR_NO_RESOURCES, SA_AIS_ERR_BAD_OPERATION, 
SA_AIS_ERR_NOT_EXIST, SA_AIS_ERR_EXIST, SA_AIS_ERR_UNAVAILABLE
+   //SA_AIS_ERR_TIMEOUT
 LOG_NO("Admin op SA_AMF_ADMIN_SI_SWAP fail [rc = %d]", rc);
 goto exit_error;
 }

--
___
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 smf:retry of Admin operation for TIMEOUT in si-swap to be avoided [#2069]

2016-09-28 Thread reddy . neelakanta
Summary: smf:retry of Admin operation for TIMEOUT in si-swap to be avoided 
[#2069]
Review request for Trac Ticket(s): 2069
Peer Reviewer(s): Lennart, Rafel
Affected branch(es): 5.0.x,5.1.x, 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 a2bf2350146e8ad02496a5df5157466dd025760d
Author: Neelakanta Reddy
Date:   Wed, 28 Sep 2016 12:15:34 +0530

smf:retry of Admin operation for TIMEOUT in si-swap to be avoided 
[#2069]

For the si-swap operation if TIMEOUT occurs the and the node is active 
the
campaign will fail. If the node is standby SmfCampaignThread::instance()
will be terminated at Quiesced state, and nothing will be done.


Complete diffstat:
--
 osaf/services/saf/smfsv/smfd/SmfUpgradeProcedure.cc |  11 ++-
 1 files changed, 6 insertions(+), 5 deletions(-)


Testing Commands:
-
when the camapign is ongoing, simulate a TIMEOUT for si-swap admin operation

Testing, Expected Results:
--
with this patch, retry of si-swap is not supported.

Conditions of Submission:
-
Ack from Reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


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


[devel] [PATCH 1 of 1] smf:retry for TIMEOUT in si-swap to be avoided [#2069]

2016-09-27 Thread reddy . neelakanta
 osaf/services/saf/smfsv/smfd/SmfUpgradeProcedure.cc |  4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)


diff --git a/osaf/services/saf/smfsv/smfd/SmfUpgradeProcedure.cc 
b/osaf/services/saf/smfsv/smfd/SmfUpgradeProcedure.cc
--- a/osaf/services/saf/smfsv/smfd/SmfUpgradeProcedure.cc
+++ b/osaf/services/saf/smfsv/smfd/SmfUpgradeProcedure.cc
@@ -4247,7 +4247,6 @@ SmfSwapThread::main(void)
int rc = admOp.execute(0);
while ((rc == SA_AIS_ERR_TRY_AGAIN) ||
   (rc == SA_AIS_ERR_BUSY) ||
-  (rc == SA_AIS_ERR_TIMEOUT) ||
   (rc == SA_AIS_ERR_FAILED_OPERATION)) {
 
 if (retryCnt > max_swap_retry) {
@@ -4255,8 +4254,7 @@ SmfSwapThread::main(void)
 goto exit_error;
 }
 
-if ((rc == SA_AIS_ERR_TIMEOUT) ||
-(rc == SA_AIS_ERR_FAILED_OPERATION)) {
+if (rc == SA_AIS_ERR_FAILED_OPERATION) {
 //A timeout or failed operation occur. It is undefined 
if the operation was successful or not.
 //We wait for maximum two minutes to see if the 
campaign thread is terminated (which it is in a successful swap)
 //If not terminated, retry the SWAP operation.

--
___
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 smf:retry for TIMEOUT in si-swap to be avoided [#2069]

2016-09-27 Thread reddy . neelakanta
Summary: smf:retry for TIMEOUT in si-swap to be avoided [#2069]
Review request for Trac Ticket(s): 2069
Peer Reviewer(s): Lennart, Rafel
Affected branch(es): 5.0.x, 5.1.x, default
Development branch: default


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):
-

changeset 9b4f8af155d0b863cbac45733baa5bdf6fc12ff8
Author: Neelakanta Reddy
Date:   Tue, 27 Sep 2016 12:46:13 +0530

smf:retry for TIMEOUT in si-swap to be avoided [#2069]


Complete diffstat:
--
 osaf/services/saf/smfsv/smfd/SmfUpgradeProcedure.cc |  4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)


Testing Commands:
-
if an si-swap adminoperation of SMF returns TIMEOUT, then re-try of si-swap has 
been removed.

Testing, Expected Results:
--
with this patch, retry of sis-wap has been removed. 

Conditions of Submission:
-
Ack from reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


--
___
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 imm:abort the uncommited ccbs when the implementer gracefully disconnects [#2056]

2016-09-26 Thread reddy . neelakanta
Summary: imm:abort the uncommited ccbs when the implementer gracefully 
disconnects[#2056]
Review request for Trac Ticket(s): 2056
Peer Reviewer(s): Zoran, Hung
Affected branch(es):Default, 5.1.x, 5.0.x 
Development branch:Default 


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):
-

changeset 908de35d0fd2f37a341b6a7e21f81d161037bedd
Author: Neelakanta Reddy
Date:   Mon, 26 Sep 2016 14:44:47 +0530

imm:abort the uncommited ccbs when the implementer gracefully 
disconnects
[#2056]


Complete diffstat:
--
 osaf/services/saf/immsv/immnd/ImmModel.cc  |  34 
+-
 osaf/services/saf/immsv/immnd/ImmModel.hh  |   4 +++-
 osaf/services/saf/immsv/immnd/immnd_evt.c  |  16 ++--
 osaf/services/saf/immsv/immnd/immnd_init.h |   3 ++-
 4 files changed, 44 insertions(+), 13 deletions(-)


Testing Commands:
-
As explained in the description of the ticket.

Testing, Expected Results:
--
with this patch, the ccbs must be aborted if implementer is gracefully 
disconnected

Conditions of Submission:
-
Ack from the reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


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


[devel] [PATCH 1 of 1] imm:abort the uncommited ccbs when the implementer gracefully disconnects [#2056]

2016-09-26 Thread reddy . neelakanta
 osaf/services/saf/immsv/immnd/ImmModel.cc  |  34 ++---
 osaf/services/saf/immsv/immnd/ImmModel.hh  |   4 ++-
 osaf/services/saf/immsv/immnd/immnd_evt.c  |  16 -
 osaf/services/saf/immsv/immnd/immnd_init.h |   3 +-
 4 files changed, 44 insertions(+), 13 deletions(-)


diff --git a/osaf/services/saf/immsv/immnd/ImmModel.cc 
b/osaf/services/saf/immsv/immnd/ImmModel.cc
--- a/osaf/services/saf/immsv/immnd/ImmModel.cc
+++ b/osaf/services/saf/immsv/immnd/ImmModel.cc
@@ -1899,10 +1899,27 @@ immModel_discardImplementer(IMMND_CB* cb
 
 SaAisErrorT
 immModel_implementerClear(IMMND_CB *cb, const struct ImmsvOiImplSetReq* req,
-SaUint32T implConn, SaUint32T implNodeId)
-{
-return ImmModel::instance(>immModel)->implementerClear(req, implConn,
-implNodeId);
+SaUint32T implConn, SaUint32T implNodeId, SaUint32T *globArrSize, 
SaUint32T** globccbIdArr)
+{
+SaAisErrorT err;
+ConnVector gv;
+ConnVector::iterator gvi;
+err = ImmModel::instance(>immModel)->implementerClear(req, implConn,
+implNodeId, gv, cb->mIsCoord);
+
+ if (globArrSize && globccbIdArr) {
+*globArrSize = (SaUint32T) gv.size();
+SaUint32T ix=0;
+if(*globArrSize) {
+*globccbIdArr = (SaUint32T *) malloc((*globArrSize)* 
sizeof(SaUint32T));
+for(gvi = gv.begin(); gvi!=gv.end(); ++gvi, ++ix) {
+   (*globccbIdArr)[ix] = (*gvi);
+   }
+}
+osafassert(ix==(*globArrSize));
+}
+
+return err;
 }
 
 SaAisErrorT
@@ -15594,11 +15611,10 @@ SaAisErrorT ImmModel::adminOwnerRelease(
  */
 SaAisErrorT
 ImmModel::implementerClear(const struct ImmsvOiImplSetReq* req,
-SaUint32T conn,
-unsigned int nodeId)
+SaUint32T conn, unsigned int nodeId,
+IdVector& gv,  bool isAtCoord)
 {
 SaAisErrorT err = SA_AIS_OK;
-ConnVector gv;
 TRACE_ENTER();
 
 ImplementerInfo* info = findImplementer(req->impl_id);
@@ -15607,7 +15623,7 @@ ImmModel::implementerClear(const struct 
 /* Sync is ongoing and we are a sync client.
Remember the death of the implementer. 
 */
-discardImplementer(req->impl_id, true, gv, false);
+discardImplementer(req->impl_id, true, gv, isAtCoord);
 goto done;
 }
 LOG_NO("ERR_BAD_HANDLE: Not a correct implementer handle? %llu id:%u", 
@@ -15620,7 +15636,7 @@ ImmModel::implementerClear(const struct 
 conn, nodeId);
 err = SA_AIS_ERR_BAD_HANDLE;
 } else {
-discardImplementer(req->impl_id, true, gv, false);
+discardImplementer(req->impl_id, true, gv, isAtCoord);
 }
 }
 
diff --git a/osaf/services/saf/immsv/immnd/ImmModel.hh 
b/osaf/services/saf/immsv/immnd/ImmModel.hh
--- a/osaf/services/saf/immsv/immnd/ImmModel.hh
+++ b/osaf/services/saf/immsv/immnd/ImmModel.hh
@@ -439,7 +439,9 @@ public:
 SaAisErrorT implementerClear(
  const struct ImmsvOiImplSetReq* req,
  SaUint32T con,
- unsigned int nodeId);
+ unsigned int nodeId,
+ IdVector& gv,
+ bool isAtCoord);
 
 SaAisErrorT rtObjectCreate(
struct ImmsvOmCcbObjectCreate* req,
diff --git a/osaf/services/saf/immsv/immnd/immnd_evt.c 
b/osaf/services/saf/immsv/immnd/immnd_evt.c
--- a/osaf/services/saf/immsv/immnd/immnd_evt.c
+++ b/osaf/services/saf/immsv/immnd/immnd_evt.c
@@ -9948,13 +9948,25 @@ static void immnd_evt_proc_impl_clr(IMMN
IMMND_IMM_CLIENT_NODE *cl_node = NULL;
SaAisErrorT err;
NCS_NODE_ID nodeId;
-   SaUint32T conn;
+   SaUint32T conn, globArrSize = 0;
+   SaUint32T * globIdArr = NULL;
 
osafassert(evt);
conn = m_IMMSV_UNPACK_HANDLE_HIGH(clnt_hdl);
nodeId = m_IMMSV_UNPACK_HANDLE_LOW(clnt_hdl);
 
-   err = immModel_implementerClear(cb, &(evt->info.implSet), 
(originatedAtThisNd) ? conn : 0, nodeId);
+   err = immModel_implementerClear(cb, &(evt->info.implSet), 
(originatedAtThisNd) ? conn : 0, nodeId, , );
+   if (err == SA_AIS_OK && globArrSize) {
+SaUint32T ix;
+for (ix = 0; ix < globArrSize; ++ix) {
+LOG_WA("Cleared implementer for id  %u, abort 
Non-critical ccbId %u which has "
+"cleared the implementer", 
evt->info.implSet.impl_id, globIdArr[ix]);
+immnd_proc_global_abort_ccb(cb, globIdArr[ix]);
+}
+free(globIdArr);
+globIdArr = NULL;
+globArrSize = 0;
+}
 
if (originatedAtThisNd) {   /*Send reply to client from this ND. */
immnd_client_node_get(cb, 

[devel] [PATCH 1 of 1] imm : updated Makefile to reflect README files [#2031]

2016-09-14 Thread reddy . neelakanta
 osaf/services/saf/immsv/Makefile.am |  8 +++-
 1 files changed, 7 insertions(+), 1 deletions(-)


diff --git a/osaf/services/saf/immsv/Makefile.am 
b/osaf/services/saf/immsv/Makefile.am
--- a/osaf/services/saf/immsv/Makefile.am
+++ b/osaf/services/saf/immsv/Makefile.am
@@ -18,6 +18,12 @@ include $(top_srcdir)/Makefile.common
 
 MAINTAINERCLEANFILES = Makefile.in
 
-EXTRA_DIST = README
+EXTRA_DIST = README \
+   README.2PBE \
+   README.ACCESS_CONTROL \
+   README.NO_DANGLING \
+   README.RESOURCE_DISPLAY \
+   README.SASTRINGT_API \
+   README.SC_ABSENCE
 
 SUBDIRS = config immd immnd immpbed immloadd

--
___
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 imm : updated Makefile to reflect README files [#2031]

2016-09-14 Thread reddy . neelakanta
Summary:imm : updated Makefile to reflect README files [#2031] 
Review request for Trac Ticket(s): 2031
Peer Reviewer(s): Anders, Zoran, Hung, Mathi
Affected branch(es): 5.0.x,5.1.x,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 f21c684edd9b1a2232f68cf4d0552607f95e8ed6
Author: Neelakanta Reddy
Date:   Wed, 14 Sep 2016 14:23:07 +0530

imm : updated Makefile to reflect README files [#2031]


Complete diffstat:
--
 osaf/services/saf/immsv/Makefile.am |  8 +++-
 1 files changed, 7 insertions(+), 1 deletions(-)


Testing Commands:
-


Testing, Expected Results:
--
when the OpenSAF source tar is built, README files are missing.

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.


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


[devel] [PATCH 1 of 1] imm:updated README for 5.1 [#2034]

2016-09-14 Thread reddy . neelakanta
 osaf/services/saf/immsv/README |  39 +++
 1 files changed, 39 insertions(+), 0 deletions(-)


diff --git a/osaf/services/saf/immsv/README b/osaf/services/saf/immsv/README
--- a/osaf/services/saf/immsv/README
+++ b/osaf/services/saf/immsv/README
@@ -2866,6 +2866,45 @@ IMMSV_MAX_CCBS 1
 
 The user can not configure the values less than the default values.
 
+Veteran max timeout is made cofigurable in case of sc Absence (5.1)
+===
+http://sourceforge.net/p/opensaf/tickets/1974/
+
+IMMSV_SC_ABSENCE_VETERAN_MAX_WAIT is the IMMD waits for veteran IMMNDs after 
sc absence.
+If IMMD processes the intro messages from new IMMNDs before the intro
+messages from veteran IMMNDs, IMM service will start to load from file
+instead of syncing data from veteran nodes. The 
IMMSV_SC_ABSENCE_VETERAN_MAX_WAIT
+will prevent that from happening.
+
+Note that during a fresh cluster startup, IMMD also waits for veteran IMMNDs.
+Setting this value to large will slow down the cluster startup.
+This timeout only used with sc absence enabled. When sc absence is disabled,
+IMMD will not wait for the veteran IMMNDs.
+
+The IMMSV_SC_ABSENCE_VETERAN_MAX_WAIT is present in immd.conf.
+The default value (when the environment variable is not set) is 3 seconds.
+
+export IMMSV_SC_ABSENCE_VETERAN_MAX_WAIT=3
+
+immcfg allows admin-owner in explicit commit mode (5.1)
+===
+https://sourceforge.net/p/opensaf/tickets/1383/
+
+immcfg in explicit commit mode, will not be able to set adminOwnerName.
+This enhancemnt removes the restriction.
+
+immcfg -o adminOwnerName.
+
+--ccb-apply and --ccb-abort will finalize the admin owner.
+if -o option is not specified default admin-owner is considered.
+
+immadm can explicitly set ReleaseOnFinalize (5.1)
+===
+https://sourceforge.net/p/opensaf/tickets/1937/
+
+with this enhancement immadm introduces a new flag '-r' for setting ROF 
(Release On Finalize) flag.
+The default value for ROF (when -r option is not specified) is SA_FALSE.
+
 Notes on upgrading from OpenSAF 5.0 to OpenSAF 5.1
 
 OpenSAF5.1 makes the IMM attributes as configurable (#195).

--
___
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 imm:updated README for 5.1 [#2034]

2016-09-14 Thread reddy . neelakanta
Summary: imm:updated README for 5.1 [#2034]
Review request for Trac Ticket(s): 2034
Peer Reviewer(s): Zoran, Hung
Affected branch(es):5.1.x, default 
Development branch: 


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 6d5664aaa5d4691c33fb951f5e230169ba249560
Author: Neelakanta Reddy
Date:   Wed, 14 Sep 2016 14:12:18 +0530

imm:updated README for 5.1 [#2034]


Complete diffstat:
--
 osaf/services/saf/immsv/README |  39 +++
 1 files changed, 39 insertions(+), 0 deletions(-)


Testing Commands:
-


Testing, Expected 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 ~/.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.


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


[devel] [PATCH 1 of 1] imm: return the correct error code for ERR_LIBRARY in saImmOiAugmentCcbInitialize [#1816]

2016-09-13 Thread reddy . neelakanta
 osaf/libs/agents/saf/imma/imma_oi_api.c |  1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


diff --git a/osaf/libs/agents/saf/imma/imma_oi_api.c 
b/osaf/libs/agents/saf/imma/imma_oi_api.c
--- a/osaf/libs/agents/saf/imma/imma_oi_api.c
+++ b/osaf/libs/agents/saf/imma/imma_oi_api.c
@@ -3755,6 +3755,7 @@ SaAisErrorT saImmOiAugmentCcbInitialize(
} else {
TRACE("ERR_LIBRARY: Error in library linkage. 
libSaImmOm.so is not linked");
rc = SA_AIS_ERR_LIBRARY;
+   goto done;
}
 
if(rc != SA_AIS_OK) {

--
___
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 imm: return the correct error code for ERR_LIBRARY in saImmOiAugmentCcbInitialize [#1816]

2016-09-13 Thread reddy . neelakanta
Summary:imm: return the correct error code for ERR_LIBRARY in 
saImmOiAugmentCcbInitialize [#1816] 
Review request for Trac Ticket(s): 1816
Peer Reviewer(s): Zoran, Hung
Affected branch(es): 4.7.x, 5.0.x,5.1.x, 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 319ecf60d66aa0e322cd6bbe5971271a2e0e982e
Author: Neelakanta Reddy
Date:   Tue, 13 Sep 2016 17:13:20 +0530

imm: return the correct error code for ERR_LIBRARY in
saImmOiAugmentCcbInitialize [#1816]


Complete diffstat:
--
 osaf/libs/agents/saf/imma/imma_oi_api.c |  1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


Testing Commands:
-
As explained in defect

Testing, Expected Results:
--
correct error code should be returned

Conditions of Submission:
-
Ack from Reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


--
___
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 imm:consider Active ccbs for maxccbs limit [#1994]

2016-09-13 Thread reddy . neelakanta
Summary:imm:consider Active ccbs for maxccbs limit [#1994] 
Review request for Trac Ticket(s): 1994
Peer Reviewer(s): Zoran, Hung
Affected branch(es): default, 5.1.x
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 693b0911c761a5910ef90a6d8d4b08ef896ba3bd
Author: Neelakanta Reddy
Date:   Tue, 13 Sep 2016 16:31:52 +0530

imm:consider Active ccbs for maxccbs limit [#1994]


Complete diffstat:
--
 osaf/services/saf/immsv/README |   6 ++
 osaf/services/saf/immsv/immnd/ImmModel.cc  |  38 
+++---
 osaf/services/saf/immsv/immnd/immnd_proc.c |   2 +-
 3 files changed, 38 insertions(+), 8 deletions(-)


Testing Commands:
-
create the ccbs in a loop

Testing, Expected Results:
--
If the maximum limit 1 Active ccbs are reached, then ERR_NO_RESOURCE will 
be returned.

Conditions of Submission:
-
Ack from reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


--
___
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 imm: Allow saImmOmCcbObjectRead in completed callback when ROF is set to false [#1956]

2016-08-19 Thread reddy . neelakanta
Summary:imm: Allow saImmOmCcbObjectRead in completed callback when ROF is set 
to false [#1956] 
Review request for Trac Ticket(s): 1956
Peer Reviewer(s): Zoran, Hung
Affected branch(es): 5.0.x,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 7b9decf345847844056ad14fa471e3068c08b33b
Author: Neelakanta Reddy
Date:   Fri, 19 Aug 2016 13:04:17 +0530

imm: Allow saImmOmCcbObjectRead in completed callback when ROF is set to
false [#1956]


Complete diffstat:
--
 osaf/libs/agents/saf/imma/imma_oi_api.c |  3 ++-
 osaf/services/saf/immsv/README  |  6 ++
 2 files changed, 8 insertions(+), 1 deletions(-)


Testing Commands:
-
Allow saImmOmCcbObjectRead in completed callback, with ROF flag set to false.

Testing, Expected Results:
--
saImmOmCcbObjectRead must succeed in completed callback

Conditions of Submission:
-
Ack from reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


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


[devel] [PATCH 1 of 1] imm: Allow saImmOmCcbObjectRead in completed callback when ROF is set to false [#1956]

2016-08-19 Thread reddy . neelakanta
 osaf/libs/agents/saf/imma/imma_oi_api.c |  3 ++-
 osaf/services/saf/immsv/README  |  6 ++
 2 files changed, 8 insertions(+), 1 deletions(-)


diff --git a/osaf/libs/agents/saf/imma/imma_oi_api.c 
b/osaf/libs/agents/saf/imma/imma_oi_api.c
--- a/osaf/libs/agents/saf/imma/imma_oi_api.c
+++ b/osaf/libs/agents/saf/imma/imma_oi_api.c
@@ -3587,7 +3587,8 @@ getAdmoName(SaImmHandleT privateOmHandle
 } else {
/* modify or delete => fetch admo attribute for object from server. 
*/
if((cbi->type != IMMA_CALLBACK_OI_CCB_DELETE) &&
-   (cbi->type != IMMA_CALLBACK_OI_CCB_MODIFY)) {
+   (cbi->type != IMMA_CALLBACK_OI_CCB_MODIFY) && 
+   (cbi->type != IMMA_CALLBACK_OI_CCB_COMPLETED)) {
LOG_ER("Inconsistency in callback type:%u", cbi->type);
abort();
}
diff --git a/osaf/services/saf/immsv/README b/osaf/services/saf/immsv/README
--- a/osaf/services/saf/immsv/README
+++ b/osaf/services/saf/immsv/README
@@ -2727,6 +2727,12 @@ The API works exactly the same way as sa
 
e) Safe read is not allowed using a runtime object as target.
 
+   f) saImmOiAugmentCcbInitialize is allowed in completed callback, but it 
should be
+  mainly used for calling saImmOmCcbObjectRead. After 
saImmOiAugmentCcbInitialize
+  succeeds object create/delete/modify will not be called  because ccb 
will not 
+  be in the state to execute the operations and ccb will be marked as 
abort.
+  After calling saImmOmCcbObjectRead, the augumentaion should be finalized.
+
 Runtime attributes residing in a config object are handled exactly the same as 
for
 saImmOmAccessorGet. The reason a safe-read call is not allowed on a runtime 
*object*
 is that a runtime object *only* contains runtime attributes. Performing a 
safe-read

--
___
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: setting of explcit admin-owner is allowed in explicit commit mode [#1383]

2016-07-28 Thread reddy . neelakanta
Summary:immtools: setting of explcit admin-owner is allowed in explicit commit 
mode [#1383] 
Review request for Trac Ticket(s): 1383
Peer Reviewer(s): Zoran, Hung
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 servicesy
 Core libraries  n
 Samples n
 Tests   n
 Other   n


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

changeset 40c31f0ec97636c9748967b264452559b0a52aed
Author: Neelakanta Reddy
Date:   Thu, 28 Jul 2016 16:01:57 +0530

immtools: setting of explcit admin-owner is allowed in explicit commit 
mode
[#1383]


Complete diffstat:
--
 osaf/tools/safimm/immcfg/imm_cfg.c |  46 
--
 1 files changed, 36 insertions(+), 10 deletions(-)


Testing Commands:
-
test the admin-owner name in explicit commit mode.
--ccb-apply and --ccb-abort will finalize the admin owner.
if -o option is not specifec default admin-owner is considered.

Testing, Expected Results:
--
Ack from Reviewers

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.


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


[devel] [PATCH 5 of 5] imm: updated README [#195]

2016-07-27 Thread reddy . neelakanta
 osaf/services/saf/immsv/README |  43 ++
 1 files changed, 43 insertions(+), 0 deletions(-)


diff --git a/osaf/services/saf/immsv/README b/osaf/services/saf/immsv/README
--- a/osaf/services/saf/immsv/README
+++ b/osaf/services/saf/immsv/README
@@ -2846,6 +2846,49 @@ been bound on the local node by the same
 Applier name continues to be shared between nodes, while object and class
 applier bindings are kept on the originating node.
 
+IMM Hardcoded limits as config parameters (5.1)
+===
+http://sourceforge.net/p/opensaf/tickets/195/
+
+The enhancemnets makes IMM limts configurable. The limits like maxClasses,
+maxImplementers, maxAdminowners and maxCcbs are allowed as configurable.
+The limits are added as attributes to the imm object 
+"opensafImm=opensafImm,safApp=safImmService".
+
+The default values configured for these attributes are :
+
+IMMSV_MAX_CLASSES 1000
+IMMSV_MAX_IMPLEMENTERS 3000
+IMMSV_MAX_ADMINOWNERS 2000
+IMMSV_MAX_CCBS 1
+
+The user can not configure the values less than the default values.
+
+Notes on upgrading from OpenSAF 5.0 to OpenSAF 5.1
+
+OpenSAF5.1 makes the IMM attributes as configurable (#195).
+During a rolling upgrade from an earlier OpenSAF release to the 5.1 
+release there will be nodes executing the older release concurrently
+with nodes executing OpenSAF 5.0. Nodes executing the earlier release will not
+recognize the new attributes introduced in imm config object from nodes 
executing 5.0.
+
+Because of this upgrade issue, the new attribute flag added in OpenSAF 5.1 is
+not allowed unless a flag is toggled on in the opensafImmNostdFlags runtime
+attribute in the object:
+
+   opensafImm=opensafImm,safApp=safImmService.
+
+The following shell command must be used once all nodes are upgraded :
+
+immadm -o 1 -p opensafImmNostdFlags:SA_UINT32_T:256 \
+   opensafImm=opensafImm,safApp=safImmService
+
+This will set bit 9 of the 'opensafImmNostdFlags' runtime attribute inside the 
immsv.
+Operation-id '1' invoked on the object:
+
+ 'opensafImm=opensafImm,safApp=safImmService'
+
+
 
 
 DEPENDENCIES

--
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 4 of 5] imm: Added the updated OpensafImm class [#195]

2016-07-27 Thread reddy . neelakanta
 tests/immsv/management/test_saImmOmAccessorGet_2.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/tests/immsv/management/test_saImmOmAccessorGet_2.c 
b/tests/immsv/management/test_saImmOmAccessorGet_2.c
--- a/tests/immsv/management/test_saImmOmAccessorGet_2.c
+++ b/tests/immsv/management/test_saImmOmAccessorGet_2.c
@@ -133,7 +133,7 @@ void saImmOmAccessorGet_2_04(void)
 rc = saImmOmAccessorGet_2(accessorHandle, , 
accessorGetConfigAttrsToken, );
 /* Verify the number of config attributes */
 cnt = print_SaImmAttrValuesT_2(attributes);
-assert(cnt == 8);
+assert(cnt == 12);
 test_validate(rc, SA_AIS_OK);
 safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK);
 }

--
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 5] Review Request for imm:Hardcoded limits are made into config parameters [#195]

2016-07-27 Thread reddy . neelakanta
Summary: Hardcoded limits are added as config parameters [#195]
Review request for Trac Ticket(s):195 
Peer Reviewer(s): Zoran, Hung
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 servicesy
 Core libraries  n
 Samples n
 Tests   n
 Other   n


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

changeset bd980ca7528061b3b8dac255d15b808871178526
Author: Neelakanta Reddy
Date:   Wed, 27 Jul 2016 13:48:35 +0530

imm: Remove the IMM limits checking in encoding and decoding [#195]

changeset f389fb5fc59a506fb4342ccd44f333c3b6296e8b
Author: Neelakanta Reddy
Date:   Wed, 27 Jul 2016 13:49:25 +0530

imm: Added new attributes to imm config class [#195]

changeset 157b4ec00ae677a693985353f6916195b2cfbcba
Author: Neelakanta Reddy
Date:   Wed, 27 Jul 2016 13:51:21 +0530

imm: Checking of Imm limits [#195]

changeset e95dcbb8b133eab87d7fc98346a94b29f01a8245
Author: Neelakanta Reddy
Date:   Wed, 27 Jul 2016 13:53:20 +0530

imm: Added the updated OpensafImm class [#195]

changeset 1059ddcaa88c7af100ab7f715894bda882802bd9
Author: Neelakanta Reddy
Date:   Wed, 27 Jul 2016 13:53:50 +0530

imm: updated README [#195]


Complete diffstat:
--
 osaf/libs/common/immsv/immsv_evt.c |   69 
---
 osaf/libs/common/immsv/include/immsv_api.h |9 
 osaf/services/saf/immsv/README |   43 +++
 osaf/services/saf/immsv/immloadd/imm_loader.cc |   28 +++-
 osaf/services/saf/immsv/immnd/ImmModel.cc  |  322 
++-
 osaf/services/saf/immsv/immnd/ImmModel.hh  |5 +-
 tests/immsv/management/test_saImmOmAccessorGet_2.c |2 +-
 7 files changed, 412 insertions(+), 66 deletions(-)


Testing Commands:
-
Test the maximum limits for each attribute.
Modify the attributes to a new value and test
Test while upgrading the node from 5.0 to default

Testing, Expected Results:
--
ERR_NO_RESOURCE or ERR_BAD_OPERATION is returned based on 
the verification against the results.

Conditions of Submission:
-
Ack from reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.hgrc file (i.e. username, email etc)

___ Your computer have a badly configured date and 

[devel] [PATCH 1 of 5] imm: Remove the IMM limits checking in encoding and decoding [#195]

2016-07-27 Thread reddy . neelakanta
 osaf/libs/common/immsv/immsv_evt.c |  69 +++--
 osaf/libs/common/immsv/include/immsv_api.h |   9 +++
 2 files changed, 18 insertions(+), 60 deletions(-)


diff --git a/osaf/libs/common/immsv/immsv_evt.c 
b/osaf/libs/common/immsv/immsv_evt.c
--- a/osaf/libs/common/immsv/immsv_evt.c
+++ b/osaf/libs/common/immsv/immsv_evt.c
@@ -30,11 +30,6 @@
 #include "osaf_extended_name.h"
 #include "saAis.h"
 
-#define IMMSV_MAX_CLASSES 1000
-#define IMMSV_MAX_IMPLEMENTERS 3000
-#define IMMSV_MAX_ADMINOWNERS 2000
-#define IMMSV_MAX_CCBS 1
-
 #define IMMSV_RSRV_SPACE_ASSERT(P,B,S) 
P=ncs_enc_reserve_space(B,S);osafassert(P)
 #define IMMSV_FLTN_SPACE_ASSERT(P,M,B,S) 
P=ncs_dec_flatten_space(B,M,S);osafassert(P)
 
@@ -820,7 +815,6 @@ static void immsv_evt_enc_class(NCS_UBAI
 
 static uint32_t immsv_evt_dec_class(NCS_UBAID *i_ub, IMMSV_CLASS_LIST **r)
 {
-   int depth = 1;
uint8_t c8;
 
do {
@@ -850,13 +844,7 @@ static uint32_t immsv_evt_dec_class(NCS_
ncs_dec_skip_space(i_ub, 1);
 
r = &((*r)->next);
-   ++depth;
-   } while (c8 && (depth < IMMSV_MAX_CLASSES));
-
-   if (depth >= IMMSV_MAX_CLASSES) {
-   LOG_ER("TOO MANY classes line: %u", __LINE__);
-   return NCSCC_RC_OUT_OF_MEM;
-   }
+   } while (c8);
 
return NCSCC_RC_SUCCESS;
 }
@@ -918,7 +906,6 @@ static void immsv_evt_enc_impl(NCS_UBAID
 
 static uint32_t immsv_evt_dec_impl(NCS_UBAID *i_ub, IMMSV_IMPL_LIST **q)
 {
-   int depth = 1;
uint8_t c8;
 
do {
@@ -950,13 +937,7 @@ static uint32_t immsv_evt_dec_impl(NCS_U
ncs_dec_skip_space(i_ub, 1);
 
q = &((*q)->next);
-   ++depth;
-   } while (c8 && (depth < IMMSV_MAX_IMPLEMENTERS));
-
-   if (depth >= IMMSV_MAX_IMPLEMENTERS) {
-   LOG_ER("TOO MANY implementers line:%u", __LINE__);
-   return NCSCC_RC_OUT_OF_MEM;
-   }
+   } while (c8);
 
return NCSCC_RC_SUCCESS;
 }
@@ -1015,7 +996,6 @@ static uint32_t immsv_evt_enc_admo(NCS_U
 
 static uint32_t immsv_evt_dec_admo(NCS_UBAID *i_ub, IMMSV_ADMO_LIST **p)
 {
-   int depth = 1;
uint8_t c8;
 
do {
@@ -1052,13 +1032,7 @@ static uint32_t immsv_evt_dec_admo(NCS_U
ncs_dec_skip_space(i_ub, 1);
 
p = &((*p)->next);
-   ++depth;
-   } while (c8 && (depth < IMMSV_MAX_ADMINOWNERS));
-
-   if (depth >= IMMSV_MAX_ADMINOWNERS) {
-   LOG_ER("TOO MANY Admin Owners");
-   return NCSCC_RC_OUT_OF_MEM;
-   }
+   } while (c8 );
 
return NCSCC_RC_SUCCESS;
 }
@@ -1791,61 +1765,38 @@ static uint32_t immsv_evt_enc_sublevels(
return immsv_evt_enc_name_list(o_ub, 
i_evt->info.immnd.info.admReq.objectNames);
} else if ((i_evt->info.immnd.type == 
IMMND_EVT_ND2ND_SYNC_FINALIZE) ||
(i_evt->info.immnd.type == 
IMMND_EVT_ND2ND_SYNC_FINALIZE_2)) {
-   int depth = 0;
uint8_t *p8;
 
IMMSV_ADMO_LIST *p = 
i_evt->info.immnd.info.finSync.adminOwners;
-   while (p && (depth < IMMSV_MAX_ADMINOWNERS)) {
+   while (p ) {
if (immsv_evt_enc_admo(o_ub, p) != 
NCSCC_RC_SUCCESS) {
return NCSCC_RC_OUT_OF_MEM;
}
p = p->next;
-   ++depth;
}
 
-   if (depth >= IMMSV_MAX_ADMINOWNERS) {
-   LOG_ER("TOO MANY admin owners line:%u", 
__LINE__);
-   return NCSCC_RC_OUT_OF_MEM;
-   }
-
-   depth = 0;
IMMSV_IMPL_LIST *q = 
i_evt->info.immnd.info.finSync.implementers;
 
-   while (q && (depth < IMMSV_MAX_IMPLEMENTERS)) {
+   while (q ) {
immsv_evt_enc_impl(o_ub, q);
q = q->next;
-   ++depth;
}
 
-   if (depth >= IMMSV_MAX_IMPLEMENTERS) {
-   LOG_ER("TOO MANY implementers line:%u", 
__LINE__);
-   return NCSCC_RC_OUT_OF_MEM;
-   }
-
-   depth = 0;
IMMSV_CLASS_LIST *r = 
i_evt->info.immnd.info.finSync.classes;
-   while (r && (depth < IMMSV_MAX_CLASSES)) {
+   while (r ) {
immsv_evt_enc_class(o_ub, r);
r = r->next;
-   ++depth;
-   }
-
-   if (depth >= IMMSV_MAX_CLASSES) {
-   LOG_ER("TOO MANY 

[devel] [PATCH 2 of 5] imm: Added new attributes to imm config class [#195]

2016-07-27 Thread reddy . neelakanta
 osaf/services/saf/immsv/immloadd/imm_loader.cc |  28 -
 1 files changed, 26 insertions(+), 2 deletions(-)


diff --git a/osaf/services/saf/immsv/immloadd/imm_loader.cc 
b/osaf/services/saf/immsv/immloadd/imm_loader.cc
--- a/osaf/services/saf/immsv/immloadd/imm_loader.cc
+++ b/osaf/services/saf/immsv/immloadd/imm_loader.cc
@@ -293,12 +293,16 @@ void opensafClassCreate(SaImmHandleT imm
 {
 SaAisErrorT err = SA_AIS_OK;
 int retries=0;
-SaImmAttrDefinitionT_2 d1, d2, d3, d4, d5, d6, d7, d8, d9;
+SaImmAttrDefinitionT_2 d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, 
d13;
 SaUint32T nost_flags_default = 0;
 SaUint32T batch_size_default = IMMSV_DEFAULT_MAX_SYNC_BATCH_SIZE;
 SaUint32T extended_names_enabled_default = 0;
 SaUint32T access_control_mode_default = IMM_ACCESS_CONTROL_MODE;
 SaUint32T absent_scs_allowed_default = 0;
+SaUint32T max_classes_default = 1000;
+SaUint32T max_implementers_default = 3000;
+SaUint32T max_adminOwners_default = 2000;
+SaUint32T max_ccbs_default = 1;
 
 d1.attrName = (char *) OPENSAF_IMM_ATTR_RDN;
 d1.attrValueType = SA_IMM_ATTR_SANAMET;
@@ -346,8 +350,28 @@ void opensafClassCreate(SaImmHandleT imm
 d9.attrFlags = SA_IMM_ATTR_RUNTIME | SA_IMM_ATTR_CACHED | 
SA_IMM_ATTR_PERSISTENT;
 d9.attrDefaultValue = _scs_allowed_default;
 
+d10.attrName = (char *) OPENSAF_IMMSV_MAX_CLASSES;
+d10.attrValueType = SA_IMM_ATTR_SAUINT32T;
+d10.attrFlags = SA_IMM_ATTR_CONFIG | SA_IMM_ATTR_WRITABLE;
+d10.attrDefaultValue = _classes_default;
+
+d11.attrName = (char *) OPENSAF_IMMSV_MAX_IMPLEMENTERS;
+d11.attrValueType = SA_IMM_ATTR_SAUINT32T;
+d11.attrFlags = SA_IMM_ATTR_CONFIG | SA_IMM_ATTR_WRITABLE;
+d11.attrDefaultValue = _implementers_default;
+
+d12.attrName = (char *) OPENSAF_IMMSV_MAX_ADMINOWNERS;
+d12.attrValueType = SA_IMM_ATTR_SAUINT32T;
+d12.attrFlags = SA_IMM_ATTR_CONFIG | SA_IMM_ATTR_WRITABLE;
+d12.attrDefaultValue = _adminOwners_default;
+
+d13.attrName = (char *) OPENSAF_IMMSV_MAX_CCBS;
+d13.attrValueType = SA_IMM_ATTR_SAUINT32T;
+d13.attrFlags = SA_IMM_ATTR_CONFIG | SA_IMM_ATTR_WRITABLE;
+d13.attrDefaultValue = _ccbs_default;
+
 const SaImmAttrDefinitionT_2* attrDefs[] =
-   {, , , , , , , , , 0};
+   {, , , , , , , , , , , , 
, 0};
 
 
 do {/* Create the class */

--
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 imm:send 2PBE preload information for controller IMMND [#1925]

2016-07-26 Thread reddy . neelakanta
Summary: imm:send 2PBE preload information for controller IMMND [#1925] 
Review request for Trac Ticket(s): 1925
Peer Reviewer(s): Zoran, Hung
Affected branch(es): 5.0.x, default
Development branch: default


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):
-

changeset 33aac51dbfa48cddcd4daa808a69d4015a3b7b95
Author: Neelakanta Reddy
Date:   Tue, 26 Jul 2016 16:46:00 +0530

imm:send 2PBE preload information for controller IMMND [#1925]

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.


Complete diffstat:
--
 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(-)


Testing Commands:
-
As explained in the description of the ticket

Testing, Expected Results:
--
start two contollers simoultaneously, 2PBE information must be sent by both 
controllers.

Conditions of Submission:
-
Ack from reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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

[devel] [PATCH 1 of 1] imm:send 2PBE preload information for controller IMMND [#1925]

2016-07-26 Thread reddy . neelakanta
 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.
+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. */
+}
+
 
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_evt(IM
TRACE_5("Process MDS EVT NCSMDS_RED_UP, my PID:%u", getpid());
if (cb->node_id != mds_info->node_id) {
MDS_DEST tmpDest = 0LL;
+   uint32_t immnd_remote_id = 0;
TRACE_5("Remote IMMD is UP.");
 
cb->immd_remote_id = 
immd_get_slot_and_subslot_id_from_node_id(mds_info->node_id);
@@ -2652,16 +2667,33 @@ static uint32_t immd_evt_proc_mds_evt(IM
 
node_info->isOnController = 
true;
TRACE_5("Located STDBY IMMND =  
%x node_id:%x",
-   
immd_get_slot_and_subslot_id_from_node_id(mds_info->node_id),
+   
immd_get_slot_and_subslot_id_from_node_id(mds_info->node_id),
mds_info->node_id);
-   immd_accept_node(cb, node_info, 
true, false); /* < Can not be sc-absence veteran if on sc. */
+   if(!cb->is_rem_immnd_up){
+   immd_accept_node(cb, 
node_info, true, false); /* < Can not be sc-absence veteran if on sc. */
+   } if (cb->is_rem_immnd_up && 
cb->mIs2Pbe){
+   immnd_remote_id = 
+
immd_get_slot_and_subslot_id_from_mds_dest(node_info->immnd_dest);
+   }
+   

[devel] [PATCH 1 of 1] smfd:check smfNodeBundleActCmd at the time of modification

2016-06-30 Thread reddy . neelakanta
 osaf/services/saf/smfsv/smfd/smfd_campaign_oi.cc |  3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)


smfd will crash when smfNodeBundleActCmd is set to NULL, because of strdup.

diff --git a/osaf/services/saf/smfsv/smfd/smfd_campaign_oi.cc 
b/osaf/services/saf/smfsv/smfd/smfd_campaign_oi.cc
--- a/osaf/services/saf/smfsv/smfd/smfd_campaign_oi.cc
+++ b/osaf/services/saf/smfsv/smfd/smfd_campaign_oi.cc
@@ -1165,6 +1165,9 @@ uint32_t read_config_and_set_control_blo
cb->adminOpTimeout = *adminOpTimeout;
cb->cliTimeout = *cliTimeout;
cb->rebootTimeout = *rebootTimeout;
+   if((smfNodeBundleActCmd != NULL) && (strcmp(smfNodeBundleActCmd,"") != 
0)) {
+cb->nodeBundleActCmd = strdup(smfNodeBundleActCmd);
+   }
cb->nodeBundleActCmd = strdup(smfNodeBundleActCmd);
cb->smfSiSwapSiName = strdup(smfSiSwapSiName);
cb->smfSiSwapMaxRetry = *smfSiSwapMaxRetry;

--
Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
___
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 smfd:check smfNodeBundleActCmd at the time of modification [#1903]

2016-06-30 Thread reddy . neelakanta
Summary:smfd:check smfNodeBundleActCmd at the time of modification [#1903] 
Review request for Trac Ticket(s): 1903
Peer Reviewer(s): Lennart, Rafael
Affected branch(es): 4.7.x, 5.0.x, 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 98c54fa4b5f4fe15362a4ef92f18ffe6bb25bb8e
Author: Neelakanta Reddy
Date:   Thu, 30 Jun 2016 16:13:10 +0530

smfd:check smfNodeBundleActCmd at the time of modification

smfd will crash when smfNodeBundleActCmd is set to NULL, because of 
strdup.


Complete diffstat:
--
 osaf/services/saf/smfsv/smfd/smfd_campaign_oi.cc |  3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)


Testing Commands:
-
As explained in the description of the ticket

Testing, Expected Results:
--
with this patch smfd should not crash

Conditions of Submission:
-
Ack from Reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


--
Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
___
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 smf: smfd must be thread safe when IMMND is restarted after the campaign start [#1878]

2016-06-14 Thread reddy . neelakanta
Summary: smf: smfd must be thread safe when IMMND is restarted after the 
campaign start [#1878]
Review request for Trac Ticket(s): 1878
Peer Reviewer(s): Lennart, Rafel, Mathi
Affected branch(es): 4.7.x, 5.0.x, default
Development branch: default


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):
-

changeset d0ca2da224c31059930f44038d7be20c10ed6ac4
Author: Neelakanta Reddy
Date:   Tue, 14 Jun 2016 16:48:30 +0530

smf: smfd must be thread safe when IMMND is restarted after the campaign
start [#1878]

mutex is introduced, when accessing IMM OI handle, between campaign 
thread
and main thread


Complete diffstat:
--
 osaf/services/saf/smfsv/smfd/smfd.h  |   4 
 osaf/services/saf/smfsv/smfd/smfd_campaign_oi.cc |  19 +--
 osaf/services/saf/smfsv/smfd/smfd_cb.h   |   1 +
 osaf/services/saf/smfsv/smfd/smfd_main.c |  86 
++
 4 files changed, 104 insertions(+), 6 deletions(-)


Testing Commands:
-
execute the camapaign and Kill IMMND in the active node

Testing, Expected Results:
--
with this patch SMFD should not assert

Conditions of Submission:
-
Ack from reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net

[devel] [PATCH 1 of 1] smf: smfd must be thread safe when IMMND is restarted after the campaign start [#1878]

2016-06-14 Thread reddy . neelakanta
 osaf/services/saf/smfsv/smfd/smfd.h  |   4 +
 osaf/services/saf/smfsv/smfd/smfd_campaign_oi.cc |  19 -
 osaf/services/saf/smfsv/smfd/smfd_cb.h   |   1 +
 osaf/services/saf/smfsv/smfd/smfd_main.c |  86 ++-
 4 files changed, 104 insertions(+), 6 deletions(-)


mutex is introduced, when accessing IMM OI handle, between campaign thread and 
main thread

diff --git a/osaf/services/saf/smfsv/smfd/smfd.h 
b/osaf/services/saf/smfsv/smfd/smfd.h
--- a/osaf/services/saf/smfsv/smfd/smfd.h
+++ b/osaf/services/saf/smfsv/smfd/smfd.h
@@ -98,6 +98,10 @@ extern "C" {
 
void smfd_cb_lock();
void smfd_cb_unlock();
+   void smfd_imm_lock();
+   void smfd_imm_unlock();
+   int smfd_imm_trylock();
+
 
 #ifdef __cplusplus
 }
diff --git a/osaf/services/saf/smfsv/smfd/smfd_campaign_oi.cc 
b/osaf/services/saf/smfsv/smfd/smfd_campaign_oi.cc
--- a/osaf/services/saf/smfsv/smfd/smfd_campaign_oi.cc
+++ b/osaf/services/saf/smfsv/smfd/smfd_campaign_oi.cc
@@ -743,11 +743,26 @@ uint32_t create_campaign_objects(smfd_cb
  */
 uint32_t updateImmAttr(const char *dn, SaImmAttrNameT attributeName, 
SaImmValueTypeT attrValueType, void *value)
 {
+   smfd_imm_lock();
SaAisErrorT rc = immutil_update_one_rattr(smfd_cb->campaignOiHandle, 
dn, attributeName, attrValueType, value);
+   smfd_imm_unlock();
+
if (rc != SA_AIS_OK) {
-   LOG_ER("updateImmAttr(): immutil_update_one_rattr FAILED, rc = 
%d, going to assert", (int)rc);
-   osafassert(0);
+   if (rc == SA_AIS_ERR_BAD_HANDLE){
+   /* If there is IMMND restart in the middle of campign, 
there is chance that
+*  the camiaign thread with Rt-update will get 
timeout, because the update
+*  has been sent to IMMND, before the reply is sent 
back to OI(SMFD) the IMMND
+*  is restarted and BAD_HANDLE is returned after API 
timout. 
+*/
+
+   LOG_WA("updateImmAttr(): immutil_update_one_rattr 
FAILED, rc = %d,"
+   "OI handle will be resurrected", 
(int)rc);
+   } else {
+   LOG_ER("updateImmAttr(): immutil_update_one_rattr 
FAILED, rc = %d, going to assert", (int)rc);
+   osafassert(0);
+   }
}
+
return NCSCC_RC_SUCCESS;
 }
 
diff --git a/osaf/services/saf/smfsv/smfd/smfd_cb.h 
b/osaf/services/saf/smfsv/smfd/smfd_cb.h
--- a/osaf/services/saf/smfsv/smfd/smfd_cb.h
+++ b/osaf/services/saf/smfsv/smfd/smfd_cb.h
@@ -68,6 +68,7 @@ typedef struct smfd_cb {
SMFD_SMFND_ADEST_INVID_MAP *smfnd_list; /* SMFNDs need to respond 
to the callback. */
uint32_t no_of_smfnd;
pthread_mutex_t lock; /* Used by smfd_cb_t 
lock/unlock functions */
+pthread_mutex_t imm_lock; /* Used when IMM OI handle 
is shared between campaign thread and main thread*/
uint32_t maxDnLength; /* Max DN length */
 uint32_t procExecutionMode;   /* Control the procedure 
execution modes
  SMF_STANDARD 0
diff --git a/osaf/services/saf/smfsv/smfd/smfd_main.c 
b/osaf/services/saf/smfsv/smfd/smfd_main.c
--- a/osaf/services/saf/smfsv/smfd/smfd_main.c
+++ b/osaf/services/saf/smfsv/smfd/smfd_main.c
@@ -96,6 +96,50 @@ void smfd_cb_unlock()
}
 }
 
+int smfd_imm_trylock()
+{
+   TRACE_ENTER();
+   int err ;
+
+   err = pthread_mutex_trylock(&(smfd_cb->imm_lock));
+   if (err != 0) {
+   if ( err == EBUSY ){
+   LOG_WA("Lock failed eith EBUSY pthread_mutex_trylock 
for imm %d", err);
+   return 1;
+   } else {
+   LOG_ER("Lock failed pthread_mutex_trylock for imm %d", 
err);
+   abort();
+   }
+   }
+   return 0;
+   TRACE_LEAVE();
+}
+
+void smfd_imm_lock()
+{
+   TRACE_ENTER();
+   int errno;
+
+   if (pthread_mutex_lock(&(smfd_cb->imm_lock)) != 0) {
+   LOG_ER("Lock failed pthread_mutex_lock for imm");
+   abort();
+   }
+   TRACE_LEAVE();
+}
+
+
+void smfd_imm_unlock()
+{
+   TRACE_ENTER();
+   if (pthread_mutex_unlock(&(smfd_cb->imm_lock)) != 0) {
+   LOG_ER("Unlock failed pthread_mutex_unlock for imm");
+   abort();
+   }
+   TRACE_LEAVE();
+}
+
+
+
 /
  * Name  : smfd_cb_init
  *
@@ -112,7 +156,7 @@ uint32_t smfd_cb_init(smfd_cb_t * smfd_c
 {
TRACE_ENTER();
 
-   pthread_mutexattr_t mutex_attr;
+   pthread_mutexattr_t mutex_attr, mutex_attr1;
 
smfd_cb->amfSelectionObject = -1;
smfd_cb->campaignSelectionObject = -1;
@@ -159,6 +203,28 @@ uint32_t 

Re: [devel] [PATCH 1 of 1] imm: fix memory leaks in immnd_introduceMe and immnd_evt_proc_imm_resurrect [#1840]

2016-05-20 Thread Reddy Neelakanta Reddy Peddavandla
Hi Zoran,

Reviewed the patch.
Ack.

/Neel.
- Original Message -
From: zoran.milinko...@ericsson.com
To: reddy.neelaka...@oracle.com
Cc: opensaf-devel@lists.sourceforge.net
Sent: Thursday, May 19, 2016 5:00:48 PM GMT +05:30 Chennai, Kolkata, Mumbai, 
New Delhi
Subject: [PATCH 1 of 1] imm: fix memory leaks in immnd_introduceMe and 
immnd_evt_proc_imm_resurrect [#1840]

 osaf/services/saf/immsv/immnd/immnd_evt.c  |  1 +
 osaf/services/saf/immsv/immnd/immnd_proc.c |  6 +-
 2 files changed, 6 insertions(+), 1 deletions(-)


The patch fixes memory leaks in immnd_introduceMe and 
immnd_evt_proc_imm_resurrect, and releases allocated memory.

diff --git a/osaf/services/saf/immsv/immnd/immnd_evt.c 
b/osaf/services/saf/immsv/immnd/immnd_evt.c
--- a/osaf/services/saf/immsv/immnd/immnd_evt.c
+++ b/osaf/services/saf/immsv/immnd/immnd_evt.c
@@ -,6 +,7 @@ static uint32_t immnd_evt_proc_imm_resur
 
 if(cb->node_id != nodeId) {
 LOG_ER("Rejecting OM client resurrect from wrong node! %x", nodeId);
+free(cl_node);
 error = SA_AIS_ERR_FAILED_OPERATION;
 goto agent_rsp;
 }
diff --git a/osaf/services/saf/immsv/immnd/immnd_proc.c 
b/osaf/services/saf/immsv/immnd/immnd_proc.c
--- a/osaf/services/saf/immsv/immnd/immnd_proc.c
+++ b/osaf/services/saf/immsv/immnd/immnd_proc.c
@@ -448,11 +448,15 @@ uint32_t immnd_introduceMe(IMMND_CB *cb)
}
 
if (!immnd_is_immd_up(cb)) {
-   return NCSCC_RC_FAILURE;
+   rc = NCSCC_RC_FAILURE;
+   goto error;
}
 
rc = immnd_mds_msg_send(cb, NCSMDS_SVC_ID_IMMD, cb->immd_mdest_id, 
_evt);
+
+error:
free(mdirDup);
+
return rc;
 }
 

--
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


[devel] [PATCH 1 of 1] imm:correcting log messages to syslog[#1796]

2016-04-29 Thread reddy . neelakanta
 osaf/services/saf/immsv/immd/immd_evt.c   |  2 +-
 osaf/services/saf/immsv/immnd/immnd_evt.c |  2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


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
@@ -604,8 +604,8 @@ static void immd_req_sync(IMMD_CB *cb, I
if (proc_rc != NCSCC_RC_SUCCESS) {
LOG_WA("Failed to send rqsync message err:%u to coord 
IMMND (%x)",
   proc_rc, node_info->immnd_key);
-   goto done;
}
+   goto done;
}
 
if (cb->is_rem_immnd_up && (cb->immd_remote_id == 
immd_get_slot_and_subslot_id_from_node_id(cb->immnd_coord))) {
diff --git a/osaf/services/saf/immsv/immnd/immnd_evt.c 
b/osaf/services/saf/immsv/immnd/immnd_evt.c
--- a/osaf/services/saf/immsv/immnd/immnd_evt.c
+++ b/osaf/services/saf/immsv/immnd/immnd_evt.c
@@ -9000,7 +9000,7 @@ static uint32_t immnd_evt_proc_intro_rsp
LOG_NO("Avoided canceling coord - SHOULD NOT 
GET HERE");
}
} else {
-   LOG_NO("SETTING COORD TO %u CLOUD PROTO", 
evt->info.ctrl.isCoord);
+   LOG_IN("SETTING COORD TO %u CLOUD PROTO", 
evt->info.ctrl.isCoord);
cb->mIsCoord = evt->info.ctrl.isCoord;
}
osafassert(!cb->mIsCoord || cb->mCanBeCoord);

--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
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 imm:correcting log messages to syslog[#1796]

2016-04-29 Thread reddy . neelakanta
Summary:imm:correcting log messages to syslog[#1796] 
Review request for Trac Ticket(s): 1796
Peer Reviewer(s): Zoran, Hung
Affected branch(es): 5.0.x, 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 ba6eedf192bf0c198e4a21a43987b6eb0332be08
Author: Neelakanta Reddy
Date:   Fri, 29 Apr 2016 16:38:36 +0530

imm:correcting log messages to syslog[#1796]


Complete diffstat:
--
 osaf/services/saf/immsv/immd/immd_evt.c   |  2 +-
 osaf/services/saf/immsv/immnd/immnd_evt.c |  2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


Testing Commands:
-


Testing, Expected Results:
--


Conditions of Submission:
-
Ack form Reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
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 msg : binding with asapi must be done after mds init [#1748]

2016-04-13 Thread reddy . neelakanta
Summary: msg : binding with asapi must be done after mds init [#1748]
Review request for Trac Ticket(s): 1748
Peer Reviewer(s): Anders, Ramesh, Mahesh
Affected branch(es): 4.5.x, default
Development branch: default


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):
-

changeset 3c3af72e97e44b0a791b95cfeebbaa9bdbe602b1
Author: Neelakanta Reddy
Date:   Wed, 13 Apr 2016 17:17:02 +0530

msg : binding with asapi must be done after mds init [#1748]

The problem was introduced with msg patch for #79


Complete diffstat:
--
 osaf/services/saf/mqsv/mqd/mqd_api.c |  8 
 1 files changed, 4 insertions(+), 4 deletions(-)


Testing Commands:
-
open the queue

Testing, Expected Results:
--
with this patch the mqd should not give any errors

Conditions of Submission:
-
Ack from Reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


[devel] [PATCH 1 of 1] msg : binding with asapi must be done after mds init [#1748]

2016-04-13 Thread reddy . neelakanta
 osaf/services/saf/mqsv/mqd/mqd_api.c |  8 
 1 files changed, 4 insertions(+), 4 deletions(-)


The problem was introduced with msg patch for  #79

diff --git a/osaf/services/saf/mqsv/mqd/mqd_api.c 
b/osaf/services/saf/mqsv/mqd/mqd_api.c
--- a/osaf/services/saf/mqsv/mqd/mqd_api.c
+++ b/osaf/services/saf/mqsv/mqd/mqd_api.c
@@ -234,10 +234,6 @@ static uint32_t mqd_lib_init(void)
 #endif
TRACE_1("saAmfComponentRegister Success");
 
-   /* Bind with ASAPi Layer */
-   mqd_asapi_bind(pMqd);
-   TRACE_1("Initialization Success");
-
/* start the AMF Health Check */
memset(, 0, sizeof(SaAmfHealthcheckKeyT));
health_key = getenv("MQSV_ENV_HEALTHCHECK_KEY");
@@ -350,6 +346,10 @@ uint32_t initialize_for_assignment(MQD_C
goto done;
}
 
+   /* Bind with ASAPi Layer */
+   mqd_asapi_bind(cb);
+   TRACE_1("Initialization Success");
+
cb->fully_initialized = true;
 done:
TRACE_LEAVE2("rc = %u", rc);

--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
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 imm: Remove the assertion when object is modified with 2PBE [#1716]

2016-04-05 Thread reddy . neelakanta
Summary: imm: Remove the assertion when object is modified with 2PBE [#1716]
Review request for Trac Ticket(s):1716
Peer Reviewer(s): Zoran, Hung
Affected branch(es): 5.0
Development branch: default


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):
-

changeset 97c4d0133f20da734a246357998760797b499474
Author: Neelakanta Reddy
Date:   Tue, 05 Apr 2016 18:38:35 +0530

imm: Remove the assertion when object is modified with 2PBE [#1716]


Complete diffstat:
--
 osaf/services/saf/immsv/immnd/immnd_evt.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)


Testing Commands:
-
2 controler nodes, with 2PBE configuration.
immcfg -a saAmfSGCompRestartMax=1000 safSg=NoRed,safApp=OpenSAF

Testing, Expected Results:
--
with this patch IMMND should not restart and modify operation must succeed

Conditions of Submission:
-
Ack from Reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


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


[devel] [PATCH 1 of 1] imm: Remove the assertion when object is modified with 2PBE [#1716]

2016-04-05 Thread reddy . neelakanta
 osaf/services/saf/immsv/immnd/immnd_evt.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)


diff --git a/osaf/services/saf/immsv/immnd/immnd_evt.c 
b/osaf/services/saf/immsv/immnd/immnd_evt.c
--- a/osaf/services/saf/immsv/immnd/immnd_evt.c
+++ b/osaf/services/saf/immsv/immnd/immnd_evt.c
@@ -6559,7 +6559,9 @@ static void immnd_evt_proc_object_modify

oi_cl_node->version.majorVersion == 0x2 &&
oi_cl_node->version.releaseCode 
== 'A') {
if (applConnArr[ix] == pbeApplierConn) 
{ /* Slave pbe */
-   
osafassert(canonicalizedAttrMod); /* Must already be built for primary pbe */
+   if(!canonicalizedAttrMod) { /* 
Must already be built for primary pbe */
+   canonicalizedAttrMod = 
immModel_canonicalizeAttrModification(cb, &(evt->info.objModify));   
+   }

send_evt.info.imma.info.objModify.attrMods = canonicalizedAttrMod;
} else {
if (!allWritableAttr) { /* 
Check if allWritableAttr is already built */

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


[devel] [PATCH 1 of 1] imm: honour return code when ncs_sel_obj_create is called in imm initialize [#1713]

2016-03-29 Thread reddy . neelakanta
 osaf/libs/agents/saf/imma/imma_init.c |  16 ++--
 1 files changed, 10 insertions(+), 6 deletions(-)


diff --git a/osaf/libs/agents/saf/imma/imma_init.c 
b/osaf/libs/agents/saf/imma/imma_init.c
--- a/osaf/libs/agents/saf/imma/imma_init.c
+++ b/osaf/libs/agents/saf/imma/imma_init.c
@@ -59,7 +59,7 @@ IMMA_CB imma_cb;
Code cloned from CkpSv. 
 **/
 
-static void imma_sync_with_immnd(IMMA_CB *cb)
+static uint32_t imma_sync_with_immnd(IMMA_CB *cb)
 {
TRACE_ENTER();
 
@@ -68,11 +68,13 @@ static void imma_sync_with_immnd(IMMA_CB
if (cb->is_immnd_up)
{
m_NCS_UNLOCK(>immnd_sync_lock,NCS_LOCK_WRITE);
-   return;
+   return NCSCC_RC_SUCCESS;
}
TRACE("Blocking first client");
cb->immnd_sync_awaited = true;
-   m_NCS_SEL_OBJ_CREATE(>immnd_sync_sel);
+   if(m_NCS_SEL_OBJ_CREATE(>immnd_sync_sel) != NCSCC_RC_SUCCESS){
+   return NCSCC_RC_FAILURE;
+   }
m_NCS_UNLOCK(>immnd_sync_lock,NCS_LOCK_WRITE);
 
/* Await indication from MDS saying IMMND is up */
@@ -88,7 +90,7 @@ static void imma_sync_with_immnd(IMMA_CB
m_NCS_UNLOCK(>immnd_sync_lock, NCS_LOCK_WRITE);
 
TRACE_LEAVE();
-   return;
+   return NCSCC_RC_SUCCESS;
 }
 
 
@@ -162,8 +164,10 @@ static uint32_t imma_create(NCSMDS_SVC_I
goto mds_reg_fail;
}
 
-   imma_sync_with_immnd(cb); /* Needed to prevent endless TRY_AGAIN loop
-for first 
client. */
+   if (imma_sync_with_immnd(cb) != NCSCC_RC_SUCCESS) {
+   /* Needed to prevent endless TRY_AGAIN loop for first client. 
*/ 
+   goto mds_reg_fail;
+   }
 
/* EDU initialisation ABT: Dont exactly know why we need this but... */
if (m_NCS_EDU_HDL_INIT(>edu_hdl) != NCSCC_RC_SUCCESS) {

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471=/4140
___
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 imm: honour return code when ncs_sel_obj_create is called in imm initialize [#1713]

2016-03-29 Thread reddy . neelakanta
Summary:imm: honour return code when ncs_sel_obj_create is called in imm 
initialize [#1713] 
Review request for Trac Ticket(s): 1713
Peer Reviewer(s): Zoran, Hung
Affected branch(es): 4.6.x, 4.7.x, 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 812ebf6a6fe564fa199d3abb72013a692ad9f65a
Author: Neelakanta Reddy
Date:   Tue, 29 Mar 2016 15:29:10 +0530

imm: honour return code when ncs_sel_obj_create is called in imm 
initialize
[#1713]


Complete diffstat:
--
 osaf/libs/agents/saf/imma/imma_init.c |  16 ++--
 1 files changed, 10 insertions(+), 6 deletions(-)


Testing Commands:
-
Hard to reproduce. Make the system fd exhaust

Testing, Expected Results:
--
with this patch apllication should not abort.

Conditions of Submission:
-
Ack from Reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471=/4140
___
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 imm: changing from system time to monotonic time [#1617]

2016-03-16 Thread reddy . neelakanta
Summary:imm: changing from system time to monotonic time [#1617] 
Review request for Trac Ticket(s): 1617
Peer Reviewer(s): Zoran, Anders, Hung
Affected branch(es): latest(5.0)
Development branch: latest


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):
-

changeset 6e89be2a550655417988c77be834e6dfe13349a6
Author: Neelakanta Reddy
Date:   Wed, 16 Mar 2016 12:59:21 +0530

imm: changing from system time to monotonic time [#1617]


Complete diffstat:
--
 osaf/libs/core/common/include/osaf_time.h|  20 
 osaf/services/saf/immsv/immnd/ImmModel.cc|  29 
-
 osaf/services/saf/immsv/immnd/ImmSearchOp.hh |   3 ++-
 osaf/services/saf/immsv/immnd/immnd_evt.c|   7 ---
 osaf/services/saf/immsv/immnd/immnd_proc.c   |   6 --
 5 files changed, 46 insertions(+), 19 deletions(-)


Testing Commands:
-
set, the OI timeout to a higher value and try to chnage the
system time.

Testing, Expected Results:
--
with this patch, the timeout should take number of seconds
that elapsed, rather than the sytem time seconds.

Conditions of Submission:
-
Ack from Reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


[devel] [PATCH 1 of 1] imm: changing from system time to monotonic time [#1617]

2016-03-16 Thread reddy . neelakanta
 osaf/libs/core/common/include/osaf_time.h|  20 +++
 osaf/services/saf/immsv/immnd/ImmModel.cc|  29 +++
 osaf/services/saf/immsv/immnd/ImmSearchOp.hh |   3 +-
 osaf/services/saf/immsv/immnd/immnd_evt.c|   7 +++--
 osaf/services/saf/immsv/immnd/immnd_proc.c   |   6 +++-
 5 files changed, 46 insertions(+), 19 deletions(-)


diff --git a/osaf/libs/core/common/include/osaf_time.h 
b/osaf/libs/core/common/include/osaf_time.h
--- a/osaf/libs/core/common/include/osaf_time.h
+++ b/osaf/libs/core/common/include/osaf_time.h
@@ -89,6 +89,18 @@ extern void osaf_nanosleep(const struct 
 static inline void osaf_clock_gettime(clockid_t i_clk_id,
struct timespec* o_ts);
 
+
+/**
+ * @brief Get the time in seconds
+ *
+ * This is a convenience function that behaves exactly like the POSIX function
+ * clock_gettime(3P), except that it will abort the process instead of 
returning
+ * an error code in case of a failure. The Output vlaue passed will be in 
seconds.
+ */
+static inline void osaf_clock_gettime_sec(clockid_t i_clk_id,
+time_t* o_t);
+
+
 /**
  * @brief Normalize a timespec structure.
  *
@@ -257,6 +269,14 @@ static inline void osaf_clock_gettime(cl
if (clock_gettime(i_clk_id, o_ts) != 0) osaf_abort(i_clk_id);
 }
 
+static inline void osaf_clock_gettime_sec(clockid_t i_clk_id,
+time_t* o_t)
+{
+   struct timespec o_ts;
+   if (clock_gettime(i_clk_id, _ts) != 0) osaf_abort(i_clk_id);
+   *o_t = o_ts.tv_sec;
+}
+
 static inline void osaf_normalize_timespec(const struct timespec* i_ts,
struct timespec* o_nrm)
 {
diff --git a/osaf/services/saf/immsv/immnd/ImmModel.cc 
b/osaf/services/saf/immsv/immnd/ImmModel.cc
--- a/osaf/services/saf/immsv/immnd/ImmModel.cc
+++ b/osaf/services/saf/immsv/immnd/ImmModel.cc
@@ -27,6 +27,7 @@
 #include "immnd.h"
 #include "osaf_unicode.h"
 #include "osaf_extended_name.h"
+#include "osaf_time.h"
 
 // Local types
 #define DEFAULT_TIMEOUT_SEC 6 /* Should be saImmOiTimeout in SaImmMngt */
@@ -44,8 +45,7 @@ struct ContinuationInfo2
 ContinuationInfo2():mCreateTime(0), mConn(0), mTimeout(0), mImplId(0){}
 ContinuationInfo2(SaUint32T conn, SaUint32T timeout):mConn(conn), 
mTimeout(timeout),
  mImplId(0)
-{mCreateTime = time(NULL);osafassert(mCreateTime >= ((time_t) 0));}
-
+ {osaf_clock_gettime_sec(CLOCK_MONOTONIC, 
);osafassert(mCreateTime >= ((time_t) 0));} 
 time_t  mCreateTime;
 SaUint32T mConn;
 SaUint32T mTimeout; //0=> no timeout. Otherwise timeout in SECONDS.
@@ -1121,7 +1121,8 @@ immModel_cleanTheBasement(IMMND_CB *cb,
 osafassert(ix==(*pbePrtoReqArrSize));
 }
 
-time_t now = time(NULL);
+time_t now;
+osaf_clock_gettime_sec(CLOCK_MONOTONIC, );
 osafassert(now >= ((time_t) 0));
 time_t nextSearch = 0;
 time_t opSearchTime;
@@ -5416,7 +5417,7 @@ ImmModel::ccbApply(SaUint32T ccbId,
 implAssoc->mWaitForImplAck = true; 
 implAssoc->mContinuationId = sLastContinuationId;/* 
incremented above */
 if(ccb->mWaitStartTime == 0) {
-ccb->mWaitStartTime = time(NULL);
+osaf_clock_gettime_sec(CLOCK_MONOTONIC, 
>mWaitStartTime);
 osafassert(ccb->mWaitStartTime >= ((time_t) 0));
 TRACE("Wait timer for completed started for ccb:%u", 
 ccb->mId);
@@ -6263,7 +6264,7 @@ ImmModel::ccbTerminate(SaUint32T ccbId)
 /*  Retain the ccb info to allow ccb result recovery. */
 
 if(ccb->mWaitStartTime == 0)  {
-ccb->mWaitStartTime = time(NULL); 
+osaf_clock_gettime_sec(CLOCK_MONOTONIC, >mWaitStartTime);
 osafassert(ccb->mWaitStartTime >= ((time_t) 0));
 TRACE_5("Ccb Wait-time for GC set. State: %u/%s", ccb->mState,
 (ccb->mState == IMM_CCB_COMMITTED)?"COMMITTED":
@@ -8037,7 +8038,7 @@ SaAisErrorT ImmModel::ccbObjectCreate(Im
 TRACE_5("THERE IS AN IMPLEMENTER %u conn:%u node:%x name:%s\n",
 object->mImplementer->mId, *implConn, *implNodeId,
 object->mImplementer->mImplementerName.c_str());
-ccb->mWaitStartTime = time(NULL);
+osaf_clock_gettime_sec(CLOCK_MONOTONIC, >mWaitStartTime);
 osafassert(ccb->mWaitStartTime >= ((time_t) 0));
 } else if(className == immMngtClass) {
 if(sImmNodeState == IMM_NODE_LOADING) {
@@ -9239,7 +9240,7 @@ ImmModel::ccbObjectModify(const ImmsvOmC
 object->mImplementer->mId, *implConn, *implNodeId,
 object->mImplementer->mImplementerName.c_str());
 
-ccb->mWaitStartTime = time(NULL);
+osaf_clock_gettime_sec(CLOCK_MONOTONIC, >mWaitStartTime);
 osafassert(ccb->mWaitStartTime >= ((time_t) 0));
 } else if(ccb->mCcbFlags & SA_IMM_CCB_REGISTERED_OI) {
 

[devel] [PATCH 1 of 1] immtool: immcfg allows creation and modification of multiple values for multi value attributes[#1626]

2016-01-27 Thread reddy . neelakanta
 osaf/tools/safimm/immcfg/imm_cfg.c |  161 
 1 files changed, 125 insertions(+), 36 deletions(-)


diff --git a/osaf/tools/safimm/immcfg/imm_cfg.c 
b/osaf/tools/safimm/immcfg/imm_cfg.c
--- a/osaf/tools/safimm/immcfg/imm_cfg.c
+++ b/osaf/tools/safimm/immcfg/imm_cfg.c
@@ -150,6 +150,10 @@ static void usage(const char *progname)
printf("\t\tchange one attribute for one object\n");
printf("\timmcfg -c SaAmfApplication -a saAmfAppType=Test 
safApp=myTestApp1\n");
printf("\t\tcreate one object setting one initialized attribute\n");
+   printf("\timmcfg -c class -a attrMulti=one -a attrMulti=two obj=1\n");
+   printf("\t\tcreate object with multiple values for MULTI_VALUE 
attribute\n");
+   printf("\timmcfg -a attrMulti=three -a attrMulti=four obj=1\n");
+   printf("\t\tModify object with multiple values for MULTI_VALUE 
attribute\n");
printf("\timmcfg -d safAmfNode=Node01,safAmfCluster=1\n");
printf("\t\tdelete one object\n");
printf("\timmcfg -d safAmfNode=Node01,safAmfCluster=1 
safAmfNode=Node02,safAmfCluster=1\n");
@@ -287,17 +291,39 @@ static void free_attr_values(SaImmAttrVa
 }
 
 static void free_attr_mod(SaImmAttrModificationT_2 *attrMod) {
+   int i;
if(attrMod) {
if(attrMod->modAttr.attrName)
free(attrMod->modAttr.attrName);
-   if(attrMod->modAttr.attrValues) {
-   free_attr_value(attrMod->modAttr.attrValueType, 
attrMod->modAttr.attrValues[0]);
-   free(attrMod->modAttr.attrValues);
+   for(i=0; i< attrMod->modAttr.attrValuesNumber;i++){
+   free_attr_value(attrMod->modAttr.attrValueType, 
attrMod->modAttr.attrValues[i]);
}
+   free(attrMod->modAttr.attrValues);
free(attrMod);
}
 }
 
+static SaAisErrorT get_attrValueType(SaImmAttrDefinitionT_2 **attrDefinitions, 
SaImmAttrNameT attrName, 
+   SaImmValueTypeT *attrValueType, SaImmAttrFlagsT * flags) {
+   if(!attrDefinitions || !attrName)
+   return SA_AIS_ERR_NOT_EXIST;
+
+   int i=0;
+   while(attrDefinitions[i]) {
+   if(!strcmp(attrDefinitions[i]->attrName, attrName)) {
+   if(attrValueType){
+   *attrValueType = 
attrDefinitions[i]->attrValueType;
+   if(flags){
+   *flags = attrDefinitions[i]->attrFlags;
+   }
+   }
+   return SA_AIS_OK;
+   }
+   i++;
+   }
+   return SA_AIS_ERR_NOT_EXIST;
+}
+
 /**
  * Alloc SaImmAttrModificationT_2 object and initialize its attributes from 
nameval (x=y)
  * @param objectName
@@ -305,7 +331,7 @@ static void free_attr_mod(SaImmAttrModif
  *
  * @return SaImmAttrModificationT_2*
  */
-static SaImmAttrModificationT_2 *new_attr_mod(const SaNameT *objectName, char 
*nameval)
+static SaImmAttrModificationT_2 *new_attr_mod(const SaNameT *objectName, char 
*nameval, SaImmAttrFlagsT * flags)
 {
int res = 0;
char *name = strdup(nameval);
@@ -314,11 +340,19 @@ static SaImmAttrModificationT_2 *new_att
SaImmClassNameT className;
SaAisErrorT error;
SaImmAttrModificationTypeT modType = SA_IMM_ATTR_VALUES_REPLACE;
+   SaImmClassCategoryT classCategory;
+SaImmAttrDefinitionT_2 **attrDefinitions = NULL;
 
className = 
object_info_get_class(osaf_extended_name_borrow(objectName));
if(!className) {
className = immutil_get_className(objectName);
}
+   
+   if((error = saImmOmClassDescriptionGet_2(immHandle, className, 
, )) != SA_AIS_OK) {
+   fprintf(stderr, "error - saImmOmClassDescriptionGet_2. FAILED: 
%s\n", saf_error(error));
+   goto done;
+   }
+
 
if (className == NULL) {
fprintf(stderr, "Object with DN '%s' does not exist\n", 
osaf_extended_name_borrow(objectName));
@@ -345,7 +379,7 @@ static SaImmAttrModificationT_2 *new_att
*value = '\0';
value++;
 
-   error = immutil_get_attrValueType(className, name, 
>modAttr.attrValueType);
+   error = get_attrValueType(attrDefinitions, name, 
>modAttr.attrValueType, flags);
if (error == SA_AIS_ERR_NOT_EXIST) {
fprintf(stderr, "Class '%s' does not exist\n", className);
res = -1;
@@ -358,6 +392,8 @@ static SaImmAttrModificationT_2 *new_att
goto done;
}
 
+   
+
attrMod->modType = modType;
attrMod->modAttr.attrName = name;
name = NULL;
@@ -384,26 +420,12 @@ static SaImmAttrModificationT_2 *new_att
attrMod = NULL;
}
}
+   if(attrDefinitions)
+   saImmOmClassDescriptionMemoryFree_2(immHandle, attrDefinitions);
+

[devel] [PATCH 0 of 1] Review Request for immtool: immcfg allows creation and modification of multiple values for multi value attributes[#1626] V3

2016-01-27 Thread reddy . neelakanta
Summary: immtool: immcfg allows creation and modification of multiple values 
for multi value attributes[#1626] V3
Review request for Trac Ticket(s): 1626
Peer Reviewer(s): zoran, Hung
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 6256665f908f73eddc1616aafbc6a9f48a62d2c6
Author: Neelakanta Reddy
Date:   Wed, 27 Jan 2016 17:09:57 +0600

immtool: immcfg allows creation and modification of multiple values for
multi value attributes[#1626]


Complete diffstat:
--
 osaf/tools/safimm/immcfg/imm_cfg.c |  161 
++
 1 files changed, 125 insertions(+), 36 deletions(-)


Testing Commands:
-
create/modify immcfg with mutilvalues for multivalue attribute

Testing, Expected Results:
--
with this patch immcfg should support create/modify of mutilvalues for 
multivalue attribute

Conditions of Submission:
-
Ack from Zoran, Hung

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.


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
___
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 immtool: immcfg allows creation and modification of multiple values for multi attributes[#1626]

2016-01-21 Thread reddy . neelakanta
Summary:immtool: immcfg allows creation and modification of multiple values for 
multi attributes[#1626] 
Review request for Trac Ticket(s): 1626
Peer Reviewer(s): Zoran, Hung
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 96f1729b3d6b38ac9eee4a98c0c4399409cccf07
Author: Neelakanta Reddy
Date:   Thu, 21 Jan 2016 16:09:29 +0600

immtool: immcfg allows creation and modification of multiple values for
multi attributes[#1626]


Complete diffstat:
--
 osaf/tools/safimm/immcfg/imm_cfg.c |  145 
++
 1 files changed, 112 insertions(+), 33 deletions(-)


Testing Commands:
-
Test the Creation and modification of  multiple values for multivalue 
attributes.

Testing, Expected Results:
--
immcfg must support Creation and modification of  multiple values for 
multivalue attribute.

Conditions of Submission:
-
Ack from Reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

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

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

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

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

___ You have a misconfigured ~/.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.


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


[devel] [PATCH 1 of 1] immtool: immcfg allows creation and modification of multiple values for multi attributes[#1626]

2016-01-21 Thread reddy . neelakanta
 osaf/tools/safimm/immcfg/imm_cfg.c |  145 
 1 files changed, 112 insertions(+), 33 deletions(-)


diff --git a/osaf/tools/safimm/immcfg/imm_cfg.c 
b/osaf/tools/safimm/immcfg/imm_cfg.c
--- a/osaf/tools/safimm/immcfg/imm_cfg.c
+++ b/osaf/tools/safimm/immcfg/imm_cfg.c
@@ -150,6 +150,10 @@ static void usage(const char *progname)
printf("\t\tchange one attribute for one object\n");
printf("\timmcfg -c SaAmfApplication -a saAmfAppType=Test 
safApp=myTestApp1\n");
printf("\t\tcreate one object setting one initialized attribute\n");
+   printf("\timmcfg -c class -a attrMulti=one -a attrMulti=two obj=1\n");
+   printf("\t\tcreate object with multiple values for MULTI_VALUE 
attribute\n");
+   printf("\timmcfg -a attrMulti=three -a attrMulti=four obj=1\n");
+   printf("\t\tModify object with multiple values for MULTI_VALUE 
attribute\n");
printf("\timmcfg -d safAmfNode=Node01,safAmfCluster=1\n");
printf("\t\tdelete one object\n");
printf("\timmcfg -d safAmfNode=Node01,safAmfCluster=1 
safAmfNode=Node02,safAmfCluster=1\n");
@@ -298,6 +302,27 @@ static void free_attr_mod(SaImmAttrModif
}
 }
 
+static SaAisErrorT get_attrValueType(SaImmAttrDefinitionT_2 **attrDefinitions, 
SaImmAttrNameT attrName, 
+   SaImmValueTypeT *attrValueType, SaImmAttrFlagsT * flags) {
+   if(!attrDefinitions || !attrName)
+   return SA_AIS_ERR_NOT_EXIST;
+
+   int i=0;
+   while(attrDefinitions[i]) {
+   if(!strcmp(attrDefinitions[i]->attrName, attrName)) {
+   if(attrValueType){
+   *attrValueType = 
attrDefinitions[i]->attrValueType;
+   if(flags){
+   *flags = attrDefinitions[i]->attrFlags;
+   }
+   }
+   return SA_AIS_OK;
+   }
+   i++;
+   }
+   return SA_AIS_ERR_NOT_EXIST;
+}
+
 /**
  * Alloc SaImmAttrModificationT_2 object and initialize its attributes from 
nameval (x=y)
  * @param objectName
@@ -305,7 +330,7 @@ static void free_attr_mod(SaImmAttrModif
  *
  * @return SaImmAttrModificationT_2*
  */
-static SaImmAttrModificationT_2 *new_attr_mod(const SaNameT *objectName, char 
*nameval)
+static SaImmAttrModificationT_2 *new_attr_mod(const SaNameT *objectName, char 
*nameval, SaImmAttrFlagsT * flags)
 {
int res = 0;
char *name = strdup(nameval);
@@ -314,11 +339,19 @@ static SaImmAttrModificationT_2 *new_att
SaImmClassNameT className;
SaAisErrorT error;
SaImmAttrModificationTypeT modType = SA_IMM_ATTR_VALUES_REPLACE;
+   SaImmClassCategoryT classCategory;
+SaImmAttrDefinitionT_2 **attrDefinitions = NULL;
 
className = 
object_info_get_class(osaf_extended_name_borrow(objectName));
if(!className) {
className = immutil_get_className(objectName);
}
+   
+   if((error = saImmOmClassDescriptionGet_2(immHandle, className, 
, )) != SA_AIS_OK) {
+   fprintf(stderr, "error - saImmOmClassDescriptionGet_2. FAILED: 
%s\n", saf_error(error));
+   goto done;
+   }
+
 
if (className == NULL) {
fprintf(stderr, "Object with DN '%s' does not exist\n", 
osaf_extended_name_borrow(objectName));
@@ -345,7 +378,7 @@ static SaImmAttrModificationT_2 *new_att
*value = '\0';
value++;
 
-   error = immutil_get_attrValueType(className, name, 
>modAttr.attrValueType);
+   error = get_attrValueType(attrDefinitions, name, 
>modAttr.attrValueType, flags);
if (error == SA_AIS_ERR_NOT_EXIST) {
fprintf(stderr, "Class '%s' does not exist\n", className);
res = -1;
@@ -358,6 +391,8 @@ static SaImmAttrModificationT_2 *new_att
goto done;
}
 
+   
+
attrMod->modType = modType;
attrMod->modAttr.attrName = name;
name = NULL;
@@ -384,26 +419,12 @@ static SaImmAttrModificationT_2 *new_att
attrMod = NULL;
}
}
+   if(attrDefinitions)
+   saImmOmClassDescriptionMemoryFree_2(immHandle, attrDefinitions);
+
return attrMod;
 }
 
-static SaAisErrorT get_attrValueType(SaImmAttrDefinitionT_2 **attrDefinitions, 
SaImmAttrNameT attrName, SaImmValueTypeT *attrValueType) {
-   if(!attrDefinitions || !attrName)
-   return SA_AIS_ERR_NOT_EXIST;
-
-   int i=0;
-   while(attrDefinitions[i]) {
-   if(!strcmp(attrDefinitions[i]->attrName, attrName)) {
-   if(attrValueType)
-   *attrValueType = 
attrDefinitions[i]->attrValueType;
-   return SA_AIS_OK;
-   }
-   i++;
-   }
-
-   return SA_AIS_ERR_NOT_EXIST;
-}
-
 /**
  * Alloc SaImmAttrValuesT_2 object and initialize its 

[devel] [PATCH 1 of 1] immtool: immcfg allows creation and modification of multiple values for multi attributes[#1626]

2016-01-21 Thread reddy . neelakanta
 osaf/tools/safimm/immcfg/imm_cfg.c |  158 
 1 files changed, 122 insertions(+), 36 deletions(-)


diff --git a/osaf/tools/safimm/immcfg/imm_cfg.c 
b/osaf/tools/safimm/immcfg/imm_cfg.c
--- a/osaf/tools/safimm/immcfg/imm_cfg.c
+++ b/osaf/tools/safimm/immcfg/imm_cfg.c
@@ -150,6 +150,10 @@ static void usage(const char *progname)
printf("\t\tchange one attribute for one object\n");
printf("\timmcfg -c SaAmfApplication -a saAmfAppType=Test 
safApp=myTestApp1\n");
printf("\t\tcreate one object setting one initialized attribute\n");
+   printf("\timmcfg -c class -a attrMulti=one -a attrMulti=two obj=1\n");
+   printf("\t\tcreate object with multiple values for MULTI_VALUE 
attribute\n");
+   printf("\timmcfg -a attrMulti=three -a attrMulti=four obj=1\n");
+   printf("\t\tModify object with multiple values for MULTI_VALUE 
attribute\n");
printf("\timmcfg -d safAmfNode=Node01,safAmfCluster=1\n");
printf("\t\tdelete one object\n");
printf("\timmcfg -d safAmfNode=Node01,safAmfCluster=1 
safAmfNode=Node02,safAmfCluster=1\n");
@@ -287,17 +291,39 @@ static void free_attr_values(SaImmAttrVa
 }
 
 static void free_attr_mod(SaImmAttrModificationT_2 *attrMod) {
+   int i;
if(attrMod) {
if(attrMod->modAttr.attrName)
free(attrMod->modAttr.attrName);
-   if(attrMod->modAttr.attrValues) {
-   free_attr_value(attrMod->modAttr.attrValueType, 
attrMod->modAttr.attrValues[0]);
-   free(attrMod->modAttr.attrValues);
+   for(i=0; i< attrMod->modAttr.attrValuesNumber;i++){
+   free_attr_value(attrMod->modAttr.attrValueType, 
attrMod->modAttr.attrValues[i]);
}
+   free(attrMod->modAttr.attrValues);
free(attrMod);
}
 }
 
+static SaAisErrorT get_attrValueType(SaImmAttrDefinitionT_2 **attrDefinitions, 
SaImmAttrNameT attrName, 
+   SaImmValueTypeT *attrValueType, SaImmAttrFlagsT * flags) {
+   if(!attrDefinitions || !attrName)
+   return SA_AIS_ERR_NOT_EXIST;
+
+   int i=0;
+   while(attrDefinitions[i]) {
+   if(!strcmp(attrDefinitions[i]->attrName, attrName)) {
+   if(attrValueType){
+   *attrValueType = 
attrDefinitions[i]->attrValueType;
+   if(flags){
+   *flags = attrDefinitions[i]->attrFlags;
+   }
+   }
+   return SA_AIS_OK;
+   }
+   i++;
+   }
+   return SA_AIS_ERR_NOT_EXIST;
+}
+
 /**
  * Alloc SaImmAttrModificationT_2 object and initialize its attributes from 
nameval (x=y)
  * @param objectName
@@ -305,7 +331,7 @@ static void free_attr_mod(SaImmAttrModif
  *
  * @return SaImmAttrModificationT_2*
  */
-static SaImmAttrModificationT_2 *new_attr_mod(const SaNameT *objectName, char 
*nameval)
+static SaImmAttrModificationT_2 *new_attr_mod(const SaNameT *objectName, char 
*nameval, SaImmAttrFlagsT * flags)
 {
int res = 0;
char *name = strdup(nameval);
@@ -314,11 +340,19 @@ static SaImmAttrModificationT_2 *new_att
SaImmClassNameT className;
SaAisErrorT error;
SaImmAttrModificationTypeT modType = SA_IMM_ATTR_VALUES_REPLACE;
+   SaImmClassCategoryT classCategory;
+SaImmAttrDefinitionT_2 **attrDefinitions = NULL;
 
className = 
object_info_get_class(osaf_extended_name_borrow(objectName));
if(!className) {
className = immutil_get_className(objectName);
}
+   
+   if((error = saImmOmClassDescriptionGet_2(immHandle, className, 
, )) != SA_AIS_OK) {
+   fprintf(stderr, "error - saImmOmClassDescriptionGet_2. FAILED: 
%s\n", saf_error(error));
+   goto done;
+   }
+
 
if (className == NULL) {
fprintf(stderr, "Object with DN '%s' does not exist\n", 
osaf_extended_name_borrow(objectName));
@@ -345,7 +379,7 @@ static SaImmAttrModificationT_2 *new_att
*value = '\0';
value++;
 
-   error = immutil_get_attrValueType(className, name, 
>modAttr.attrValueType);
+   error = get_attrValueType(attrDefinitions, name, 
>modAttr.attrValueType, flags);
if (error == SA_AIS_ERR_NOT_EXIST) {
fprintf(stderr, "Class '%s' does not exist\n", className);
res = -1;
@@ -358,6 +392,8 @@ static SaImmAttrModificationT_2 *new_att
goto done;
}
 
+   
+
attrMod->modType = modType;
attrMod->modAttr.attrName = name;
name = NULL;
@@ -384,26 +420,12 @@ static SaImmAttrModificationT_2 *new_att
attrMod = NULL;
}
}
+   if(attrDefinitions)
+   saImmOmClassDescriptionMemoryFree_2(immHandle, attrDefinitions);
+

[devel] [PATCH 0 of 1] Review Request for immtool: immcfg allows creation and modification of multiple values for multi attributes[#1626]

2016-01-21 Thread reddy . neelakanta
Summary: immtool: immcfg allows creation and modification of multiple values 
for multi attributes[#1626]
Review request for Trac Ticket(s): 1626
Peer Reviewer(s): zoran, hung
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 servicesy
 Core libraries  n
 Samples n
 Tests   n
 Other   n


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

changeset e6664829b56b44a2e42d7c54fe2d08d4bd4d0582
Author: Neelakanta Reddy
Date:   Fri, 22 Jan 2016 12:56:25 +0600

immtool: immcfg allows creation and modification of multiple values for
multi attributes[#1626]


Complete diffstat:
--
 osaf/tools/safimm/immcfg/imm_cfg.c |  158 
++
 1 files changed, 122 insertions(+), 36 deletions(-)


Testing Commands:
-
Test the Creation and modification of  multiple values for multivalue 
attributes.

Testing, Expected Results:
--
immcfg must support Creation and modification of  multiple values for 
multivalue attribute.

Conditions of Submission:
-
Ack from reviewers

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


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


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

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

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

___ Your patches do not have proper short+long header

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

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

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

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

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

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

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

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

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

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

___ You have giant attachments which should never have been sent;
Instead you should place your content in a public tree to be pulled.

___ You have too many commits attached to an e-mail; resend as threaded
commits, or place in a public tree for a pull.

___ You have resent this content multiple times without a clear indication
of what has changed between each re-send.

___ You have failed to adequately and individually address all of the
comments and change requests that were proposed in the initial review.

___ You have a misconfigured ~/.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.


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
___
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 immtool: immcfg allows creation of multiple values for multi attributesa[#1626]

2016-01-19 Thread reddy . neelakanta
Summary: immtool: immcfg allows creation of multiple values for multivalue 
attribute [ #1626]
Review request for Trac Ticket(s):1626 
Peer Reviewer(s): Zoran, Hung
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 servicesy
 Core libraries  n
 Samples n
 Tests   n
 Other   n


Comments (indicate scope for each "y" above):
-

changeset 7fb6bdb65431efef9f4c4ce2917ba3da3edfe280
Author: Neelakanta Reddy
Date:   Tue, 19 Jan 2016 17:29:47 +0600

immtool: immcfg allows creation of multiple values for multi
value attribute [#1626]


Complete diffstat:
--
 osaf/tools/safimm/immcfg/imm_cfg.c |  48 
+---
 1 files changed, 37 insertions(+), 11 deletions(-)


Testing Commands:
-
immcfg -c class -a attr="one" -a attr="two" rdn=0

Testing, Expected Results:
--
Creation of  multiple values for multivalue attribute must be supported.

Conditions of Submission:
-
Ack from Reviewers

Arch  Built StartedLinux distro
---
mipsn  n
mips64  n  n
x86 n  n
x86_64  y  y
powerpc n  n
powerpc64   n  n


Reviewer Checklist:
---
[Submitters: make sure that your review doesn't trigger any checkmarks!]


Your checkin has not passed review because (see checked entries):

___ Your RR template is generally incomplete; it has too many blank entries
that need proper data filled in.

___ You have failed to nominate the proper persons for review and push.

___ Your patches do not have proper short+long header

___ You have grammar/spelling in your header that is unacceptable.

___ You have exceeded a sensible line length in your headers/comments/text.

___ You have failed to put in a proper Trac Ticket # into your commits.

___ You have incorrectly put/left internal data in your comments/files
(i.e. internal bug tracking tool IDs, product names etc)

___ You have not given any evidence of testing beyond basic build tests.
Demonstrate some level of runtime or other sanity testing.

___ You have ^M present in some of your files. These have to be removed.

___ You have needlessly changed whitespace or added whitespace crimes
like trailing spaces, or spaces before tabs.

___ You have mixed real technical changes with whitespace and other
cosmetic code cleanup changes. These have to be separate commits.

___ You need to refactor your submission into logical chunks; there is
too much content into a single commit.

___ You have extraneous garbage in your review (merge commits etc)

___ You have giant attachments which should never have been sent;
Instead you should place your content in a public tree to be pulled.

___ You have too many commits attached to an e-mail; resend as threaded
commits, or place in a public tree for a pull.

___ You have resent this content multiple times without a clear indication
of what has changed between each re-send.

___ You have failed to adequately and individually address all of the
comments and change requests that were proposed in the initial review.

___ You have a misconfigured ~/.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.


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


  1   2   3   >