[Openais] Application using AMF hang when
sending saAmfHealthcheckConfirm...
Hans Feldt
Hans.Feldt at ericsson.com
Wed Sep 20 03:23:49 PDT 2006
For the "Framework-invoked" healthcheck type, the component should
respond with amfResponse only, not confirm also. See 6.1.2.2.
"Component-invoked" healthchecks are not supported yet. At least not
tested...
See testamf1.c
Regards,
Hans
Ola Lundqvist wrote:
> Hi
>
> The following code is used:
>
> void healthcheckCallback(SaInvocationT invocation,
> const SaNameT * componentName,
> SaAmfHealthcheckKeyT * healthCheckKey)
> {
> SaAisErrorT result;
> fprintf(stderr,"Healthcheck ");
> printSaName(componentName);
> fprintf(stderr, "\n");
> /* First send response */
> fprintf(stderr, " resp \n");
> result = _retrySaAmfResponse(saAmfHandle, invocation, SA_AIS_OK);
> if (result != SA_AIS_OK)
> {
> fprintf(stderr,"healthCheck respond error: response res is
> %d\n", result);
> return;
> }
> do {
> fprintf(stderr, " C\n");
> result = saAmfHealthcheckConfirm(saAmfHandle,
> componentName,
> healthCheckKey,
> SA_AIS_OK);
> if (result == SA_AIS_ERR_TRY_AGAIN) {
> fprintf(stderr,"%d: TRY_AGAIN received\n", getpid());
> usleep (100000);
> }
> } while (result == SA_AIS_ERR_TRY_AGAIN);
> if (result != SA_AIS_OK)
> {
> fprintf(stderr,"healthCheck confirm error: response res is
> %d\n", result);
> return;
> }
> fprintf(stderr, "healthCheck respond with ok (conf and response)\n");
> }
>
> I get the " C" printout but not the "healthCheck respond with ok" printout.
>
> So from what I can determine the saAmfHealthcheckConfirm hang the process.
>
> Then amf detect this and try to restart the process. However as it is
> stalled it can not restart it. I do not know why, more than it may not
> be able to restart it as it is stalled...
>
> Is there any known problems with this function. (I'm using trunk, and
> have also tried with 0.80.1 version).
>
> Regards,
>
> // Ola
>
More information about the Openais
mailing list