[tickets] [opensaf:tickets] #2424 amfnd: illegal memory access in avnd_comptype_delete()

2017-04-11 Thread Hoa Le



---

** [tickets:#2424] amfnd: illegal memory access in avnd_comptype_delete()**

**Status:** assigned
**Milestone:** 5.17.06
**Created:** Wed Apr 12, 2017 04:08 AM UTC by Hoa Le
**Last Updated:** Wed Apr 12, 2017 04:08 AM UTC
**Owner:** Hoa Le
**Attachments:**

- 
[bt_core.1491307159.osafamfnd.428.PL-5](https://sourceforge.net/p/opensaf/tickets/2424/attachment/bt_core.1491307159.osafamfnd.428.PL-5)
 (12.3 kB; application/octet-stream)


There are some unsafe memory accesses in avnd_comptype_delete() function. This 
caused segfault as in attachment.

~~~
/src/amf/amfnd/compdb.cc

static amf_comp_type_t *avnd_comptype_create(SaImmHandleT immOmHandle, const 
std::string& dn)
{
int rc = -1;
...
if (amf_saImmOmAccessorGet_o2(immOmHandle, accessorHandle, dn, nullptr, 
(SaImmAttrValuesT_2 ***)) != SA_AIS_OK) {
LOG_ER("amf_saImmOmAccessorGet_o2 FAILED for '%s'", dn.c_str());
goto done;
}
...
 done:
if (rc != 0) {
avnd_comptype_delete(compt);
compt = nullptr;
}
...
}

static void avnd_comptype_delete(amf_comp_type_t *compt)
{
...
/* Free saAmfCtDefInstantiateCmdArgv[i] before freeing 
saAmfCtDefInstantiateCmdArgv */
arg_counter = 0;
while ((argv = compt->saAmfCtDefInstantiateCmdArgv[arg_counter++]) != 
nullptr)
...
}
~~~

In this case, compt->saAmfCtDefInstantiateCmdArgv was NULL, accessing to 
compt->saAmfCtDefInstantiateCmdArgv[arg_counter++]) caused a segmentation fault.



---

Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets


[tickets] [opensaf:tickets] #2420 imm: IMMND on PL hangs when headless

2017-04-11 Thread Hung Nguyen
- **status**: accepted --> review



---

** [tickets:#2420] imm: IMMND on PL hangs when headless**

**Status:** review
**Milestone:** 5.0.2
**Created:** Tue Apr 11, 2017 07:13 AM UTC by Hung Nguyen
**Last Updated:** Tue Apr 11, 2017 07:13 AM UTC
**Owner:** Hung Nguyen


IMMND on PL hangs at waitpid() after coordinator removal.

When pbe process is in D State (Uninterruptible sleep (usually IO)), waitpid() 
will be hung if WNOHANG is not specified.

~~~
LOG_WA("SC were absent and PBE appears hung, sending SIGKILL");
kill(cb->pbePid, SIGKILL);
waitpid(cb->pbePid, NULL, 0);
~~~
The bug is introduced by [#2296].

Solution: Use waitpid() with WNOHANG specified. Check for pbe/sync process 
exiting before sending introduce message during headless.


---

Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets


[tickets] [opensaf:tickets] #2423 rde: RDE sets the active role even if there is a node with the active role in a cluster

2017-04-11 Thread Zoran Milinkovic



---

** [tickets:#2423] rde: RDE sets the active role even if there is a node with 
the active role in a cluster**

**Status:** accepted
**Milestone:** 5.17.06
**Created:** Tue Apr 11, 2017 11:14 AM UTC by Zoran Milinkovic
**Last Updated:** Tue Apr 11, 2017 11:14 AM UTC
**Owner:** Zoran Milinkovic


When there is a late detection of an active node, the new node may acquire 
active role due to gap in time between request and response messages. RDE does 
not remember a role of nodes that sent a request, and it make problems for 
electing the second node with the active role.

2016-12-22 17:55:08 SC-2 osafrded[421]: NO Got peer info request from node 
0x2050f with role ACTIVE
2016-12-22 17:55:08 SC-2 osafrded[421]: NO Running 
'/usr/local/lib/opensaf/opensaf_sc_active' with 0 argument(s)
2016-12-22 17:55:08 SC-2 opensaf_sc_active: 
5c20d9c8-c867-11e6-a222-5254001c9220 expected on SC-1
2016-12-22 17:55:08 SC-2 osafrded[421]: NO Switched to ACTIVE from Undefined
2016-12-22 17:55:08 SC-2 osafrded[421]: NO Got peer info response from node 
0x2050f with role ACTIVE



---

Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets


[tickets] [opensaf:tickets] #2422 imm: ObjectMutation is added to sPbeRtMutations even when validation for duplicate values fails

2017-04-11 Thread Hung Nguyen



---

** [tickets:#2422] imm: ObjectMutation is added to sPbeRtMutations even when 
validation for duplicate values fails**

**Status:** assigned
**Milestone:** 5.0.2
**Created:** Tue Apr 11, 2017 10:15 AM UTC by Hung Nguyen
**Last Updated:** Tue Apr 11, 2017 10:15 AM UTC
**Owner:** Hung Nguyen
**Attachments:**

- 
[SC-1_log.7z](https://sourceforge.net/p/opensaf/tickets/2422/attachment/SC-1_log.7z)
 (23.3 kB; application/octet-stream)


~~~
# immlist -c Test

<< Test - CONFIG >>
test : SA_STRING_T [1] {RDN, CONFIG, INITIALIZED}
list : SA_UINT32_T [0..*] {RUNTIME, CACHED, PERSISTENT, MULTI_VALUE, 
NO_DUPLICATES}
~~~

Reproduce:
1. Create object
2. Add value=10 to 'list' attribute => SA_AIS_OK
3. Add value=10 to 'list' attribute => ERR_INVALID_PARAM
4. Add value=9 to 'list' attribute => ERR_TRY_AGAIN

PBE process is then killed by IMMND
~~~
17:08:09 SC-1 osafimmnd[441]: NO ERR_INVALID_PARAM: multivalued attr 'list' 
with NO_DUPLICATES yet duplicate values provided in rta-update call. 
Object:'test=1'.
17:08:09 SC-1 osafimmnd[441]: WA Got error on non local rt object update err: 7
17:08:19 SC-1 osafimmnd[441]: NO Implementer disconnected 9 <201, 2010f> 
(xhunngu)
17:08:24 SC-1 osafimmnd[441]: NO Implementer connected: 10 (xhunngu) <202, 
2010f>
17:08:34 SC-1 osafimmnd[441]: NO Implementer disconnected 10 <202, 2010f> 
(xhunngu)
17:10:10 SC-1 osafimmnd[441]: WA IMMND - Client 201 went down so no response
17:10:40 SC-1 osafimmnd[441]: WA PBE process 463 appears stuck on runtime data 
handling - sending SIGTERM
17:10:40 SC-1 osafimmpbed: NO IMM PBE received SIG_TERM, closing db handle
17:10:40 SC-1 osafimmpbed: IN IMM PBE process EXITING...
~~~

Attached is logs.





---

Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets


[tickets] [opensaf:tickets] #2354 amf: support amf tool command to know AMF cluster/nodes status.

2017-04-11 Thread Praveen
- **summary**: osaf: How to detect if payload is being in "SC Absence" mode. 
--> amf: support amf tool command to know AMF cluster/nodes status.
- **status**: unassigned --> accepted
- **assigned_to**: Praveen
- **Type**: discussion --> enhancement
- **Component**: osaf --> amf
- **Part**: - --> tools
- **Priority**: minor --> major
- **Comment**:

I think,  a  tool command and a callback is needed.

With tool command , a user can check status of nodes in cluster any time. Since 
both CLM and AMF have notion of nodes amd cluster, a user may want to know the 
status of CLM or AMF cluster. But this status is not just mere listing of 
nodes. This is already being done with currently supported utilities. The 
command should also consider OpenSAF status also.
For example: 
 During SCs Absence, amf-state siass list of SISUs for controllers also, but a 
user can not know that controllers are up or not with this.
 
 For callback, a user can not run tool command continuously to check whether 
controllers exist or not. Also calling some SAF API on payload in an 
application to know, based on its return status, whether host payload is in SC 
Absence mode or not is not a proper solution as  return code of API can have 
multiple interpretations. So there should be some callback also to inform 
application that this host payload has entered SC absence mode or has returned 
back to SC Presence mode.Application will subsribe for this callback,
 
I will send out a patch for amf cluster status and will see possiblity of a 
callback either in CLM or AMF. 



---

** [tickets:#2354] amf: support amf tool command to know AMF cluster/nodes 
status.**

**Status:** accepted
**Milestone:** future
**Created:** Wed Mar 08, 2017 07:28 AM UTC by Praveen
**Last Updated:** Wed Mar 08, 2017 07:28 AM UTC
**Owner:** Praveen


This discussion ticket is being raised based on a user list query dated March 
1st, 2017.
The query says:
 "We have enabled the new feature "SC Absence" of OpenSAF 5.x in our product, 
it works good so far.
 
 Now we need to make some actions when PLD go in/out "SC Absence" mode, we have 
to find a way in PLD to detect if it is being in "SC Absent" mode or not.
 So, does anyone knows how to make it by a utility/tool and C code(i.e. OpenSAF 
API) as well?
 "
 I think we do not have any API which can be used to query OpenSAF for knowing 
SC absence state.
MDS  up and down events of directors can be used to decide SC absence state as 
some agents are and node directors are using. But this will add lot of code in 
application.

Please update this ticket for a known or proposed solution. 



---

Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets